text
stringlengths
1
22.8M
```go // This file is part of go-ethereum. // // go-ethereum is free software: you can redistribute it and/or modify // (at your option) any later version. // // go-ethereum is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // along with go-ethereum. If not, see <path_to_url package main import ( "errors" "math" "math/big" "strings" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" math2 "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" ) // alethGenesisSpec represents the genesis specification format used by the // C++ Ethereum implementation. type alethGenesisSpec struct { SealEngine string `json:"sealEngine"` Params struct { AccountStartNonce math2.HexOrDecimal64 `json:"accountStartNonce"` MaximumExtraDataSize hexutil.Uint64 `json:"maximumExtraDataSize"` HomesteadForkBlock *hexutil.Big `json:"homesteadForkBlock,omitempty"` DaoHardforkBlock math2.HexOrDecimal64 `json:"daoHardforkBlock"` EIP150ForkBlock *hexutil.Big `json:"EIP150ForkBlock,omitempty"` EIP158ForkBlock *hexutil.Big `json:"EIP158ForkBlock,omitempty"` ByzantiumForkBlock *hexutil.Big `json:"byzantiumForkBlock,omitempty"` ConstantinopleForkBlock *hexutil.Big `json:"constantinopleForkBlock,omitempty"` ConstantinopleFixForkBlock *hexutil.Big `json:"constantinopleFixForkBlock,omitempty"` IstanbulForkBlock *hexutil.Big `json:"istanbulForkBlock,omitempty"` MinGasLimit hexutil.Uint64 `json:"minGasLimit"` MaxGasLimit hexutil.Uint64 `json:"maxGasLimit"` TieBreakingGas bool `json:"tieBreakingGas"` GasLimitBoundDivisor math2.HexOrDecimal64 `json:"gasLimitBoundDivisor"` MinimumDifficulty *hexutil.Big `json:"minimumDifficulty"` DifficultyBoundDivisor *math2.HexOrDecimal256 `json:"difficultyBoundDivisor"` DurationLimit *math2.HexOrDecimal256 `json:"durationLimit"` BlockReward *hexutil.Big `json:"blockReward"` NetworkID hexutil.Uint64 `json:"networkID"` ChainID hexutil.Uint64 `json:"chainID"` AllowFutureBlocks bool `json:"allowFutureBlocks"` } `json:"params"` Genesis struct { Nonce types.BlockNonce `json:"nonce"` Difficulty *hexutil.Big `json:"difficulty"` MixHash common.Hash `json:"mixHash"` Author common.Address `json:"author"` Timestamp hexutil.Uint64 `json:"timestamp"` ParentHash common.Hash `json:"parentHash"` ExtraData hexutil.Bytes `json:"extraData"` GasLimit hexutil.Uint64 `json:"gasLimit"` } `json:"genesis"` Accounts map[common.UnprefixedAddress]*alethGenesisSpecAccount `json:"accounts"` } // alethGenesisSpecAccount is the prefunded genesis account and/or precompiled // contract definition. type alethGenesisSpecAccount struct { Balance *math2.HexOrDecimal256 `json:"balance,omitempty"` Nonce uint64 `json:"nonce,omitempty"` Precompiled *alethGenesisSpecBuiltin `json:"precompiled,omitempty"` } // alethGenesisSpecBuiltin is the precompiled contract definition. type alethGenesisSpecBuiltin struct { Name string `json:"name,omitempty"` StartingBlock *hexutil.Big `json:"startingBlock,omitempty"` Linear *alethGenesisSpecLinearPricing `json:"linear,omitempty"` } type alethGenesisSpecLinearPricing struct { Base uint64 `json:"base"` Word uint64 `json:"word"` } // newAlethGenesisSpec converts a go-ethereum genesis block into a Aleth-specific // chain specification format. func newAlethGenesisSpec(network string, genesis *core.Genesis) (*alethGenesisSpec, error) { // Only ethash is currently supported between go-ethereum and aleth if genesis.Config.Ethash == nil { return nil, errors.New("unsupported consensus engine") } // Reconstruct the chain spec in Aleth format spec := &alethGenesisSpec{ SealEngine: "Ethash", } // Some defaults spec.Params.AccountStartNonce = 0 spec.Params.TieBreakingGas = false spec.Params.AllowFutureBlocks = false // Dao hardfork block is a special one. The fork block is listed as 0 in the // config but aleth will sync with ETC clients up until the actual dao hard // fork block. spec.Params.DaoHardforkBlock = 0 if num := genesis.Config.HomesteadBlock; num != nil { spec.Params.HomesteadForkBlock = (*hexutil.Big)(num) } if num := genesis.Config.EIP150Block; num != nil { spec.Params.EIP150ForkBlock = (*hexutil.Big)(num) } if num := genesis.Config.EIP158Block; num != nil { spec.Params.EIP158ForkBlock = (*hexutil.Big)(num) } if num := genesis.Config.ByzantiumBlock; num != nil { spec.Params.ByzantiumForkBlock = (*hexutil.Big)(num) } if num := genesis.Config.ConstantinopleBlock; num != nil { spec.Params.ConstantinopleForkBlock = (*hexutil.Big)(num) } if num := genesis.Config.PetersburgBlock; num != nil { spec.Params.ConstantinopleFixForkBlock = (*hexutil.Big)(num) } if num := genesis.Config.IstanbulBlock; num != nil { spec.Params.IstanbulForkBlock = (*hexutil.Big)(num) } spec.Params.NetworkID = (hexutil.Uint64)(genesis.Config.ChainID.Uint64()) spec.Params.ChainID = (hexutil.Uint64)(genesis.Config.ChainID.Uint64()) spec.Params.MaximumExtraDataSize = (hexutil.Uint64)(params.MaximumExtraDataSize) spec.Params.MinGasLimit = (hexutil.Uint64)(params.DefaultMinGasLimit) spec.Params.MaxGasLimit = (hexutil.Uint64)(math.MaxInt64) spec.Params.MinimumDifficulty = (*hexutil.Big)(params.MinimumDifficulty) spec.Params.DifficultyBoundDivisor = (*math2.HexOrDecimal256)(params.DifficultyBoundDivisor) spec.Params.GasLimitBoundDivisor = (math2.HexOrDecimal64)(params.GasLimitBoundDivisor) spec.Params.DurationLimit = (*math2.HexOrDecimal256)(params.DurationLimit) spec.Params.BlockReward = (*hexutil.Big)(ethash.FrontierBlockReward) spec.Genesis.Nonce = types.EncodeNonce(genesis.Nonce) spec.Genesis.MixHash = genesis.Mixhash spec.Genesis.Difficulty = (*hexutil.Big)(genesis.Difficulty) spec.Genesis.Author = genesis.Coinbase spec.Genesis.Timestamp = (hexutil.Uint64)(genesis.Timestamp) spec.Genesis.ParentHash = genesis.ParentHash spec.Genesis.ExtraData = genesis.ExtraData spec.Genesis.GasLimit = (hexutil.Uint64)(genesis.GasLimit) for address, account := range genesis.Alloc { spec.setAccount(address, account) } spec.setPrecompile(1, &alethGenesisSpecBuiltin{Name: "ecrecover", Linear: &alethGenesisSpecLinearPricing{Base: 3000}}) spec.setPrecompile(2, &alethGenesisSpecBuiltin{Name: "sha256", Linear: &alethGenesisSpecLinearPricing{Base: 60, Word: 12}}) spec.setPrecompile(3, &alethGenesisSpecBuiltin{Name: "ripemd160", Linear: &alethGenesisSpecLinearPricing{Base: 600, Word: 120}}) spec.setPrecompile(4, &alethGenesisSpecBuiltin{Name: "identity", Linear: &alethGenesisSpecLinearPricing{Base: 15, Word: 3}}) if genesis.Config.ByzantiumBlock != nil { spec.setPrecompile(5, &alethGenesisSpecBuiltin{Name: "modexp", StartingBlock: (*hexutil.Big)(genesis.Config.ByzantiumBlock)}) spec.setPrecompile(6, &alethGenesisSpecBuiltin{Name: "alt_bn128_G1_add", StartingBlock: (*hexutil.Big)(genesis.Config.ByzantiumBlock), Linear: &alethGenesisSpecLinearPricing{Base: 500}}) spec.setPrecompile(7, &alethGenesisSpecBuiltin{Name: "alt_bn128_G1_mul", StartingBlock: (*hexutil.Big)(genesis.Config.ByzantiumBlock), Linear: &alethGenesisSpecLinearPricing{Base: 40000}}) spec.setPrecompile(8, &alethGenesisSpecBuiltin{Name: "alt_bn128_pairing_product", StartingBlock: (*hexutil.Big)(genesis.Config.ByzantiumBlock)}) } if genesis.Config.IstanbulBlock != nil { if genesis.Config.ByzantiumBlock == nil { return nil, errors.New("invalid genesis, istanbul fork is enabled while byzantium is not") } spec.setPrecompile(6, &alethGenesisSpecBuiltin{ Name: "alt_bn128_G1_add", StartingBlock: (*hexutil.Big)(genesis.Config.ByzantiumBlock), }) // Aleth hardcoded the gas policy spec.setPrecompile(7, &alethGenesisSpecBuiltin{ Name: "alt_bn128_G1_mul", StartingBlock: (*hexutil.Big)(genesis.Config.ByzantiumBlock), }) // Aleth hardcoded the gas policy spec.setPrecompile(9, &alethGenesisSpecBuiltin{ Name: "blake2_compression", StartingBlock: (*hexutil.Big)(genesis.Config.IstanbulBlock), }) } return spec, nil } func (spec *alethGenesisSpec) setPrecompile(address byte, data *alethGenesisSpecBuiltin) { if spec.Accounts == nil { spec.Accounts = make(map[common.UnprefixedAddress]*alethGenesisSpecAccount) } addr := common.UnprefixedAddress(common.BytesToAddress([]byte{address})) if _, exist := spec.Accounts[addr]; !exist { spec.Accounts[addr] = &alethGenesisSpecAccount{} } spec.Accounts[addr].Precompiled = data } func (spec *alethGenesisSpec) setAccount(address common.Address, account core.GenesisAccount) { if spec.Accounts == nil { spec.Accounts = make(map[common.UnprefixedAddress]*alethGenesisSpecAccount) } a, exist := spec.Accounts[common.UnprefixedAddress(address)] if !exist { a = &alethGenesisSpecAccount{} spec.Accounts[common.UnprefixedAddress(address)] = a } a.Balance = (*math2.HexOrDecimal256)(account.Balance) a.Nonce = account.Nonce } // parityChainSpec is the chain specification format used by Parity. type parityChainSpec struct { Name string `json:"name"` Datadir string `json:"dataDir"` Engine struct { Ethash struct { Params struct { MinimumDifficulty *hexutil.Big `json:"minimumDifficulty"` DifficultyBoundDivisor *hexutil.Big `json:"difficultyBoundDivisor"` DurationLimit *hexutil.Big `json:"durationLimit"` BlockReward map[string]string `json:"blockReward"` DifficultyBombDelays map[string]string `json:"difficultyBombDelays"` HomesteadTransition hexutil.Uint64 `json:"homesteadTransition"` EIP100bTransition hexutil.Uint64 `json:"eip100bTransition"` } `json:"params"` } `json:"Ethash"` } `json:"engine"` Params struct { AccountStartNonce hexutil.Uint64 `json:"accountStartNonce"` MaximumExtraDataSize hexutil.Uint64 `json:"maximumExtraDataSize"` MinGasLimit hexutil.Uint64 `json:"minGasLimit"` GasLimitBoundDivisor math2.HexOrDecimal64 `json:"gasLimitBoundDivisor"` NetworkID hexutil.Uint64 `json:"networkID"` ChainID hexutil.Uint64 `json:"chainID"` MaxCodeSize hexutil.Uint64 `json:"maxCodeSize"` MaxCodeSizeTransition hexutil.Uint64 `json:"maxCodeSizeTransition"` EIP98Transition hexutil.Uint64 `json:"eip98Transition"` EIP150Transition hexutil.Uint64 `json:"eip150Transition"` EIP160Transition hexutil.Uint64 `json:"eip160Transition"` EIP161abcTransition hexutil.Uint64 `json:"eip161abcTransition"` EIP161dTransition hexutil.Uint64 `json:"eip161dTransition"` EIP155Transition hexutil.Uint64 `json:"eip155Transition"` EIP140Transition hexutil.Uint64 `json:"eip140Transition"` EIP211Transition hexutil.Uint64 `json:"eip211Transition"` EIP214Transition hexutil.Uint64 `json:"eip214Transition"` EIP658Transition hexutil.Uint64 `json:"eip658Transition"` EIP145Transition hexutil.Uint64 `json:"eip145Transition"` EIP1014Transition hexutil.Uint64 `json:"eip1014Transition"` EIP1052Transition hexutil.Uint64 `json:"eip1052Transition"` EIP1283Transition hexutil.Uint64 `json:"eip1283Transition"` EIP1283DisableTransition hexutil.Uint64 `json:"eip1283DisableTransition"` EIP1283ReenableTransition hexutil.Uint64 `json:"eip1283ReenableTransition"` EIP1344Transition hexutil.Uint64 `json:"eip1344Transition"` EIP1884Transition hexutil.Uint64 `json:"eip1884Transition"` EIP2028Transition hexutil.Uint64 `json:"eip2028Transition"` } `json:"params"` Genesis struct { Seal struct { Ethereum struct { Nonce types.BlockNonce `json:"nonce"` MixHash hexutil.Bytes `json:"mixHash"` } `json:"ethereum"` } `json:"seal"` Difficulty *hexutil.Big `json:"difficulty"` Author common.Address `json:"author"` Timestamp hexutil.Uint64 `json:"timestamp"` ParentHash common.Hash `json:"parentHash"` ExtraData hexutil.Bytes `json:"extraData"` GasLimit hexutil.Uint64 `json:"gasLimit"` } `json:"genesis"` Nodes []string `json:"nodes"` Accounts map[common.UnprefixedAddress]*parityChainSpecAccount `json:"accounts"` } // parityChainSpecAccount is the prefunded genesis account and/or precompiled // contract definition. type parityChainSpecAccount struct { Balance math2.HexOrDecimal256 `json:"balance"` Nonce math2.HexOrDecimal64 `json:"nonce,omitempty"` Builtin *parityChainSpecBuiltin `json:"builtin,omitempty"` } // parityChainSpecBuiltin is the precompiled contract definition. type parityChainSpecBuiltin struct { Name string `json:"name"` // Each builtin should has it own name Pricing interface{} `json:"pricing"` // Each builtin should has it own price strategy ActivateAt *hexutil.Big `json:"activate_at,omitempty"` // ActivateAt can't be omitted if empty, default means no fork } // parityChainSpecPricing represents the different pricing models that builtin // contracts might advertise using. type parityChainSpecPricing struct { Linear *parityChainSpecLinearPricing `json:"linear,omitempty"` ModExp *parityChainSpecModExpPricing `json:"modexp,omitempty"` // Before the path_to_url // Parity uses this format to config bn pairing price policy. AltBnPairing *parityChainSepcAltBnPairingPricing `json:"alt_bn128_pairing,omitempty"` // Blake2F is the price per round of Blake2 compression Blake2F *parityChainSpecBlakePricing `json:"blake2_f,omitempty"` } type parityChainSpecLinearPricing struct { Base uint64 `json:"base"` Word uint64 `json:"word"` } type parityChainSpecModExpPricing struct { Divisor uint64 `json:"divisor"` } // parityChainSpecAltBnConstOperationPricing defines the price // policy for bn const operation(used after istanbul) type parityChainSpecAltBnConstOperationPricing struct { Price uint64 `json:"price"` } // parityChainSepcAltBnPairingPricing defines the price policy // for bn pairing. type parityChainSepcAltBnPairingPricing struct { Base uint64 `json:"base"` Pair uint64 `json:"pair"` } // parityChainSpecBlakePricing defines the price policy for blake2 f // compression. type parityChainSpecBlakePricing struct { GasPerRound uint64 `json:"gas_per_round"` } type parityChainSpecAlternativePrice struct { AltBnConstOperationPrice *parityChainSpecAltBnConstOperationPricing `json:"alt_bn128_const_operations,omitempty"` AltBnPairingPrice *parityChainSepcAltBnPairingPricing `json:"alt_bn128_pairing,omitempty"` } // parityChainSpecVersionedPricing represents a single version price policy. type parityChainSpecVersionedPricing struct { Price *parityChainSpecAlternativePrice `json:"price,omitempty"` Info string `json:"info,omitempty"` } // newParityChainSpec converts a go-ethereum genesis block into a Parity specific // chain specification format. func newParityChainSpec(network string, genesis *core.Genesis, bootnodes []string) (*parityChainSpec, error) { // Only ethash is currently supported between go-ethereum and Parity if genesis.Config.Ethash == nil { return nil, errors.New("unsupported consensus engine") } // Reconstruct the chain spec in Parity's format spec := &parityChainSpec{ Name: network, Nodes: bootnodes, Datadir: strings.ToLower(network), } spec.Engine.Ethash.Params.BlockReward = make(map[string]string) spec.Engine.Ethash.Params.DifficultyBombDelays = make(map[string]string) // Frontier spec.Engine.Ethash.Params.MinimumDifficulty = (*hexutil.Big)(params.MinimumDifficulty) spec.Engine.Ethash.Params.DifficultyBoundDivisor = (*hexutil.Big)(params.DifficultyBoundDivisor) spec.Engine.Ethash.Params.DurationLimit = (*hexutil.Big)(params.DurationLimit) spec.Engine.Ethash.Params.BlockReward["0x0"] = hexutil.EncodeBig(ethash.FrontierBlockReward) // Homestead spec.Engine.Ethash.Params.HomesteadTransition = hexutil.Uint64(genesis.Config.HomesteadBlock.Uint64()) // Tangerine Whistle : 150 // path_to_url spec.Params.EIP150Transition = hexutil.Uint64(genesis.Config.EIP150Block.Uint64()) // Spurious Dragon: 155, 160, 161, 170 // path_to_url spec.Params.EIP155Transition = hexutil.Uint64(genesis.Config.EIP155Block.Uint64()) spec.Params.EIP160Transition = hexutil.Uint64(genesis.Config.EIP155Block.Uint64()) spec.Params.EIP161abcTransition = hexutil.Uint64(genesis.Config.EIP158Block.Uint64()) spec.Params.EIP161dTransition = hexutil.Uint64(genesis.Config.EIP158Block.Uint64()) // Byzantium if num := genesis.Config.ByzantiumBlock; num != nil { spec.setByzantium(num) } // Constantinople if num := genesis.Config.ConstantinopleBlock; num != nil { spec.setConstantinople(num) } // ConstantinopleFix (remove eip-1283) if num := genesis.Config.PetersburgBlock; num != nil { spec.setConstantinopleFix(num) } // Istanbul if num := genesis.Config.IstanbulBlock; num != nil { spec.setIstanbul(num) } spec.Params.MaximumExtraDataSize = (hexutil.Uint64)(params.MaximumExtraDataSize) spec.Params.MinGasLimit = (hexutil.Uint64)(params.DefaultMinGasLimit) spec.Params.GasLimitBoundDivisor = (math2.HexOrDecimal64)(params.GasLimitBoundDivisor) spec.Params.NetworkID = (hexutil.Uint64)(genesis.Config.ChainID.Uint64()) spec.Params.ChainID = (hexutil.Uint64)(genesis.Config.ChainID.Uint64()) spec.Params.MaxCodeSize = params.MaxCodeSize // geth has it set from zero spec.Params.MaxCodeSizeTransition = 0 // Disable this one spec.Params.EIP98Transition = math.MaxInt64 spec.Genesis.Seal.Ethereum.Nonce = types.EncodeNonce(genesis.Nonce) spec.Genesis.Seal.Ethereum.MixHash = genesis.Mixhash[:] spec.Genesis.Difficulty = (*hexutil.Big)(genesis.Difficulty) spec.Genesis.Author = genesis.Coinbase spec.Genesis.Timestamp = (hexutil.Uint64)(genesis.Timestamp) spec.Genesis.ParentHash = genesis.ParentHash spec.Genesis.ExtraData = genesis.ExtraData spec.Genesis.GasLimit = (hexutil.Uint64)(genesis.GasLimit) spec.Accounts = make(map[common.UnprefixedAddress]*parityChainSpecAccount) for address, account := range genesis.Alloc { bal := math2.HexOrDecimal256(*account.Balance) spec.Accounts[common.UnprefixedAddress(address)] = &parityChainSpecAccount{ Balance: bal, Nonce: math2.HexOrDecimal64(account.Nonce), } } spec.setPrecompile(1, &parityChainSpecBuiltin{Name: "ecrecover", Pricing: &parityChainSpecPricing{Linear: &parityChainSpecLinearPricing{Base: 3000}}}) spec.setPrecompile(2, &parityChainSpecBuiltin{ Name: "sha256", Pricing: &parityChainSpecPricing{Linear: &parityChainSpecLinearPricing{Base: 60, Word: 12}}, }) spec.setPrecompile(3, &parityChainSpecBuiltin{ Name: "ripemd160", Pricing: &parityChainSpecPricing{Linear: &parityChainSpecLinearPricing{Base: 600, Word: 120}}, }) spec.setPrecompile(4, &parityChainSpecBuiltin{ Name: "identity", Pricing: &parityChainSpecPricing{Linear: &parityChainSpecLinearPricing{Base: 15, Word: 3}}, }) if genesis.Config.ByzantiumBlock != nil { spec.setPrecompile(5, &parityChainSpecBuiltin{ Name: "modexp", ActivateAt: (*hexutil.Big)(genesis.Config.ByzantiumBlock), Pricing: &parityChainSpecPricing{ ModExp: &parityChainSpecModExpPricing{Divisor: 20}, }, }) spec.setPrecompile(6, &parityChainSpecBuiltin{ Name: "alt_bn128_add", ActivateAt: (*hexutil.Big)(genesis.Config.ByzantiumBlock), Pricing: &parityChainSpecPricing{ Linear: &parityChainSpecLinearPricing{Base: 500, Word: 0}, }, }) spec.setPrecompile(7, &parityChainSpecBuiltin{ Name: "alt_bn128_mul", ActivateAt: (*hexutil.Big)(genesis.Config.ByzantiumBlock), Pricing: &parityChainSpecPricing{ Linear: &parityChainSpecLinearPricing{Base: 40000, Word: 0}, }, }) spec.setPrecompile(8, &parityChainSpecBuiltin{ Name: "alt_bn128_pairing", ActivateAt: (*hexutil.Big)(genesis.Config.ByzantiumBlock), Pricing: &parityChainSpecPricing{ AltBnPairing: &parityChainSepcAltBnPairingPricing{Base: 100000, Pair: 80000}, }, }) } if genesis.Config.IstanbulBlock != nil { if genesis.Config.ByzantiumBlock == nil { return nil, errors.New("invalid genesis, istanbul fork is enabled while byzantium is not") } spec.setPrecompile(6, &parityChainSpecBuiltin{ Name: "alt_bn128_add", ActivateAt: (*hexutil.Big)(genesis.Config.ByzantiumBlock), Pricing: map[*hexutil.Big]*parityChainSpecVersionedPricing{ (*hexutil.Big)(big.NewInt(0)): { Price: &parityChainSpecAlternativePrice{ AltBnConstOperationPrice: &parityChainSpecAltBnConstOperationPricing{Price: 500}, }, }, (*hexutil.Big)(genesis.Config.IstanbulBlock): { Price: &parityChainSpecAlternativePrice{ AltBnConstOperationPrice: &parityChainSpecAltBnConstOperationPricing{Price: 150}, }, }, }, }) spec.setPrecompile(7, &parityChainSpecBuiltin{ Name: "alt_bn128_mul", ActivateAt: (*hexutil.Big)(genesis.Config.ByzantiumBlock), Pricing: map[*hexutil.Big]*parityChainSpecVersionedPricing{ (*hexutil.Big)(big.NewInt(0)): { Price: &parityChainSpecAlternativePrice{ AltBnConstOperationPrice: &parityChainSpecAltBnConstOperationPricing{Price: 40000}, }, }, (*hexutil.Big)(genesis.Config.IstanbulBlock): { Price: &parityChainSpecAlternativePrice{ AltBnConstOperationPrice: &parityChainSpecAltBnConstOperationPricing{Price: 6000}, }, }, }, }) spec.setPrecompile(8, &parityChainSpecBuiltin{ Name: "alt_bn128_pairing", ActivateAt: (*hexutil.Big)(genesis.Config.ByzantiumBlock), Pricing: map[*hexutil.Big]*parityChainSpecVersionedPricing{ (*hexutil.Big)(big.NewInt(0)): { Price: &parityChainSpecAlternativePrice{ AltBnPairingPrice: &parityChainSepcAltBnPairingPricing{Base: 100000, Pair: 80000}, }, }, (*hexutil.Big)(genesis.Config.IstanbulBlock): { Price: &parityChainSpecAlternativePrice{ AltBnPairingPrice: &parityChainSepcAltBnPairingPricing{Base: 45000, Pair: 34000}, }, }, }, }) spec.setPrecompile(9, &parityChainSpecBuiltin{ Name: "blake2_f", ActivateAt: (*hexutil.Big)(genesis.Config.IstanbulBlock), Pricing: &parityChainSpecPricing{ Blake2F: &parityChainSpecBlakePricing{GasPerRound: 1}, }, }) } return spec, nil } func (spec *parityChainSpec) setPrecompile(address byte, data *parityChainSpecBuiltin) { if spec.Accounts == nil { spec.Accounts = make(map[common.UnprefixedAddress]*parityChainSpecAccount) } a := common.UnprefixedAddress(common.BytesToAddress([]byte{address})) if _, exist := spec.Accounts[a]; !exist { spec.Accounts[a] = &parityChainSpecAccount{} } spec.Accounts[a].Builtin = data } func (spec *parityChainSpec) setByzantium(num *big.Int) { spec.Engine.Ethash.Params.BlockReward[hexutil.EncodeBig(num)] = hexutil.EncodeBig(ethash.ByzantiumBlockReward) spec.Engine.Ethash.Params.DifficultyBombDelays[hexutil.EncodeBig(num)] = hexutil.EncodeUint64(3000000) n := hexutil.Uint64(num.Uint64()) spec.Engine.Ethash.Params.EIP100bTransition = n spec.Params.EIP140Transition = n spec.Params.EIP211Transition = n spec.Params.EIP214Transition = n spec.Params.EIP658Transition = n } func (spec *parityChainSpec) setConstantinople(num *big.Int) { spec.Engine.Ethash.Params.BlockReward[hexutil.EncodeBig(num)] = hexutil.EncodeBig(ethash.ConstantinopleBlockReward) spec.Engine.Ethash.Params.DifficultyBombDelays[hexutil.EncodeBig(num)] = hexutil.EncodeUint64(2000000) n := hexutil.Uint64(num.Uint64()) spec.Params.EIP145Transition = n spec.Params.EIP1014Transition = n spec.Params.EIP1052Transition = n spec.Params.EIP1283Transition = n } func (spec *parityChainSpec) setConstantinopleFix(num *big.Int) { spec.Params.EIP1283DisableTransition = hexutil.Uint64(num.Uint64()) } func (spec *parityChainSpec) setIstanbul(num *big.Int) { spec.Params.EIP1344Transition = hexutil.Uint64(num.Uint64()) spec.Params.EIP1884Transition = hexutil.Uint64(num.Uint64()) spec.Params.EIP2028Transition = hexutil.Uint64(num.Uint64()) spec.Params.EIP1283ReenableTransition = hexutil.Uint64(num.Uint64()) } // pyEthereumGenesisSpec represents the genesis specification format used by the // Python Ethereum implementation. type pyEthereumGenesisSpec struct { Nonce types.BlockNonce `json:"nonce"` Timestamp hexutil.Uint64 `json:"timestamp"` ExtraData hexutil.Bytes `json:"extraData"` GasLimit hexutil.Uint64 `json:"gasLimit"` Difficulty *hexutil.Big `json:"difficulty"` Mixhash common.Hash `json:"mixhash"` Coinbase common.Address `json:"coinbase"` Alloc core.GenesisAlloc `json:"alloc"` ParentHash common.Hash `json:"parentHash"` } // newPyEthereumGenesisSpec converts a go-ethereum genesis block into a Parity specific // chain specification format. func newPyEthereumGenesisSpec(network string, genesis *core.Genesis) (*pyEthereumGenesisSpec, error) { // Only ethash is currently supported between go-ethereum and pyethereum if genesis.Config.Ethash == nil { return nil, errors.New("unsupported consensus engine") } spec := &pyEthereumGenesisSpec{ Nonce: types.EncodeNonce(genesis.Nonce), Timestamp: (hexutil.Uint64)(genesis.Timestamp), ExtraData: genesis.ExtraData, GasLimit: (hexutil.Uint64)(genesis.GasLimit), Difficulty: (*hexutil.Big)(genesis.Difficulty), Mixhash: genesis.Mixhash, Coinbase: genesis.Coinbase, Alloc: genesis.Alloc, ParentHash: genesis.ParentHash, } return spec, nil } ```
```c++ /* * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of Intel Corporation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include <stdlib.h> #include <new> #include "sgx_defs.h" #include "sgx_trts.h" #include "internal/util.h" SGX_WEAK void SGXAPI operator delete[] (void* ptr, size_t) { operator delete(ptr); } ```
Peter Diamand, CBE (8 June 191316 January 1998) was an arts administrator and director of the Edinburgh International Festival from 1965 to 1978. Diamand was born in Berlin on 8 June 1913, and educated there, but held Austrian nationality. In the early 1930s, being Jewish, he fled to Amsterdam to escape Nazism. While there, he worked as secretary to pianist Artur Schnabel. Diamand spent some time in a Dutch concentration camp before escaping. He and his mother needed to hide from the Nazis, in attics and other cramped places, with inadequate food. Schnabel's last student, pianist Maria Curcio, looked after them, at great risk and high cost to her own health and career. In 1947, they married. They divorced in 1971. He subsequently married American violinist, Sylvia Rosenberg. He appeared as a castaway on the BBC Radio programme Desert Island Discs on 15 August 1966, and was made an honorary Commander of the Order of the British Empire in 1972. He was also Artistic advisor for the Orchestre de Paris between 1976 and 1998. He was made Commander of the Ordre des Arts et des Lettres in February 1996. Diamand died in Amsterdam on 16 January 1998. References 1913 births 1998 deaths People from Berlin Commanders of the Order of the British Empire Arts administrators Austrian expatriates in the Netherlands Austrian expatriates in the United Kingdom Jewish emigrants from Nazi Germany to the United Kingdom Austrian Jews Edinburgh Festival Commandeurs of the Ordre des Arts et des Lettres
```go /* path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ // Code generated by informer-gen. DO NOT EDIT. package v1alpha3 import ( "context" time "time" resourcev1alpha3 "k8s.io/api/resource/v1alpha3" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" internalinterfaces "k8s.io/client-go/informers/internalinterfaces" kubernetes "k8s.io/client-go/kubernetes" v1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" cache "k8s.io/client-go/tools/cache" ) // ResourceClaimTemplateInformer provides access to a shared informer and lister for // ResourceClaimTemplates. type ResourceClaimTemplateInformer interface { Informer() cache.SharedIndexInformer Lister() v1alpha3.ResourceClaimTemplateLister } type resourceClaimTemplateInformer struct { factory internalinterfaces.SharedInformerFactory tweakListOptions internalinterfaces.TweakListOptionsFunc namespace string } // NewResourceClaimTemplateInformer constructs a new informer for ResourceClaimTemplate type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewResourceClaimTemplateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { return NewFilteredResourceClaimTemplateInformer(client, namespace, resyncPeriod, indexers, nil) } // NewFilteredResourceClaimTemplateInformer constructs a new informer for ResourceClaimTemplate type. // Always prefer using an informer factory to get a shared informer instead of getting an independent // one. This reduces memory footprint and number of connections to the server. func NewFilteredResourceClaimTemplateInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { return cache.NewSharedIndexInformer( &cache.ListWatch{ ListFunc: func(options v1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.ResourceV1alpha3().ResourceClaimTemplates(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } return client.ResourceV1alpha3().ResourceClaimTemplates(namespace).Watch(context.TODO(), options) }, }, &resourcev1alpha3.ResourceClaimTemplate{}, resyncPeriod, indexers, ) } func (f *resourceClaimTemplateInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { return NewFilteredResourceClaimTemplateInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) } func (f *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer { return f.factory.InformerFor(&resourcev1alpha3.ResourceClaimTemplate{}, f.defaultInformer) } func (f *resourceClaimTemplateInformer) Lister() v1alpha3.ResourceClaimTemplateLister { return v1alpha3.NewResourceClaimTemplateLister(f.Informer().GetIndexer()) } ```
Catocala kotschubeyi is a moth in the family Erebidae first described by Leo Sheljuzhko in 1927. It is found in the Russian Far East (southern Ussuri). References kotschubeyi Moths described in 1927 Moths of Asia
Giuseppe Lo Schiavo also known as GLOS is an Italian-born visual artist based in London. Lo Schiavo is an artist who combines technology, science, and popular culture in his art, using mediums such as video, photography, installation, AI, microorganisms and more. He draws inspiration from the past and reinterprets it through a digital lens, resulting in a unique fusion of old and new. Biography Giuseppe Lo Schiavo was born in Vibo Valentia, in the south of Italy. He has studied architecture at the Sapienza University of Rome and he is specialized in Architectural 3D Visualization. In 2023, Domus, a renowned publication, has described Giuseppe Lo Schiavo as "a prototype of the modern-day artist." Lo Schiavo introduced the term 'simulated photography' in September 2023 in an interview published by the Amsterdam-based newspaper Het Parool. This pioneering concept challenges traditional photography by embracing new methods of image creation, opening up exciting possibilities for a novel art form. 'Simulated photography' represents a novel approach to image creation that transcends conventional camera-based methods, paving the way for a transformative new art form. In February 2023 Lo Schiavo presented at CAFA Museum in Beijing the work Nike which is the largest resolution CGI artwork to date, with a resolution of 80.000 x 80.000 pixels showcasing Lo Schiavo's pioneering approach to pushing the boundaries of digital art. In 2022 Lo Schiavo signed the creative direction of the first published book illustrated by the AI tool Midjourney, authored by Paolo Stella and published by De Agostini. Giuseppe Lo Schiavo was the first winner of the European project BioArt Challenge organised by the Museum of Science MUSE with the support of Cardiff University, Zurich University of Applied Science, the University of Trento and the Museum of Science MUSE. In 2020 Giuseppe Lo Schiavo was the first artist to be invited for an artist in residence program in the microbiology lab of University College London UCL in London. Glos started his career as an artist in 2011 with his series Levitation that was published and exhibited internationally. His recent artistic research focuses on exploring human civilization, sociology and biology. He currently lives and works between Milan and London. Awards and exhibitions In 2021 Lo Schiavo is the winner of the European project BioArt Challenge organised by the Museum of Science MUSE. In 2020 Lo Schiavo was offered a one-year artist residence program at the university UCL in London in the Microbiology lab of the medical school. In 2019 Lo Schiavo was a tutor of History of Art at the Marangoni Institute in London that is part of Manchester Metropolitan University. In June 2015, Giuseppe Lo Schiavo was one of the youngest artists of the group exhibition Il blu nell'arte, da Yves Klein a Jan Fabre. presented at MACA museum in Acri, Cosenza where is work "narcissus" was exhibited together with artists such as Lucio Fontana, Yves Klein, Jan Fabre, Victor Vasarely, Mimmo Rotella, Mimmo Rotella, Raymond Hains, curated by Francesco Poli In April 2014 Lo Schiavo's gif 'Anamorphic Triangle' was presented at Saatchi Gallery in occasion of the Saatchi Gallery and Google Plus Motion Photography Prize Lo Schiavo's works were selected for the Portrait Salon 2013 that was presented in the UK and was featured on the BBC. In November 2013 he won the jury award on the Bonato Minella Awards in Turin , Italy. The award was conferred to Lo Schiavo by Vittorio Sgarbi. The works of Lo Schiavo have been featured in international magazine, radio and presented in various exhibitions of museums and art galleries in all over the world such as Saatchi Gallery in London, Aperture Foundation in New York, Museo Arte Contemporanea Acri in Cosenza, in Istanbul and in other galleries in Rome, Turin and Munich. References Living people 1986 births 21st-century Italian photographers People from Calabria People from the Province of Vibo Valentia 21st-century male artists
```swift // A structure to represent the information about a movie. // snippet-start:[ddb.swift.batchgetitem.movie] import Foundation import AWSDynamoDB // snippet-start:[ddb.swift.batchgetitem.info] /// The optional details about a movie. public struct Info: Codable { /// The movie's rating, if available. var rating: Double? /// The movie's plot, if available. var plot: String? } // snippet-end:[ddb.swift.batchgetitem.info] public struct Movie: Codable { /// The year in which the movie was released. var year: Int /// The movie's title. var title: String /// An `Info` object providing the optional movie rating and plot /// information. var info: Info // snippet-start:[ddb.swift.batchgetitem.movie.init] /// Create a `Movie` object representing a movie, given the movie's /// details. /// /// - Parameters: /// - title: The movie's title (`String`). /// - year: The year in which the movie was released (`Int`). /// - rating: The movie's rating (optional `Double`). /// - plot: The movie's plot (optional `String`). init(title: String, year: Int, rating: Double? = nil, plot: String? = nil) { self.title = title self.year = year self.info = Info(rating: rating, plot: plot) } // snippet-end:[ddb.swift.batchgetitem.movie.init] // snippet-start:[ddb.swift.batchgetitem.movie.init-info] /// Create a `Movie` object representing a movie, given the movie's /// details. /// /// - Parameters: /// - title: The movie's title (`String`). /// - year: The year in which the movie was released (`Int`). /// - info: The optional rating and plot information for the movie in an /// `Info` object. init(title: String, year: Int, info: Info?) { self.title = title self.year = year if info != nil { self.info = info! } else { self.info = Info(rating: nil, plot: nil) } } // snippet-end:[ddb.swift.batchgetitem.movie.init-info] // snippet-start:[ddb.swift.batchgetitem.movie.init-withitem] /// /// Return a new `MovieTable` object, given an array mapping string to Amazon /// DynamoDB attribute values. /// /// - Parameter item: The item information provided in the form used by /// DynamoDB. This is an array of strings mapped to /// `DynamoDBClientTypes.AttributeValue` values. init(withItem item: [Swift.String:DynamoDBClientTypes.AttributeValue]) throws { // Read the attributes. guard let titleAttr = item["title"], let yearAttr = item["year"] else { throw MovieError.ItemNotFound } let infoAttr = item["info"] ?? nil // Extract the values of the title and year attributes. if case .s(let titleVal) = titleAttr { self.title = titleVal } else { throw MovieError.InvalidAttributes } if case .n(let yearVal) = yearAttr { self.year = Int(yearVal)! } else { throw MovieError.InvalidAttributes } // Extract the rating and/or plot from the `info` attribute, if // they're present. var rating: Double? = nil var plot: String? = nil if case .m(let infoVal) = infoAttr { let ratingAttr = infoVal["rating"] ?? nil let plotAttr = infoVal["plot"] ?? nil if ratingAttr != nil, case .n(let ratingVal) = ratingAttr { rating = Double(ratingVal) ?? nil } if plotAttr != nil, case .s(let plotVal) = plotAttr { plot = plotVal } } self.info = Info(rating: rating, plot: plot) } // snippet-end:[ddb.swift.batchgetitem.movie.init-withitem] // snippet-start:[ddb.swift.batchgetitem.movie.getasitem] /// /// Return an array mapping attribute names to Amazon DynamoDB attribute /// values, representing the contents of the `Movie` record as a DynamoDB /// item. /// /// - Returns: The movie item as an array of type /// `[Swift.String:DynamoDBClientTypes.AttributeValue]`. /// func getAsItem() async throws -> [Swift.String:DynamoDBClientTypes.AttributeValue] { // Build the item record, starting with the year and title, which are // always present. var item: [Swift.String:DynamoDBClientTypes.AttributeValue] = [ "year": .n(String(self.year)), "title": .s(self.title) ] // Add the `info` field with the rating and/or plot if they're // available. var info: [Swift.String:DynamoDBClientTypes.AttributeValue] = [:] if self.info.rating != nil { info["rating"] = .n(String(self.info.rating!)) } if self.info.plot != nil { info["plot"] = .s(self.info.plot!) } item["info"] = .m(info) return item } // snippet-end:[ddb.swift.batchgetitem.movie.getasitem] } // snippet-end:[ddb.swift.batchgetitem.movie] ```
```makefile libavcodec/jpeglsdec.o: libavcodec/jpeglsdec.c libavcodec/avcodec.h \ libavutil/samplefmt.h libavutil/avutil.h libavutil/common.h \ libavutil/attributes.h libavutil/macros.h libavutil/version.h \ libavutil/avconfig.h config.h libavutil/intmath.h libavutil/mem.h \ libavutil/error.h libavutil/internal.h libavutil/timer.h libavutil/log.h \ libavutil/cpu.h libavutil/dict.h libavutil/pixfmt.h libavutil/libm.h \ libavutil/intfloat.h libavutil/mathematics.h libavutil/rational.h \ libavutil/attributes.h libavutil/avutil.h libavutil/buffer.h \ libavutil/cpu.h libavutil/channel_layout.h libavutil/dict.h \ libavutil/frame.h libavutil/buffer.h libavutil/samplefmt.h \ libavutil/log.h libavutil/pixfmt.h libavutil/rational.h \ libavcodec/version.h libavutil/version.h libavcodec/get_bits.h \ libavutil/common.h libavutil/intreadwrite.h libavutil/bswap.h \ libavutil/avassert.h libavcodec/mathops.h libavcodec/vlc.h \ libavcodec/golomb.h libavcodec/put_bits.h libavcodec/internal.h \ libavutil/mathematics.h libavcodec/mjpeg.h libavcodec/mjpegdec.h \ libavutil/pixdesc.h libavutil/stereo3d.h libavutil/frame.h \ libavcodec/blockdsp.h libavcodec/hpeldsp.h libavcodec/idctdsp.h \ libavcodec/jpegls.h libavcodec/jpeglsdec.h ```
```objective-c #pragma once #include <string> #include <vector> #include "envoy/common/exception.h" #include "source/common/common/assert.h" #include "source/common/common/regex.h" #include "source/common/singleton/const_singleton.h" namespace Envoy { namespace Config { bool doesTagNameValueMatchInvalidCharRegex(absl::string_view name); /** * Well-known address resolver names. */ class AddressResolverNameValues { public: // Basic IP resolver const std::string IP = "envoy.ip"; }; using AddressResolverNames = ConstSingleton<AddressResolverNameValues>; /** * Well-known metadata filter namespaces. */ class MetadataFilterValues { public: // Filter namespace for built-in load balancer. const std::string ENVOY_LB = "envoy.lb"; // Filter namespace for built-in transport socket match in cluster. const std::string ENVOY_TRANSPORT_SOCKET_MATCH = "envoy.transport_socket_match"; // Proxy address configuration namespace for HTTP/1.1 proxy transport sockets. const std::string ENVOY_HTTP11_PROXY_TRANSPORT_SOCKET_ADDR = "envoy.http11_proxy_transport_socket.proxy_address"; }; using MetadataFilters = ConstSingleton<MetadataFilterValues>; /** * Keys for MetadataFilterValues::ENVOY_LB metadata. */ class MetadataEnvoyLbKeyValues { public: // Key in envoy.lb filter namespace for endpoint canary bool value. const std::string CANARY = "canary"; // Key in envoy.lb filter namespace for the key to use to hash an endpoint. const std::string HASH_KEY = "hash_key"; // Key in envoy.lb filter namespace for providing fallback metadata const std::string FALLBACK_LIST = "fallback_list"; }; using MetadataEnvoyLbKeys = ConstSingleton<MetadataEnvoyLbKeyValues>; /** * Well known tags values and a mapping from these names to the regexes they * represent. Note: when names are added to the list, they also must be added to * the regex map by adding an entry in the getRegexMapping function. */ class TagNameValues { public: TagNameValues(); /** * Represents a tag extraction. This structure may be extended to * allow for an faster pattern-matching engine to be used as an * alternative to regexes, on an individual tag basis. Some of the * tags, such as "_rq_(\\d)xx$", will probably stay as regexes. */ struct Descriptor { const std::string name_; const std::string regex_; const std::string substr_; const std::string negative_match_; // A value that will not match as the extracted tag value. const Regex::Type re_type_; }; struct TokenizedDescriptor { const std::string name_; const std::string pattern_; }; // Cluster name tag const std::string CLUSTER_NAME = "envoy.cluster_name"; // Listener port tag const std::string LISTENER_ADDRESS = "envoy.listener_address"; // Stats prefix for HttpConnectionManager const std::string HTTP_CONN_MANAGER_PREFIX = "envoy.http_conn_manager_prefix"; // User agent for a connection const std::string HTTP_USER_AGENT = "envoy.http_user_agent"; // SSL cipher for a connection const std::string SSL_CIPHER = "envoy.ssl_cipher"; // SSL curve for a connection const std::string SSL_CURVE = "envoy.ssl_curve"; // SSL signature algorithm for a connection const std::string SSL_SIGALG = "envoy.ssl_sigalg"; // SSL version for a connection const std::string SSL_VERSION = "envoy.ssl_version"; // SSL cipher suite const std::string SSL_CIPHER_SUITE = "cipher_suite"; // Stats prefix for the Client SSL Auth network filter const std::string CLIENTSSL_PREFIX = "envoy.clientssl_prefix"; // Stats prefix for the Mongo Proxy network filter const std::string MONGO_PREFIX = "envoy.mongo_prefix"; // Request command for the Mongo Proxy network filter const std::string MONGO_CMD = "envoy.mongo_cmd"; // Request collection for the Mongo Proxy network filter const std::string MONGO_COLLECTION = "envoy.mongo_collection"; // Request callsite for the Mongo Proxy network filter const std::string MONGO_CALLSITE = "envoy.mongo_callsite"; // Stats prefix for the Ratelimit network filter const std::string RATELIMIT_PREFIX = "envoy.ratelimit_prefix"; // Stats prefix for the Local Ratelimit network filter const std::string LOCAL_HTTP_RATELIMIT_PREFIX = "envoy.local_http_ratelimit_prefix"; // Stats prefix for the Local Ratelimit network filter const std::string LOCAL_NETWORK_RATELIMIT_PREFIX = "envoy.local_network_ratelimit_prefix"; // Stats prefix for the Local Ratelimit listener filter const std::string LOCAL_LISTENER_RATELIMIT_PREFIX = "envoy.local_listener_ratelimit_prefix"; // Stats prefix for the dns filter const std::string DNS_FILTER_PREFIX = "envoy.dns_filter_prefix"; // Stats prefix for the Connection limit filter const std::string CONNECTION_LIMIT_PREFIX = "envoy.connection_limit_prefix"; // Stats prefix for the RBAC network filter const std::string RBAC_PREFIX = "envoy.rbac_prefix"; // Stats prefix for the RBAC http filter const std::string RBAC_HTTP_PREFIX = "envoy.rbac_http_prefix"; // Policy name for the RBAC http filter const std::string RBAC_POLICY_NAME = "envoy.rbac_policy_name"; // Stats prefix for the TCP Proxy network filter const std::string TCP_PREFIX = "envoy.tcp_prefix"; // Stats prefix for the UDP Proxy network filter const std::string UDP_PREFIX = "envoy.udp_prefix"; // Downstream cluster for the Fault http filter const std::string FAULT_DOWNSTREAM_CLUSTER = "envoy.fault_downstream_cluster"; // Operation name for the Dynamo http filter const std::string DYNAMO_OPERATION = "envoy.dynamo_operation"; // Table name for the Dynamo http filter const std::string DYNAMO_TABLE = "envoy.dynamo_table"; // Partition ID for the Dynamo http filter const std::string DYNAMO_PARTITION_ID = "envoy.dynamo_partition_id"; // Request service name GRPC Bridge http filter const std::string GRPC_BRIDGE_SERVICE = "envoy.grpc_bridge_service"; // Request method name for the GRPC Bridge http filter const std::string GRPC_BRIDGE_METHOD = "envoy.grpc_bridge_method"; // Request virtual host given by the Router http filter const std::string VIRTUAL_HOST = "envoy.virtual_host"; // Request virtual cluster given by the Router http filter const std::string VIRTUAL_CLUSTER = "envoy.virtual_cluster"; // Request response code const std::string RESPONSE_CODE = "envoy.response_code"; // Request response code class const std::string RESPONSE_CODE_CLASS = "envoy.response_code_class"; // Route config name for RDS updates const std::string RDS_ROUTE_CONFIG = "envoy.rds_route_config"; // Scoped route config name for RDS updates const std::string SCOPED_RDS_CONFIG = "envoy.scoped_rds_config"; // Request route given by the Router http filter const std::string ROUTE = "envoy.route"; // Stats prefix for the ext_authz HTTP filter const std::string EXT_AUTHZ_PREFIX = "envoy.ext_authz_prefix"; // Listener manager worker id const std::string WORKER_ID = "envoy.worker_id"; // Stats prefix for the Thrift Proxy network filter const std::string THRIFT_PREFIX = "envoy.thrift_prefix"; // Stats prefix for the Redis Proxy network filter const std::string REDIS_PREFIX = "envoy.redis_prefix"; // Proxy Protocol version for a connection (Proxy Protocol listener filter). const std::string PROXY_PROTOCOL_VERSION = "envoy.proxy_protocol_version"; // Stats prefix for the proxy protocol listener filter. const std::string PROXY_PROTOCOL_PREFIX = "envoy.proxy_protocol_prefix"; // Mapping from the names above to their respective regex strings. const std::vector<std::pair<std::string, std::string>> name_regex_pairs_; // Returns the list of descriptors. const std::vector<Descriptor>& descriptorVec() const { return descriptor_vec_; } // Returns the list of tokenized descriptors. const std::vector<TokenizedDescriptor>& tokenizedDescriptorVec() const { return tokenized_descriptor_vec_; } private: void addRe2(const std::string& name, const std::string& regex, const std::string& substr = "", const std::string& negative_matching_value = ""); // See class doc for TagExtractorTokensImpl in // source/common/stats/tag_extractor_impl.h for details on the format of // tokens. void addTokenized(const std::string& name, const std::string& tokens); // Collection of tag descriptors. std::vector<Descriptor> descriptor_vec_; // Collection of tokenized tag descriptors. std::vector<TokenizedDescriptor> tokenized_descriptor_vec_; }; using TagNames = ConstSingleton<TagNameValues>; // This class holds extension points which will always be built into Envoy in // server mode, but may be excluded from Envoy Mobile. class ServerBuiltInExtensionValues { public: // Extension point for the default listener. const std::string DEFAULT_LISTENER = "envoy.listener_manager_impl.default"; // Extension point for the validation listener const std::string VALIDATION_LISTENER = "envoy.listener_manager_impl.validation"; }; using ServerExtensionValues = ConstSingleton<ServerBuiltInExtensionValues>; } // namespace Config } // namespace Envoy ```
```c++ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Original code copyright 2014 Foxit Software Inc. path_to_url #include "core/fpdfapi/font/cpdf_fontglobals.h" #include <utility> #include "core/fpdfapi/parser/cpdf_document.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" CPDF_FontGlobals::CPDF_FontGlobals() { memset(m_EmbeddedCharsets, 0, sizeof(m_EmbeddedCharsets)); memset(m_EmbeddedToUnicodes, 0, sizeof(m_EmbeddedToUnicodes)); } CPDF_FontGlobals::~CPDF_FontGlobals() {} CPDF_Font* CPDF_FontGlobals::Find(CPDF_Document* pDoc, uint32_t index) { auto it = m_StockMap.find(pDoc); if (it == m_StockMap.end()) return nullptr; return it->second ? it->second->GetFont(index) : nullptr; } CPDF_Font* CPDF_FontGlobals::Set(CPDF_Document* pDoc, uint32_t index, std::unique_ptr<CPDF_Font> pFont) { if (!pdfium::ContainsKey(m_StockMap, pDoc)) m_StockMap[pDoc] = pdfium::MakeUnique<CFX_StockFontArray>(); return m_StockMap[pDoc]->SetFont(index, std::move(pFont)); } void CPDF_FontGlobals::Clear(CPDF_Document* pDoc) { m_StockMap.erase(pDoc); } ```
```c++ /* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */ // vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4: #ident "$Id$" /* COPYING CONDITIONS NOTICE: This program is free software; you can redistribute it and/or modify published by the Free Software Foundation, and provided that the following conditions are met: * Redistributions of source code must retain this COPYING CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the PATENT MARKING NOTICE (below), and the PATENT RIGHTS GRANT (below). * Redistributions in binary form must reproduce this COPYING CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the PATENT MARKING NOTICE (below), and the PATENT RIGHTS GRANT (below) in the documentation and/or other materials provided with the distribution. along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. COPYRIGHT NOTICE: TokuFT, Tokutek Fractal Tree Indexing Library. DISCLAIMER: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU UNIVERSITY PATENT NOTICE: The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it. PATENT MARKING NOTICE: This software is covered by US Patent No. 8,185,551. This software is covered by US Patent No. 8,489,638. PATENT RIGHTS GRANT: "THIS IMPLEMENTATION" means the copyrightable works distributed by Tokutek as part of the Fractal Tree project. "PATENT CLAIMS" means the claims of patents that are owned or licensable by Tokutek, both currently or in the future; and that in the absence of this license would be infringed by THIS IMPLEMENTATION or by using or running THIS IMPLEMENTATION. "PATENT CHALLENGE" shall mean a challenge to the validity, patentability, enforceability and/or non-infringement of any of the PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS. Tokutek hereby grants to you, for the term and geographical scope of the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, transfer, and otherwise run, modify, and propagate the contents of THIS IMPLEMENTATION, where such license applies only to the PATENT CLAIMS. This grant does not include claims that would be infringed only as a consequence of further modifications of THIS IMPLEMENTATION. If you or your agent or licensee institute or order or agree to the institution of patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that THIS IMPLEMENTATION constitutes direct or contributory patent infringement, or inducement of patent infringement, then any rights such litigation is filed. If you or your agent or exclusive licensee institute or order or agree to the institution of a PATENT CHALLENGE, then Tokutek may terminate any rights granted to you */ #ident "The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it." #include "test.h" #include <toku_assert.h> #include <string.h> #include <stdio.h> #include <unistd.h> #include "loader/loader-internal.h" #include "memory.h" #include <portability/toku_path.h> static int qsort_compare_ints (const void *a, const void *b) { int avalue = *(int*)a; int bvalue = *(int*)b; if (avalue<bvalue) return -1; if (avalue>bvalue) return +1; return 0; } static int compare_ints (DB* UU(desc), const DBT *akey, const DBT *bkey) { assert(akey->size==sizeof(int)); assert(bkey->size==sizeof(int)); return qsort_compare_ints(akey->data, bkey->data); } static void err_cb(DB *db UU(), int dbn UU(), int err UU(), DBT *key UU(), DBT *val UU(), void *extra UU()) { fprintf(stderr, "error in test"); abort(); } bool founddup; static void expect_dups_cb(DB *db UU(), int dbn UU(), int err UU(), DBT *key UU(), DBT *val UU(), void *extra UU()) { founddup=true; } static void test_merge_internal (int a[], int na, int b[], int nb, bool dups) { int *MALLOC_N(na+nb, ab); // the combined array a and b for (int i=0; i<na; i++) { ab[i]=a[i]; } for (int i=0; i<nb; i++) { ab[na+i] = b[i]; } struct row *MALLOC_N(na, ar); struct row *MALLOC_N(nb, br); for (int i=0; i<na; i++) { ar[i].off = i*sizeof(a[0]); ar[i].klen = sizeof(a[i]); ar[i].vlen = 0; } for (int i=0; i<nb; i++) { br[i].off = (na+i)*sizeof(b[0]); br[i].klen = sizeof(b[i]); br[i].vlen = 0; } struct row *MALLOC_N(na+nb, cr); DB *dest_db = NULL; struct ft_loader_s bl; ft_loader_init_error_callback(&bl.error_callback); ft_loader_set_error_function(&bl.error_callback, dups ? expect_dups_cb : err_cb, NULL); struct rowset rs = { .memory_budget = 0, .n_rows = 0, .n_rows_limit = 0, .rows = NULL, .n_bytes = 0, .n_bytes_limit = 0, .data=(char*)ab}; merge_row_arrays_base(cr, ar, na, br, nb, 0, dest_db, compare_ints, &bl, &rs); ft_loader_call_error_function(&bl.error_callback); if (dups) { assert(founddup); } else { // verify the merge int i=0; int j=0; for (int k=0; k<na+nb; k++) { int voff = cr[k].off; int vc = *(int*)(((char*)ab)+voff); if (i<na && j<nb) { if (vc==a[i]) { assert(a[i]<=b[j]); i++; } else if (vc==b[j]) { assert(a[i]>b[j]); j++; } else { assert(0); } } } } toku_free(cr); toku_free(ar); toku_free(br); toku_free(ab); ft_loader_destroy_error_callback(&bl.error_callback); } /* Test the basic merger. */ static void test_merge (void) { { int avals[]={1,2,3,4,5}; int *bvals = NULL; test_merge_internal(avals, 5, bvals, 0, false); test_merge_internal(bvals, 0, avals, 5, false); } { int avals[]={1,3,5,7}; int bvals[]={2,4}; test_merge_internal(avals, 4, bvals, 2, false); test_merge_internal(bvals, 2, avals, 4, false); } { int avals[]={1,2,3,5,6,7}; int bvals[]={2,4,5,6,8}; test_merge_internal(avals, 6, bvals, 5, true); test_merge_internal(bvals, 5, avals, 6, true); } } static void test_internal_mergesort_row_array (int a[], int n) { struct row *MALLOC_N(n, ar); for (int i=0; i<n; i++) { ar[i].off = i*sizeof(a[0]); ar[i].klen = sizeof(a[i]); ar[i].vlen = 0; } struct rowset rs = { .memory_budget = 0, .n_rows = 0, .n_rows_limit = 0, .rows = NULL, .n_bytes = 0, .n_bytes_limit = 0, .data=(char*)a}; ft_loader_mergesort_row_array (ar, n, 0, NULL, compare_ints, NULL, &rs); int *MALLOC_N(n, tmp); for (int i=0; i<n; i++) { tmp[i]=a[i]; } qsort(tmp, n, sizeof(a[0]), qsort_compare_ints); for (int i=0; i<n; i++) { int voff = ar[i].off; int v = *(int*)(((char*)a)+voff); assert(tmp[i]==v); } toku_free(ar); toku_free(tmp); } static void test_mergesort_row_array (void) { { int avals[]={5,2,1,7}; for (int i=0; i<=4; i++) test_internal_mergesort_row_array(avals, i); } const int MAX_LEN = 100; enum { MAX_VAL = 1000 }; for (int i=0; i<MAX_LEN; i++) { bool used[MAX_VAL]; for (int j=0; j<MAX_VAL; j++) used[j]=false; int len=1+random()%MAX_LEN; int avals[len]; for (int j=0; j<len; j++) { int v; do { v = random()%MAX_VAL; } while (used[v]); avals[j] = v; used[v] = true; } test_internal_mergesort_row_array(avals, len); } } static void test_read_write_rows (char *tf_template) { struct ft_loader_s bl; ZERO_STRUCT(bl); bl.temp_file_template = tf_template; int r = ft_loader_init_file_infos(&bl.file_infos); CKERR(r); FIDX file; r = ft_loader_open_temp_file(&bl, &file); CKERR(r); uint64_t dataoff=0; const char *keystrings[] = {"abc", "b", "cefgh"}; const char *valstrings[] = {"defg", "", "xyz"}; uint64_t actual_size=0; for (int i=0; i<3; i++) { DBT key; toku_fill_dbt(&key, keystrings[i], strlen(keystrings[i])); DBT val; toku_fill_dbt(&val, valstrings[i], strlen(valstrings[i])); r = loader_write_row(&key, &val, file, toku_bl_fidx2file(&bl, file), &dataoff, nullptr, &bl); CKERR(r); actual_size+=key.size + val.size + 8; } if (actual_size != dataoff) fprintf(stderr, "actual_size=%" PRIu64 ", dataoff=%" PRIu64 "\n", actual_size, dataoff); assert(actual_size == dataoff); r = ft_loader_fi_close(&bl.file_infos, file, true); CKERR(r); r = ft_loader_fi_reopen(&bl.file_infos, file, "r"); CKERR(r); { int n_read=0; DBT key, val; toku_init_dbt(&key); toku_init_dbt(&val); while (0==loader_read_row(toku_bl_fidx2file(&bl, file), &key, &val)) { assert(strlen(keystrings[n_read])==key.size); assert(strlen(valstrings[n_read])==val.size); assert(0==memcmp(keystrings[n_read], key.data, key.size)); assert(0==memcmp(valstrings[n_read], val.data, val.size)); assert(key.size<=key.ulen); assert(val.size<=val.ulen); n_read++; } assert(n_read==3); toku_free(key.data); toku_free(val.data); } r = ft_loader_fi_close(&bl.file_infos, file, true); CKERR(r); r = ft_loader_fi_unlink(&bl.file_infos, file); CKERR(r); assert(bl.file_infos.n_files_open==0); assert(bl.file_infos.n_files_extant==0); ft_loader_fi_destroy(&bl.file_infos, false); } static void fill_rowset (struct rowset *rows, int keys[], const char *vals[], int n, uint64_t *size_est) { init_rowset(rows, toku_ft_loader_get_rowset_budget_for_testing()); for (int i=0; i<n; i++) { DBT key; toku_fill_dbt(&key, &keys[i], sizeof keys[i]); DBT val; toku_fill_dbt(&val, vals[i], strlen(vals[i])); add_row(rows, &key, &val); *size_est += ft_loader_leafentry_size(key.size, val.size, TXNID_NONE); } } static void verify_dbfile(int n, int sorted_keys[], const char *sorted_vals[], const char *name) { int r; CACHETABLE ct; toku_cachetable_create(&ct, 0, ZERO_LSN, nullptr); TOKUTXN const null_txn = NULL; FT_HANDLE t = NULL; toku_ft_handle_create(&t); toku_ft_set_bt_compare(t, compare_ints); r = toku_ft_handle_open(t, name, 0, 0, ct, null_txn); assert(r==0); FT_CURSOR cursor = NULL; r = toku_ft_cursor(t, &cursor, NULL, false, false); assert(r == 0); size_t userdata = 0; int i; for (i=0; i<n; i++) { struct check_pair pair = {sizeof sorted_keys[i], &sorted_keys[i], (uint32_t) strlen(sorted_vals[i]), sorted_vals[i], 0}; r = toku_ft_cursor_get(cursor, NULL, lookup_checkf, &pair, DB_NEXT); if (r != 0) { assert(pair.call_count ==0); break; } assert(pair.call_count==1); userdata += pair.keylen + pair.vallen; } struct check_pair pair; memset(&pair, 0, sizeof pair); r = toku_ft_cursor_get(cursor, NULL, lookup_checkf, &pair, DB_NEXT); assert(r != 0); toku_ft_cursor_close(cursor); struct ftstat64_s s; toku_ft_handle_stat64(t, NULL, &s); assert(s.nkeys == (uint64_t) n && s.ndata == (uint64_t) n && s.dsize == userdata); r = toku_close_ft_handle_nolsn(t, 0); assert(r==0); toku_cachetable_close(&ct); } static void test_merge_files (const char *tf_template, const char *output_name) { DB *dest_db = NULL; struct ft_loader_s bl; ZERO_STRUCT(bl); bl.temp_file_template = tf_template; bl.reserved_memory = 512*1024*1024; int r = ft_loader_init_file_infos(&bl.file_infos); CKERR(r); ft_loader_lock_init(&bl); ft_loader_init_error_callback(&bl.error_callback); ft_loader_set_fractal_workers_count_from_c(&bl); struct merge_fileset fs; init_merge_fileset(&fs); int a_keys[] = { 1, 3, 5, 7, 8, 9}; int b_keys[] = { 0, 2, 4, 6 }; const char *a_vals[] = {"a", "c", "e", "g", "h", "i"}; const char *b_vals[] = {"0", "b", "d", "f"}; int sorted_keys[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; const char *sorted_vals[] = { "0", "a", "b", "c", "d", "e", "f", "g", "h", "i" }; struct rowset aset, bset; uint64_t size_est = 0; fill_rowset(&aset, a_keys, a_vals, 6, &size_est); fill_rowset(&bset, b_keys, b_vals, 4, &size_est); toku_ft_loader_set_n_rows(&bl, 6+4); ft_loader_set_error_function(&bl.error_callback, err_cb, NULL); r = ft_loader_sort_and_write_rows(&aset, &fs, &bl, 0, dest_db, compare_ints); CKERR(r); r = ft_loader_sort_and_write_rows(&bset, &fs, &bl, 0, dest_db, compare_ints); CKERR(r); assert(fs.n_temp_files==2 && fs.n_temp_files_limit >= fs.n_temp_files); // destroy_rowset(&aset); // destroy_rowset(&bset); for (int i=0; i<2; i++) assert(fs.data_fidxs[i].idx != -1); ft_loader_fi_close_all(&bl.file_infos); QUEUE q; r = toku_queue_create(&q, 0xFFFFFFFF); // infinite queue. assert(r==0); r = merge_files(&fs, &bl, 0, dest_db, compare_ints, 0, q); CKERR(r); assert(fs.n_temp_files==0); DESCRIPTOR_S desc; toku_fill_dbt(&desc.dbt, "abcd", 4); int fd = open(output_name, O_RDWR | O_CREAT | O_BINARY, S_IRWXU|S_IRWXG|S_IRWXO); assert(fd>=0); r = toku_loader_write_ft_from_q_in_C(&bl, &desc, fd, 1000, q, size_est, 0, 0, 0, TOKU_DEFAULT_COMPRESSION_METHOD, 16); assert(r==0); destroy_merge_fileset(&fs); ft_loader_fi_destroy(&bl.file_infos, false); ft_loader_destroy_error_callback(&bl.error_callback); ft_loader_lock_destroy(&bl); // verify the dbfile verify_dbfile(10, sorted_keys, sorted_vals, output_name); r = toku_queue_destroy(q); assert(r==0); } /* Test to see if we can open temporary files. */ int test_main (int argc, const char *argv[]) { argc--; argv++; while (argc>0) { if (strcmp(argv[0],"-v")==0) { verbose=1; } else if (strcmp(argv[0],"-q")==0) { verbose=0; } else { break; } argc--; argv++; } const char* directory = TOKU_TEST_FILENAME; int r = toku_os_mkdir(directory, 0755); if (r!=0) CKERR2(errno, EEXIST); int templen = strlen(directory)+15; char tf_template[templen]; { int n = snprintf(tf_template, templen, "%s/tempXXXXXX", directory); assert (n>0 && n<templen); } char output_name[templen]; { int n = snprintf(output_name, templen, "%s/data.tokudb", directory); assert (n>0 && n<templen); } test_read_write_rows(tf_template); test_merge(); test_mergesort_row_array(); test_merge_files(tf_template, output_name); { char deletecmd[templen]; int n = snprintf(deletecmd, templen, "rm -rf %s", directory); assert(n>0 && n<templen); r = system(deletecmd); CKERR(r); } return 0; } ```
Lupfer Glacier is in Glacier National Park in the U.S. state of Montana. The glacier is situated immediately to the east of Mount Phillips at an elevation between and above sea level. Lupfer Glacier covers an area of approximately and does not meet the threshold of often cited as being the minimum size to qualify as an active glacier. Between 1966 and 2005 Lupfer Glacier lost over 50 percent of its surface area. See also List of glaciers in the United States Glaciers in Glacier National Park (U.S.) References Glaciers of Flathead County, Montana Glaciers of Glacier National Park (U.S.) Glaciers of Montana
It Happened in Hollywood is a 1973 American pornographic film. It was produced by Screw Magazine founders Jim Buckley and Al Goldstein. It was the first in a proposed series of films from Screw. Goldstein played a character in the movie, and is also credited as "fourth unit director." At the 2nd Annual New York Erotic Film Festival it won awards for Best Picture, Best Female Performance, and Best Supporting Actor. Premise A woman, Felicity Split, tries to make it in the porn industry. Cast Melissa Hall as Felicity Split Harry Reems Release The film had a wide release in cinemas and made $1,220,000 in rentals in North America. Variety magazine said the film "probably offers more sex per celluloid foot than any such feature to date, but the emphasis here is really on making the audience laugh. Overall effect is much like a pornographic version of Laugh-In." References External links It Happened in Hollywood at Letterbox DVD It Happened in Hollywood at IMDb Review of film at Shock Cinema 1973 films American pornographic films 1970s pornographic films
```yaml pt-BR: activemodel: attributes: config: available_methods: Mtodos disponveis offline: desligada offline_explanation: Instrues para verificao off-line online: Conectados id_document_information: document_number: Nmero do documento (com letra) document_type: Tipo do documento id_document_upload: document_number: Nmero do documento (com letra) document_type: Tipo do seu documento user: Usurio verification_attachment: Cpia digitalizada do seu documento offline_confirmation: email: E-mail do usurio postal_letter_address: full_address: Endereo completo postal_letter_confirmation: verification_code: Cdigo de verificao postal_letter_postage: full_address: Endereo completo verification_code: Cdigo de verificao decidim: admin: menu: authorization_revocation: before_date_info: til se o processo j comeou e voc deseja revogar as permisses do processo anterior. button: Revogar todos button_before: Revogar antes da data destroy_ok: Todas as autorizaes correspondentes foram revogadas com sucesso. info: H um total de %{count} participantes verificados. title: Revogao de Autorizaes authorization_workflows: Autorizaes admin_log: organization: update_id_documents_config: "%{user_name} atualizou a configurao de autorizao de Documentos de Identidade" user: grant_id_documents_offline_verification: "%{user_name} verificado %{resource_name} usando a autorizao dos Documentos de Identidade offline" authorization_handlers: admin: id_documents: help: - Os usurios preenchem suas informaes de identidade e carregam uma cpia do documento. - Voc preencher as informaes presentes na imagem carregada. - A informao deve corresponder ao que o usurio preenchido. - postal_letter: help: - Os usurios solicitaram que um cdigo de verificao seja enviado para o endereo. - Voc envia a carta para seu endereo com o cdigo de verificao. - Voc marca a carta como enviada. - Depois de marcar a carta como enviada, o usurio poder introduzir o cdigo e ser verificado. csv_census: name: Recenseamento da organizao direct: Direto help: Ajuda id_documents: name: Documentos de identidade multistep: Mltiplas etapas name: Nome postal_letter: name: Cdigo por carta postal events: verifications: verify_with_managed_user: email_outro: Verifique a <a href="%{conflicts_url}">lista de conflitos das verificaes</a> e entre em contato com o participante para verificar seus detalhes e resolver o problema. email_subject: Falha na tentativa de verificao contra outro usurio verifications: authorizations: authorization_metadata: info: 'Estes so os dados da verificao atual:' no_data_stored: Nenhum dado armazenado. create: error: Ocorreu um erro ao criar a autorizao. unconfirmed: Voc precisa confirmar seu e-mail para se autorizar. destroy: error: Ocorreu um erro ao excluir a autorizao. first_login: actions: another_dummy_authorization_handler: Verificar contra outro exemplo de manipulador de autorizao csv_census: Verifique o censo da organizao dummy_authorization_handler: Verifique contra o manipulador de autorizao de exemplo dummy_authorization_workflow: Verifique o exemplo de fluxo de trabalho de autorizao id_documents: Seja verificado ao fazer o upload do documento de identidade postal_letter: Seja verificado ao receber um cdigo de verificao por correio postal sms: Seja verificado ao receber um cdigo de verificao por SMS title: Verifique sua identidade verify_with_these_options: 'Estas so as opes disponveis para verificar sua identidade:' index: expired_verification: O cdigo de verificao expirou pending_verification: Verificao pendente show_renew_info: Clique para renovar a verificao new: authorize: Enviar authorize_with: Verifique com %{authorizer} renew_modal: cancel: Cancelar continue: Continuar title: Renovar Verificao skip_verification: Voc pode ignorar isso por enquanto e %{link} start_exploring: comece a explorar csv_census: admin: census: create: error: Ocorreu um erro ao importar o censo. destroy: title: Excluir todos os dados do censo index: empty: No h dados do censo. Use o formulrio abaixo para import-lo usando um arquivo CSV. title: Dados do censo atual instructions: body: Para fazer isso, voc deve entrar na administrao do sistema e adicionar as autorizaes csv_census organizao title: Voc precisa ativar o censo CSV para esta organizao new: file: "arquivo .csv com dados de e-mails" info: 'Deve ser um arquivo no formato CSV com apenas uma coluna com o endereo de e-mail:' submit: Subir arquivo title: Carregar um novo censo authorizations: new: error: No foi possvel confirmar sua conta ou voc no est no censo da organizao. success: Sua conta foi confirmada com sucesso. dummy_authorization: extra_explanation: postal_codes: one: A participao restrita aos usurios com o cdigo postal %{postal_codes}. other: 'A participao restrita aos usurios com qualquer um dos seguintes cdigos postais: %{postal_codes}.' scope: A participao restrita aos participantes com o escopo %{scope_name}. user_postal_codes: one: A participao restrita aos usurios com o cdigo postal %{postal_codes} e seu cdigo postal %{user_postal_code}. other: 'A participao restrita aos usurios com qualquer um dos seguintes cdigos postais: %{postal_codes}. Seu cdigo postal %{user_postal_code}.' user_scope: A participao restrita aos participantes com o escopo %{scope_name}, e seu escopo %{user_scope_name}. id_documents: admin: config: edit: title: Configurao de documentos de identidade update: Atualizar update: error: Houve um erro ao atualizar a configurao. confirmations: new: introduce_user_data: Introduza os dados na imagem reject: Rejeitar verify: Verificar offline_confirmations: new: cancel: Cancelar introduce_user_data: Introduzir o email do usurio e os dados do documento verify: Verificar pending_authorizations: index: config: Config offline_verification: Verificao off-line title: Verificaes pendentes verification_number: 'Verificao # %{n}' authorizations: choose: choose_a_type: 'Por favor, selecione como deseja ser verificado:' offline: desligada online: Conectados title: Confirme-se usando seu documento de identidade edit: offline: Use a verificao off-line online: Use a verificao on-line send: Solicite novamente a verificao new: send: Solicitar verificao title: Carregue seu documento de identidade passport: Passaporte postal_letter: admin: pending_authorizations: index: address: Endereo letter_sent_at: Carta enviada em mark_as_sent: Marcar como enviado not_yet_sent: Ainda no enviado title: Verificaes contnuas username: Nome de usurio verification_code: Cdigo de verificao authorizations: edit: send: confirme new: send: Envie-me uma carta title: Solicite seu cdigo de verificao sms: authorizations: edit: confirm_destroy: Tem certeza de que deseja redefinir o cdigo de verificao? destroy: Redefinir cdigo de verificao send: confirme title: Introduza o cdigo de verificao recebido new: send: Envie-me um SMS title: Solicite seu cdigo de verificao errors: messages: uppercase_only_letters_numbers: devem ser todas maisculas e conter apenas letras e / ou nmeros ```
```objective-c /* * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * * path_to_url * * Unless required by applicable law or agreed to in writing, * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * specific language governing permissions and limitations */ /*! * \file src/contrib/msc/core/utils.h * \brief Common utilities for msc. */ #ifndef TVM_CONTRIB_MSC_CORE_UTILS_H_ #define TVM_CONTRIB_MSC_CORE_UTILS_H_ #include <tvm/ir/source_map.h> #include <tvm/relax/expr.h> #include <tvm/relay/expr.h> #include <string> #include <tuple> #include <vector> namespace tvm { namespace contrib { namespace msc { using Expr = tvm::RelayExpr; using RelaxCall = tvm::relax::Call; using RelayCall = tvm::relay::Call; namespace msc_attr { /*! \brief Mark the name for the expr. */ constexpr const char* kName = "Name"; /*! \brief Mark the optype for the expr. */ constexpr const char* kOptype = "Optype"; /*! \brief Mark the optype for the expr. */ constexpr const char* kOpattrs = "Opattrs"; /*! \brief Mark the layout for the expr. */ constexpr const char* kLayout = "Layout"; /*! \brief Mark the share reference for the expr. */ constexpr const char* kSharedRef = "SharedRef"; /*! \brief Mark the unique name for the func. */ constexpr const char* kUnique = "Unique"; /*! \brief Mark the input layout for the func. */ constexpr const char* kInputLayouts = "InputLayouts"; /*! \brief Mark the consumer type for the func. */ constexpr const char* kConsumerType = "ConsumerType"; } // namespace msc_attr /*! * \brief Utils for Common. */ class CommonUtils { public: /*! * \brief Check if the index is in range. * \return The valid index. */ TVM_DLL static size_t GetIndex(int index, size_t max_size); /*! * \brief Check if the index is in range. * \return The valid indices. */ TVM_DLL static std::vector<size_t> GetIndices(const std::vector<int>& indices, size_t max_size); /*! * \brief Compare version with version in config * 0 for same version, 1 for greater version, -1 for less version */ TVM_DLL static int CompareVersion(const std::vector<size_t>& given_version, const std::vector<size_t>& target_version); TVM_DLL static int CompareVersion(const Array<Integer>& given_version, const Array<Integer>& target_version); /*! * \brief Get attr key. * \return The attr key. */ TVM_DLL static const String ToAttrKey(const String& key); }; /*! * \brief Utils for String. */ class StringUtils { public: /*! * \brief Check if the String contains a substring. * \return Whether substring is contained. */ TVM_DLL static bool Contains(const String& src_string, const String& sub_string); /*! * \brief Check if the String starts with a substring. * \return Whether string starts with substring. */ TVM_DLL static bool StartsWith(const String& src_string, const String& sub_string); /*! * \brief Check if the String ens with a substring. * \return Whether string endswith substring. */ TVM_DLL static bool EndsWith(const String& src_string, const String& sub_string); /*! * \brief Split the String into sub Strings. * \return The SubStrings. */ TVM_DLL static const Array<String> Split(const String& src_string, const String& sep); /*! * \brief Join the SubStrings into String. * \return The String. */ TVM_DLL static const String Join(const Array<String>& sub_strings, const String& joint); TVM_DLL static const String Join(const std::vector<std::string>& sub_strings, const std::string& joint); /*! * \brief Replace the substring old to new in String. * \return The replaced String. */ TVM_DLL static const String Replace(const String& src_string, const String& old_str, const String& new_str); /*! * \brief Split the String into two sub Strings, only split by the frist seq. * \return The SubStrings. */ TVM_DLL static const std::tuple<String, String> SplitOnce(const String& src_string, const String& sep, bool from_left = false); /*! * \brief Get the tokens between left and right. * \return The Tokens. */ TVM_DLL static const Array<String> GetClosures(const String& src_string, const String& left, const String& right); /*! * \brief Get the first token between left and right. * \return The Token. */ TVM_DLL static const String GetClosureOnce(const String& src_string, const String& left, const String& right, bool from_left = true); /*! * \brief Change string to upper. * \return The String. */ TVM_DLL static const String Upper(const String& src_string); /*! * \brief Change string to lower. * \return The String. */ TVM_DLL static const String Lower(const String& src_string); /*! * \brief Change Object to String. * \return The String. */ TVM_DLL static const String ToString(const runtime::ObjectRef& obj); /*! * \brief Compare String arrays. * \return Whether two array are same. */ TVM_DLL static bool CompareArrays(const Array<String>& left, const Array<String>& right, int size = -1); }; /*! * \brief Utils for Array. */ class ArrayUtils { public: /*! * \brief Replace the element old to new in Array. * \return The replaced Array. */ template <typename T> TVM_DLL static const Array<T> Replace(const Array<T>& src_array, const T& old_ele, const T& new_ele) { Array<T> new_array; for (const auto& a : src_array) { if (a == old_ele) { new_array.push_back(new_ele); } else { new_array.push_back(a); } } return new_array; } /*! * \brief Find the index of element. * \return The index, -1 if not found. */ template <typename T> TVM_DLL static int IndexOf(const std::vector<T>& array, const T& ele) { for (size_t i = 0; i < array.size(); i++) { if (array[i] == ele) { return i; } } return -1; } /*! * \brief Downcast elements in the array. * \return The downcasted array */ template <typename T> TVM_DLL static const Array<T> Cast(const Array<PrimExpr>& src_array) { Array<T> new_array; for (const auto& s : src_array) { if (s->IsInstance<tvm::tir::AnyNode>()) { new_array.push_back(T(-1)); } else { new_array.push_back(Downcast<T>(s)); } } return new_array; } template <typename T> TVM_DLL static const Array<Array<T>> Product(const Array<Array<T>>& arrays) { Array<Array<T>> p_arrays; if (arrays.size() == 1) { for (const auto& a : arrays[0]) { p_arrays.push_back(Array<T>{a}); } return p_arrays; } Array<Array<T>> sub_arrays; for (size_t i = 0; i < arrays.size() - 1; i++) { sub_arrays.push_back(arrays[i]); } for (const auto& p_array : Product(sub_arrays)) { for (const auto& a : arrays[arrays.size() - 1]) { Array<T> sub_array = p_array; sub_array.push_back(a); p_arrays.push_back(sub_array); } } return p_arrays; } }; /*! * \brief Utils for Span. */ class SpanUtils { public: /*! * \brief Set <key>value</key> to the Span. * \return The new Span. */ TVM_DLL static const Span SetAttr(const Span& span, const String& key, const String& value); /*! * \brief Get the value in <key>value</key> from the Span. * \return The value String. */ TVM_DLL static const String GetAttr(const Span& span, const String& key); /*! * \brief Get all the key:value in format <key>value</key> from the Span. * \return The Attrs Map. */ TVM_DLL static const Map<String, String> GetAttrs(const Span& span); }; /*! * \brief Utils for Expr. */ class ExprUtils { public: /*! * \brief Get the input types of call. * \return The input types. */ TVM_DLL static const Array<String> GetInputTypes(const String& optype, size_t inputs_num, bool as_relax); /*! * \brief Get the input types of call. * \return The input types. */ TVM_DLL static const Array<String> GetInputTypes(const RelaxCall& call); /*! * \brief Get the input types of call. * \return The input types. */ TVM_DLL static const Array<String> GetInputTypes(const RelayCall& call); /*! * \brief Get the scalar value of ndarray. * \return The scalar value. */ template <typename T> TVM_DLL static const T GetScalar(const runtime::NDArray& array, size_t i = 0) { if (array->dtype.code == kDLInt) { if (array->dtype.bits == 8) { return T(reinterpret_cast<int8_t*>(array->data)[i]); } else if (array->dtype.bits == 16) { return T(reinterpret_cast<int16_t*>(array->data)[i]); } else if (array->dtype.bits == 32) { return T(reinterpret_cast<int32_t*>(array->data)[i]); } else if (array->dtype.bits == 64) { return T(reinterpret_cast<int64_t*>(array->data)[i]); } } else if (array->dtype.code == kDLUInt) { if (array->dtype.bits == 1) { // bool return T(reinterpret_cast<uint8_t*>(array->data)[i]); } else if (array->dtype.bits == 8) { return T(reinterpret_cast<uint8_t*>(array->data)[i]); } else if (array->dtype.bits == 16) { return T(reinterpret_cast<uint16_t*>(array->data)[i]); } else if (array->dtype.bits == 32) { return T(reinterpret_cast<uint32_t*>(array->data)[i]); } else if (array->dtype.bits == 64) { return T(reinterpret_cast<uint64_t*>(array->data)[i]); } } else if (array->dtype.code == kDLFloat) { if (array->dtype.bits == 32) { return T(reinterpret_cast<float*>(array->data)[i]); } else if (array->dtype.bits == 64) { return T(reinterpret_cast<double*>(array->data)[i]); } } LOG(FATAL) << "Failed to get scalar from array " << array; } /*! * \brief Get the scalar value of relax constant. * \return The scalar value. */ template <typename T> TVM_DLL static const T GetScalar(const relax::Constant& constant, size_t i = 0) { return GetScalar<T>(constant->data, i); } /*! * \brief Get the scalar value of relay constant. * \return The scalar value. */ template <typename T> TVM_DLL static const T GetScalar(const relay::Constant& constant, size_t i = 0) { return GetScalar<T>(constant->data, i); } }; } // namespace msc } // namespace contrib } // namespace tvm #endif // TVM_CONTRIB_MSC_CORE_UTILS_H_ ```
Ndukaku Alison (born 12 August 1991) is a Nigerian professional footballer. Career Alison spent most of his career playing in Finland playing for clubs RoPS and AC Kajaani. In 2016 he started playing for a club Chittagong Abahani Limited in Bangladesh. In 2018 Alison played in AFC Cup with Abahani Limited Dhaka scoring one goal during the Cup. In 2019 Alison continued his career in Bangladesh Premier League playing for Sheikh Russel KC. On 2 February 2021, Alison signed for FC Haka. External links References 1991 births Living people Nigerian men's footballers Men's association football defenders Veikkausliiga players Bangladesh Premier League footballers Rovaniemen Palloseura players AC Kajaani players Nigerian expatriate men's footballers Expatriate men's footballers in Finland Expatriate men's footballers in Bangladesh
```c++ //===- SPIRVInstructionSelector.cpp ------------------------------*- C++ -*-==// // // See path_to_url for license information. // //===your_sha256_hash------===// // // This file implements the targeting of the InstructionSelector class for // SPIRV. // TODO: This should be generated by TableGen. // //===your_sha256_hash------===// #include "SPIRV.h" #include "SPIRVGlobalRegistry.h" #include "SPIRVInstrInfo.h" #include "SPIRVRegisterBankInfo.h" #include "SPIRVRegisterInfo.h" #include "SPIRVTargetMachine.h" #include "SPIRVUtils.h" #include "llvm/ADT/APFloat.h" #include "llvm/CodeGen/GlobalISel/InstructionSelector.h" #include "llvm/CodeGen/GlobalISel/InstructionSelectorImpl.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/IR/IntrinsicsSPIRV.h" #include "llvm/Support/Debug.h" #define DEBUG_TYPE "spirv-isel" using namespace llvm; namespace CL = SPIRV::OpenCLExtInst; namespace GL = SPIRV::GLSLExtInst; using ExtInstList = std::vector<std::pair<SPIRV::InstructionSet::InstructionSet, uint32_t>>; namespace { #define GET_GLOBALISEL_PREDICATE_BITSET #include "SPIRVGenGlobalISel.inc" #undef GET_GLOBALISEL_PREDICATE_BITSET class SPIRVInstructionSelector : public InstructionSelector { const SPIRVSubtarget &STI; const SPIRVInstrInfo &TII; const SPIRVRegisterInfo &TRI; const RegisterBankInfo &RBI; SPIRVGlobalRegistry &GR; MachineRegisterInfo *MRI; public: SPIRVInstructionSelector(const SPIRVTargetMachine &TM, const SPIRVSubtarget &ST, const RegisterBankInfo &RBI); void setupMF(MachineFunction &MF, GISelKnownBits *KB, CodeGenCoverage &CoverageInfo, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI) override; // Common selection code. Instruction-specific selection occurs in spvSelect. bool select(MachineInstr &I) override; static const char *getName() { return DEBUG_TYPE; } #define GET_GLOBALISEL_PREDICATES_DECL #include "SPIRVGenGlobalISel.inc" #undef GET_GLOBALISEL_PREDICATES_DECL #define GET_GLOBALISEL_TEMPORARIES_DECL #include "SPIRVGenGlobalISel.inc" #undef GET_GLOBALISEL_TEMPORARIES_DECL private: // tblgen-erated 'select' implementation, used as the initial selector for // the patterns that don't require complex C++. bool selectImpl(MachineInstr &I, CodeGenCoverage &CoverageInfo) const; // All instruction-specific selection that didn't happen in "select()". // Is basically a large Switch/Case delegating to all other select method. bool spvSelect(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectGlobalValue(Register ResVReg, MachineInstr &I, const MachineInstr *Init = nullptr) const; bool selectUnOpWithSrc(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, Register SrcReg, unsigned Opcode) const; bool selectUnOp(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, unsigned Opcode) const; bool selectLoad(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectStore(MachineInstr &I) const; bool selectMemOperation(Register ResVReg, MachineInstr &I) const; bool selectAtomicRMW(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, unsigned NewOpcode) const; bool selectAtomicCmpXchg(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectFence(MachineInstr &I) const; bool selectAddrSpaceCast(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectBitreverse(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectConstVector(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectCmp(Register ResVReg, const SPIRVType *ResType, unsigned comparisonOpcode, MachineInstr &I) const; bool selectICmp(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectFCmp(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; void renderImm32(MachineInstrBuilder &MIB, const MachineInstr &I, int OpIdx) const; void renderFImm32(MachineInstrBuilder &MIB, const MachineInstr &I, int OpIdx) const; bool selectConst(Register ResVReg, const SPIRVType *ResType, const APInt &Imm, MachineInstr &I) const; bool selectSelect(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, bool IsSigned) const; bool selectIToF(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, bool IsSigned, unsigned Opcode) const; bool selectExt(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, bool IsSigned) const; bool selectTrunc(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectIntToBool(Register IntReg, Register ResVReg, MachineInstr &I, const SPIRVType *intTy, const SPIRVType *boolTy) const; bool selectOpUndef(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectIntrinsic(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectExtractVal(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectInsertVal(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectExtractElt(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectInsertElt(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectGEP(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectFrameIndex(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectBranch(MachineInstr &I) const; bool selectBranchCond(MachineInstr &I) const; bool selectPhi(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const; bool selectExtInst(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, CL::OpenCLExtInst CLInst) const; bool selectExtInst(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, CL::OpenCLExtInst CLInst, GL::GLSLExtInst GLInst) const; bool selectExtInst(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, const ExtInstList &ExtInsts) const; Register buildI32Constant(uint32_t Val, MachineInstr &I, const SPIRVType *ResType = nullptr) const; Register buildZerosVal(const SPIRVType *ResType, MachineInstr &I) const; Register buildOnesVal(bool AllOnes, const SPIRVType *ResType, MachineInstr &I) const; }; } // end anonymous namespace #define GET_GLOBALISEL_IMPL #include "SPIRVGenGlobalISel.inc" #undef GET_GLOBALISEL_IMPL SPIRVInstructionSelector::SPIRVInstructionSelector(const SPIRVTargetMachine &TM, const SPIRVSubtarget &ST, const RegisterBankInfo &RBI) : InstructionSelector(), STI(ST), TII(*ST.getInstrInfo()), TRI(*ST.getRegisterInfo()), RBI(RBI), GR(*ST.getSPIRVGlobalRegistry()), #define GET_GLOBALISEL_PREDICATES_INIT #include "SPIRVGenGlobalISel.inc" #undef GET_GLOBALISEL_PREDICATES_INIT #define GET_GLOBALISEL_TEMPORARIES_INIT #include "SPIRVGenGlobalISel.inc" #undef GET_GLOBALISEL_TEMPORARIES_INIT { } void SPIRVInstructionSelector::setupMF(MachineFunction &MF, GISelKnownBits *KB, CodeGenCoverage &CoverageInfo, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI) { MRI = &MF.getRegInfo(); GR.setCurrentFunc(MF); InstructionSelector::setupMF(MF, KB, CoverageInfo, PSI, BFI); } static bool isImm(const MachineOperand &MO, MachineRegisterInfo *MRI); // Defined in SPIRVLegalizerInfo.cpp. extern bool isTypeFoldingSupported(unsigned Opcode); bool SPIRVInstructionSelector::select(MachineInstr &I) { assert(I.getParent() && "Instruction should be in a basic block!"); assert(I.getParent()->getParent() && "Instruction should be in a function!"); Register Opcode = I.getOpcode(); // If it's not a GMIR instruction, we've selected it already. if (!isPreISelGenericOpcode(Opcode)) { if (Opcode == SPIRV::ASSIGN_TYPE) { // These pseudos aren't needed any more. auto *Def = MRI->getVRegDef(I.getOperand(1).getReg()); if (isTypeFoldingSupported(Def->getOpcode())) { auto Res = selectImpl(I, *CoverageInfo); assert(Res || Def->getOpcode() == TargetOpcode::G_CONSTANT); if (Res) return Res; } MRI->replaceRegWith(I.getOperand(1).getReg(), I.getOperand(0).getReg()); I.removeFromParent(); return true; } else if (I.getNumDefs() == 1) { // Make all vregs 32 bits (for SPIR-V IDs). MRI->setType(I.getOperand(0).getReg(), LLT::scalar(32)); } return constrainSelectedInstRegOperands(I, TII, TRI, RBI); } if (I.getNumOperands() != I.getNumExplicitOperands()) { LLVM_DEBUG(errs() << "Generic instr has unexpected implicit operands\n"); return false; } // Common code for getting return reg+type, and removing selected instr // from parent occurs here. Instr-specific selection happens in spvSelect(). bool HasDefs = I.getNumDefs() > 0; Register ResVReg = HasDefs ? I.getOperand(0).getReg() : Register(0); SPIRVType *ResType = HasDefs ? GR.getSPIRVTypeForVReg(ResVReg) : nullptr; assert(!HasDefs || ResType || I.getOpcode() == TargetOpcode::G_GLOBAL_VALUE); if (spvSelect(ResVReg, ResType, I)) { if (HasDefs) // Make all vregs 32 bits (for SPIR-V IDs). MRI->setType(ResVReg, LLT::scalar(32)); I.removeFromParent(); return true; } return false; } bool SPIRVInstructionSelector::spvSelect(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { assert(!isTypeFoldingSupported(I.getOpcode()) || I.getOpcode() == TargetOpcode::G_CONSTANT); const unsigned Opcode = I.getOpcode(); switch (Opcode) { case TargetOpcode::G_CONSTANT: return selectConst(ResVReg, ResType, I.getOperand(1).getCImm()->getValue(), I); case TargetOpcode::G_GLOBAL_VALUE: return selectGlobalValue(ResVReg, I); case TargetOpcode::G_IMPLICIT_DEF: return selectOpUndef(ResVReg, ResType, I); case TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS: return selectIntrinsic(ResVReg, ResType, I); case TargetOpcode::G_BITREVERSE: return selectBitreverse(ResVReg, ResType, I); case TargetOpcode::G_BUILD_VECTOR: return selectConstVector(ResVReg, ResType, I); case TargetOpcode::G_SHUFFLE_VECTOR: { MachineBasicBlock &BB = *I.getParent(); auto MIB = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpVectorShuffle)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(I.getOperand(1).getReg()) .addUse(I.getOperand(2).getReg()); for (auto V : I.getOperand(3).getShuffleMask()) MIB.addImm(V); return MIB.constrainAllUses(TII, TRI, RBI); } case TargetOpcode::G_MEMMOVE: case TargetOpcode::G_MEMCPY: case TargetOpcode::G_MEMSET: return selectMemOperation(ResVReg, I); case TargetOpcode::G_ICMP: return selectICmp(ResVReg, ResType, I); case TargetOpcode::G_FCMP: return selectFCmp(ResVReg, ResType, I); case TargetOpcode::G_FRAME_INDEX: return selectFrameIndex(ResVReg, ResType, I); case TargetOpcode::G_LOAD: return selectLoad(ResVReg, ResType, I); case TargetOpcode::G_STORE: return selectStore(I); case TargetOpcode::G_BR: return selectBranch(I); case TargetOpcode::G_BRCOND: return selectBranchCond(I); case TargetOpcode::G_PHI: return selectPhi(ResVReg, ResType, I); case TargetOpcode::G_FPTOSI: return selectUnOp(ResVReg, ResType, I, SPIRV::OpConvertFToS); case TargetOpcode::G_FPTOUI: return selectUnOp(ResVReg, ResType, I, SPIRV::OpConvertFToU); case TargetOpcode::G_SITOFP: return selectIToF(ResVReg, ResType, I, true, SPIRV::OpConvertSToF); case TargetOpcode::G_UITOFP: return selectIToF(ResVReg, ResType, I, false, SPIRV::OpConvertUToF); case TargetOpcode::G_CTPOP: return selectUnOp(ResVReg, ResType, I, SPIRV::OpBitCount); case TargetOpcode::G_SMIN: return selectExtInst(ResVReg, ResType, I, CL::s_min, GL::SMin); case TargetOpcode::G_UMIN: return selectExtInst(ResVReg, ResType, I, CL::u_min, GL::UMin); case TargetOpcode::G_SMAX: return selectExtInst(ResVReg, ResType, I, CL::s_max, GL::SMax); case TargetOpcode::G_UMAX: return selectExtInst(ResVReg, ResType, I, CL::u_max, GL::UMax); case TargetOpcode::G_FMA: return selectExtInst(ResVReg, ResType, I, CL::fma, GL::Fma); case TargetOpcode::G_FPOW: return selectExtInst(ResVReg, ResType, I, CL::pow, GL::Pow); case TargetOpcode::G_FPOWI: return selectExtInst(ResVReg, ResType, I, CL::pown); case TargetOpcode::G_FEXP: return selectExtInst(ResVReg, ResType, I, CL::exp, GL::Exp); case TargetOpcode::G_FEXP2: return selectExtInst(ResVReg, ResType, I, CL::exp2, GL::Exp2); case TargetOpcode::G_FLOG: return selectExtInst(ResVReg, ResType, I, CL::log, GL::Log); case TargetOpcode::G_FLOG2: return selectExtInst(ResVReg, ResType, I, CL::log2, GL::Log2); case TargetOpcode::G_FLOG10: return selectExtInst(ResVReg, ResType, I, CL::log10); case TargetOpcode::G_FABS: return selectExtInst(ResVReg, ResType, I, CL::fabs, GL::FAbs); case TargetOpcode::G_ABS: return selectExtInst(ResVReg, ResType, I, CL::s_abs, GL::SAbs); case TargetOpcode::G_FMINNUM: case TargetOpcode::G_FMINIMUM: return selectExtInst(ResVReg, ResType, I, CL::fmin, GL::FMin); case TargetOpcode::G_FMAXNUM: case TargetOpcode::G_FMAXIMUM: return selectExtInst(ResVReg, ResType, I, CL::fmax, GL::FMax); case TargetOpcode::G_FCOPYSIGN: return selectExtInst(ResVReg, ResType, I, CL::copysign); case TargetOpcode::G_FCEIL: return selectExtInst(ResVReg, ResType, I, CL::ceil, GL::Ceil); case TargetOpcode::G_FFLOOR: return selectExtInst(ResVReg, ResType, I, CL::floor, GL::Floor); case TargetOpcode::G_FCOS: return selectExtInst(ResVReg, ResType, I, CL::cos, GL::Cos); case TargetOpcode::G_FSIN: return selectExtInst(ResVReg, ResType, I, CL::sin, GL::Sin); case TargetOpcode::G_FSQRT: return selectExtInst(ResVReg, ResType, I, CL::sqrt, GL::Sqrt); case TargetOpcode::G_CTTZ: case TargetOpcode::G_CTTZ_ZERO_UNDEF: return selectExtInst(ResVReg, ResType, I, CL::ctz); case TargetOpcode::G_CTLZ: case TargetOpcode::G_CTLZ_ZERO_UNDEF: return selectExtInst(ResVReg, ResType, I, CL::clz); case TargetOpcode::G_INTRINSIC_ROUND: return selectExtInst(ResVReg, ResType, I, CL::round, GL::Round); case TargetOpcode::G_INTRINSIC_ROUNDEVEN: return selectExtInst(ResVReg, ResType, I, CL::rint, GL::RoundEven); case TargetOpcode::G_INTRINSIC_TRUNC: return selectExtInst(ResVReg, ResType, I, CL::trunc, GL::Trunc); case TargetOpcode::G_FRINT: case TargetOpcode::G_FNEARBYINT: return selectExtInst(ResVReg, ResType, I, CL::rint, GL::RoundEven); case TargetOpcode::G_SMULH: return selectExtInst(ResVReg, ResType, I, CL::s_mul_hi); case TargetOpcode::G_UMULH: return selectExtInst(ResVReg, ResType, I, CL::u_mul_hi); case TargetOpcode::G_SEXT: return selectExt(ResVReg, ResType, I, true); case TargetOpcode::G_ANYEXT: case TargetOpcode::G_ZEXT: return selectExt(ResVReg, ResType, I, false); case TargetOpcode::G_TRUNC: return selectTrunc(ResVReg, ResType, I); case TargetOpcode::G_FPTRUNC: case TargetOpcode::G_FPEXT: return selectUnOp(ResVReg, ResType, I, SPIRV::OpFConvert); case TargetOpcode::G_PTRTOINT: return selectUnOp(ResVReg, ResType, I, SPIRV::OpConvertPtrToU); case TargetOpcode::G_INTTOPTR: return selectUnOp(ResVReg, ResType, I, SPIRV::OpConvertUToPtr); case TargetOpcode::G_BITCAST: return selectUnOp(ResVReg, ResType, I, SPIRV::OpBitcast); case TargetOpcode::G_ADDRSPACE_CAST: return selectAddrSpaceCast(ResVReg, ResType, I); case TargetOpcode::G_PTR_ADD: { // Currently, we get G_PTR_ADD only as a result of translating // global variables, initialized with constant expressions like GV + Const // (see test opencl/basic/progvar_prog_scope_init.ll). // TODO: extend the handler once we have other cases. assert(I.getOperand(1).isReg() && I.getOperand(2).isReg()); Register GV = I.getOperand(1).getReg(); MachineRegisterInfo::def_instr_iterator II = MRI->def_instr_begin(GV); assert(((*II).getOpcode() == TargetOpcode::G_GLOBAL_VALUE || (*II).getOpcode() == TargetOpcode::COPY || (*II).getOpcode() == SPIRV::OpVariable) && isImm(I.getOperand(2), MRI)); Register Idx = buildZerosVal(GR.getOrCreateSPIRVIntegerType(32, I, TII), I); MachineBasicBlock &BB = *I.getParent(); auto MIB = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpSpecConstantOp)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addImm(static_cast<uint32_t>( SPIRV::Opcode::InBoundsPtrAccessChain)) .addUse(GV) .addUse(Idx) .addUse(I.getOperand(2).getReg()); return MIB.constrainAllUses(TII, TRI, RBI); } case TargetOpcode::G_ATOMICRMW_OR: return selectAtomicRMW(ResVReg, ResType, I, SPIRV::OpAtomicOr); case TargetOpcode::G_ATOMICRMW_ADD: return selectAtomicRMW(ResVReg, ResType, I, SPIRV::OpAtomicIAdd); case TargetOpcode::G_ATOMICRMW_AND: return selectAtomicRMW(ResVReg, ResType, I, SPIRV::OpAtomicAnd); case TargetOpcode::G_ATOMICRMW_MAX: return selectAtomicRMW(ResVReg, ResType, I, SPIRV::OpAtomicSMax); case TargetOpcode::G_ATOMICRMW_MIN: return selectAtomicRMW(ResVReg, ResType, I, SPIRV::OpAtomicSMin); case TargetOpcode::G_ATOMICRMW_SUB: return selectAtomicRMW(ResVReg, ResType, I, SPIRV::OpAtomicISub); case TargetOpcode::G_ATOMICRMW_XOR: return selectAtomicRMW(ResVReg, ResType, I, SPIRV::OpAtomicXor); case TargetOpcode::G_ATOMICRMW_UMAX: return selectAtomicRMW(ResVReg, ResType, I, SPIRV::OpAtomicUMax); case TargetOpcode::G_ATOMICRMW_UMIN: return selectAtomicRMW(ResVReg, ResType, I, SPIRV::OpAtomicUMin); case TargetOpcode::G_ATOMICRMW_XCHG: return selectAtomicRMW(ResVReg, ResType, I, SPIRV::OpAtomicExchange); case TargetOpcode::G_ATOMIC_CMPXCHG: return selectAtomicCmpXchg(ResVReg, ResType, I); case TargetOpcode::G_FENCE: return selectFence(I); default: return false; } } bool SPIRVInstructionSelector::selectExtInst(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, CL::OpenCLExtInst CLInst) const { return selectExtInst(ResVReg, ResType, I, {{SPIRV::InstructionSet::OpenCL_std, CLInst}}); } bool SPIRVInstructionSelector::selectExtInst(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, CL::OpenCLExtInst CLInst, GL::GLSLExtInst GLInst) const { ExtInstList ExtInsts = {{SPIRV::InstructionSet::OpenCL_std, CLInst}, {SPIRV::InstructionSet::GLSL_std_450, GLInst}}; return selectExtInst(ResVReg, ResType, I, ExtInsts); } bool SPIRVInstructionSelector::selectExtInst(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, const ExtInstList &Insts) const { for (const auto &Ex : Insts) { SPIRV::InstructionSet::InstructionSet Set = Ex.first; uint32_t Opcode = Ex.second; if (STI.canUseExtInstSet(Set)) { MachineBasicBlock &BB = *I.getParent(); auto MIB = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpExtInst)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addImm(static_cast<uint32_t>(Set)) .addImm(Opcode); const unsigned NumOps = I.getNumOperands(); for (unsigned i = 1; i < NumOps; ++i) MIB.add(I.getOperand(i)); return MIB.constrainAllUses(TII, TRI, RBI); } } return false; } bool SPIRVInstructionSelector::selectUnOpWithSrc(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, Register SrcReg, unsigned Opcode) const { return BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(Opcode)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(SrcReg) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectUnOp(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, unsigned Opcode) const { return selectUnOpWithSrc(ResVReg, ResType, I, I.getOperand(1).getReg(), Opcode); } static SPIRV::Scope::Scope getScope(SyncScope::ID Ord) { switch (Ord) { case SyncScope::SingleThread: return SPIRV::Scope::Invocation; case SyncScope::System: return SPIRV::Scope::Device; default: llvm_unreachable("Unsupported synchronization Scope ID."); } } static void addMemoryOperands(MachineMemOperand *MemOp, MachineInstrBuilder &MIB) { uint32_t SpvMemOp = static_cast<uint32_t>(SPIRV::MemoryOperand::None); if (MemOp->isVolatile()) SpvMemOp |= static_cast<uint32_t>(SPIRV::MemoryOperand::Volatile); if (MemOp->isNonTemporal()) SpvMemOp |= static_cast<uint32_t>(SPIRV::MemoryOperand::Nontemporal); if (MemOp->getAlign().value()) SpvMemOp |= static_cast<uint32_t>(SPIRV::MemoryOperand::Aligned); if (SpvMemOp != static_cast<uint32_t>(SPIRV::MemoryOperand::None)) { MIB.addImm(SpvMemOp); if (SpvMemOp & static_cast<uint32_t>(SPIRV::MemoryOperand::Aligned)) MIB.addImm(MemOp->getAlign().value()); } } static void addMemoryOperands(uint64_t Flags, MachineInstrBuilder &MIB) { uint32_t SpvMemOp = static_cast<uint32_t>(SPIRV::MemoryOperand::None); if (Flags & MachineMemOperand::Flags::MOVolatile) SpvMemOp |= static_cast<uint32_t>(SPIRV::MemoryOperand::Volatile); if (Flags & MachineMemOperand::Flags::MONonTemporal) SpvMemOp |= static_cast<uint32_t>(SPIRV::MemoryOperand::Nontemporal); if (SpvMemOp != static_cast<uint32_t>(SPIRV::MemoryOperand::None)) MIB.addImm(SpvMemOp); } bool SPIRVInstructionSelector::selectLoad(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { unsigned OpOffset = I.getOpcode() == TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS ? 1 : 0; Register Ptr = I.getOperand(1 + OpOffset).getReg(); auto MIB = BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(SPIRV::OpLoad)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(Ptr); if (!I.getNumMemOperands()) { assert(I.getOpcode() == TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS); addMemoryOperands(I.getOperand(2 + OpOffset).getImm(), MIB); } else { addMemoryOperands(*I.memoperands_begin(), MIB); } return MIB.constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectStore(MachineInstr &I) const { unsigned OpOffset = I.getOpcode() == TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS ? 1 : 0; Register StoreVal = I.getOperand(0 + OpOffset).getReg(); Register Ptr = I.getOperand(1 + OpOffset).getReg(); MachineBasicBlock &BB = *I.getParent(); auto MIB = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpStore)) .addUse(Ptr) .addUse(StoreVal); if (!I.getNumMemOperands()) { assert(I.getOpcode() == TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS); addMemoryOperands(I.getOperand(2 + OpOffset).getImm(), MIB); } else { addMemoryOperands(*I.memoperands_begin(), MIB); } return MIB.constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectMemOperation(Register ResVReg, MachineInstr &I) const { MachineBasicBlock &BB = *I.getParent(); Register SrcReg = I.getOperand(1).getReg(); if (I.getOpcode() == TargetOpcode::G_MEMSET) { assert(I.getOperand(1).isReg() && I.getOperand(2).isReg()); unsigned Val = getIConstVal(I.getOperand(1).getReg(), MRI); unsigned Num = getIConstVal(I.getOperand(2).getReg(), MRI); SPIRVType *ValTy = GR.getOrCreateSPIRVIntegerType(8, I, TII); SPIRVType *ArrTy = GR.getOrCreateSPIRVArrayType(ValTy, Num, I, TII); Register Const = GR.getOrCreateConsIntArray(Val, I, ArrTy, TII); SPIRVType *VarTy = GR.getOrCreateSPIRVPointerType( ArrTy, I, TII, SPIRV::StorageClass::UniformConstant); // TODO: check if we have such GV, add init, use buildGlobalVariable. Type *LLVMArrTy = ArrayType::get( IntegerType::get(GR.CurMF->getFunction().getContext(), 8), Num); GlobalVariable *GV = new GlobalVariable(LLVMArrTy, true, GlobalValue::InternalLinkage); Register VarReg = MRI->createGenericVirtualRegister(LLT::scalar(32)); GR.add(GV, GR.CurMF, VarReg); buildOpDecorate(VarReg, I, TII, SPIRV::Decoration::Constant, {}); BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(SPIRV::OpVariable)) .addDef(VarReg) .addUse(GR.getSPIRVTypeID(VarTy)) .addImm(SPIRV::StorageClass::UniformConstant) .addUse(Const) .constrainAllUses(TII, TRI, RBI); SPIRVType *SourceTy = GR.getOrCreateSPIRVPointerType( ValTy, I, TII, SPIRV::StorageClass::UniformConstant); SrcReg = MRI->createGenericVirtualRegister(LLT::scalar(32)); selectUnOpWithSrc(SrcReg, SourceTy, I, VarReg, SPIRV::OpBitcast); } auto MIB = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpCopyMemorySized)) .addUse(I.getOperand(0).getReg()) .addUse(SrcReg) .addUse(I.getOperand(2).getReg()); if (I.getNumMemOperands()) addMemoryOperands(*I.memoperands_begin(), MIB); bool Result = MIB.constrainAllUses(TII, TRI, RBI); if (ResVReg.isValid() && ResVReg != MIB->getOperand(0).getReg()) BuildMI(BB, I, I.getDebugLoc(), TII.get(TargetOpcode::COPY), ResVReg) .addUse(MIB->getOperand(0).getReg()); return Result; } bool SPIRVInstructionSelector::selectAtomicRMW(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, unsigned NewOpcode) const { assert(I.hasOneMemOperand()); const MachineMemOperand *MemOp = *I.memoperands_begin(); uint32_t Scope = static_cast<uint32_t>(getScope(MemOp->getSyncScopeID())); Register ScopeReg = buildI32Constant(Scope, I); Register Ptr = I.getOperand(1).getReg(); // TODO: Changed as it's implemented in the translator. See test/atomicrmw.ll // auto ScSem = // getMemSemanticsForStorageClass(GR.getPointerStorageClass(Ptr)); AtomicOrdering AO = MemOp->getSuccessOrdering(); uint32_t MemSem = static_cast<uint32_t>(getMemSemantics(AO)); Register MemSemReg = buildI32Constant(MemSem /*| ScSem*/, I); return BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(NewOpcode)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(Ptr) .addUse(ScopeReg) .addUse(MemSemReg) .addUse(I.getOperand(2).getReg()) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectFence(MachineInstr &I) const { AtomicOrdering AO = AtomicOrdering(I.getOperand(0).getImm()); uint32_t MemSem = static_cast<uint32_t>(getMemSemantics(AO)); Register MemSemReg = buildI32Constant(MemSem, I); SyncScope::ID Ord = SyncScope::ID(I.getOperand(1).getImm()); uint32_t Scope = static_cast<uint32_t>(getScope(Ord)); Register ScopeReg = buildI32Constant(Scope, I); MachineBasicBlock &BB = *I.getParent(); return BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpMemoryBarrier)) .addUse(ScopeReg) .addUse(MemSemReg) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectAtomicCmpXchg(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { Register ScopeReg; Register MemSemEqReg; Register MemSemNeqReg; Register Ptr = I.getOperand(2).getReg(); if (I.getOpcode() != TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS) { assert(I.hasOneMemOperand()); const MachineMemOperand *MemOp = *I.memoperands_begin(); unsigned Scope = static_cast<uint32_t>(getScope(MemOp->getSyncScopeID())); ScopeReg = buildI32Constant(Scope, I); unsigned ScSem = static_cast<uint32_t>( getMemSemanticsForStorageClass(GR.getPointerStorageClass(Ptr))); AtomicOrdering AO = MemOp->getSuccessOrdering(); unsigned MemSemEq = static_cast<uint32_t>(getMemSemantics(AO)) | ScSem; MemSemEqReg = buildI32Constant(MemSemEq, I); AtomicOrdering FO = MemOp->getFailureOrdering(); unsigned MemSemNeq = static_cast<uint32_t>(getMemSemantics(FO)) | ScSem; MemSemNeqReg = MemSemEq == MemSemNeq ? MemSemEqReg : buildI32Constant(MemSemNeq, I); } else { ScopeReg = I.getOperand(5).getReg(); MemSemEqReg = I.getOperand(6).getReg(); MemSemNeqReg = I.getOperand(7).getReg(); } Register Cmp = I.getOperand(3).getReg(); Register Val = I.getOperand(4).getReg(); SPIRVType *SpvValTy = GR.getSPIRVTypeForVReg(Val); Register ACmpRes = MRI->createVirtualRegister(&SPIRV::IDRegClass); const DebugLoc &DL = I.getDebugLoc(); bool Result = BuildMI(*I.getParent(), I, DL, TII.get(SPIRV::OpAtomicCompareExchange)) .addDef(ACmpRes) .addUse(GR.getSPIRVTypeID(SpvValTy)) .addUse(Ptr) .addUse(ScopeReg) .addUse(MemSemEqReg) .addUse(MemSemNeqReg) .addUse(Val) .addUse(Cmp) .constrainAllUses(TII, TRI, RBI); Register CmpSuccReg = MRI->createVirtualRegister(&SPIRV::IDRegClass); SPIRVType *BoolTy = GR.getOrCreateSPIRVBoolType(I, TII); Result |= BuildMI(*I.getParent(), I, DL, TII.get(SPIRV::OpIEqual)) .addDef(CmpSuccReg) .addUse(GR.getSPIRVTypeID(BoolTy)) .addUse(ACmpRes) .addUse(Cmp) .constrainAllUses(TII, TRI, RBI); Register TmpReg = MRI->createVirtualRegister(&SPIRV::IDRegClass); Result |= BuildMI(*I.getParent(), I, DL, TII.get(SPIRV::OpCompositeInsert)) .addDef(TmpReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(ACmpRes) .addUse(GR.getOrCreateUndef(I, ResType, TII)) .addImm(0) .constrainAllUses(TII, TRI, RBI); Result |= BuildMI(*I.getParent(), I, DL, TII.get(SPIRV::OpCompositeInsert)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(CmpSuccReg) .addUse(TmpReg) .addImm(1) .constrainAllUses(TII, TRI, RBI); return Result; } static bool isGenericCastablePtr(SPIRV::StorageClass::StorageClass SC) { switch (SC) { case SPIRV::StorageClass::Workgroup: case SPIRV::StorageClass::CrossWorkgroup: case SPIRV::StorageClass::Function: return true; default: return false; } } // In SPIR-V address space casting can only happen to and from the Generic // storage class. We can also only case Workgroup, CrossWorkgroup, or Function // pointers to and from Generic pointers. As such, we can convert e.g. from // Workgroup to Function by going via a Generic pointer as an intermediary. All // other combinations can only be done by a bitcast, and are probably not safe. bool SPIRVInstructionSelector::selectAddrSpaceCast(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { // If the AddrSpaceCast user is single and in OpConstantComposite or // OpVariable, we should select OpSpecConstantOp. auto UIs = MRI->use_instructions(ResVReg); if (!UIs.empty() && ++UIs.begin() == UIs.end() && (UIs.begin()->getOpcode() == SPIRV::OpConstantComposite || UIs.begin()->getOpcode() == SPIRV::OpVariable || isSpvIntrinsic(*UIs.begin(), Intrinsic::spv_init_global))) { Register NewReg = I.getOperand(1).getReg(); MachineBasicBlock &BB = *I.getParent(); SPIRVType *SpvBaseTy = GR.getOrCreateSPIRVIntegerType(8, I, TII); ResType = GR.getOrCreateSPIRVPointerType(SpvBaseTy, I, TII, SPIRV::StorageClass::Generic); bool Result = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpSpecConstantOp)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addImm(static_cast<uint32_t>(SPIRV::Opcode::PtrCastToGeneric)) .addUse(NewReg) .constrainAllUses(TII, TRI, RBI); return Result; } Register SrcPtr = I.getOperand(1).getReg(); SPIRVType *SrcPtrTy = GR.getSPIRVTypeForVReg(SrcPtr); SPIRV::StorageClass::StorageClass SrcSC = GR.getPointerStorageClass(SrcPtr); SPIRV::StorageClass::StorageClass DstSC = GR.getPointerStorageClass(ResVReg); // Casting from an eligable pointer to Generic. if (DstSC == SPIRV::StorageClass::Generic && isGenericCastablePtr(SrcSC)) return selectUnOp(ResVReg, ResType, I, SPIRV::OpPtrCastToGeneric); // Casting from Generic to an eligable pointer. if (SrcSC == SPIRV::StorageClass::Generic && isGenericCastablePtr(DstSC)) return selectUnOp(ResVReg, ResType, I, SPIRV::OpGenericCastToPtr); // Casting between 2 eligable pointers using Generic as an intermediary. if (isGenericCastablePtr(SrcSC) && isGenericCastablePtr(DstSC)) { Register Tmp = MRI->createVirtualRegister(&SPIRV::IDRegClass); SPIRVType *GenericPtrTy = GR.getOrCreateSPIRVPointerType( SrcPtrTy, I, TII, SPIRV::StorageClass::Generic); MachineBasicBlock &BB = *I.getParent(); const DebugLoc &DL = I.getDebugLoc(); bool Success = BuildMI(BB, I, DL, TII.get(SPIRV::OpPtrCastToGeneric)) .addDef(Tmp) .addUse(GR.getSPIRVTypeID(GenericPtrTy)) .addUse(SrcPtr) .constrainAllUses(TII, TRI, RBI); return Success && BuildMI(BB, I, DL, TII.get(SPIRV::OpGenericCastToPtr)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(Tmp) .constrainAllUses(TII, TRI, RBI); } // TODO Should this case just be disallowed completely? // We're casting 2 other arbitrary address spaces, so have to bitcast. return selectUnOp(ResVReg, ResType, I, SPIRV::OpBitcast); } static unsigned getFCmpOpcode(unsigned PredNum) { auto Pred = static_cast<CmpInst::Predicate>(PredNum); switch (Pred) { case CmpInst::FCMP_OEQ: return SPIRV::OpFOrdEqual; case CmpInst::FCMP_OGE: return SPIRV::OpFOrdGreaterThanEqual; case CmpInst::FCMP_OGT: return SPIRV::OpFOrdGreaterThan; case CmpInst::FCMP_OLE: return SPIRV::OpFOrdLessThanEqual; case CmpInst::FCMP_OLT: return SPIRV::OpFOrdLessThan; case CmpInst::FCMP_ONE: return SPIRV::OpFOrdNotEqual; case CmpInst::FCMP_ORD: return SPIRV::OpOrdered; case CmpInst::FCMP_UEQ: return SPIRV::OpFUnordEqual; case CmpInst::FCMP_UGE: return SPIRV::OpFUnordGreaterThanEqual; case CmpInst::FCMP_UGT: return SPIRV::OpFUnordGreaterThan; case CmpInst::FCMP_ULE: return SPIRV::OpFUnordLessThanEqual; case CmpInst::FCMP_ULT: return SPIRV::OpFUnordLessThan; case CmpInst::FCMP_UNE: return SPIRV::OpFUnordNotEqual; case CmpInst::FCMP_UNO: return SPIRV::OpUnordered; default: llvm_unreachable("Unknown predicate type for FCmp"); } } static unsigned getICmpOpcode(unsigned PredNum) { auto Pred = static_cast<CmpInst::Predicate>(PredNum); switch (Pred) { case CmpInst::ICMP_EQ: return SPIRV::OpIEqual; case CmpInst::ICMP_NE: return SPIRV::OpINotEqual; case CmpInst::ICMP_SGE: return SPIRV::OpSGreaterThanEqual; case CmpInst::ICMP_SGT: return SPIRV::OpSGreaterThan; case CmpInst::ICMP_SLE: return SPIRV::OpSLessThanEqual; case CmpInst::ICMP_SLT: return SPIRV::OpSLessThan; case CmpInst::ICMP_UGE: return SPIRV::OpUGreaterThanEqual; case CmpInst::ICMP_UGT: return SPIRV::OpUGreaterThan; case CmpInst::ICMP_ULE: return SPIRV::OpULessThanEqual; case CmpInst::ICMP_ULT: return SPIRV::OpULessThan; default: llvm_unreachable("Unknown predicate type for ICmp"); } } static unsigned getPtrCmpOpcode(unsigned Pred) { switch (static_cast<CmpInst::Predicate>(Pred)) { case CmpInst::ICMP_EQ: return SPIRV::OpPtrEqual; case CmpInst::ICMP_NE: return SPIRV::OpPtrNotEqual; default: llvm_unreachable("Unknown predicate type for pointer comparison"); } } // Return the logical operation, or abort if none exists. static unsigned getBoolCmpOpcode(unsigned PredNum) { auto Pred = static_cast<CmpInst::Predicate>(PredNum); switch (Pred) { case CmpInst::ICMP_EQ: return SPIRV::OpLogicalEqual; case CmpInst::ICMP_NE: return SPIRV::OpLogicalNotEqual; default: llvm_unreachable("Unknown predicate type for Bool comparison"); } } bool SPIRVInstructionSelector::selectBitreverse(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { MachineBasicBlock &BB = *I.getParent(); return BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpBitReverse)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(I.getOperand(1).getReg()) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectConstVector(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { // TODO: only const case is supported for now. assert(std::all_of( I.operands_begin(), I.operands_end(), [this](const MachineOperand &MO) { if (MO.isDef()) return true; if (!MO.isReg()) return false; SPIRVType *ConstTy = this->MRI->getVRegDef(MO.getReg()); assert(ConstTy && ConstTy->getOpcode() == SPIRV::ASSIGN_TYPE && ConstTy->getOperand(1).isReg()); Register ConstReg = ConstTy->getOperand(1).getReg(); const MachineInstr *Const = this->MRI->getVRegDef(ConstReg); assert(Const); return (Const->getOpcode() == TargetOpcode::G_CONSTANT || Const->getOpcode() == TargetOpcode::G_FCONSTANT); })); auto MIB = BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(SPIRV::OpConstantComposite)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)); for (unsigned i = I.getNumExplicitDefs(); i < I.getNumExplicitOperands(); ++i) MIB.addUse(I.getOperand(i).getReg()); return MIB.constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectCmp(Register ResVReg, const SPIRVType *ResType, unsigned CmpOpc, MachineInstr &I) const { Register Cmp0 = I.getOperand(2).getReg(); Register Cmp1 = I.getOperand(3).getReg(); assert(GR.getSPIRVTypeForVReg(Cmp0)->getOpcode() == GR.getSPIRVTypeForVReg(Cmp1)->getOpcode() && "CMP operands should have the same type"); return BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(CmpOpc)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(Cmp0) .addUse(Cmp1) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectICmp(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { auto Pred = I.getOperand(1).getPredicate(); unsigned CmpOpc; Register CmpOperand = I.getOperand(2).getReg(); if (GR.isScalarOfType(CmpOperand, SPIRV::OpTypePointer)) CmpOpc = getPtrCmpOpcode(Pred); else if (GR.isScalarOrVectorOfType(CmpOperand, SPIRV::OpTypeBool)) CmpOpc = getBoolCmpOpcode(Pred); else CmpOpc = getICmpOpcode(Pred); return selectCmp(ResVReg, ResType, CmpOpc, I); } void SPIRVInstructionSelector::renderFImm32(MachineInstrBuilder &MIB, const MachineInstr &I, int OpIdx) const { assert(I.getOpcode() == TargetOpcode::G_FCONSTANT && OpIdx == -1 && "Expected G_FCONSTANT"); const ConstantFP *FPImm = I.getOperand(1).getFPImm(); addNumImm(FPImm->getValueAPF().bitcastToAPInt(), MIB); } void SPIRVInstructionSelector::renderImm32(MachineInstrBuilder &MIB, const MachineInstr &I, int OpIdx) const { assert(I.getOpcode() == TargetOpcode::G_CONSTANT && OpIdx == -1 && "Expected G_CONSTANT"); addNumImm(I.getOperand(1).getCImm()->getValue(), MIB); } Register SPIRVInstructionSelector::buildI32Constant(uint32_t Val, MachineInstr &I, const SPIRVType *ResType) const { Type *LLVMTy = IntegerType::get(GR.CurMF->getFunction().getContext(), 32); const SPIRVType *SpvI32Ty = ResType ? ResType : GR.getOrCreateSPIRVIntegerType(32, I, TII); // Find a constant in DT or build a new one. auto ConstInt = ConstantInt::get(LLVMTy, Val); Register NewReg = GR.find(ConstInt, GR.CurMF); if (!NewReg.isValid()) { NewReg = MRI->createGenericVirtualRegister(LLT::scalar(32)); GR.add(ConstInt, GR.CurMF, NewReg); MachineInstr *MI; MachineBasicBlock &BB = *I.getParent(); if (Val == 0) { MI = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpConstantNull)) .addDef(NewReg) .addUse(GR.getSPIRVTypeID(SpvI32Ty)); } else { MI = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpConstantI)) .addDef(NewReg) .addUse(GR.getSPIRVTypeID(SpvI32Ty)) .addImm(APInt(32, Val).getZExtValue()); } constrainSelectedInstRegOperands(*MI, TII, TRI, RBI); } return NewReg; } bool SPIRVInstructionSelector::selectFCmp(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { unsigned CmpOp = getFCmpOpcode(I.getOperand(1).getPredicate()); return selectCmp(ResVReg, ResType, CmpOp, I); } Register SPIRVInstructionSelector::buildZerosVal(const SPIRVType *ResType, MachineInstr &I) const { if (ResType->getOpcode() == SPIRV::OpTypeVector) return GR.getOrCreateConsIntVector(0, I, ResType, TII); return GR.getOrCreateConstInt(0, I, ResType, TII); } Register SPIRVInstructionSelector::buildOnesVal(bool AllOnes, const SPIRVType *ResType, MachineInstr &I) const { unsigned BitWidth = GR.getScalarOrVectorBitWidth(ResType); APInt One = AllOnes ? APInt::getAllOnesValue(BitWidth) : APInt::getOneBitSet(BitWidth, 0); if (ResType->getOpcode() == SPIRV::OpTypeVector) return GR.getOrCreateConsIntVector(One.getZExtValue(), I, ResType, TII); return GR.getOrCreateConstInt(One.getZExtValue(), I, ResType, TII); } bool SPIRVInstructionSelector::selectSelect(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, bool IsSigned) const { // To extend a bool, we need to use OpSelect between constants. Register ZeroReg = buildZerosVal(ResType, I); Register OneReg = buildOnesVal(IsSigned, ResType, I); bool IsScalarBool = GR.isScalarOfType(I.getOperand(1).getReg(), SPIRV::OpTypeBool); unsigned Opcode = IsScalarBool ? SPIRV::OpSelectSISCond : SPIRV::OpSelectSIVCond; return BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(Opcode)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(I.getOperand(1).getReg()) .addUse(OneReg) .addUse(ZeroReg) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectIToF(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, bool IsSigned, unsigned Opcode) const { Register SrcReg = I.getOperand(1).getReg(); // We can convert bool value directly to float type without OpConvert*ToF, // however the translator generates OpSelect+OpConvert*ToF, so we do the same. if (GR.isScalarOrVectorOfType(I.getOperand(1).getReg(), SPIRV::OpTypeBool)) { unsigned BitWidth = GR.getScalarOrVectorBitWidth(ResType); SPIRVType *TmpType = GR.getOrCreateSPIRVIntegerType(BitWidth, I, TII); if (ResType->getOpcode() == SPIRV::OpTypeVector) { const unsigned NumElts = ResType->getOperand(2).getImm(); TmpType = GR.getOrCreateSPIRVVectorType(TmpType, NumElts, I, TII); } SrcReg = MRI->createVirtualRegister(&SPIRV::IDRegClass); selectSelect(SrcReg, TmpType, I, false); } return selectUnOpWithSrc(ResVReg, ResType, I, SrcReg, Opcode); } bool SPIRVInstructionSelector::selectExt(Register ResVReg, const SPIRVType *ResType, MachineInstr &I, bool IsSigned) const { if (GR.isScalarOrVectorOfType(I.getOperand(1).getReg(), SPIRV::OpTypeBool)) return selectSelect(ResVReg, ResType, I, IsSigned); unsigned Opcode = IsSigned ? SPIRV::OpSConvert : SPIRV::OpUConvert; return selectUnOp(ResVReg, ResType, I, Opcode); } bool SPIRVInstructionSelector::selectIntToBool(Register IntReg, Register ResVReg, MachineInstr &I, const SPIRVType *IntTy, const SPIRVType *BoolTy) const { // To truncate to a bool, we use OpBitwiseAnd 1 and OpINotEqual to zero. Register BitIntReg = MRI->createVirtualRegister(&SPIRV::IDRegClass); bool IsVectorTy = IntTy->getOpcode() == SPIRV::OpTypeVector; unsigned Opcode = IsVectorTy ? SPIRV::OpBitwiseAndV : SPIRV::OpBitwiseAndS; Register Zero = buildZerosVal(IntTy, I); Register One = buildOnesVal(false, IntTy, I); MachineBasicBlock &BB = *I.getParent(); BuildMI(BB, I, I.getDebugLoc(), TII.get(Opcode)) .addDef(BitIntReg) .addUse(GR.getSPIRVTypeID(IntTy)) .addUse(IntReg) .addUse(One) .constrainAllUses(TII, TRI, RBI); return BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpINotEqual)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(BoolTy)) .addUse(BitIntReg) .addUse(Zero) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectTrunc(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { if (GR.isScalarOrVectorOfType(ResVReg, SPIRV::OpTypeBool)) { Register IntReg = I.getOperand(1).getReg(); const SPIRVType *ArgType = GR.getSPIRVTypeForVReg(IntReg); return selectIntToBool(IntReg, ResVReg, I, ArgType, ResType); } bool IsSigned = GR.isScalarOrVectorSigned(ResType); unsigned Opcode = IsSigned ? SPIRV::OpSConvert : SPIRV::OpUConvert; return selectUnOp(ResVReg, ResType, I, Opcode); } bool SPIRVInstructionSelector::selectConst(Register ResVReg, const SPIRVType *ResType, const APInt &Imm, MachineInstr &I) const { unsigned TyOpcode = ResType->getOpcode(); assert(TyOpcode != SPIRV::OpTypePointer || Imm.isNullValue()); MachineBasicBlock &BB = *I.getParent(); if ((TyOpcode == SPIRV::OpTypePointer || TyOpcode == SPIRV::OpTypeEvent) && Imm.isNullValue()) return BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpConstantNull)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .constrainAllUses(TII, TRI, RBI); if (TyOpcode == SPIRV::OpTypeInt) { Register Reg = GR.getOrCreateConstInt(Imm.getZExtValue(), I, ResType, TII); if (Reg == ResVReg) return true; return BuildMI(BB, I, I.getDebugLoc(), TII.get(TargetOpcode::COPY)) .addDef(ResVReg) .addUse(Reg) .constrainAllUses(TII, TRI, RBI); } auto MIB = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpConstantI)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)); // <=32-bit integers should be caught by the sdag pattern. assert(Imm.getBitWidth() > 32); addNumImm(Imm, MIB); return MIB.constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectOpUndef(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { return BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(SPIRV::OpUndef)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .constrainAllUses(TII, TRI, RBI); } static bool isImm(const MachineOperand &MO, MachineRegisterInfo *MRI) { assert(MO.isReg()); const SPIRVType *TypeInst = MRI->getVRegDef(MO.getReg()); if (TypeInst->getOpcode() != SPIRV::ASSIGN_TYPE) return false; assert(TypeInst->getOperand(1).isReg()); MachineInstr *ImmInst = MRI->getVRegDef(TypeInst->getOperand(1).getReg()); return ImmInst->getOpcode() == TargetOpcode::G_CONSTANT; } static int64_t foldImm(const MachineOperand &MO, MachineRegisterInfo *MRI) { const SPIRVType *TypeInst = MRI->getVRegDef(MO.getReg()); MachineInstr *ImmInst = MRI->getVRegDef(TypeInst->getOperand(1).getReg()); assert(ImmInst->getOpcode() == TargetOpcode::G_CONSTANT); return ImmInst->getOperand(1).getCImm()->getZExtValue(); } bool SPIRVInstructionSelector::selectInsertVal(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { MachineBasicBlock &BB = *I.getParent(); auto MIB = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpCompositeInsert)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) // object to insert .addUse(I.getOperand(3).getReg()) // composite to insert into .addUse(I.getOperand(2).getReg()); for (unsigned i = 4; i < I.getNumOperands(); i++) MIB.addImm(foldImm(I.getOperand(i), MRI)); return MIB.constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectExtractVal(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { MachineBasicBlock &BB = *I.getParent(); auto MIB = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpCompositeExtract)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(I.getOperand(2).getReg()); for (unsigned i = 3; i < I.getNumOperands(); i++) MIB.addImm(foldImm(I.getOperand(i), MRI)); return MIB.constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectInsertElt(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { if (isImm(I.getOperand(4), MRI)) return selectInsertVal(ResVReg, ResType, I); MachineBasicBlock &BB = *I.getParent(); return BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpVectorInsertDynamic)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(I.getOperand(2).getReg()) .addUse(I.getOperand(3).getReg()) .addUse(I.getOperand(4).getReg()) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectExtractElt(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { if (isImm(I.getOperand(3), MRI)) return selectExtractVal(ResVReg, ResType, I); MachineBasicBlock &BB = *I.getParent(); return BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpVectorExtractDynamic)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addUse(I.getOperand(2).getReg()) .addUse(I.getOperand(3).getReg()) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectGEP(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { // In general we should also support OpAccessChain instrs here (i.e. not // PtrAccessChain) but SPIRV-LLVM Translator doesn't emit them at all and so // do we to stay compliant with its test and more importantly consumers. unsigned Opcode = I.getOperand(2).getImm() ? SPIRV::OpInBoundsPtrAccessChain : SPIRV::OpPtrAccessChain; auto Res = BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(Opcode)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) // Object to get a pointer to. .addUse(I.getOperand(3).getReg()); // Adding indices. for (unsigned i = 4; i < I.getNumExplicitOperands(); ++i) Res.addUse(I.getOperand(i).getReg()); return Res.constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { MachineBasicBlock &BB = *I.getParent(); switch (I.getIntrinsicID()) { case Intrinsic::spv_load: return selectLoad(ResVReg, ResType, I); break; case Intrinsic::spv_store: return selectStore(I); break; case Intrinsic::spv_extractv: return selectExtractVal(ResVReg, ResType, I); break; case Intrinsic::spv_insertv: return selectInsertVal(ResVReg, ResType, I); break; case Intrinsic::spv_extractelt: return selectExtractElt(ResVReg, ResType, I); break; case Intrinsic::spv_insertelt: return selectInsertElt(ResVReg, ResType, I); break; case Intrinsic::spv_gep: return selectGEP(ResVReg, ResType, I); break; case Intrinsic::spv_unref_global: case Intrinsic::spv_init_global: { MachineInstr *MI = MRI->getVRegDef(I.getOperand(1).getReg()); MachineInstr *Init = I.getNumExplicitOperands() > 2 ? MRI->getVRegDef(I.getOperand(2).getReg()) : nullptr; assert(MI); return selectGlobalValue(MI->getOperand(0).getReg(), *MI, Init); } break; case Intrinsic::spv_const_composite: { // If no values are attached, the composite is null constant. bool IsNull = I.getNumExplicitDefs() + 1 == I.getNumExplicitOperands(); unsigned Opcode = IsNull ? SPIRV::OpConstantNull : SPIRV::OpConstantComposite; auto MIB = BuildMI(BB, I, I.getDebugLoc(), TII.get(Opcode)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)); // skip type MD node we already used when generated assign.type for this if (!IsNull) { for (unsigned i = I.getNumExplicitDefs() + 1; i < I.getNumExplicitOperands(); ++i) { MIB.addUse(I.getOperand(i).getReg()); } } return MIB.constrainAllUses(TII, TRI, RBI); } break; case Intrinsic::spv_assign_name: { auto MIB = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpName)); MIB.addUse(I.getOperand(I.getNumExplicitDefs() + 1).getReg()); for (unsigned i = I.getNumExplicitDefs() + 2; i < I.getNumExplicitOperands(); ++i) { MIB.addImm(I.getOperand(i).getImm()); } return MIB.constrainAllUses(TII, TRI, RBI); } break; case Intrinsic::spv_switch: { auto MIB = BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpSwitch)); for (unsigned i = 1; i < I.getNumExplicitOperands(); ++i) { if (I.getOperand(i).isReg()) MIB.addReg(I.getOperand(i).getReg()); else if (I.getOperand(i).isCImm()) addNumImm(I.getOperand(i).getCImm()->getValue(), MIB); else if (I.getOperand(i).isMBB()) MIB.addMBB(I.getOperand(i).getMBB()); else llvm_unreachable("Unexpected OpSwitch operand"); } return MIB.constrainAllUses(TII, TRI, RBI); } break; case Intrinsic::spv_cmpxchg: return selectAtomicCmpXchg(ResVReg, ResType, I); break; case Intrinsic::spv_unreachable: BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpUnreachable)); break; case Intrinsic::spv_alloca: return selectFrameIndex(ResVReg, ResType, I); break; default: llvm_unreachable("Intrinsic selection not implemented"); } return true; } bool SPIRVInstructionSelector::selectFrameIndex(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { return BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(SPIRV::OpVariable)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)) .addImm(static_cast<uint32_t>(SPIRV::StorageClass::Function)) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectBranch(MachineInstr &I) const { // InstructionSelector walks backwards through the instructions. We can use // both a G_BR and a G_BRCOND to create an OpBranchConditional. We hit G_BR // first, so can generate an OpBranchConditional here. If there is no // G_BRCOND, we just use OpBranch for a regular unconditional branch. const MachineInstr *PrevI = I.getPrevNode(); MachineBasicBlock &MBB = *I.getParent(); if (PrevI != nullptr && PrevI->getOpcode() == TargetOpcode::G_BRCOND) { return BuildMI(MBB, I, I.getDebugLoc(), TII.get(SPIRV::OpBranchConditional)) .addUse(PrevI->getOperand(0).getReg()) .addMBB(PrevI->getOperand(1).getMBB()) .addMBB(I.getOperand(0).getMBB()) .constrainAllUses(TII, TRI, RBI); } return BuildMI(MBB, I, I.getDebugLoc(), TII.get(SPIRV::OpBranch)) .addMBB(I.getOperand(0).getMBB()) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectBranchCond(MachineInstr &I) const { // InstructionSelector walks backwards through the instructions. For an // explicit conditional branch with no fallthrough, we use both a G_BR and a // G_BRCOND to create an OpBranchConditional. We should hit G_BR first, and // generate the OpBranchConditional in selectBranch above. // // If an OpBranchConditional has been generated, we simply return, as the work // is alread done. If there is no OpBranchConditional, LLVM must be relying on // implicit fallthrough to the next basic block, so we need to create an // OpBranchConditional with an explicit "false" argument pointing to the next // basic block that LLVM would fall through to. const MachineInstr *NextI = I.getNextNode(); // Check if this has already been successfully selected. if (NextI != nullptr && NextI->getOpcode() == SPIRV::OpBranchConditional) return true; // Must be relying on implicit block fallthrough, so generate an // OpBranchConditional with the "next" basic block as the "false" target. MachineBasicBlock &MBB = *I.getParent(); unsigned NextMBBNum = MBB.getNextNode()->getNumber(); MachineBasicBlock *NextMBB = I.getMF()->getBlockNumbered(NextMBBNum); return BuildMI(MBB, I, I.getDebugLoc(), TII.get(SPIRV::OpBranchConditional)) .addUse(I.getOperand(0).getReg()) .addMBB(I.getOperand(1).getMBB()) .addMBB(NextMBB) .constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectPhi(Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { auto MIB = BuildMI(*I.getParent(), I, I.getDebugLoc(), TII.get(SPIRV::OpPhi)) .addDef(ResVReg) .addUse(GR.getSPIRVTypeID(ResType)); const unsigned NumOps = I.getNumOperands(); for (unsigned i = 1; i < NumOps; i += 2) { MIB.addUse(I.getOperand(i + 0).getReg()); MIB.addMBB(I.getOperand(i + 1).getMBB()); } return MIB.constrainAllUses(TII, TRI, RBI); } bool SPIRVInstructionSelector::selectGlobalValue( Register ResVReg, MachineInstr &I, const MachineInstr *Init) const { // FIXME: don't use MachineIRBuilder here, replace it with BuildMI. MachineIRBuilder MIRBuilder(I); const GlobalValue *GV = I.getOperand(1).getGlobal(); SPIRVType *ResType = GR.getOrCreateSPIRVType( GV->getType(), MIRBuilder, SPIRV::AccessQualifier::ReadWrite, false); std::string GlobalIdent = GV->getGlobalIdentifier(); // We have functions as operands in tests with blocks of instruction e.g. in // transcoding/global_block.ll. These operands are not used and should be // substituted by zero constants. Their type is expected to be always // OpTypePointer Function %uchar. if (isa<Function>(GV)) { const Constant *ConstVal = GV; MachineBasicBlock &BB = *I.getParent(); Register NewReg = GR.find(ConstVal, GR.CurMF); if (!NewReg.isValid()) { SPIRVType *SpvBaseTy = GR.getOrCreateSPIRVIntegerType(8, I, TII); ResType = GR.getOrCreateSPIRVPointerType(SpvBaseTy, I, TII); Register NewReg = ResVReg; GR.add(ConstVal, GR.CurMF, NewReg); return BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpConstantNull)) .addDef(NewReg) .addUse(GR.getSPIRVTypeID(ResType)) .constrainAllUses(TII, TRI, RBI); } assert(NewReg != ResVReg); return BuildMI(BB, I, I.getDebugLoc(), TII.get(TargetOpcode::COPY)) .addDef(ResVReg) .addUse(NewReg) .constrainAllUses(TII, TRI, RBI); } auto GlobalVar = cast<GlobalVariable>(GV); assert(GlobalVar->getName() != "llvm.global.annotations"); bool HasInit = GlobalVar->hasInitializer() && !isa<UndefValue>(GlobalVar->getInitializer()); // Skip empty declaration for GVs with initilaizers till we get the decl with // passed initializer. if (HasInit && !Init) return true; unsigned AddrSpace = GV->getAddressSpace(); SPIRV::StorageClass::StorageClass Storage = addressSpaceToStorageClass(AddrSpace); bool HasLnkTy = GV->getLinkage() != GlobalValue::InternalLinkage && Storage != SPIRV::StorageClass::Function; SPIRV::LinkageType::LinkageType LnkType = (GV->isDeclaration() || GV->hasAvailableExternallyLinkage()) ? SPIRV::LinkageType::Import : SPIRV::LinkageType::Export; Register Reg = GR.buildGlobalVariable(ResVReg, ResType, GlobalIdent, GV, Storage, Init, GlobalVar->isConstant(), HasLnkTy, LnkType, MIRBuilder, true); return Reg.isValid(); } namespace llvm { InstructionSelector * createSPIRVInstructionSelector(const SPIRVTargetMachine &TM, const SPIRVSubtarget &Subtarget, const RegisterBankInfo &RBI) { return new SPIRVInstructionSelector(TM, Subtarget, RBI); } } // namespace llvm ```
```python # # # path_to_url # # Unless required by applicable law or agreed to in writing, software # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. from .client.client import MessageBusClient from .message import Message from .send_func import send from .service.event_handler import MessageBusEventHandler ```
James Stephen "Queenie" O'Rourke (December 26, 1883 – December 22, 1955) was an American professional baseball player. He played in Major League Baseball for the New York Highlanders in 1908, primarily as a left fielder and shortstop. Biography O'Rourke was the son of Baseball Hall of Fame inductee Jim O'Rouke; the father was often called "Orator Jim" with the son referred to as "Jimmy". John O'Rourke, brother of Orator Jim, was also a major league player. Jimmy O'Rourke attended Yale University, where he played shortstop on the varsity baseball team in 1901 as a freshman. After being unable to play in 1902 for academic reasons, O'Rourke started playing professionally in 1903, ending his collegiate eligibility. He did complete his degree at Yale, graduating in June 1904. O'Rourke played baseball professionally from 1903 to 1915, and during 1922 and 1924. His major league career consisted of 34 games for the 1908 New York Highlanders, during which he compiled a .231 batting average with three runs batted in. He started 28 games for New York: 13 in left field, 10 at shortstop, three at second base, and two at third base. In the minor leagues, O'Rourke played over 1200 games in 15 seasons. He batted .303 for the Bridgeport Orators of the Connecticut State League in 1907; records for some of his seasons are incomplete. After apparently not playing professionally from 1916 through 1921, O'Rourke batted .283 in 23 games for the Syracuse Stars of the International League in 1922, and .236 in 88 games for the Ottawa-Hull Senators of the Ontario–Quebec–Vermont League in 1924. In 1923, he served as manager of the Ottawa Canadiens in the Eastern Canada League. O'Rourke died in December 1955; he was survived by his wife and a son. While O'Rourke is listed on various baseball references sites under the nickname "Queenie", research by the Society for American Baseball Research indicates that the nickname was "historically contrived", as it was not known to be used during O'Rourke's career and only appeared after his death. See also List of second-generation Major League Baseball players References External links 1883 births 1955 deaths Baseball players from Bridgeport, Connecticut Major League Baseball outfielders New York Highlanders players Yale Bulldogs baseball players Bridgeport Orators players Evansville River Rats players Columbus Senators players St. Paul Saints (AA) players St. Paul Apostles players Syracuse Stars (minor league baseball) players Ottawa-Hull Senators players Minor league baseball managers American expatriate baseball players in Canada
```html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "path_to_url"> <html xmlns="path_to_url"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta http-equiv="x-ua-compatible" content="ie=7"/> <title> KPPWSQL() | WooYun-2014-86886 | WooYun.org </title> <meta name="author" content="80sec"/> <meta name="copyright" content="path_to_url"/> <meta name="keywords" content=",xfkxfk,SQL,wooyun,,web,,,,,"/> <meta name="description" content="KPPWSQL...|WooYun,,,"/> <link rel="icon" href="path_to_url" sizes="32x32" /> <link href="../css/style.css?v=201501291909" rel="stylesheet" type="text/css"/> <script src="path_to_url" type="text/javascript"></script> </head> <body id="bugDetail"> <style> #myBugListTab { position:relative; display:inline; border:none } #myBugList { position:absolute; display:none; margin-left:309px; * margin-left:-60px; * margin-top:18px ; border:#c0c0c0 1px solid; padding:2px 7px; background:#FFF } #myBugList li { text-align:left } </style> <script type="text/javascript"> $(document).ready(function(){ if ( $("#__cz_push_d_object_box__") ) { $("script[src^='path_to_url").attr("src"," ").remove(); $("#__cz_push_d_object_box__").empty().remove(); $("a[id^='__czUnion_a']").attr("href","#").remove(); } if ( $("#ooDiv") ) { $("#ooDiv").empty().parent("div").remove(); } $("#myBugListTab").toggle( function(){ $("#myBugList").css("display","block"); }, function(){ $("#myBugList").css("display","none"); } ); if ( $(window).scrollTop() > 120 ) { $("#back-to-top").fadeIn(300); } else { $("#back-to-top").fadeOut(300); } $(window).scroll(function(){ if ( $(window).scrollTop() > 120 ) { $("#back-to-top").fadeIn(300); } else { $("#back-to-top").fadeOut(300); } }); $("#back-to-top a").click(function() { $('body,html').animate({scrollTop:0},300); return false; }); $("#go-to-comment a").click(function() { var t = $("#replys").offset().top - 52; $('body,html').animate({scrollTop:t},300); return false; }); }); function gofeedback(){ var bugid=$("#fbid").val(); if(bugid){ var url="/feedback.php?bugid="+bugid; }else{ var url="/feedback.php" } window.open(url); } </script> <div class="go-to-wrapper"> <ul class="go-to"> <li id="go-to-comment" title=""><a href="wooyun-2014-086886#"></a></li> <li id="go-to-feedback" title=""><a href="javascript:void(0)" onclick="gofeedback()"></a></li> <li id="back-to-top" title=""><a href="wooyun-2014-086886#"></a></li> </ul> </div> <div class="banner"> <div class="logo"> <h1>WooYun.org</h1> <div class="weibo"><iframe width="136" height="24" frameborder="0" allowtransparency="true" marginwidth="0" marginheight="0" scrolling="no" border="0" src="path_to_url"></iframe> </div> <div class="wxewm"> <a class="ewmthumb" href="javascript:void(0)"><span><img src="path_to_url"width="220" border="0"></span><img src="path_to_url"width="22" border="0"></a> </div> </div> <div class="login"> <a href="path_to_url"></a> | <a href="path_to_url" class="reg"></a> </div> </div> <div class="nav" id="nav_sc"> <ul> <li><a href="path_to_url"></a></li> <li><a href="path_to_url"></a></li> <li><a href="path_to_url"></a></li> <li><a href="path_to_url"></a></li> <li><a href="path_to_url"></a></li> <li><a href="path_to_url"></a></li> <li class="new"><a href="path_to_url"></a></li> <!--li><a href="/corp_actions"></a></li--> <!--<li><a target='_blank' href="path_to_url"></a></li>--> <li><a href="path_to_url" target="_blank" style="color:rgb(246,172,110);font-size:14px;font-weight:blod"></a></li> <!--li><a href="/job/"></a></li--> <li><a href="path_to_url" target="_blank"></a></li> <li><a href="path_to_url" target="_blank"></a></li> <li><a href="path_to_url"></a></li> </ul> <form action="path_to_url" method="post" id="searchbox"> <input type="text" name="q" id="search_input" /> <input type="submit" value="" id="search_button" /> </form> </div> <div class="bread" style="padding-top: 4px;"> <div style="float:left"><a href="path_to_url">WooYun</a> >> <a href="wooyun-2014-086886#"></a></div> </div> <script language="javascript"> var _LANGJS = {"COMMENT_LIKE_SELF":"\u4e0d\u80fd\u81ea\u5df1\u8d5e\u81ea\u5df1\u7684\u8bc4\u8bba","COMMENT_LIKED":"\u5df2\u8d5e\u6b64\u8bc4\u8bba","COMMENT_NOT":"\u6b64\u8bc4\u8bba\u4e0d\u5b58\u5728","COMMENT_FILL":"\u8bf7\u8f93\u5165\u8bc4\u8bba\u5185\u5bb9","COMMENT_STAT":"\u8bc4\u8bba\u4e0d\u80fd\u4e3a\u7a7a","COMMENT_LOGIN":"\u767b\u9646\u540e\u624d\u80fd\u8bc4\u8bba","COMMENT_GOOD_DONE":"\u5df2\u8d5e\u8fc7\u6b64\u6761\u8bc4\u8bba","COMMENT_SELF":"\u4e0d\u80fd\u8bc4\u4ef7\u81ea\u5df1\u53d1\u5e03\u7684\u8bc4\u8bba","COMMENT_CLICK_FILL":"\u70b9\u51fb\u8f93\u5165\u8bc4\u8bba\u5185\u5bb9","FAIL":"\u64cd\u4f5c\u5931\u8d25","FAIL_MANAGE":"\u64cd\u4f5c\u5931\u8d25\uff0c\u8bf7\u4e0e\u7ba1\u7406\u5458\u8054\u7cfb","FAIL_NO_WHITEHATS":"\u64cd\u4f5c\u5931\u8d25\uff0c\u6ca1\u6709\u6b64\u767d\u5e3d\u5b50","FAIL_NO_CORPS":"\u64cd\u4f5c\u5931\u8d25\uff0c\u6ca1\u6709\u6b64\u5382\u5546","BUGS_CORPS_SELECT":"\u9009\u62e9\u5382\u5546(\u53ef\u8f93\u5165\u5173\u952e\u5b57\u641c\u7d22)","BUGS_CORPS_OTHER":"Other\/\u5176\u5b83\u5382\u5546","BUGS_CORPS_TYPE_STAT":"\u8be5\u6f0f\u6d1e\u5bf9\u5e94\u5382\u5546\u7684\u7c7b\u578b","BUGS_CORPS_NAME_STAT":"\u8be5\u6f0f\u6d1e\u5bf9\u5e94\u5382\u5546\u7684\u540d\u79f0","BUGS_TYPE_STAT":"\u8be5\u6f0f\u6d1e\u7684\u7c7b\u578b\uff0c\u4e71\u9009\u6263\u5206","BUGS_TITLE_STAT":"\u8be5\u6f0f\u6d1e\u7684\u6807\u9898","BUGS_HARMLEVEL_STAT":"\u8be5\u6f0f\u6d1e\u7684\u5371\u5bb3\u7b49\u7ea7","BUGS_DESCRIPTION_STAT":"\u5bf9\u6f0f\u6d1e\u7684\u7b80\u8981\u63cf\u8ff0\uff0c\u53ef\u4ee5\u7b80\u5355\u63cf\u8ff0\u6f0f\u6d1e\u7684\u5371\u5bb3\u548c\u6210\u56e0\uff0c\u4e0d\u8981\u900f\u6f0f\u6f0f\u6d1e\u7684\u7ec6\u8282","BUGS_CONTENT_STAT":"\u5bf9\u6f0f\u6d1e\u7684\u8be6\u7ec6\u63cf\u8ff0\uff0c\u8bf7\u5c3d\u91cf\u591a\u7684\u6df1\u5165\u7ec6\u8282\u4ee5\u65b9\u4fbf\u5bf9\u6f0f\u6d1e\u7684\u7406\u89e3\uff0c\u652f\u6301&lt;code>&lt;\/code>\u6807\u7b7e","BUGS_POC_STAT":"\u7ed9\u51fa\u95ee\u9898\u7684\u6982\u5ff5\u6027\u8bc1\u660e\uff0c\u652f\u6301&lt;code>&lt;\/code>\u6807\u7b7e","BUGS_PATCH_STAT":"\u5efa\u8bae\u7684\u6f0f\u6d1e\u4fee\u590d\u65b9\u6848\uff0c\u652f\u6301&lt;code>&lt;\/code>\u6807\u7b7e","BUGS_TEST_STAT":"\u7ed9\u51fa\u95ee\u9898\u7684\u6807\u51c6\u6d4b\u8bd5\u4ee3\u7801\u4ee5\u66f4\u4e3a\u65b9\u4fbf\u7684\u5bf9\u6f0f\u6d1e\u8fdb\u884c\u6d4b\u8bd5\u548c\u9a8c\u8bc1\uff0c\u6d4b\u8bd5\u4ee3\u7801\u5bf9\u5916\u9ed8\u8ba4\u4e0d\u663e\u793a\uff0c<br\/>\u5176\u4ed6\u767d\u5e3d\u5b50\u652f\u4ed8\u4e4c\u4e91\u5e01\u67e5\u770b\u540e\u4f60\u5c06\u83b7\u5f97\u989d\u5916\u4e4c\u4e91\u5e01\uff0c<br\/>\u540c\u65f6\u4e5f\u5c06\u5728\u4f60\u7684\u4e2a\u4eba\u9875\u9762\u4f53\u73b0\u4f60\u7684\u6d4b\u8bd5\u4ee3\u7801\u7f16\u5199\u80fd\u529b\u3002","BUGS_QUESTION_SELECT":"\u8bf7\u9009\u62e9\u95ee\u9898\u5382\u5546","BUGS_TITLE_NOTICE":"\u6f0f\u6d1e\u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a","BUGS_RANK_NOTICE1":"\u8bf7\u586b\u5199\u81ea\u8bc4Rank","BUGS_RANK_NOTICE2":"\u81ea\u8bc4Rank\u4e3a\u5927\u4e8e0\u7684\u6570\u5b57","BUGS_TYPE_SELECT":"\u8bf7\u9009\u62e9\u6f0f\u6d1e\u7c7b\u578b","BUGS_TYPE_NOTICE":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u7c7b\u578b","BUGS_HARMLEVEL_SELECT":"\u9009\u62e9\u6f0f\u6d1e\u7b49\u7ea7","BUGS_HARMLEVEL_NOTICE":"\u8bf7\u9009\u62e9\u6f0f\u6d1e\u7b49\u7ea7","BUGS_HARMLEVEL_LOWER":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u4f4e \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a1-5","BUGS_HARMLEVEL_MIDDLE":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u4e2d \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a5-10","BUGS_HARMLEVEL_HIGH":"\u6f0f\u6d1e\u7b49\u7ea7\u4e3a \u9ad8 \u65f6\uff0c\u81ea\u8bc4Rank\u4e3a10-20","BUGS_AREA_SELECT":"\u8bf7\u9009\u62e9\u5730\u533a\uff01","BUGS_DOMAILS":"\u6f0f\u6d1e\u6240\u5728\u57df\u540d(\u5982qq.com)","BUGS_DOMAIN_FILL":"\u8bf7\u586b\u5199\u57df\u540d\uff01","BUGS_DETAIL_MORE":"\u67e5\u770b\u8be6\u60c5","BUGS_IGNORE_DAYS":"\u8ddd\u6f0f\u6d1e\u5ffd\u7565\u8fd8\u6709","BUGS_CONFIRM_QUICK":"\u8bf7\u5382\u5546\u5c3d\u5feb","BUGS":"\u6f0f\u6d1e","BUGS_PUBLIC_DAYS":"\u8ddd\u6f0f\u6d1e\u5411\u516c\u4f17\u516c\u5f00\u8fd8\u6709","BUGS_IGNORE_PUBLIC_DAYS":"\u8ddd\u6f0f\u6d1e\u672a\u786e\u8ba4\u65e0\u5f71\u54cd\u5ffd\u7565\u8fd8\u6709","BUGS_REPAIR_QUICK":"\u8bf7\u5382\u5546\u5c3d\u5feb\u4fee\u590d\u6f0f\u6d1e","BUGS_HARMLEVEL_REMIND":"\u8bf7\u9009\u62e9\u5371\u5bb3\u7b49\u7ea7","BUGS_RANK_STAT":"rank\u4e3a1-20\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT1":"rank\u4e3a1-5\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT2":"rank\u4e3a5-10\u7684\u6b63\u6574\u6570","BUGS_RANK_STAT3":"rank\u4e3a10-20\u7684\u6b63\u6574\u6570","BUGS_COMPLEMENT_REASON":"\u6dfb\u52a0\u5bf9\u6f0f\u6d1e\u7684\u8865\u5145\u8bf4\u660e\u4ee5\u53ca\u505a\u51fa\u8bc4\u4ef7\u7684\u7406\u7531","BUGS_REPLY_FILL":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u56de\u590d","BUGS_IGNORE_CONFIRM":"\u786e\u5b9a\u5ffd\u7565\u6b64\u6f0f\u6d1e\u5417","BUGS_STATUS_NEW_UPDATE":"\u66f4\u6539\u6f0f\u6d1e\u7684\u6700\u65b0\u72b6\u6001","BUGS_STATUS_FILL":"\u8bf7\u586b\u5199\u6f0f\u6d1e\u72b6\u6001","BUGS_PUBLIC_ADVANCE":"\u786e\u5b9a\u63d0\u524d\u516c\u5f00\u6b64\u6f0f\u6d1e\u5417","BUGS_COUNT":"\u6f0f\u6d1e\u6570","BUGS_REPLY_HAT":"\u56de\u590d\u6b64\u4eba","BUGS_DELAY_CONFIRM":"\u786e\u5b9a\u8981\u5ef6\u671f\u4e48?","BUGS_DELAY":"\u7533\u8bf7\u5ef6\u671f","BUGS_DELAY_DONE":"\u5df2\u7ecf\u5ef6\u671f","BUGS_RISK_CONFIM":"\u786e\u5b9a\u6b64\u6f0f\u6d1e\u4e3a\u9ad8\u5371\u5417?","BUGS_NULL_EDITE":"\u7559\u7a7a\u8868\u793a\u4e0d\u4fee\u6539","BUGS_DONE_CONFIRM":"\u8be5\u64cd\u4f5c\u6682\u65f6\u4e0d\u53ef\u9006\uff0c\u786e\u5b9a\uff1f","BUGS_UPUBLIC":"\u4f60\u4ece\u53d1\u5e03\u7684\u6f0f\u6d1e","BUGS_UPUBLIC1":"\u91cc\u53c8\u83b7\u5f97\u4e86","BUGS_PRECHECK":"\u6709\u4eba\u63d0\u524d\u67e5\u770b\u4e86\u4f60\u53d1\u5e03\u7684\u6f0f\u6d1e","BUGS_PRECHECK_UNPUBLIC":"\u63d0\u524d\u67e5\u770b\u672a\u516c\u5f00\u6f0f\u6d1e","BUGS_NUM":"\u6f0f\u6d1e\u6570\u91cf","RANKAVG":"\u4eba\u5747\u8d21\u732e Rank","CAPTCHA_GET":"\u83b7\u53d6\u9a8c\u8bc1\u7801","CAPTCHA_FILL":"\u8bf7\u8f93\u5165\u56fe\u7247\u4e2d\u7684\u9a8c\u8bc1\u7801","CAPTCHA_NULL":"\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a","CAPTCHA_ERROR":"\u9a8c\u8bc1\u7801\u8f93\u5165\u9519\u8bef","CAPTCHA_PHONE_ERROR":"\u624b\u673a\u9a8c\u8bc1\u7801\u4e0d\u6b63\u786e","CAPTCHA_PHONE_SEND":"\u9a8c\u8bc1\u7801\u5df2\u53d1\u9001\u5230\u4f60\u7684\u624b\u673a\u4e0a\u8bf7\u6ce8\u610f\u67e5\u6536","CAPTCHA_SEND_AGAIN":"\u540e\u53ef\u91cd\u53d1","CAPTCHA_SEND_OVER":"\u77ed\u4fe1\u5df2\u53d1\u9001\u6210\u529f,\u9a8c\u8bc1\u7801\u533a\u5206\u5927\u5c0f\u5199","CAPTCHA_PHONE_NO":"\u4e0d\u9700\u8981\u77ed\u4fe1\u9a8c\u8bc1\u7801","CAPTCHA_PHONE_NULL":"\u77ed\u4fe1\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","PHONE_TYPE_ERROR":"\u7535\u8bdd\u683c\u5f0f\u4e0d\u5bf9","PHONE_NOTING":"\u7535\u8bdd\u4e0d\u80fd\u4e3a\u7a7a","PHONE_FILL":"\u8bf7\u586b\u5199\u624b\u673a\u53f7","PHONE_CAPTCHA_NOTING":"\u624b\u673a\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_NOTING":"\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_CONFIRM_NOTING":"\u5bc6\u7801\u786e\u8ba4\u4e0d\u80fd\u4e3a\u7a7a","PASSWORD_PAY_LESS":"\u652f\u4ed8\u5bc6\u7801\u4e0d\u80fd\u5c11\u4e8e6\u4f4d","PASSWORD_FILL_DIFFERENT":"\u8f93\u5165\u7684\u4e24\u6b21\u5bc6\u7801\u4e0d\u4e00\u6837","PASSWORD_PAY_LOGIN_SAME":"\u652f\u4ed8\u5bc6\u7801\u4e0d\u80fd\u540c\u767b\u9646\u5bc6\u7801\u4e00\u6837","PASSWORD_PAY_FILL":"\u8bf7\u586b\u5199\u652f\u4ed8\u5bc6\u7801","PASSWORD_LENGH_LESS":"\u5bc6\u7801\u957f\u5ea6\u4e0d\u80fd\u5c0f\u4e8e6\u4f4d","PASSWORD_SEND_OK":"\u53d1\u9001\u5bc6\u7801\u90ae\u4ef6\u6210\u529f","PASSWORD_OFER_WRROR":"\u60a8\u63d0\u4f9b\u7684\u627e\u56de\u5bc6\u7801\u4fe1\u606f\u4e0d\u6b63\u786e","PASSWORD_OLD_ERROR":"\u539f\u5bc6\u7801\u9519\u8bef","PASSWORD_UPDATE_OK":"\u5bc6\u7801\u4fee\u6539\u6210\u529f","EMAILL_USED":"\u90ae\u7bb1\u5df2\u88ab\u5360\u7528","EMAILL_NULL":"\u90ae\u7bb1\u4e0d\u80fd\u4e3a\u7a7a\uff01","NOTING":"\u65e0","LEAVEWORDS_NULL":"\u7559\u8a00\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a","LOGIN_FIRST":"\u8bf7\u5148\u767b\u5f55","CONFIRM":"\u786e\u8ba4","YEAR":"\u5e74","DAYS":"\u5929","HOURS":"\u65f6","HOUR":"\u5c0f\u65f6","MINUTE":"\u5206","SECOND":"\u79d2","IS":"\u4e3a","ONE":"\u4e00","TWE":"\u4e8c","TIMES":"\u6b21","COUNTENT_UPDATE_FILL":"\u8bf7\u586b\u5199\u4fee\u6539\u5185\u5bb9","CANCLE":"\u53d6\u6d88","OPERATE_CONFIRM":"\u786e\u5b9a\u6b64\u64cd\u4f5c\u5417\uff1f","USERNAME":"\u59d3\u540d","SUCCESS":"\u64cd\u4f5c\u6210\u529f","FAIL_REPLY":"\u64cd\u4f5c\u5931\u8d25\uff0c\u8bf7\u586b\u5199\u56de\u590d\u4fe1\u606f","SEND_OK":"\u53d1\u9001\u6210\u529f","PHONE_BIND_DONE":"\u5df2\u7ed1\u5b9a","TAGS_USE":"\u4f7f\u7528\u6b64\u6807\u7b7e","WHITEHATS":"\u767d\u5e3d\u5b50","WHITEHATS_VERTIFY":"\u8ba4\u8bc1\u767d\u5e3d\u5b50","WHITEHATES_NAME":"\u8bf7\u8f93\u5165\u767d\u5e3d\u5b50\u7528\u6237\u540d","USER_ZONE_EDIT":"\u7f16\u8f91\u9886\u57df","WB_TRANSFER":"\u6211\u8981\u8f6c\u8d26","WB_TRANSFER_CANCEL":"\u53d6\u6d88\u8f6c\u8d26","WB_NUM":"\u8bf7\u8f93\u5165\u4e4c\u4e91\u5e01\u6570\u91cf","WB_NUMBER":"\u4e4c\u4e91\u5e01\u6570\u91cf\u4e3a\u6b63\u6574\u6570","WB_NEED_LESS":"\u81f3\u5c11\u9700\u8981","WB_NEED_SUM":"\u4e2a\u4e4c\u4e91\u5e01","WB_TRANSFER_OK":"\u8f6c\u8d26\u6210\u529f","WB_MY":"\u6211\u7684\u4e4c\u4e91\u5e01","WB_CAN_USE":"\u53ef\u7528\u7684\u4e4c\u4e91\u5e01","WB_FROZEN":"\u51bb\u7ed3\u7684\u4e4c\u4e91\u5e01","WB_LACK":"\u4e4c\u4e91\u5e01\u4e0d\u8db3","WB_SET_SCOPE":"\u51fa\u4ef7\u8303\u56f4\u4e3a","WB_BIND_CANCEL_STAT":"(\u70b9\u51fb\u201c\u53d6\u6d88\u7ed1\u5b9a\u201d\u83b7\u53d6\u9a8c\u8bc1\u7801\uff0c\u5411\u4e4c\u4e91\u516c\u4f17\u8d26\u53f7\u53d1\u9001\u9a8c\u8bc1\u7801\u53d6\u6d88\u5fae\u4fe1\u7ed1\u5b9a\uff0c\u7136\u540e\u5237\u65b0\u672c\u9875\u9762)","EMAIL_LOGIN_MEXT":"\u90ae\u4ef6\u53d1\u9001\u6210\u529f,\u8bf7\u767b\u9646\u60a8\u7684\u90ae\u7bb1\u8fdb\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c","EMAIL_UPDATE_LOGIN_MEXT":"\u66f4\u6539\u8bf7\u6c42\u5df2\u53d1\u9001\u5230\u90ae\u7bb1,\u8bf7\u767b\u9646\u60a8\u7684\u90ae\u7bb1\u8fdb\u884c\u4e0b\u4e00\u6b65\u64cd\u4f5c","EMAIL_SEND_OK":"\u90ae\u4ef6\u53d1\u9001\u6210\u529f\uff01","CORPS":"\u5382\u5546","TEAM_NAME_NULL":"\u56e2\u961f\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a","TEAM_HOMEPAGE_NULL":"\u56e2\u961f\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","TEAM_QQ_NULL":"\u56e2\u961fqq\u4e0d\u80fd\u4e3a\u7a7a","TEAM_BRIEF_NULL":"\u56e2\u961f\u7b80\u4ecb\u4e0d\u80fd\u4e3a\u7a7a","TEAM_EXIST":"\u56e2\u961f\u5df2\u5b58\u5728","TEAM_DISMISS_CONFIRM":"\u786e\u5b9a\u89e3\u6563\u672c\u56e2\u961f\u5417?","TEAM_NAME":"\u56e2\u961f\u540d\u79f0","TEAM_CREATER":"\u521b\u5efa\u4eba","TEAM_DONATER":"\u56e2\u961f\u4e3b\u529b","TEAM_MUMBER":"\u4eba\u6570","TEAM":"\u56e2\u961f","REGISTER_BRIEF":"*\u8bf7\u8f93\u5165\u4e2a\u4eba\u7684\u7b80\u8981\u4ecb\u7ecd","REGISTER_TYPE":"*\u9009\u62e9\u6ce8\u518c\u7c7b\u578b","REGISTER_CORPS_BRIEF":"*\u8f93\u5165\u5382\u5546\u7684\u7b80\u8981\u4ecb\u7ecd","REGISTER_EMAIL":"*\u5382\u5546\u90ae\u4ef6\u5fc5\u987b\u4e3a\u4f01\u4e1a\u4f7f\u7528\u7684\u6b63\u5f0f\u90ae\u4ef6","REGISTER_NAME_NULL":"\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_HOMEPAGE_NULL":"\u4e2a\u4eba\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_BREIF_NULL":"\u7b80\u8981\u4ecb\u7ecd\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_CORPNAME_NULL":"\u5382\u5546\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_CORPHOMEPAGE_NULL":"\u5b98\u65b9\u4e3b\u9875\u4e0d\u80fd\u4e3a\u7a7a","REGISTER_LAW_AGREE":"\u540c\u610f\u300a\u4fe1\u606f\u5b89\u5168\u76f8\u5173\u4fdd\u62a4\u548c\u58f0\u660e\u300b\u624d\u80fd\u6ce8\u518c","ATTENTION":"\u5173\u6ce8","ATTENTION_SUM":"\u5173\u6ce8\u6570","ATTENTION_DONE":"\u5df2\u5173\u6ce8","ATTENTION_CANCEL":"\u53d6\u6d88\u5173\u6ce8","ATTENTION_BUG_DONE":"\u5df2\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_BUG_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u6f0f\u6d1e\u7684\u5173\u6ce8","ATTENTION_BUG":"\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_BUG_UNDO":"\u6ca1\u6709\u5173\u6ce8\u6b64\u6f0f\u6d1e","ATTENTION_HAT_DONE":"\u5df2\u5173\u6ce8\u6b64\u767d\u5e3d\u5b50","ATTENTION_HAT_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u767d\u5e3d\u5b50\u7684\u5173\u6ce8?","COLLECTION":"\u6536\u85cf","COLLECTION_DONE":"\u5df2\u6536\u85cf","COLLECTION_BUG_DONE":"\u5df2\u6536\u85cf\u6b64\u6f0f\u6d1e","COLLECTION_BUG_UNDO":"\u6ca1\u6709\u6536\u85cf\u6b64\u6f0f\u6d1e","COLLECTION_BUG_CONFIRM":"\u786e\u5b9a\u53d6\u6d88\u5bf9\u6b64\u6f0f\u6d1e\u7684\u6536\u85cf","SMS_SEND_NAME":"* \u7528\u6237\u6635\u79f0\/\u5382\u5546\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_TITLE":"* \u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_CONTENT":"* \u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a<br \/>","SMS_SEND_CAPTCHA":"* \u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a<br \/>","NUMBER":"\u7684\u6b63\u6574\u6570","RATING_SUCCESS":"\u8bc4\u5206\u6210\u529f","RATING_BUGS_DONE":"\u5df2\u5bf9\u6b64\u6f0f\u6d1e\u8fdb\u884c\u8fc7\u8bc4\u5206","RATING_BUGS_SELF":"\u4e0d\u80fd\u5bf9\u81ea\u5df1\u53d1\u5e03\u7684\u6f0f\u6d1e\u8fdb\u884c\u8bc4\u5206","RATING_SUBMIT_CANCLE":"\u53d6\u6d88\u63d0\u4ea4\u8bc4\u5206","RATING_SUBMIT":"\u63d0\u4ea4\u6211\u7684\u8bc4\u5206","RATING_SUBMIT_CHECK":"\u8bf7\u786e\u5b9a\u6bcf\u4e00\u9879\u90fd\u9009\u62e9\u4e86\u8bc4\u5206","RATING_CONFIRM":"\u786e\u5b9a\u63d0\u4ea4\u5bf9\u6b64\u5382\u5546\u7684\u8bc4\u5206\u5417\uff1f","RATING_LOGIN":"\u53ea\u6709\u767b\u5f55\u7684\u767d\u5e3d\u5b50\u624d\u80fd\u8bc4\u5206","RATING_DONE":"\u5df2\u7ecf\u8bc4\u8fc7\u5206\u4e86","WOOYUN_CORPS":"\u4e4c\u4e91\u5382\u5546","MARST_IMAGE":"\u5bf9\u56fe\u7247\u6253\u7801","FEEDBACK_LINK_NULL":"\u94fe\u63a5\u4e0d\u80fd\u4e3a\u7a7a\uff01","FEEDBACK_LINK_ERROR":"\u8bf7\u4e66\u5199\u6b63\u786e\u7684\u94fe\u63a5\u5730\u5740\uff01","FEEDBACK_CONTENT_NULL":"\u95ee\u9898\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a\uff01","FEEDBACK_ALLOW_LIMIT":"\u534a\u5c0f\u65f6\u53ea\u5141\u8bb8\u53cd\u9988\u4e00\u6b21","TOP_RANK":"\u6392\u540d","TOP_BUG_TITLE":"\u6f0f\u6d1e\u6807\u9898","TOP_RANK_NONE":"\u6682\u65e0\u6392\u540d","TOP_BUGS_GOOD":"\u4f18\u8d28\u6f0f\u6d1e\u6570","NICKNAME":"\u6635\u79f0","LEVEL":"\u7b49\u7ea7","VALUE":"\u503c","EDITOR_INSERT_PIC":"\u63d2\u5165\u56fe\u7247","EDITOR_PIC_ADDR":"\u5730\u5740\uff1a","EDITOR_CONFIRM":"\u786e\u5b9a","EDITOR_PIC_NULL":"\u8bf7\u4e0a\u4f20\u56fe\u7247\u6216\u586b\u5199\u56fe\u7247\u5730\u5740","EDITOR_INSERT_VIDIO":"\u63d2\u5165\u89c6\u9891","EDITOR_VIDIO_ADDR":"\u89c6\u9891\u5730\u5740\uff1a","EDITOR_VIDIO_NULL":"\u8bf7\u586b\u5199\u89c6\u9891\u5730\u5740(.swf)","EDITOR_VIDIO_TYPE":"\u76ee\u524d\u4ec5\u652f\u6301.swf\u683c\u5f0f","PIC_SELECT":"\u8bf7\u9009\u62e9\u5f85\u4e0a\u4f20\u7684\u56fe\u7247","PIC_TYPE_IS":"\u56fe\u7247\u7c7b\u578b\u4e3a","UPLOAD":"\u4e0a\u4f20","RANK_AVG":"\u6f0f\u6d1e\u5e73\u5747"}; $(function(){ function getParamsOfShareWindow(width, height) { return ['toolbar=0,status=0,resizable=1,width=' + width + ',height=' + height + ',left=',(screen.width-width)/2,',top=',(screen.height-height)/2].join(''); } }); function errimg(img){ tmp=img.src; nimg=tmp.replace("path_to_url","path_to_url"); img.src=nimg; $(img).parent().attr('href',nimg); img.onerror=null; } function AttendBug(id){ $.get('/ajaxdo.php',{module:'attendbug',id:id,rid:Math.random(),token:$("#token").val()},function(re){ if(re==1){ $("#attention_num").html(parseInt($("#attention_num").html())+1); $("#attend_action").html(''+_LANGJS.ATTENTION_DONE+' <a class="btn" href="javascript:void(0)" onclick="AttendCancel('+id+')">'+_LANGJS.ATTENTION_CANCEL+'</a></span>'); }else if(re==2){ alert(_LANGJS.LOGIN_FIRST); }else if(re==3){ alert(_LANGJS.ATTENTION_BUG_DONE); }else{ alert(_LANGJS.FAIL_MANAGE); } }); } function AttendCancel(id){ if(confirm(_LANGJS.ATTENTION_BUG_CONFIRM+"?")){ $.get('/ajaxdo.php',{module:'attendcancel',id:id,rid:Math.random(),token:$("#token").val()},function(re){ if(re==1){ $("#attention_num").html(parseInt($("#attention_num").html())-1); $("#attend_action").html('<a class="btn" href="javascript:void(0)" onclick="AttendBug('+id+')">'+_LANGJS.ATTENTION_BUG+'</a></span>'); }else{ alert(_LANGJS.FAIL_MANAGE); } }); } } function CollectBug(id,token){ $.get('/ajaxdo.php',{'module':'collect','id':id,'token':token,'rid':Math.random()},function(re){ if(re==1){ $("#collection_num").html(parseInt($("#collection_num").html())+1); $(".btn-fav").removeClass("fav-add"); $(".btn-fav").addClass("fav-cancel"); $(".btn-fav").unbind(); $(".btn-fav").click(function(){ CollectCancel(id,token); }); }else if(re==2){ alert(_LANGJS.LOGIN_FIRST); }else if(re==3){ alert(_LANGJS.COLLECTION_BUG_DONE); }else{ alert(_LANGJS.FAIL_MANAGE); } }); } function CollectCancel(id,token){ if(confirm(_LANGJS.COLLECTION_BUG_CONFIRM+"?")){ $.get('/ajaxdo.php',{'module':'collectcancel','id':id,'token':token,'rid':Math.random()},function(re){ if(re==1){ $("#collection_num").html(parseInt($("#collection_num").html())-1); $(".btn-fav").removeClass("fav-cancel"); $(".btn-fav").addClass("fav-add"); $(".btn-fav").unbind(); $(".btn-fav").click(function(){ CollectBug(id,token); }); }else{ alert(_LANGJS.FAIL_MANAGE); } }); } } </script> <div class="content"> <input type="hidden" id="token" style="display:none" value="" /> <h2> <span style="margin:0 0 0 580px; float:right; position:absolute; font-size:14px; font-weight:normal">(<span id="attention_num">17</span>) <span id="attend_action"> <a class="btn" href="javascript:void(0)" onclick="AttendBug(86886)"></a></span> </span></h2> <h3> <a href="wooyun-2014-086886">WooYun-2014-86886</a> <input id="fbid" type="hidden" value="86886"> </h3> <h3 class='wybug_title'> KPPWSQL() <img src="path_to_url" alt="" class="credit"> </h3> <h3 class='wybug_corp'> <a href="path_to_url"> keke.com </a> </h3> <h3 class='wybug_author'> <a href="path_to_url">xfkxfk</a><img height="12" width="12" style="vertical-align:-2px;margin-left:2px;" src="path_to_url" alt="" /></h3> <h3 class='wybug_date'> 2014-12-12 15:33</h3> <h3 class='wybug_open_date'> 2015-01-18 15:34</h3> <h3 class='wybug_type'> SQL</h3> <h3 class='wybug_level'> </h3> <h3>Rank 20</h3> <h3 class='wybug_status'> </h3> <h3> <a href="path_to_url">path_to_url help@wooyun.org</h3> <h3>Tags <span class="tag"><a href="path_to_url"></a></span> <span class="tag"><a href="path_to_url"></a></span> <span class="tag"><a href="path_to_url">php</a></span> <span class="tag"><a href="path_to_url">php</a></span> <span class="tag"><a href="path_to_url"></a></span> </h3> <h3> <!-- Baidu Button BEGIN --> <div id="share"> <div style="float:right; margin-right:100px;font-size:12px"> <span class="fav-num"><a id="collection_num">1</a></span> <a style="text-decoration:none; font-size:12px" href="javascript:void(0)" class="fav-add btn-fav"></a> <script type="text/javascript"> var token=""; var id="86886"; $(".btn-fav").click(function(){ CollectBug(id,token); }); </script> </div> <span style="float:left;"></span> <div id="bdshare" class="bdshare_b" style="line-height: 12px;"><img src="path_to_url" /> <a class="shareCount"></a> </div> </div> <!-- Baidu Button END --> </h3> <hr align="center"/> <h2></h2> <h3 class="detailTitle"></h3> <p class="detail" style="padding-bottom:0"> </p> <p class="detail wybug_open_status"> 2014-12-12 <br/> 2014-12-17 <a href="path_to_url" target="_blank"></a><a href="path_to_url" target="_blank"></a><a href="path_to_url" target="_blank"></a><br/> 2015-02-10 <br/> 2015-02-20 <br/> 2015-03-02 <br/> 2015-01-18 <br/> </p> <h3 class="detailTitle"></h3> <p class="detail wybug_description">KPPWSQL...</p> <h3 class="detailTitle"></h3> <div class='wybug_detail'> <p class="detail">KPPWSQL...<br /> <br /> <br /> <br /> /control/user/account_auth.php<br /> <br /> </p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>if ($code&amp;&amp;in_array($code,$arrAllowAuth)) {<br /> $code or $code = $keys [&#039;0&#039;]; <br /> $code or kekezu::show_msg ( $_lang [&#039;param_error&#039;], &quot;index.php?do=auth&quot;, 3, &#039;&#039;, &#039;warning&#039; );<br /> $auth_class = &quot;keke_auth_&quot; . $code . &quot;_class&quot;;<br /> $objAuth = new $auth_class ( $code ); <br /> $auth_item = $arrAllAuthItems [$code]; <br /> $auth_dir = $auth_item [&#039;auth_dir&#039;]; <br /> $arrAuthInfo = $objAuth-&gt;get_user_auth_info ( $gUid, 0, $intBankAid ); <br /> require S_ROOT . &quot;/auth/$code/control/index.php&quot;;<br /> require keke_tpl_class::template ( &#039;auth/&#039; . $code . &#039;/tpl/&#039; . $_K [&#039;template&#039;] . &#039;/&#039;.$step );<br /> die;<br /> } else {<br /> $real_pass = keke_auth_fac_class::auth_check ( &#039;enterprise&#039;, $gUid ) or $real_pass = keke_auth_fac_class::auth_check ( &quot;realname&quot;, $gUid );<br /> $arrHasAuthItem = keke_auth_fac_class::get_auth ( $gUserInfo );<br /> $arrUserAuthInfo = $arrHasAuthItem [&#039;info&#039;];<br /> }</code></pre></fieldset><p class='detail'><br /> <br /> /auth/$code/control/index.phpcodeemail<br /> <br /> code(&#039;realname&#039;,&#039;enterprise&#039;,&#039;bank&#039;,&#039;mobile&#039;,&#039;email&#039;)<br /> <br /> /auth/email/control/index.php<br /> <br /> </p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>case &quot;step3&quot;:<br /> if($email_a_id&amp;&amp;$ac==&#039;check_email&#039;){<br /> $boolAuthRes = $objAuth-&gt;audit_auth($active_code,$email_a_id);<br /> header(&#039;location:index.php?do=user&amp;view=account&amp;op=auth&amp;code=email&#039;);<br /> }<br /> if($arrAuthInfo[&#039;auth_status&#039;]==1){<br /> $auth_tips =&#039;&#039;;<br /> $auth_style = &#039;success&#039;;<br /> }elseif($arrAuthInfo[&#039;auth_status&#039;]==2){<br /> $auth_tips =&#039;&#039;;<br /> $auth_style = &#039;warning&#039;;<br /> }<br /> break;</code></pre></fieldset><p class='detail'><br /> <br /> $active_code$email_a_idaudit_auth<br /> <br /> /auth/email/lib/keke_auth_email_class.php<br /> <br /> </p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>public function audit_auth($active_code,$email_a_id){<br /> global $_K, $kekezu,$_lang;<br /> $user_info=$kekezu-&gt;_userinfo;<br /> if(md5($user_info[&#039;uid&#039;].$user_info[&#039;username&#039;].$user_info[&#039;email&#039;])==$active_code){<br /> $arrAuthInfo=$this-&gt;get_auth_info($email_a_id);<br /> if(empty($arrAuthInfo[0])){<br /> return false;<br /> }</code></pre></fieldset><p class='detail'><br /> <br /> $email_a_idget_auth_info<br /> <br /> /lib/sys/keke_auth_base_class.php<br /> <br /> </p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>public function get_auth_info($auth_ids){<br /> if(isset($auth_ids)){<br /> if(!stristr($auth_ids,&#039;,&#039;)) {<br /> return db_factory::query(sprintf(&quot; select * from %s where %s = &#039;%s&#039;&quot;,TABLEPRE.$this-&gt;_auth_table_name,$this-&gt;_primary_key,$auth_ids));<br /> }else{<br /> return db_factory::query(sprintf(&quot; select * from %s where %s in (%s) &quot;,TABLEPRE.$this-&gt;_auth_table_name,$this-&gt;_primary_key,$auth_ids));<br /> }<br /> }else{<br /> return array();<br /> }<br /> }</code></pre></fieldset><p class='detail'><br /> <br /> $auth_ids = $email_a_idsql<br /> <br /> $auth_idsin ($auth_ids),$auth_ids<br /> <br /> <br /> <br /> <br /> <br /> get_auth_info/lib/sys/keke_auth_base_class.php<br /> <br /> libkeke_auth_base_class.php<br /> <br /> </p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>/auth/email/lib/keke_auth_email_class.php<br /> /lib/sys/keke_auth_base_class.php<br /> /lib/sys/keke_auth_base_class.php<br /> /lib/sys/keke_auth_base_class.php</code></pre></fieldset><p class='detail'><br /> <br /> <br /> <br /> </p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>public function del_auth($auth_ids,$url=null) {<br /> global $_lang;<br /> $url =&quot;index.php?do=auth&amp;view=list&amp;code=&quot;.$this-&gt;_auth_code;<br /> is_array($auth_ids) and $ids=implode(&quot;,&quot;,$auth_ids) or $ids=$auth_ids;<br /> $auth_info=$this-&gt;get_auth_info($ids);</code></pre></fieldset><p class='detail'><br /> <br /> <br /> <br /> </p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>public function review_auth($auth_ids,$type=&#039;pass&#039;,$url=null){<br /> global $_lang;<br /> global $kekezu;<br /> if($url===null){<br /> $url = $_SERVER[&#039;HTTP_REFERER&#039;];<br /> }<br /> $prom_obj = keke_prom_class::get_instance ();<br /> is_array($auth_ids) and $auth_ids=implode(&quot;,&quot;,$auth_ids);<br /> $auth_info=$this-&gt;get_auth_info($auth_ids);<br /> $size=sizeof($auth_info);</code></pre></fieldset><p class='detail'><br /> <br /> del_authreview_authget_auth_info<br /> <br /> sqlsql<br /> <br /> del_auth21...<br /> <br /> review_auth17...<br /> <br /> get_auth_infosql<br /> <br /> <br /> <br /> <br /> <br /> </p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>kppwsqlin ()sql</code></pre></fieldset><p class='detail'><br /> <br /> </p> </div> <h3 class="detailTitle"></h3> <div class='wybug_poc'> <p class="detail"><br /> <br /> </p><p class="detail usemasaic"><a href="../upload/201412/121057518ac678af968bd9f0166e60188551ffbf.png" target="_blank"><img src="../upload/201412/121057518ac678af968bd9f0166e60188551ffbf.png" alt="1.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"><br /> <br /> <br /> <br /> </p><p class="detail usemasaic"><a href="../upload/201412/12105811df26579ba9e9dc5839d24aa8bba29163.png" target="_blank"><img src="../upload/201412/12105811df26579ba9e9dc5839d24aa8bba29163.png" alt="2.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"><br /> <br /> copyemail_a_ididid2<br /> <br /> </p><fieldset class='fieldset fieldset-code'><legend>code </legend><pre><code>path_to_url class='detail'><br /> <br /> 5<br /> <br /> </p><p class="detail usemasaic"><a href="../upload/201412/12110047bbaaa461a74b6111a5e6987485c55bc1.png" target="_blank"><img src="../upload/201412/12110047bbaaa461a74b6111a5e6987485c55bc1.png" alt="3.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"><br /> <br /> username+passwausername+password<br /> <br /> sql<br /> <br /> </p><p class="detail usemasaic"><a href="../upload/201412/12110222849b711381550f56039e33e8411b5af4.png" target="_blank"><img src="../upload/201412/12110222849b711381550f56039e33e8411b5af4.png" alt="4.png" width="600" onerror="javascript:errimg(this);"/></a></p><p class="detail"> </p> </div> <h3 class="detailTitle"></h3> <div class='wybug_patch'> <p class="detail">ininintval </p> </div> <h3 class="detailTitle"> <a style="font-weight:normal" href="path_to_url" title="xfkxfk">xfkxfk</a>@<a style="font-weight:normal" href="path_to_url" title="KPPWSQL()"></a></h3> <hr align="center"/> <h2 id="bugreply"></h2> <div class='bug_result'> <h3 class="detailTitle"></h3> <p class="detail"></p> <p class="detail">2015-01-18 15:34</p> <h3 class="detailTitle"></h3> <p class="detail"></p> <h3 class="detailTitle"></h3> <p class="detail"></p> </div> <hr align="center" /> <script type="text/javascript"> var bugid="86886"; var bugRating="-3"; var myRating=""; var ratingCount="0"; function ShowBugRating(k){ var ratingItems=$(".myrating span"); $.each(ratingItems,function(i,n){ var nk=parseInt($(n).attr("rel")); if(nk<=k){ $(n).addClass("on"); }else{ $(n).removeClass("on"); } }); $(".myrating span").hover( function(){ $("#ratingShow").html($(this).attr("data-title")); }, function(){ $("#ratingShow").html(""); } ); } $(document).ready(function(){ if(myRating==""){ var ratingItems=$(".myrating span"); $(".myrating span").hover( function(){ $(this).addClass("hover"); var k=parseInt($(this).attr("rel")); $.each(ratingItems,function(i,n){ var nk=parseInt($(n).attr("rel")); if(nk<k) $(n).addClass("on"); if(nk>k) $(n).removeClass("on"); }); $("#ratingShow").html($(this).attr("data-title")); }, function(){ $(this).removeClass("hover"); if($("#myRating").val()==""){ $.each(ratingItems,function(i,n){ $(n).removeClass("on"); }); } $("#ratingShow").html(""); } ); $(".myrating span").click(function(){ var rating=$(this).attr("rel"); var k=parseInt($(this).attr("rel")); $.post("/ajaxdo.php?module=bugrating",{"id":bugid,"rating":rating,"token":$("#token").val()},function(re){ // $(".myrating span").unbind(); re=parseInt(re); switch(re){ case 1: $("#ratingShow").html(_LANGJS.RATING_SUCCESS); $("#ratingSpan").html(parseInt($("#ratingSpan").html())+1); $.each(ratingItems,function(i,n){ var nk=parseInt($(n).attr("rel")); if(nk<=k){ $(n).addClass("on"); }else{ $(n).removeClass("on"); } }); ShowBugRating(rating); break; case 2: $("#ratingShow").html(_LANGJS.LOGIN_FIRST); break; case 4: $("#ratingShow").html(_LANGJS.RATING_BUGS_DONE); break; case 6: $("#ratingShow").html(_LANGJS.RATING_BUGS_SELF); break; default:break; } }); }); }else{ if(ratingCount>2){ ShowBugRating(bugRating); }else{ ShowBugRating(-3); } } }); </script> <h3 class="detailTitle"></h3> <p class="detail"></p> <h5 class="rating"> <div class="ratingText"><span>(<span id="ratingSpan">0</span>)</span>:</div> <div class="myrating"> <span rel="-2" data-title=""></span> <span rel="-1" data-title=""></span> <span rel="0" data-title=""></span> <span rel="1" data-title=""></span> <span rel="2" data-title=""></span> <div id="ratingShow"> </div> </div> </h5> <input type="hidden" id="myRating" value="" /> <hr align="center" /> <h2></h2> <div id="replys" class="replys"> <ol class="replylist"> <li class="reply clearfix"> <div class="reply-content"> <div class="reply-info"> <span class="addtime">2014-12-12 15:36</span> | <a target='_blank' href="path_to_url">phith0n</a> <img height="12" width="12" style="vertical-align:-2px;" src="path_to_url" alt="" /> <!-- @zm 2013-12-13 Begin --> ( | <!-- @zm 2013-12-13 End --> Rank:816 :126 | ~) <div class="likebox"> <span class="likepre" title="" rel="123012"></span> <span class="liketext liketext_min"><span id="likenum_123012">3</span></span> <span class="likesuf"></span> </div> </div><!-- reply-info End --> <div class="description"> <p>X9 </p> </div> <div class="replylist-act"> <span class="floor">1#</span> <a title=" phith0n" href="javascript:void(0)" class="replyBtn" onclick="Reply('phith0n')"></a> </div> </div><!-- reply-content End --> </li> <li class="reply clearfix"> <div class="reply-content"> <div class="reply-info"> <span class="addtime">2014-12-12 15:37</span> | <a target='_blank' href="path_to_url">wanglaojiu</a> <!-- @zm 2013-12-13 Begin --> ( | <!-- @zm 2013-12-13 End --> Rank:170 :40 | ...) <div class="likebox"> <span class="likepre" title="" rel="123014"></span> <span class="liketext liketext_min"><span id="likenum_123014">2</span></span> <span class="likesuf"></span> </div> </div><!-- reply-info End --> <div class="description"> <p>...... </p> </div> <div class="replylist-act"> <span class="floor">2#</span> <a title=" wanglaojiu" href="javascript:void(0)" class="replyBtn" onclick="Reply('wanglaojiu')"></a> </div> </div><!-- reply-content End --> </li> <li class="reply clearfix"> <div class="reply-content"> <div class="reply-info"> <span class="addtime">2014-12-12 15:40</span> | <a target='_blank' href="path_to_url">diguoji</a> <!-- @zm 2013-12-13 Begin --> ( | <!-- @zm 2013-12-13 End --> Rank:397 :101 | ) <div class="likebox"> <span class="likepre" title="" rel="123015"></span> <span class="liketext liketext_min"><span id="likenum_123015">2</span></span> <span class="likesuf"></span> </div> </div><!-- reply-info End --> <div class="description"> <p> </p> </div> <div class="replylist-act"> <span class="floor">3#</span> <a title=" diguoji" href="javascript:void(0)" class="replyBtn" onclick="Reply('diguoji')"></a> </div> </div><!-- reply-content End --> </li> <li class="reply clearfix"> <div class="reply-content"> <div class="reply-info"> <span class="addtime">2014-12-12 15:43</span> | <a target='_blank' href="path_to_url">xfkxfk</a> <img height="12" width="12" style="vertical-align:-2px;" src="path_to_url" alt="" /> <!-- @zm 2013-12-13 Begin --> ( | <!-- @zm 2013-12-13 End --> Rank:2313 :351 | ) <div class="likebox"> <span class="likepre" title="" rel="123017"></span> <span class="liketext liketext_min"><span id="likenum_123017">1</span></span> <span class="likesuf"></span> </div> </div><!-- reply-info End --> <div class="description"> <p>@phith0n </p> </div> <div class="replylist-act"> <span class="floor">4#</span> <a title=" xfkxfk" href="javascript:void(0)" class="replyBtn" onclick="Reply('xfkxfk')"></a> </div> </div><!-- reply-content End --> </li> <li class="reply clearfix"> <div class="reply-content"> <div class="reply-info"> <span class="addtime">2014-12-12 15:43</span> | <a target='_blank' href="path_to_url">xfkxfk</a> <img height="12" width="12" style="vertical-align:-2px;" src="path_to_url" alt="" /> <!-- @zm 2013-12-13 Begin --> ( | <!-- @zm 2013-12-13 End --> Rank:2313 :351 | ) <div class="likebox"> <span class="likepre" title="" rel="123018"></span> <span class="liketext liketext_min"><span id="likenum_123018">2</span></span> <span class="likesuf"></span> </div> </div><!-- reply-info End --> <div class="description"> <p>@diguoji </p> </div> <div class="replylist-act"> <span class="floor">5#</span> <a title=" xfkxfk" href="javascript:void(0)" class="replyBtn" onclick="Reply('xfkxfk')"></a> </div> </div><!-- reply-content End --> </li> <li class="reply clearfix"> <div class="reply-content"> <div class="reply-info"> <span class="addtime">2014-12-12 16:04</span> | <a target='_blank' href="path_to_url">Power</a> <!-- @zm 2013-12-13 Begin --> ( | <!-- @zm 2013-12-13 End --> Rank:78 :26 ) <div class="likebox"> <span class="likepre" title="" rel="123021"></span> <span class="liketext liketext_min"><span id="likenum_123021">1</span></span> <span class="likesuf"></span> </div> </div><!-- reply-info End --> <div class="description"> <p>x </p> </div> <div class="replylist-act"> <span class="floor">6#</span> <a title=" Power" href="javascript:void(0)" class="replyBtn" onclick="Reply('Power')"></a> </div> </div><!-- reply-content End --> </li> <li class="reply clearfix"> <div class="reply-content"> <div class="reply-info"> <span class="addtime">2014-12-12 16:36</span> | <a target='_blank' href="path_to_url"></a> <img height="12" width="12" style="vertical-align:-2px;" src="path_to_url" alt="" /> <!-- @zm 2013-12-13 Begin --> ( | <!-- @zm 2013-12-13 End --> Rank:1332 :198 | Only Code Never Lie To Me.) <div class="likebox"> <span class="likepre" title="" rel="123031"></span> <span class="liketext liketext_min"><span id="likenum_123031">1</span></span> <span class="likesuf"></span> </div> </div><!-- reply-info End --> <div class="description"> <p> </p> </div> <div class="replylist-act"> <span class="floor">7#</span> <a title=" " href="javascript:void(0)" class="replyBtn" onclick="Reply('')"></a> </div> </div><!-- reply-content End --> </li> <li class="reply clearfix"> <div class="reply-content"> <div class="reply-info"> <span class="addtime">2014-12-12 17:10</span> | <a target='_blank' href="path_to_url">superbing</a> <!-- @zm 2013-12-13 Begin --> ( | <!-- @zm 2013-12-13 End --> Rank:210 :33 | ) <div class="likebox"> <span class="likepre" title="" rel="123042"></span> <span class="liketext liketext_min"><span id="likenum_123042">1</span></span> <span class="likesuf"></span> </div> </div><!-- reply-info End --> <div class="description"> <p>KPPW </p> </div> <div class="replylist-act"> <span class="floor">8#</span> <a title=" superbing" href="javascript:void(0)" class="replyBtn" onclick="Reply('superbing')"></a> </div> </div><!-- reply-content End --> </li> </ol><!-- replylist End --> </div><!-- replys End --> <div id="reply" class="reply"> <a name="comment"></a> <p class="detail"> <a href="path_to_url"><u></u></a> </p> <script type="text/javascript"> var masaic = '0'; function CommentLike(id){ $.post("/ajaxdo.php?module=commentrating",{"id":id,"token":$("#token").val()},function(re){ re=parseInt(re); switch(re){ case 1: $("#likenum_"+id).html(parseInt($("#likenum_"+id).html())+1); break; case 4: alert(_LANGJS.COMMENT_GOOD_DONE); break; case 6: alert(_LANGJS.COMMENT_SELF); break; default:break; } }); } $(document).ready(function(){ $(".likebox .likepre").click(function(){ CommentLike($(this).attr("rel")); }); }); </script> <div> </div> <div id="footer"> <span class="copyright fleft"> <a href="path_to_url">ICP15041338-1</a> <!--a href="path_to_url" target="_blank"><img src="/images/sae_bottom_logo.png" title="Powered by Sina App Engine"></a--> </span> <span class="other fright"> <a href="path_to_url"></a> <a href="path_to_url"></a> <a href="path_to_url"></a> <a href="path_to_url"></a> <a href="path_to_url"></a> </span> </div> <script type="text/javascript"> var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fc12f88b5c1cd041a732dea597a5ec94c' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript" id="bdshare_js" data="type=button" ></script> <script type="text/javascript" id="bdshell_js"></script> <script type="text/javascript"> document.getElementById("bdshell_js").src = "path_to_url" + new Date().getHours(); if (top.location !== self.location) top.location=self.location; </script> </body> </html> ```
Orb or ORB may refer to: Sphere Globus cruciger, ceremonial orb Places Orb (river), in southern France Orb (Kinzig), a tributary of the Kinzig river in Germany Bad Orb, a town in Hesse, Germany Literature, radio, film, television Orb Kaftan, a character from the Incarnations of Immortality novel series by Piers Anthony Orb (comics), a Marvel Comics villain "Orb" (Adventure Time), a television episode Orb Publications, an Australian publishing company Orb Speculative Fiction, an Australian magazine Orbing, a magical form of teleportation in the television show Charmed Ultraman Orb, a 2016 Japanese tokusatsu television series Ostdeutscher Rundfunk Brandenburg, a former German public broadcasting organization Music The Orb, a British electronic music group O.R.B. (band) (formerly The Original Rude Boys), an Irish acoustic group Orbs (band), a rock group featuring members of Between the Buried and Me and Fear Before the March of Flames Orb (Boiled in Lead album), 1990 Orb (Alastair Galbraith album), 2007 The Oak Ridge Boys, a country music group Computing Object request broker, a distributed computing concept Orb (software), a streaming media application Castlewood Orb Drive, a 3.5-inch removable hard disk drive Oriented FAST and rotated BRIEF (ORB), an image processing method Open Relay Behavior-modification System (ORBS), a defunct system for blocking suspected Internet spam sites Celestial matters Orb (astrology), a measurement of object interaction Celestial orb, a central concept in ancient and early-modern astronomy Transport ORB, IATA code for Örebro Airport in Sweden ORB, FAA code for Orr Regional Airport in Minnesota ORB, Amtrak code for Old Orchard Beach station in Maine ORBS, former ICAO code for Baghdad International Airport Business ORB International, a London-based polling agency Orbital Sciences Corporation (former NYSE stock ticker: ORB) Other O-ring boss seal, a hydraulic fitting Organic radical battery, a type of rechargeable battery Globus cruciger, an orb-and-cross symbol of Christian authority Sovereign's Orb, a Crown Jewel of the United Kingdom The trademarked symbol printed on genuine Harris Tweed O.R.B: Off-World Resource Base, a 2002 computer game Orb web, a type of spider web Orb (horse), the winner of the 2013 Kentucky Derby Orb (optics), an optical artifact Yard globe "The orb", a symbolic object featured during the 2017 Arab Islamic American Summit See also Orbe (disambiguation) Orbis (disambiguation)
Monday Night Combat is a downloadable third-person shooter video game developed by Uber Entertainment. It was published by Microsoft Studios on the Xbox 360 and by Uber Entertainment and Valve for Microsoft Windows. It was released on August 11, 2010 on the Xbox 360 as part of Microsoft's 2010 Xbox Live Summer of Arcade and is distributed through Xbox Live Arcade. It was released on January 24, 2011 for Windows via Steam. Monday Night Combat is a class-based third-person shooter game in which two teams are pitted against each other in a fictional combat setting similar to that of a tower defense title. The competitors on each team are clones, and the goal is to destroy the other team's Moneyball, a stationary objective which houses the team's money, while protecting their own. It is presented to the player as the Monday Night Football sport of the future. The game was well received by critics, averaging 79.24% at GameRankings and 79 out of 100 at Metacritic, two video game aggregate websites. Reviewers were generally universal in praising the quality of the game in comparison to the cost. The game's graphics and art style were also praised. Critics noted that the six character classes were well-suited to the tower defense style of gameplay. As of year-end 2011, Monday Night Combat has sold over 307,000 copies on Xbox Live Arcade. Gameplay Monday Night Combat is a shooter played from a third-person perspective. It combines a class-based character selection system with team-based objectives in the style of Defense of the Ancients. Its background is that of a futuristic replacement for Monday Night Football in which cloned soldiers battle against each other for money. The game is played in one of two scenarios, each one a variant on the traditional action RTS setting with elements of tower defense mixed in. The first is Crossfire, in which teams of up to six compete online to destroy the other team's Moneyball, a stationary shielded object guarded by its respective team. The first team to destroy their opponent's Moneyball is declared the winner. The second gameplay scenario is known as Blitz. In Blitz up to four players work together to protect their team's Moneyball against increasingly difficult waves of robots. Blitz can be played alone, in two-player splitscreen or with up to four players online. Players can choose between one of six classes, each with their own unique abilities and weapons. The Tank and Gunner classes focus on heavy weaponry. The Support class is similar to Team Fortress 2s engineer and medic, providing support for their team by healing teammates, and repairing robots and turrets. The Assault class plays similarly to the standard soldier class found in other games, and is patterned as a well-rounded class for players. Snipers can be used as long-range support, but can also use their secondary weaponry when in close proximity to enemies. Finally Assassins are focused on stealth and mobility and can use their abilities to sneak up on enemies, dispatch them, and then quickly escape. As players destroy robots and make kills they are rewarded with cash, which can then in turn be used to buy upgrades, improve the defense of their base, or send specialty robots against the other team. Players can also earn cash by attacking the sport's mascot, Bullseye, which occasionally appears on the field. Another thing that players accumulate as they play is Juice. Filling the Juice gauge allows the player a brief period of super-powered abilities they can use to attack the other team. Additionally, bacon is infrequently dropped by the mascot or robots when attacked. Bacon serves as a powerup for the player, giving them boosted abilities until they die or the round ends. Churros were added to the first downloadable content pack, and give the player a temporary health boost, and regenerate the player's abilities. Development and marketing Monday Night Combat was announced for the Xbox 360 via Xbox Live Arcade on January 15, 2010. It was shown in April 2010 at PAX East in Boston, Massachusetts with a playable demo. It was also shown in June 2010 at the Electronic Entertainment Expo with another playable demo. The Xbox 360 version was released on August 11, 2010 via Xbox Live Arcade. The possibility of the game coming to other platforms as hinted at during an interview with Executive Producer Chandana Ekanayake. The PC version of the game was announced December 14, 2010. Uber Entertainment conducted a public beta testing session which started December 16, 2010 for consumers who pre-ordered the game. It was officially released on January 24, 2011 via the digital distributor Steam and will contain the core game and the Spunky Cola Special content. Ekanayake further revealed in an interview with PC Gamer that the PC version of the game will have full support for the Unreal development tools, allowing players to create fan-based modifications and levels. Giant Bomb chose Monday Night Combat to play on Justin.tv during its weekly Thursday Night Throwdown. After news of this reached the official Uber Entertainment Twitter account, Uber Entertainment creative director John Comes, Director of QA & Associate Producer Logan DeMelt, and CEO Bob Berry joined the stream. They offered advice to the four players competing in a match of Blitz, gave developer insight to making the game and distributed a few free copies of Monday Night Combat. The game was created by a team of sixteen developers, but began with six developers in a two bedroom apartment. For the first year of development the game was known under the code name of Hostile. During a presentation at Williams College, developers Uber Entertainment revealed much of the game's development process. It began with whitebox testing in Epic Games' Unreal Engine 3 to lay out basic gameplay, game flow, the game's over-the-shoulder camera, and more. Placeholder models and effects were then added to adjust the shader system and to discover what assets can be shared amongst characters and classes. Arenas were then built with basic shapes to lock down scale and overall level flow. This would then serve as a base for the final level design. In order to simplify and streamline development time, three base character skeletons were shared amongst the six character classes. Characters were modeled then multiple texture maps were applied. Specular and normal maps were added to the model prior to the main texture map. The texture map was then added with any team-colorized sections painted in greyscale tones. A team color mask is then applied to give the character a team-aligned texture. Robot characters also have multiple texture maps to signify damage received. The music for the game was composed by Cris Velasco of Monarch Audio. Monday Night Combat features an on the fly update system. Instead of the game being patched to correct issues, most game-wide variables are controlled on the server level, allowing Uber Entertainment to make tweaks to things such as character speed, weapon damage, match length and game difficulty. This allows for fine tuning without the need to download an additional patch for the game. Monday Night Combat dynamic update system is hosted on Microsoft's Title Managed Storage. Title Managed Storage is an allocated space on Xbox Live servers for developers to use. Uber Entertainment placed a text document on the server which stores any values they want to be able to adjust dynamically. When a change needs to be made, the value is changed in the text file, and instantly the gameplay is tweaked. On August 29, 2010 Uber Entertainment revealed via their official blog that a title update for the game was being tested. This update would fix gameplay bugs related to character classes, multiplayer, and general gameplay. They also revealed at that time plans for three downloadable content packages and further stated that the first of the three packages would be free to consumers. The blog post also revealed the figurine statues available for purchase as part of the game's promotions. On October 13, 2010 a title update was released, which fixed multiple issues and made various gameplay tweaks. The first downloadable content package, entitled Spunky Cola Special, was officially announced over a week-long promotion in October 2010 known as the Monday Night Combat Halloween Unmasking. The free content consists of two new arenas, one devoted to Crossfire mode and the other to Blitz. Also included are several bug fixes and additional features. Spunky Cola Special was released December 1, 2010. In an interview, Monday Night Combats art director and executive producer Chandana Ekanayake revealed that Uber found top ranking players playing Blitz for 6–8 hours without failing, something the game was not intended to do. According to Ekanayake, to accommodate those players the downloadable content also included "a tougher Super Sudden Death challenge as well as updated the round clocks to include four digits up to round 9999." Ekanayake further stated that Uber would be focusing on additional content and updates for Monday Night Combat players. Reception Monday Night Combat was well received by critics, averaging 79 out of 100 at Metacritic, a video game aggregate website. As of October 2010, Monday Night Combat has sold over 225,000 copies on Xbox Live Arcade. That number rose to over 293,000 at the close of 2010. As of year-end 2011 sales increased to over 307,000 units. Most reviewers agreed that the game was well worth the price of 1200 Microsoft Points. GamePro called the game "equal parts wacky, polished, and just downright fun." Game Revolution agreed, calling Monday Night Combat "so much unadulterated fun." Official Xbox Magazine called it a "great third-person shooter with Monday-night-football flair." It received Gamasutra's award for Best Downloadable Console Game for 2010. Game Revolution stated the gameplay was an improvement over Team Fortress 2. GamePro also stated the Team Fortress 2 veterans "should definitely enjoy the very obvious similarities." Official Xbox Magazine felt that the game's six character classes were well balanced and that each class provided utility to players. PALGN praised the cartoon art style and over the top commentary by the game's announcer. They went on to call the Monday Night Combat a "stylish, streamlined, expertly crafted third person shooter." IGN noted the game's fun multiplayer modes, stating that both cooperative and versus modes are "good fun if you get a crew together." Official Xbox Magazine criticized the fact that the game only comes equipped with two modes and four arenas. GamePro agreed, stating with a low number of robot types and very few maps that "the action will eventually lose some luster over time." IGN reviewer Daemon Hatfield expressed surprise and confusion in regards to attacking Bullseye, the Monday Night Mascot, for cash, calling it "one of the most bizarre gaming events I've recently witnessed." Game Informer expressed similar thoughts, saying "this guy is so annoying that it's impossible not to smile while shooting him." Destructoid was critical of the character classes, calling them unbalanced. GameSpot was critical of the game's announcer, stating that they found the commentary annoying. They also went on to criticize the limited tutorial, stating it leaves the player "to read up [in the] How to Play section of the pause menu." The Spunky Cola Special downloadable content was generally well received. Griffin McElroy of Joystiq praised the fact that the content was released free of charge. Destructoid's Jordan Devore agreed, and stated it was a "smart move for a game that shouldn't segregate its audience." The reviewer from XBLAfans praised the amount of content given in Spunky Cola Special. The reviewer called the new arenas "relentless" and "fast paced". Also praised were the addition of churros as a powerup, the additional voice lines for the game's announcer, and the 47 additional protags; markings to indicate a player's clan or affiliation. Sequel A sequel, Super Monday Night Combat, was developed by Uber and was released on 18 April 2012. It draws even more heavily from the DotA lineage of multiplayer online battle arena games, adopting elements such as a free to play model, character skins, and regularly released new Pros along with a rotating group of free Pros and new outdoor environments. References External links Cooperative video games Hero shooters Multiplayer online games Multiplayer and single-player video games Third-person shooters Unreal Engine games Xbox 360 games Xbox 360 Live Arcade games Uber Entertainment games 2010 video games Microsoft games Video games about death games Video games scored by Cris Velasco Video games developed in the United States Windows games
Pseudocheilinus is a genus of wrasses native to the Indian and Pacific Oceans. Species The currently recognized species in this genus are: Pseudocheilinus citrinus J. E. Randall, 1999 Pseudocheilinus dispilus J. E. Randall, 1999 Pseudocheilinus evanidus D. S. Jordan & Evermann, 1903 (striated wrasse) Pseudocheilinus hexataenia (Bleeker, 1857) (six-line wrasse) Pseudocheilinus ocellatus J. E. Randall, 1999 (white-barred wrasse) Pseudocheilinus octotaenia O. P. Jenkins, 1901 (eight-lined wrasse) Pseudocheilinus tetrataenia L. P. Schultz, 1960 (four-lined wrasse) References Labridae Taxa named by Pieter Bleeker Marine fish genera
A.J. Carruthers is an Australian-born literary critic and experimental poet. Biography A.J. Carruthers (also aj carruthers) was born in Sydney, and is of mixed/Asian heritage. Since 2011, he has been writing a long poem called AXIS. His critical work has focused on North American and contemporary Australian poetry and poetics. He is an editor of Southerly, Rabbit Poetry Journal and the founder of SOd press. Published works Books Stave Sightings: Notational Experiments in North American Long Poems, 1961–2011 (New York: Palgrave Macmillan, 2017) AXIS Book 1: Areal (Tokyo: Vagabond Press, 2014) Opus 16 on Tehching Hsieh (Oakland, CA: GaussPDF, 2016) Ode to On Kawara (Buffalo, NY: Hysterically Real, 2016) The Tulip Beds: A Toneme Suite (Tokyo: Vagabond Press, 2013 Anthologies Contemporary Asian Australian Poets (Sydney: Puncher & Wattmann, 2013) Active Aesthetics: Contemporary Australian Poetry (Berkeley, CA: Tuumba and Giramondo Press, 2016) Exhibitions Selected Works (Non-Objective Writing, SNO Contemporary Art Projects) References External links Biography and list of works at Austlit: the Australian Literature Resource Biography at Poetry and Poetics (Western Sydney University Writing Society) Year of birth missing (living people) Living people Poets from Sydney Australian literary critics
```c# <h1>Available Tests</h1> <ul> <li><a href="/">/</a> - This page</li> <li><a href="/Auth/Basic/">/Auth/Basic/</a> - Basic Authentication</li> <li><a href="/Auth/Negotiate/">/Auth/Negotiate/</a> - Negotiate Authentication</li> <li><a href="/Auth/NTLM/">/Auth/NTLM/</a> - NTLM Authentication</li> <li><a href="/Cert/">/Cert/</a> - Client Certificate Details</li> <li><a href="/Compression/Brotli/">/Compression/Brotli/</a> - Returns brotli compressed response</li> <li><a href="/Compression/Deflate/">/Compression/Deflate/</a> - Returns deflate compressed response</li> <li><a href="/Compression/GZip/">/Compression/Gzip/</a> - Returns gzip compressed response</li> <li><a href="/Delay/">/Delay/{seconds}</a> - Delays response for <i>seconds</i> seconds.</li> <li>/Delete/ - returns data from a DELETE request</li> <li><a href="/Encoding/Utf8/">/Encoding/Utf8/</a> - Returns page containing UTF-8 data.</li> <li><a href="/Get/">/Get/</a> - Emulates functionality of path_to_url by returning GET headers, Arguments, and Request URL</li> <li><a href="/Get/">/Get/</a> - Emulates functionality of path_to_url by returning GET headers, Arguments, and Request URL</li> <li><a href="/Link/?linknumber=1&maxlinks=3&type=default">/Link/</a> - Link Header (pagination) testing</li> <li>/Patch/ - returns data from a PATCH request</li> <li>/Post/ - returns data from a POST request</li> <li>/Put/ - returns data from a PUT request</li> <li><a href="/Redirect/">/Redirect/{count}</a> - 302 redirect <i>count</i> times.</li> <li><a href="/Response/?statuscode=200&contenttype=application%2Fjson&body=%22Body%20text%22&headers=%7B%22x-header%22%3A%20%22Response%20Header%20Value%22%7D">/Response/?statuscode=&lt;StatusCode&gt;&amp;body=&lt;ResponseBody&gt;&amp;contenttype=&lt;ResponseContentType&gt;&amp;headers=&lt;JsonHeadersObject&gt;</a> - Returns the given response.</li> <li><a href="/ResponseHeaders/?key=val">/ResponseHeaders/?key=val</a> - Returns given response headers.</li> <li><a href="/Retry/?sessionid=100&failureCode=599&failureCount=2">/Retry/?sessionid=100&failureCode=599&failureCount=2</a> - Returns HTTP status code <i>failureCode</i>, <i>failureCount</i> number of times.</li> </ul> ```
Lou Blackburn (November 12, 1922 – 7 June 1990) was an American jazz trombonist. Biography Blackburn was born in Rankin, Pennsylvania. He is best known for his work in the swing genre but he also performed in the West Coast jazz and soul jazz mediums. During the 1950s, he played swing music with Lionel Hampton, and also Charlie Ventura. In the early 1960s, he began performing with musicians like Cat Anderson, among others. He also appears on the album Mingus at Monterey by Charles Mingus. He also did crossover work with The Beach Boys and The Turtles, among others. From 1970, he lived in Germany, where he toured successfully with his ethno jazz band Mombasa. Blackburn died in Berlin in 1990. Discography As leader Jazz Frontier (Imperial, 1963) Two Note Samba (Imperial, 1963) The Complete Imperial Sessions (Blue Note, 2006) As sideman With Duke Ellington Paris Blues (United Artists, 1961) First Time! The Count Meets the Duke (Columbia, 1971) The Girl's Suite and The Perfume Suite (Columbia, 1982) With others Steve Allen, Soulful Brass #2 (Flying Dutchman, 1969) John Braheny, Some Kind of Change (By Pete 1968) Bobby Bryant, Swahili Strut (Cadet, 1971) Bumble Bee Slim, Back in Town (Pacific Jazz, 1962) June Christy, Something Broadway, Something Latin (Capitol, 1965) Bobby Darin, Venice Blue (Capitol, 1965) Gil Fuller, Night Flight (Pacific Jazz, 1966) Roosevelt Grier, Soul City (Recording Industries, 1964) Chico Hamilton, Chic Chic Chico (Impulse!, 1965) Lionel Hampton, Hamp's Big Band (Audio Fidelity, 1959) Tricky Lofton, Carmell Jones, Brass Bag (Pacific Jazz, 1962) Onzy Matthews, Blues with a Touch of Elegance (Capitol, 1964) Charles Mingus, Mingus at Monterey (Jazz Workshop, 1965) Thelonious Monk, Monk's Blues (Columbia, 1968) The Monkees, Listen to the Band (Rhino, 1991) Oliver Nelson, Live from Los Angeles (Impulse!, 1967) Esther Phillips, Confessin' the Blues (Atlantic, 1976) Lou Rawls, Black and Blue and Tobacco Road (Capitol, 2006) Nelson Riddle, Contemporary Sound of Nelson Riddle (United Artists, 1968) The Righteous Brothers, Back to Back (Philles, 1965) The Three Sounds, Coldwater Flat (Blue Note, 1968) Mason Williams, The Mason Williams Ear Show (Warner Bros., 1968) Gerald Wilson, Moment of Truth (Pacific Jazz, 1962) The Yellow Balloon, The Yellow Balloon (Canterbury, 1967) References Kampmann, Wolf (ed.) Reclams Jazzlexikon. Stuttgart 2003; 1922 births 1990 deaths People from Rankin, Pennsylvania American jazz trombonists Male trombonists Cool jazz trombonists Soul-jazz trombonists Swing trombonists West Coast jazz trombonists Duke Ellington Orchestra members The Wrecking Crew (music) members 20th-century American musicians Jazz musicians from Pennsylvania 20th-century trombonists American male jazz musicians 20th-century American male musicians
Menlo Park is an unincorporated community within Edison Township in Middlesex County, in the U.S. state of New Jersey. In 1876, Thomas Edison set up his home and research laboratory in Menlo Park, at the time an unsuccessful real estate development named after the town of Menlo Park, California. In this lab, which was one of the first to pursue practical, commercial applications of research, Edison invented the phonograph and developed a commercially viable incandescent light bulb filament. Christie Street in Menlo Park was one of the first streets in the world to use electric lights for illumination. In 1887, Edison moved his home and laboratory to West Orange. After his death, the Thomas Alva Edison Memorial Tower and Museum was constructed near his old Menlo Park lab and dedicated in 1938. Edison's old lab site and memorial now make up Edison State Park. The municipality in which Menlo Park is located, which was called "Raritan Township" while Edison was alive, was changed to Edison Township on November 10, 1954. See also List of neighborhoods in Edison, New Jersey References Neighborhoods in Edison, New Jersey Unincorporated communities in Middlesex County, New Jersey Unincorporated communities in New Jersey Company towns in New Jersey
Abraham Karem (born 1937) is a designer of fixed and rotary-wing unmanned aircraft. He is regarded as the founding father of UAV (drone) technology. Biography Abraham Karem was born in Baghdad, Iraq, to an Assyrian Jewish couple. His family moved to Israel in 1951, where he grew up. From an early age, he had an innate passion for aeronautics, and at the age of 14, he started building model aircraft. Karem is regarded as the founding father of UAV (drone) technology. He graduated as an aeronautical engineer from the Technion. He built his first drone during the Yom Kippur War for the Israeli Air Force. In the 1970s, he immigrated to the United States. Engineering career He founded Leading Systems Inc. in his home garage, where he started manufacturing his first drone, Albatross, and later on, the more sophisticated Amber, which eventually evolved into the famous General Atomics MQ-1 Predator drone, which brought him the title of "Drone father". Karem has been described by The Economist magazine as the man who "created the robotic plane that transformed the way modern warfare is waged and continues to pioneer other airborne innovations". Leading Systems has since gone bankrupt and was bought up by the US defense contractor General Atomics, which employed Karem and his team for the development of ultra-high endurance UAVs. The new development resulted in the creation of the Predator, based on the previous model Amber. Awards and recognition In 2010, Karem was elected a member of the National Academy of Engineering for the development of long-endurance unmanned aerial vehicles and variable rotor speed VTOL aircraft systems. References American aerospace engineers American people of Iraqi-Jewish descent Israeli aerospace engineers Living people People from Baghdad 1937 births
```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <title>WebGL2 - Instanced Drawing</title> <link type="text/css" href="resources/webgl-tutorials.css" rel="stylesheet" /> </head> <body> <div class="description"> Instanced Drawing </div> <canvas id="canvas"></canvas> </body> <!-- for most samples webgl-utils only provides shader compiling/linking and canvas resizing because why clutter the examples with code that's the same in every sample. See path_to_url and path_to_url for webgl-utils, m3, m4, and webgl-lessons-ui. --> <script src="resources/webgl-utils.js"></script> <script src="resources/m4.js"></script> <script> 'use strict'; const vertexShaderSource = `#version 300 es in vec4 a_position; in vec4 color; in mat4 matrix; out vec4 v_color; void main() { // Multiply the position by the matrix. gl_Position = matrix * a_position; // Pass the vertex color to the fragment shader. v_color = color; } `; const fragmentShaderSource = `#version 300 es precision highp float; // Passed in from the vertex shader. in vec4 v_color; out vec4 outColor; void main() { outColor = v_color; } `; function main() { // Get A WebGL context /** @type {HTMLCanvasElement} */ const canvas = document.querySelector('#canvas'); const gl = canvas.getContext('webgl2'); if (!gl) { return; } // Use our boilerplate utils to compile the shaders and link into a program var program = webglUtils.createProgramFromSources(gl, [vertexShaderSource, fragmentShaderSource]); const positionLoc = gl.getAttribLocation(program, 'a_position'); const colorLoc = gl.getAttribLocation(program, 'color'); const matrixLoc = gl.getAttribLocation(program, 'matrix'); // Create a vertex array object (attribute state) const vao = gl.createVertexArray(); // and make it the one we're currently working with gl.bindVertexArray(vao); const positionBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ -0.1, 0.4, -0.1, -0.4, 0.1, -0.4, -0.1, 0.4, 0.1, -0.4, 0.1, 0.4, -0.4, -0.1, 0.4, -0.1, -0.4, 0.1, -0.4, 0.1, 0.4, -0.1, 0.4, 0.1, ]), gl.STATIC_DRAW); const numVertices = 12; // setup the position attribute gl.enableVertexAttribArray(positionLoc); gl.vertexAttribPointer( positionLoc, // location 2, // size (num values to pull from buffer per iteration) gl.FLOAT, // type of data in buffer false, // normalize 0, // stride (0 = compute from size and type above) 0, // offset in buffer ); // setup matrixes, one per instance const numInstances = 5; // make a typed array with one view per matrix const matrixData = new Float32Array(numInstances * 16); const matrices = []; for (let i = 0; i < numInstances; ++i) { const byteOffsetToMatrix = i * 16 * 4; const numFloatsForView = 16; matrices.push(new Float32Array( matrixData.buffer, byteOffsetToMatrix, numFloatsForView)); } const matrixBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, matrixBuffer); // just allocate the buffer gl.bufferData(gl.ARRAY_BUFFER, matrixData.byteLength, gl.DYNAMIC_DRAW); // set all 4 attributes for matrix const bytesPerMatrix = 4 * 16; for (let i = 0; i < 4; ++i) { const loc = matrixLoc + i; gl.enableVertexAttribArray(loc); // note the stride and offset const offset = i * 16; // 4 floats per row, 4 bytes per float gl.vertexAttribPointer( loc, // location 4, // size (num values to pull from buffer per iteration) gl.FLOAT, // type of data in buffer false, // normalize bytesPerMatrix, // stride, num bytes to advance to get to next set of values offset, // offset in buffer ); // this line says this attribute only changes for each 1 instance gl.vertexAttribDivisor(loc, 1); } // setup colors, one per instance const colorBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, colorBuffer); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 1, 0, 0, 1, // red 0, 1, 0, 1, // green 0, 0, 1, 1, // blue 1, 0, 1, 1, // magenta 0, 1, 1, 1, // cyan ]), gl.STATIC_DRAW); // set attribute for color gl.enableVertexAttribArray(colorLoc); gl.vertexAttribPointer(colorLoc, 4, gl.FLOAT, false, 0, 0); // this line says this attribute only changes for each 1 instance gl.vertexAttribDivisor(colorLoc, 1); function render(time) { time *= 0.001; // seconds webglUtils.resizeCanvasToDisplaySize(gl.canvas); // Tell WebGL how to convert from clip space to pixels gl.viewport(0, 0, gl.canvas.width, gl.canvas.height); gl.useProgram(program); // setup all attributes gl.bindVertexArray(vao); // update all the matrices matrices.forEach((mat, ndx) => { m4.translation(-0.5 + ndx * 0.25, 0, 0, mat); m4.zRotate(mat, time * (0.1 + 0.1 * ndx), mat); }); // upload the new matrix data gl.bindBuffer(gl.ARRAY_BUFFER, matrixBuffer); gl.bufferSubData(gl.ARRAY_BUFFER, 0, matrixData); gl.drawArraysInstanced( gl.TRIANGLES, 0, // offset numVertices, // num vertices per instance numInstances, // num instances ); requestAnimationFrame(render); } requestAnimationFrame(render); } main(); </script> </html> ```
```c // // Created by liuruikai756 on 05/07/2017. // #include <sys/mman.h> #include <string.h> #include "common.h" #include "env.h" #include "trampoline.h" static unsigned char *trampolineCode; // place where trampolines are saved static unsigned int trampolineCodeSize; // total size of trampoline code area static unsigned int trampolineSize; // trampoline size required for each hook unsigned int hookCap = 0; unsigned int hookCount = 0; // trampoline1: set eax/r0/x0 to the hook ArtMethod addr and then jump into its entry point #if defined(__i386__) // b8 78 56 34 12 ; mov eax, 0x12345678 // 66 c7 40 12 00 00 ; mov word [eax + 0x12], 0 // ff 70 20 ; push dword [eax + 0x20] // c3 ; ret unsigned char trampoline1[] = { 0xb8, 0x78, 0x56, 0x34, 0x12, 0x66, 0xc7, 0x40, 0x12, 0x00, 0x00, 0xff, 0x70, 0x20, 0xc3 }; static unsigned int t1Size = roundUpToPtrSize(sizeof(trampoline1)); // for alignment #elif defined(__arm__) //------------------------------> 10 00 9f e5 ; ldr r0, [pc, #20] //------------------------------> 04 40 2d e5 ; push {r4} //------------------------------> 00 40 a0 e3 ; mov r4, #0 //------------------------------> b2 41 c0 e1 ; strh r4, [r0, #18] //------------------------------> 04 40 9d e4 ; pop {r4} // 00 00 9F E5 ; ldr r0, [pc] // 20 F0 90 E5 ; ldr pc, [r0, 0x20] // 78 56 34 12 ; 0x12345678 unsigned char trampoline1[] = { 0x14, 0x00, 0x9f, 0xe5, 0x04, 0x40, 0x2d, 0xe5, 0x00, 0x40, 0xa0, 0xe3, 0xb2, 0x41, 0xc0, 0xe1, 0x04, 0x40, 0x9d, 0xe4, 0x00, 0x00, 0x9f, 0xe5, 0x20, 0xf0, 0x90, 0xe5, 0x78, 0x56, 0x34, 0x12 }; static unsigned int t1Size = sizeof(trampoline1); #elif defined(__aarch64__) // 60 00 00 58 ; ldr x0, 12 ------->// 80 00 00 58 ; ldr x0, 16 dexhotness // 1f 24 00 79 ; strh wzr, [x0, #18] // 10 18 40 f9 ; ldr x16, [x0, #48] // 00 02 1f d6 ; br x16 // 78 56 34 12 // 89 67 45 23 ; 0x2345678912345678 unsigned char trampoline1[] = { 0x80, 0x00, 0x00, 0x58, 0x1f, 0x24, 0x00, 0x79, // 0x60, 0x00, 0x00, 0x58, 0x10, 0x18, 0x40, 0xf9, 0x00, 0x02, 0x1f, 0xd6, 0x78, 0x56, 0x34, 0x12, 0x89, 0x67, 0x45, 0x23 }; static unsigned int t1Size = roundUpToPtrSize(sizeof(trampoline1)); #endif // trampoline2: // 1.1 set eax/r0/x0 to the copy of origin ArtMethod addr, // 2. clear hotness_count of the copy origin ArtMethod(only after Android N) // 3. jump into origin's real entry point #if defined(__i386__) // b8 21 43 65 87 ; mov eax, 0x87654321 // 66 c7 40 12 00 00 ; mov word [eax + 0x12], 0 // 68 78 56 34 12 ; push 0x12345678 // c3 ; ret unsigned char trampoline2[] = { 0xb8, 0x21, 0x43, 0x65, 0x87, 0x66, 0xc7, 0x40, 0x12, 0x00, 0x00, 0x68, 0x78, 0x56, 0x34, 0x12, 0xc3 }; static unsigned int t2Size = roundUpToPtrSize(sizeof(trampoline2)); // for alignment #elif defined(__arm__) // 10 00 9f e5 ; ldr r0, [pc, #16] // 04 40 2d e5 ; push {r4} // 00 40 a0 e3 ; mov r4, #0 // b2 41 c0 e1 ; strh r4, [r0, #18] // 04 40 9d e4 ; pop {r4} // 00 f0 9f e5 ; ldr pc, [pc, #0] // 21 43 65 87 ; 0x87654321 // 78 56 34 12 ; 0x12345678 unsigned char trampoline2[] = { 0x10, 0x00, 0x9f, 0xe5, 0x04, 0x40, 0x2d, 0xe5, 0x00, 0x40, 0xa0, 0xe3, 0xb2, 0x41, 0xc0, 0xe1, 0x04, 0x40, 0x9d, 0xe4, 0x00, 0xf0, 0x9f, 0xe5, 0x21, 0x43, 0x65, 0x87, 0x78, 0x56, 0x34, 0x12 }; static unsigned int t2Size = sizeof(trampoline2); #elif defined(__aarch64__) // 80 00 00 58 ; ldr x0, [pc, #16] // 1f 24 00 79 ; strh wzr, [x0, #18] // 90 00 00 58 ; ldr x16, [pc, #16] // 00 02 1f d6 ; br x16 // 89 67 45 23 // 78 56 34 12 ; 0x1234567823456789 // 78 56 34 12 // 89 67 45 23 ; 0x2345678912345678 unsigned char trampoline2[] = { 0x80, 0x00, 0x00, 0x58, 0x1f, 0x24, 0x00, 0x79, 0x90, 0x00, 0x00, 0x58, 0x00, 0x02, 0x1f, 0xd6, 0x89, 0x67, 0x45, 0x23, 0x78, 0x56, 0x34, 0x12, 0x78, 0x56, 0x34, 0x12, 0x89, 0x67, 0x45, 0x23 }; static unsigned int t2Size = roundUpToPtrSize(sizeof(trampoline2)); #endif void *genTrampoline1(void *hookMethod) { void *targetAddr; /* if(mprotect(trampolineCode, trampolineCodeSize, PROT_READ | PROT_WRITE) == -1) { LOGE("mprotect RW failed"); return NULL; }*/ targetAddr = trampolineCode + trampolineSize*hookCount; memcpy(targetAddr, trampoline1, sizeof(trampoline1)); // do not use t1size since it's a rounded size // replace with the hook ArtMethod addr #if defined(__i386__) memcpy(targetAddr+1, &hookMethod, pointer_size); #elif defined(__arm__) memcpy(targetAddr+28, &hookMethod, pointer_size); // memcpy(targetAddr+8, &hookMethod, pointer_size); #elif defined(__aarch64__) memcpy(targetAddr+16, &hookMethod, pointer_size); #endif /* if(mprotect(trampolineCode, trampolineCodeSize, PROT_READ | PROT_EXEC) == -1) { LOGE("mprotect RX failed"); return NULL; } */ return targetAddr; } void *genTrampoline2(void *originMethod, void *entryPoint) { int i; void *targetAddr; /* if(mprotect(trampolineCode, trampolineCodeSize, PROT_READ | PROT_WRITE) == -1) { LOGE("mprotect RW failed"); return NULL; } */ targetAddr = trampolineCode + trampolineSize*hookCount + t1Size; memcpy(targetAddr, trampoline2, sizeof(trampoline2)); // do not use t2size since it's a rounded size // set eax/r0/x0 and the real entrypoint #if defined(__i386__) memcpy(targetAddr+1, &originMethod, pointer_size); memcpy(targetAddr+12, &entryPoint, pointer_size); #elif defined(__arm__) memcpy(targetAddr+24, &originMethod, pointer_size); memcpy(targetAddr+28, &entryPoint, pointer_size); #elif defined(__aarch64__) memcpy(targetAddr+16, &originMethod, pointer_size); memcpy(targetAddr+24, &entryPoint, pointer_size); #endif /* if(mprotect(trampolineCode, trampolineCodeSize, PROT_READ | PROT_EXEC) == -1) { LOGE("mprotect RX failed"); return NULL; } */ // LOGI("trampoline 2 is at %p", targetAddr); return targetAddr; } int doInitHookCap(unsigned int cap) { trampolineSize = t1Size + t2Size; if(cap == 0) { LOGE("invalid capacity: %d", cap); return 1; } if(hookCap) { LOGW("allocating new space for trampoline code"); } unsigned int allSize = trampolineSize*cap; unsigned char *buf = mmap(NULL, allSize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_PRIVATE, -1, 0); if(buf == MAP_FAILED) { LOGE("mmap failed"); return 1; } hookCap = cap; hookCount = 0; trampolineCode = buf; trampolineCodeSize = allSize; return 0; } ```
Inclán District is one of ten districts of the province Tacna in Peru. References
A sea serpent or sea dragon is a type of dragon sea monster described in various mythologies, most notably Mesopotamian (Tiamat), Judaeo-Christian (Leviathan), Greek (Cetus, Echidna, Hydra, Scylla), and Norse (Jörmungandr). Mythology Mediterranean and Western Asia The mytheme, the chief god in the role of the hero slaying a sea serpent, is widespread both in the ancient Near East and in Indo-European mythology, e.g. Lotan and Hadad, Leviathan and Yahweh, Tiamat and Marduk (see also Labbu, Bašmu, Mušḫuššu), Illuyanka and Tarhunt, Yammu and Baal in the Baal Cycle etc. The Hebrew Bible also has mythological descriptions of large sea creatures as part of creation under Yahweh's command, such as the Tanninim mentioned in Book of Genesis 1:21 and the "great serpent" of Amos 9:3. In the Aeneid, a pair of sea serpents killed Laocoön and his sons when Laocoön argued against bringing the Trojan Horse into Troy. Claudius Aelianus on his work On the Nature of Animals mentions the giant sea centipede which has a tail that is similar to a crayfish and moves through numerous feet on each side of its body. Guillaume Rondelet mentions a similar imaginary creature called centipede cetacean in his work L'histoire entière des poissons. In antiquity and in the Bible, dragons were envisioned as huge serpentine monsters, with the image of a dragon with two or four legs and wings developing during the Middle Ages. Stories depicting sea-dwelling serpents may include the Babylonian myths of Tiamat, the myths of the Hydra, Scylla, Cetus, and Echidna in Greek mythology, and Christianity's Leviathan. Germanic Scandinavia In Nordic mythology, Jörmungandr (or Midgarðsormr) was a sea serpent or worm so long that it encircled the entire world, Midgard. Sea serpents also appear frequently in later Scandinavian folklore, particularly in that of Norway, such as an account that in 1028 AD, Saint Olaf killed a sea serpent in Valldal in Norway, throwing its body onto the mountain Syltefjellet. Marks on the mountain are associated with the legend. Natural history An apparent eye-witness account is given by Aristotle in his work Historia Animalium on natural history. Strabo makes reference to an eyewitness account of a dead sea creature sighted by Poseidonius on the coast of the northern Levant. He reports the following: "As for the plains, the first, beginning at the sea, is called Macras, or Macra-Plain. Here, as reported by Poseidonius, was seen the fallen dragon, the corpse of which was about a plethrum [] in length, and so bulky that horsemen standing by it on either side could not see one another, and its jaws were large enough to admit a man on horseback, and each flake of its horny scales exceeded an oblong shield in length." The creature was seen sometime between 130 and 51 BC. Norway, 16th century Swedish ecclesiastic and writer Olaus Magnus included illustrations of sea serpents and other various marine monsters on his illustrated map, the Carta marina. In his 1555 work History of the Northern Peoples, Olaus gives the following description of a Norwegian sea serpent: {{cquote|Those who sail up along the coast of Norway to trade or to fish, all tell the remarkable story of how a serpent of fearsome size, from to long, and wide, resides in rifts and caves outside Bergen. On bright summer nights this serpent leaves the caves to eat calves, lambs and pigs, or it fares out to the sea and feeds on sea nettles, crabs and similar marine animals. It has ell-long hair hanging from its neck, sharp black scales and flaming red eyes. It attacks vessels, grabs and swallows people, as it lifts itself up like a column from the water.}} Norwegian Bishop Erik Pontoppidan (1698–1764) did not disbelieve the existence of sea serpents themselves, but doubted they would prey on ships and feed on humans, being more cautious-minded in that respect than Archbishop Olaus (of Upsala). Nevertheless, a number of reports were made by sailors at the time that sea serpents would destroy ships by wrapping the ship in coils of their body and pulling it underwater. Sailors threatened by a sea serpent were said to have thrown large objects such as paddles or shovels overboard in the path of the serpent, hoping that the serpent would take the object and leave without destroying the ship. Greenland in 1734 Rev. Hans Egede, a Dano-Norwegian clergyman who was an early explorer and surveyor of Greenland, gave an 18th-century description of a sea serpent witnessed by his party. In his journal he wrote: Egede also wrote on the same sea-monster sighting in his book, noting that the beast was spotted at the 64th degree of latitude, and was as thick or "bulky as the Ship, and three or four times as long". Egede himself did not supply a sketch in this otherwise well-illustrated book, but the missionary named Bing who was his comrade drew a sketch, which is reproduced in Henry Lee's work. Bing further described this creature as having reddish eyes, almost burning with fire. This convinced Bishop Pontoppidan that this was different from the type of sea serpent seen by others. From Bing's drawing, Pontoppidan estimated the creature to be considerably shorter than the length of a cable rope, or 100 fathoms (200 metres) attested by multiple witnesses, and the pair of fins which were attached "below the waist ()" in Pontoppidan's view, was another unusual feature. Lee proposed a rational explanation that this sea-serpent was a misapprehended sighting of what was actually the exposed head and one tentacle of a great squid (Cf. figure above left). New York exhibition in 1845 In 1845, a 35 meter long skeleton claimed as belonging to an extinct sea serpent was put on a show in the New York City by Albert C. Koch. The claim was debunked by Prof. Jeffries Wyman, an anatomist who went to see the skeleton for himself. Wyman declared that the skull of the animal had to be mammalian in origin, and that the skeleton was composed of bones of several different animals, including an extinct species of whale. Portuguese waters, 1848 On 6 August 1848 Captain McQuhae of and several of his officers and crew (en route to St Helena) saw a sea serpent which was subsequently reported (and debated) in The Times. The vessel sighted what they named as an enormous serpent between the Cape of Good Hope and St Helena. The serpent was witnessed to have been swimming with of its head above the water and they believed that there was another of the creature in the sea. Captain McQuahoe also said that "[The creature] passed rapidly, but so close under our lee quarter, that had it been a man of my acquaintance I should have easily have recognized his features with the naked eye." According to seven members of the crew, it remained in view for around twenty minutes. Another officer wrote that the creature was more of a lizard than a serpent. Evolutionary biologist Gary J. Galbreath contends that what the crew of Daedalus saw was a sei whale. A report was published in the Illustrated London News on 14 April 1849 of a sighting of a sea serpent off the Portuguese coast by ."A giant snake appeared at once from the water - and the largest cetacean a boa constrictor way wrapped twice. (I note such a physeter It can grow to 20-30 meters long!) It lasted for about 15 minutes the deadly struggle, the sea was just foaming and crashing waves around us, finally the back of the whale stood out Out of the water, he sank head first into the deep where the snake must have killed him. A cold shiver ran through us a cet at the sight of his final struggle; so writhing poor in the monster's double ring, like a little bird between the claws of a falcon. View of the two rings, the snake. It could have been 160-170 feet long and 7-8 feet thick."Gallery In media C. S. Lewis's The Chronicles of Narnia features a sea serpent as one of many obstacles in The Voyage of the Dawn Treader, along with the 1989 TV serial and the 2010 film based on it. Beany and Cecil, featuring a sea sick sea serpent. Revived as The New Beany and Cecil Show'' by prouducer DIC Entertainment. See also Bakunawa Chinese dragon Giant oarfish Gyarados Kraken Lindworm Nāga Pyrosome Selma Stronsay Beast Ogopogo Explanatory notes References Bibliography (Further reading) External links Video of the oarfish, a creature that possibly inspired the sea serpent mythology. https://emergencemagazine.org/essay/great-sea-serpent/ https://www.gutenberg.org/files/36677/36677-h/36677-h.htm Legendary serpents Dragons Greek legendary creatures Sea monsters Tiamat
```tex \documentclass{article} % Previously we had five input LaTeX files (booklet.tex bk-lt.tex bk-a4.tex % refcard.tex gnusref.tex) and two logo files (gnuslogo-refcard.eps and % gnuslogo-booklet.eps). % % From this LaTeX file (gnus-refcard.tex) plus a single logo (gnus-logo.eps), % we can generate the refcard and the booklet version. This simplifies to % distribute the refcard with Emacs. Appropriate Makefile rules were added in % gnus/texi/Makefile. % For Emacs, we may use the following commands (w/o) using Gnus' Makefile: % % latex gnus-refcard.tex && % dvips -t letter -f gnus-refcard.dvi > gnus-refcard.ps % % latex '\def\booklettrue{}\def\letterpapertrue{}\input{gnus-refcard}' && % mv gnus-refcard.dvi gnus-booklet.dvi && % dvips -t letter -f gnus-booklet.dvi > gnus-booklet.ps \usepackage{ifthen} \ifthenelse{\isundefined{\booklettrue}}{ \typeout{Creating reference card...} }{ \typeout{Creating reference booklet...}} \usepackage{supertabular} \newlength{\logowidth} \setlength{\logowidth} {6.861in} \newlength{\logoheight} \setlength{\logoheight}{7.013in} \usepackage{graphicx} \usepackage{geometry} \ifthenelse{\isundefined{\booklettrue}}{% ifcard %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Reference Card \def\Guide{Card}\def\guide{card} \def\logoscale{0.25} % Page setup for the refcard: % \setlength{\textwidth}{7.26in} \setlength{\textheight}{10in} % \setlength{\topmargin}{-1.0in} % % the same settings work for A4, although there is a bit of space at the % % top and bottom of the page. % \setlength{\oddsidemargin}{-0.5in} \setlength{\evensidemargin}{-0.5in} \ifthenelse{\isundefined{\letterpapertrue}}{ \geometry{a4paper,hmargin=10mm,tmargin=10mm,bmargin=35mm} }{ \geometry{hmargin=20mm,tmargin=10mm,bmargin=12mm} } }{ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Reference Booklet \def\Guide{Booklet}\def\guide{booklet} \def\logoscale{0.5}% FIXME: too large for 2up printing? --rsteib \ifthenelse{\isundefined{\letterpapertrue}}{ \geometry{a5paper,hmargin=10mm,tmargin=10mm,bmargin=4mm} }{ \geometry{a5paper,hmargin=20mm,tmargin=10mm,bmargin=4mm} } \def\sec{\section} \def\subsec{\subsection} \def\subsubsec{\subsubsection} \def\blankpage{\vspace*{\fill}\par %\centerline{(This page intentionally left blank.)} \par\vspace*{\fill}\pagebreak} }%ifbooklet% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \input{gnusref} % % % % % % % % % % % % % % % % % % % % % % % % % % %% include file for the Gnus refcard and booklet \def\progver{5.11} % program version % \def\refver{5.10-2} % refcard version (not used) \def\date{April, 2006} \def\author{Gnus Bugfixing Girls + Boys $<$bugs@gnus.org$>$} %% \newlength{\keycolwidth} \newenvironment{keys}[1]% #1 is the widest key {\nopagebreak%\noindent% \settowidth{\keycolwidth}{#1}% \addtolength{\keycolwidth}{\tabcolsep}% \addtolength{\keycolwidth}{-\columnwidth}% \begin{supertabular}{@{}l@{\hspace{\tabcolsep}}p{-\keycolwidth}@{}}}% {\end{supertabular}\\} %% uncomment the first definition if you do not want pagebreaks in maps %%\newcommand{\esamepage}{\samepage} \newcommand{\esamepage}{} \newcommand*{\B}[1]{{\bf#1})} % bold l)etter \newcommand{\Title}{% \begin{center} {\bf\LARGE Gnus \progver\ Reference \Guide\\} %{\normalsize \Guide\ version \refver} \end{center} } % \newcommand*{\LogoOLD}[1]{\centerline{% % \makebox[\logoscale\logowidth][l]{\vbox to \logoscale\logoheight % {\vfill\epsfig{figure=gnuslogo-#1}}\vspace{-\baselineskip}}}} \newcommand*{\Logo}[1]{\centerline{% \includegraphics[width=\logoscale\logowidth]{gnus-logo}}} %% Contributions by: %% 1995 Vladimir Alexiev <vladimir@cs.ualberta.ca> %% 2000 Felix Natter <fnatter@gmx.net> %% 2001, 2002, 2003, 2005 \author. %% Original Gnus manual 1994 Lars Magne Ingebrigtsen %% Some material from Emacs Help Bindings feature (C-h b). %% Gnus logo by Luis Fernandes. \begin{center} \end{center} For more Emacs documentation, and the \TeX{} source for this card, see the Emacs distribution, or {\tt path_to_url} Please send corrections, additions and suggestions to the current maintainer's email address. \Guide{} last edited on \date. } \newcommand{\Notes}{% \subsection*{Notes} {\esamepage Gnus is complex. Currently it has some 876 interactive (user-callable) functions. Of these 618 are in the two major modes (Group and Summary/Article). Many of these functions have more than one binding, some have 3 or even 4 bindings. The total number of keybindings is 677. So in order to save 40\% space, every function is listed only once on this \guide, under the ``more logical'' binding. Alternative bindings are given in parentheses in the beginning of the description. Many Gnus commands are affected by the numeric prefix. Normally you enter a prefix by holding the Meta key and typing a number, but in most Gnus modes you don't need to use Meta since the digits are not self-inserting. The prefixed behavior of commands is given in [brackets]. Often the prefix is used to specify: \quad [distance] How many objects to move the point over. \quad [scope] How many objects to operate on (including current one). \quad [p/p] The ``Process/Prefix Convention'': If a prefix is given then it determines how many objects to operate on. Else if there are some objects marked with the process mark \#, these are operated on. Else only the current object is affected. \quad [level] A group subscribedness level. Only groups with a lower or equal level will be affected by the operation. If no prefix is given, `gnus-group-default-list-level' is used. If `gnus-group-use-permanent-levels', then a prefix to the `g' and `l' commands will also set the default level. \quad [score] An article score. If no prefix is given, `gnus-summary-default-score' is used. \\*[\baselineskip] % some keys Gnus startup-commands:\\* \begin{keys}{M-x gnus-unplugged} M-x gnus & start Gnus. \\ M-x gnus-no-server & start Gnus without connecting to server (i.e. to read mail). \\ \end{keys} Additionally, there are two commands \texttt{gnus-plugged} and \texttt{gnus-unplugged}, which are only used if you want to download news and/or read previously downloaded news offline (see C-c C-i g Gnus Unplugged RET). Note: \texttt{gnus-no-server} ignores the stuff in \texttt{gnus-agent-directory}, and thus does not allow you to use Gnus Unplugged.\\ % \begin{keys}{C-c C-i} C-c C-i & Go to the Gnus online {\bf info}.\\ C-c C-b & Send a Gnus {\bf bug} report.\\ \end{keys} }} \newcommand{\GroupLevels}{% The table below assumes that you use the default Gnus levels. Fill your user-specific levels in the blank cells.\\[1\baselineskip] \begin{tabular}{|c|l|l|} \hline Level & Groups & Status \\ \hline 1 & draft/mail groups & \\ 2 & mail groups & \\ 3 & & subscribed \\ 4 & & \\ 5 & default list level & \\ \hline 6 & & unsubscribed \\ 7 & & \\ \hline 8 & & zombies \\ \hline 9 & & killed \\ \hline \end{tabular}} \newcommand{\MarkCharacters}{% {\esamepage If a command directly sets a mark, it is shown in parentheses.\\* \newlength{\markcolwidth} \settowidth{\markcolwidth}{` '}% widest character \addtolength{\markcolwidth}{4\tabcolsep} \addtolength{\markcolwidth}{-\columnwidth} \newlength{\markdblcolwidth} \setlength{\markdblcolwidth}{\columnwidth} \addtolength{\markdblcolwidth}{-2\tabcolsep} \begin{tabular}{|c|p{-\markcolwidth}|} \hline \multicolumn{2}{|p{\markdblcolwidth}|}{{\bf ``Read'' Marks.} All these marks appear in the first column of the summary line, and so are mutually exclusive.}\\ \hline ` ' & (M-u, M SPC, M c) Not read.\\ ! & (!, M !, M t) Ticked (interesting).\\ ? & (?, M ?) Dormant (only followups are interesting).\\ E & (E, M e, M x) {\bf Expirable}. Only has effect in mail groups.\\ G & (C, B DEL) Canceled article (or deleted in mailgroups).\\ \$ & (M-d, M s x, S x). Marked as spam.\\ \hline\hline \multicolumn{2}{|p{\markdblcolwidth}|} {The marks below mean that the article is read (killed, uninteresting), and have more or less the same effect. Some commands however explicitly differentiate between them (e.g.\ M M-C-r, adaptive scoring).}\\ \hline r & (d, M d, M r) Deleted (marked as {\bf read}).\\ C & (M C; M C-c; M H; c, Z c; Z n; Z C) Killed by {\bf catch-up}.\\ F & SOUPed article. See the manual.\\ O & {\bf Old} (read in a previous session).\\ K & (k, M k; C-k, M K) {\bf Killed}.\\ M & Article marked as read by duplicate suppression.\\ Q & Article is part of a sparse thread (see ``Threading'' in manual).\\ R & {\bf Read} (viewed in actuality).\\ X & Killed by a kill file.\\ Y & Killed due to low score.\\ \hline\multicolumn{2}{c}{\vspace{1ex}}\\\hline \multicolumn{2}{|p{\markdblcolwidth}|} {{\bf Marks not affecting visibility}}\\ \hline \# & (\#, M \#, M P p) Processable (affected by next operation). [2]\\ A & {\bf Answered} (followed-up or replied). [2]\\ F & Forwarded. [2]\\ $\ast$ & Cached. [2]\\ S & Saved. [2]\\ N & Recently arrived. [2]\\ . & Unseen. [2]\\ + & Over default score. [3]\\ $-$ & Under default score. [3]\\ $=$ & Has children (thread underneath it). Add `\%e' to `gnus-summary-line-format'. [3]\\ \hline \end{tabular} }} \newcommand{\GroupModeGeneral}{% \begin{keys}{C-c M-C-x} RET & (=) Enter this group. [Prefix: how many (read) articles to fetch. Positive: newest articles, negative: oldest ones; non-numerical: view all articles, not just unread]\\ M-RET & Enter group quickly.\\ M-SPC & Same as RET but does not expunge and hide dormants.\\ M-C-RET & Enter group without any processing, changes will not be permanent.\\ SPC & Select this group and display the first (unread) article. [Same prefix as above.]\\ ? & Give a very short help message.\\ $<$ & Go to the beginning of the Group buffer.\\ $>$ & Go to the end of the Group buffer.\\ , & Jump to the lowest-level group with unread articles.\\ . & Jump to the first group with unread articles.\\ \^{} & Enter the Server buffer mode.\\ a & Post an {\bf article} to a group [Prefix: use group under point to find posting-style].\\ b & Find {\bf bogus} groups and delete them.\\ c & Mark all unticked articles in group as read ({\bf catch-up}). [p/p]\\ g & Check the server for new articles ({\bf get}). [level]\\ M-g & Check the server for new articles in this group ({\bf get}). [p/p]\\ j & {\bf Jump} to a group.\\ m & {\bf Mail} a message to someone [Prefix: use group under point to find posting-style].\\ n & Go to the {\bf next} group with unread articles. [distance]\\ M-n & Go to the {\bf next} group on the same or lower level. [distance]\\ p & (DEL) Go to the {\bf previous} group with unread articles. [distance]\\ M-p & Go to the {\bf previous} group on the same or lower level. [distance]\\ q & {\bf Quit} Gnus.\\ r & Re-read the init file ({\bf reset}).\\ s & {\bf Save} `.newsrc.eld' file (and `.newsrc' if `gnus-save-newsrc-file').\\ z & Suspend (kill all buffers of) Gnus.\\ B & {\bf Browse} a foreign server.\\ C & Mark all articles in this group as read ({\bf Catch-up}). [p/p]\\ F & {\bf Find} new groups and process them.\\ N & Go to the {\bf next} group. [distance]\\ P & Go to the {\bf previous} group. [distance]\\ Q & {\bf Quit} Gnus without saving any startup (.newsrc) files.\\ R & {\bf Restart} Gnus.\\ Z & Clear the dribble buffer.\\ M-c & Clear data from group (marks and list of read articles). \\ C-c C-s & {\bf Sort} the groups by name, number of unread articles, or level (depending on `gnus-group-sort-function').\\ C-c C-x & Run all expirable articles in group through the {\bf expiry} process.\\ C-c M-C-x & Run all articles in all groups through the {\bf expiry} process.\\ C-c M-g & Activate all {\bf groups}.\\ C-c C-i & Gnus online-manual ({\bf info}).\\ C-x C-t & {\bf Transpose} two groups.\\ H f & Fetch this group's {\bf FAQ} (using ange-ftp).\\ H c & Display this group's {\bf charter}. [Prefix: query for group]\\ H C & Display this group's {\bf control message} (using ange-ftp). [Prefix: query for group]\\ H v & (V) Display the Gnus {\bf version} number.\\ H d & (C-c C-d) Show the {\bf description} of this group [Prefix: re-read from server].\\ M-d & {\bf Describe} all groups. [Prefix: re-read from server]\\ D g & Regenerate a Sieve script from group parameters.\\ D u & Regenerate Sieve script and {\bf upload} to server.\\ \end{keys} } \newcommand{\ListGroups}{% {\esamepage \begin{keys}{A M} A d & (C-c C-M-a) List all groups whose names or {\bf descriptions} match a regexp.\\ A k & (C-c C-l) List all {\bf killed} groups. [Prefix: look at active-file from server]\\ A l & List all groups on a specific level. [Prefix: also list groups with no unread articles]\\ A a & (C-c C-a) List all groups whose names match a regexp ({\bf apropos}).\\ A A & List the server's active-file.\\ A M & List groups that {\bf match} a regexp.\\ A m & List groups that {\bf match} a regexp and have unread articles. [level]\\ A s & (l) List all {\bf subscribed} groups with unread articles. [level; 5 and lower is the default]\\ A u & (L) List all groups (including read and {\bf unsubscribed}). [level; 7 and lower is the default]\\ A z & List all {\bf zombie} groups.\\ A c & List all groups with cached articles. [level]\\ A ? & List all groups with dormant articles. [level]\\ \end{keys} } \newcommand{\CreateEditGroups}{% {\esamepage The select methods are indicated in parentheses.\\* \begin{keys}{G DEL} G a & Make the Gnus list {\bf archive} group. (nndir over ange-ftp)\\ G c & {\bf Customize} this group's parameters.\\ G d & Make a {\bf directory} group (every file must be a posting and files must have numeric names). (nndir)\\ G D & Enter a {\bf directory} as a (temporary) group. (nneething without recording articles read)\\ G e & (M-e) {\bf Edit} this group's select method.\\ G E & {\bf Edit} this group's info (select method, articles read, etc).\\ G f & Make a group based on a {\bf file}. (nndoc)\\ G h & Make the Gnus {\bf help} (documentation) group. (nndoc)\\ G k & Make a {\bf kiboze} group. (nnkiboze)\\ G m & {\bf Make} a new group.\\ G p & Edit this group's {\bf parameters}.\\ G r & Rename this group (does not work with read-only groups!).\\ G u & Create one of the groups mentioned in gnus-{\bf useful}-groups.\\ G v & Add this group to a {\bf virtual} group. [p/p]\\ G V & Make a new empty {\bf virtual} group. (nnvirtual)\\ G w & Create ephemeral group based on web-search. [Prefix: make solid group instead]\\ G R & Make an {\bf RSS} group.\\ G DEL & {\bf Delete} group [Prefix: delete all articles as well].\\ G x & Expunge all deleted articles in an nnimap mailbox.\\ G l & Edit ACL (Access Control {\bf List}) for an nnimap mailbox.\\ \end{keys} You can also create mail-groups and read your mail with Gnus (very useful if you are subscribed to mailing lists), using one of the methods nnmbox, nnbabyl, nnml, nnmh, or nnfolder. Read about it in the online info (C-c C-i g Reading Mail RET). }} % TODO: \newcommand{\SoupCommands}{% \begin{keys}{G s w} G s b & gnus-group-brew-soup: not documented.\\ G s p & gnus-soup-pack-packet: not documented.\\ G s r & nnsoup-pack-replies: not documented.\\ G s s & gnus-soup-send-replies: not documented.\\ G s w & gnus-soup-save-areas: not documented.\\ \end{keys}} \newcommand{\MarkGroups}{% \begin{keys}{M m} M m & (\#) Set the process {\bf mark} on this group. [scope]\\ M r & Mark all groups matching regular expression.\\ M u & (M-\#) Remove process mark from this group ({\bf unmark}). [scope]\\ M U & Remove the process mark from all groups (\textbf{unmark all}).\\ M w & Mark all groups in the current region. [prefix: unmark]\\ M b & Mark all groups in the {\bf buffer}. [prefix: unmark]\\ \end{keys}} \newcommand{\GroupTopicsGeneral}{% {\esamepage Topics are ``categories'' for groups. Press t in the group-buffer to toggle gnus-topic-mode (C-c C-i g Group Topics RET).\\* \begin{keys}{C-c C-x} T n & Prompt for topic {\bf name} and create it.\\ T m & {\bf Move} the current group to some other topic [p/p].\\ T j & {\bf Jump} to a topic.\\ T c & {\bf Copy} the current group to some other topic [p/p].\\ T D & Remove (not delete) the current group [p/p].\\ T M & {\bf Move} all groups matching a regexp to a topic.\\ T C & {\bf Copy} all groups matching a regexp to a topic.\\ T H & Toggle {\bf hiding} of empty topics.\\ T r & {\bf Rename} a topic.\\ T DEL & Delete an empty topic.\\ T \# & Mark all groups in the current topic with the process-mark.\\ T M-\# & Remove the process-mark from all groups in the current topic.\\ T TAB & (TAB) Indent current topic [Prefix: unindent].\\ M-TAB & Unindent the current topic.\\ RET & (SPC) Either unfold topic or enter group [level].\\ T s & {\bf Show} the current topic. [Prefix: show permanently]\\ T h & {\bf Hide} the current topic. [Prefix: hide permanently]\\ C-c C-x & Expire all articles in current group or topic.\\ C-k & {\bf Kill} a group or topic.\\ C-y & {\bf Yank} a group or topic.\\ A T & List active-file using {\bf topics}.\\ G p & Edit topic-{\bf parameters}.\\ T M-n & Go to {\bf next} topic. [distance]\\ T M-p & Go to {\bf previous} topic. [distance]\\ \end{keys} } } \newcommand{\TopicSorting}{% {\esamepage \begin{keys}{T S m} T S a & Sort {\bf alphabetically}.\\ T S u & Sort by number of {\bf unread} articles.\\ T S l & Sort by group {\bf level}.\\ T S v & Sort by group score ({\bf value}).\\ T S r & Sort by group {\bf rank}.\\ T S m & Sort by {\bf method}.\\ T S e & Sort by {\bf server} name.\\ T S s & Sort according to `gnus-group-sort-function'.\\ \end{keys} With a prefix these commands will sort in reverse order. } } \newcommand{\SubscribeKillYankGroups}{% {\esamepage \begin{keys}{S C-k} S k & (C-k) {\bf Kill} this group.\\ S l & Set the {\bf level} of this group. [p/p]\\ S s & (U) Prompt for a group and toggle its {\bf subscription}.\\ S t & (u) {\bf Toggle} subscription to this group. [p/p]\\ S w & (C-w) Kill all groups in the region.\\ S y & (C-y) {\bf Yank} the last killed group.\\ S z & Kill all {\bf zombie} groups.\\ S C-k & Kill all groups on a certain level.\\ \end{keys} } } \newcommand{\SummaryModeGeneral}{% {\esamepage \begin{keys}{M-RET} SPC & (A SPC, A n) Select an article, scroll it one page, move to the next one.\\ DEL & (A DEL, A p, b) Scroll this article one page back. [distance]\\ RET & (A RET) Scroll this article one line forward. [distance]\\ M-RET & (A M-RET) Scroll this article one line backward. [distance]\\ = & Expand the Summary window (fullsize). [Prefix: shrink to display article window]\\ % \& & Execute a command on all articles whose header matches a regexp. [Prefix: move backwards]\\ M-\& & Execute a command on all articles having the process mark.\\ % M-n & (G M-n) Go to {\bf next} summary line of unread article. [distance]\\ M-p & (G M-p) Go to {\bf previous} summary line of an unread article. [distance]\\ M-s & {\bf Search} through all subsequent articles for a regexp.\\ M-r & Search through all previous articles for a regexp.\\ % A P & {\bf Postscript}-print current buffer.\\ % M-k & Edit this group's {\bf kill} file.\\ M-K & Edit the general {\bf kill} file.\\ % C-t & Toggle {\bf truncation} of summary lines.\\ Y g & Regenerate the summary-buffer.\\ Y c & Insert all cached articles into the summary-buffer.\\ % M-C-e & {\bf Edit} the group-parameters.\\ M-C-a & Customize the group-parameters.\\ % % article handling % A $<$ & ($<$, A b) Scroll to the beginning of this article.\\ A $>$ & ($>$, A e) Scroll to the end of this article.\\ A s & (s) Perform an i{\bf search} in the article buffer.\\ % A D & (C-d) Un{\bf digestify} this article into a separate group. [Prefix: force digest]\\ M-C-d & Like C-d, but open several documents in nndoc-groups, wrapped in an nnvirtual group [p/p]\\ % A g & (g) (Re)fetch this article ({\bf get}). [Prefix: get raw version]\\ A r & (\^{}, A \^{}) Fetch the parent(s) of this article. [Prefix: if positive fetch \textit{n} ancestors; negative: fetch only the \textit{n}th ancestor]\\ A t & {\bf Translate} this article.\\ A R & Fetch all articles mentioned in the {\bf References}-header.\\ A T & Fetch full \textbf{thread} in which the current article appears.\\ M-\^{} & Fetch the article with a given Message-ID.\\ S y & {\bf Yank} the current article into an existing message-buffer. [p/p]\\ A M & Setup group parameters for {\bf mailing} lists from headers. [Prefix: replace old settings]\\ \end{keys} } } \newcommand{\MIMESummary}{% {\esamepage For the commands operating on one MIME part (a subset of gnus-article-*), a prefix selects which part to operate on. If the point is placed over a MIME button in the article buffer, use the corresponding bindings for the article buffer instead. \begin{keys}{W M w} K v & (b, W M b) {\bf View} the MIME-part.\\ K o & {\bf Save} the MIME part.\\ K c & {\bf Copy} the MIME part.\\ K e & View the MIME part {\bf externally}.\\ K i & View the MIME part {\bf internally}.\\ K $\mid$ & Pipe the MIME part to an external command.\\ K b & Make all the MIME parts have buttons in front of them.\\ K m & Try to repair {\bf multipart-headers}.\\ K C & View the MIME part using a different {\bf charset}.\\ X m & Save all parts matching a MIME type to a directory. [p/p]\\ M-t & Toggle the buttonized display of the article buffer.\\ W M w & Decode RFC2047-encoded words in the article headers.\\ W M c & Decode encoded article bodies. [Prefix: prompt for charset]\\ W M v & View all MIME parts in the current article.\\ \end{keys} } } \newcommand{\SortSummary}{% {\esamepage \begin{keys}{C-c C-s C-a} C-c C-s C-a & Sort the summary-buffer by {\bf author}.\\ C-c C-s C-t & Sort the summary-buffer by {\bf recipient}.\\ C-c C-s C-d & Sort the summary-buffer by {\bf date}.\\ C-c C-s C-i & Sort the summary-buffer by article score.\\ C-c C-s C-l & Sort the summary-buffer by amount of {\bf lines}.\\ C-c C-s C-c & Sort the summary-buffer by length.\\ C-c C-s C-n & Sort the summary-buffer by article {\bf number}.\\ C-c C-s C-s & Sort the summary-buffer by {\bf subject}.\\ C-c C-s C-r & Sort the summary-buffer {\bf randomly}.\\ C-c C-s C-o & Sort the summary-buffer using the default method.\\ \end{keys} With a prefix these functions sort in reverse order. } } \newcommand{\MailGroups}{% formerly \Bsubmap {\esamepage These commands (except `B c') are only valid in a mail group.\\* \begin{keys}{B M-C-e} B DEL & (B backspace, B delete) {\bf Delete} the mail article from disk (!). [p/p]\\ B B & Crosspost this article to another group.\\ B c & {\bf Copy} this article from any group to a mail group. [p/p]\\ B e & {\bf Expire} all expirable articles in this group. [p/p]\\ B i & {\bf Import} a random file into this group.\\ B I & Create an empty article in this group.\\ B m & {\bf Move} the article from one mail group to another. [p/p]\\ B p & Query whether the article was {\bf posted} as well.\\ B q & {\bf Query} where the article will end up after fancy splitting\\ B r & {\bf Respool} this mail article. [p/p]\\ B t & {\bf Trace} the fancy splitting patterns applied to this article.\\ B w & (e) Edit this article.\\ B M-C-e & {\bf Expunge} (delete from disk) all expirable articles in this group (!). [p/p]\\ K E & {\bf Encrypt} article body. [p/p]\\ \end{keys} } } \newcommand{\DraftGroup}{% formerly \Dsubmap {\esamepage The ``drafts''-group contains messages that have been saved but not sent and rejected articles. \\* \begin{keys}{B DEL} D e & \textbf{edit} message.\\ D s & \textbf{Send} message. [p/p]\\ D S & \textbf{Send} all messages.\\ D t & \textbf{Toggle} sending (mark as unsendable).\\ B DEL & \textbf{Delete} message (like in mailgroup).\\ \end{keys} } } \newcommand{\SelectArticles}{% formerly \Gsubmap {\esamepage These commands select the target article. They do not use the prefix.\\* \begin{keys}{G C-n} h & Enter article-buffer.\\ G b & (,) Go to the {\bf best} article (the one with highest score).\\ G f & (.) Go to the {\bf first} unread article.\\ G n & (n) Go to the {\bf next} unread article.\\ G p & (p) Go to the {\bf previous} unread article.\\ % G N & (N) Go to {\bf the} next article.\\ G P & (P) Go to the {\bf previous} article.\\ % G C-n & (M-C-n) Go to the {\bf next} article with the same subject.\\ G C-p & (M-C-p) Go to the {\bf previous} article with the same subject.\\ % G l & (l) Go to the previously read article ({\bf last-read-article}).\\ G o & Pop an article off the summary history and go to it.\\ % G g & Search an article via subject.\\ G j & (j) Search an article via Message-Id or subject.\\ \end{keys} } } \newcommand{\ArticleModeGeneral}{% {\esamepage The normal navigation keys work in Article mode. Some additional keys are:\\ \begin{keys}{C-c RET} C-c \^{} & Get the article with the Message-ID near point.\\ C-c RET & Send reply to address near point.\\ h & Go to the \textbf{header}-line of the article in the summary-buffer.\\ s & Go to \textbf{summary}-buffer.\\ RET & (middle mouse button) Activate the button at point to follow an URL or Message-ID.\\ TAB & Move the point to the next button.\\ M-TAB & Move point to previous button.\\ \end{keys} } } \newcommand{\WashArticle}{% formerly \Wsubmap {\esamepage \begin{keys}{W W H} W 6 & Translate a base64 article.\\ W a & Strip certain {\bf headers} from body.\\ W b & Make Message-IDs and URLs in the article mouse-clickable {\bf buttons}.\\ W c & Translate CRLF-pairs to LF and then remaining CR's to LF's.\\ W d & Treat {\bf dumbquotes}.\\ W e & Treat {\bf emphasized} text.\\ W h & Treat {\bf HTML}.\\ W l & (w) Remove page breaks ({\bf\^{}L}) from the article.\\ W m & {\bf Morse} decode article.\\ W o & Treat {\bf overstrike} or underline (\^{}H\_) in the article.\\ W p & Verify X-{\bf PGP}-Sig header.\\ W q & Treat {\bf quoted}-printable in the article.\\ W r & (C-c C-r) Do a Caesar {\bf rotate} (rot13) on the article.\\ W s & Verify (and decrypt) a {\bf signed} message.\\ W t & (t) {\bf Toggle} display of all headers.\\ W u & {\bf Unsplit} broken URLs.\\ W v & (v) Toggle permanent {\bf verbose} displaying of all headers.\\ W w & Do word {\bf wrap} in the article.\\ W B & Add clickable {\bf buttons} to the article headers.\\ W C & {\bf Capitalize} first word in each sentence.\\ W Q & Fill long lines.\\ W Z & Translate a HZ-encoded article.\\ % W G u & {\bf Unfold} folded header lines.\\ W G f & {\bf Fold} all header lines.\\ W G n & Unfold {\bf Newsgroups:} and Follow-Up-To:.\\ % W Y c & Repair broken {\bf citations}.\\ W Y a & Repair broken {\bf attribution} lines.\\ W Y u & {\bf Unwrap} broken citation lines.\\ W Y f & Do a {\bf full} deuglification (W Y c, W Y a, W Y u).\\ \end{keys} } } \newcommand{\BlankAndWhitespace}{% {\esamepage \begin{keys}{W E w} W E l & Strip blank {\bf lines} from the beginning of the article.\\ W E m & Replace blank lines with empty lines and remove {\bf multiple} blank lines.\\ W E t & Remove {\bf trailing} blank lines.\\ W E a & Strip blank lines at start and end (W E l, W E m and W E t).\\ W E A & Strip {\bf all} blank lines.\\ W E s & Strip leading blank lines from the article body.\\ W E e & Strip trailing blank lines from the article body.\\ W E w & Remove leading {\bf whitespace} from all headers.\\ \end{keys} } } \newcommand{\Picons}{% {\esamepage \begin{keys}{W D D} W D s & (W g) Display {\bf smilies}.\\ W D x & (W f) Look for and display any X-{\bf Face} headers.\\ W D d & Display any Face headers.\\ W D n & Toggle picons in {\bf Newsgroups} and Followup-To.\\ W D m & Toggle picons in {\bf mail} headers (To and Cc).\\ W D f & Toggle picons in {\bf From}.\\ W D D & Remove all images from the article buffer.\\ \end{keys} } } \newcommand{\TimeAndDate}{% {\esamepage \begin{keys}{W T u} W T u & (W T z) Display the article timestamp in GMT ({\bf UT, ZULU}).\\ W T i & Display the article timestamp in {\bf ISO} 8601.\\ W T l & Display the article timestamp in the {\bf local} timezone.\\ W T s & Display according to `gnus-article-time-format'.\\ W T e & Display the time {\bf elapsed} since it was sent.\\ W T o & Display the {\bf original} timestamp.\\ W T p & Display the date in format that's {\bf pronounceable} in English.\\ \end{keys} } } \newcommand{\HideHighlightArticle}{% {\esamepage \begin{keys}{W W C-c} W W a & Hide {\bf all} unwanted parts. Calls W W h, W W s, W W C-c.\\ W W h & Hide article {\bf headers}.\\ W W b & Hide {\bf boring} headers.\\ W W s & Hide {\bf signature}.\\ W W l & Hide {\bf list} identifiers in subject-header.\\ W W P & Hide {\bf PEM} (privacy enhanced messages).\\ W W B & Hide banner specified by group parameter.\\ W W c & Hide {\bf citation}.\\ W W C-c & Hide {\bf citation} using a more intelligent algorithm.\\ W W C & Hide cited text in articles that aren't roots.\\ W H a & Highlight {\bf all} parts. Calls W b, W H c, W H h, W H s.\\ W H c & Highlight article {\bf citations}.\\ W H h & Highlight article {\bf headers}.\\ W H s & Highlight article {\bf signature}.\\ \end{keys} For all hiding-commands: A positive prefix always hides, and a negative prefix will show what was previously hidden. }} \newcommand{\MIMEArticleMode}{% {\esamepage \begin{keys}{RET} RET & (BUTTON-2) Toggle display of the MIME object.\\ v & Prompt for a method and then view object using this method.\\ o & Prompt for a filename and save the MIME object.\\ C-o & Prompt for a filename to save the MIME object to and remove it.\\ d & {\bf Delete} the MIME object.\\ c & {\bf Copy} the MIME object to a new buffer and display this buffer.\\ i & Display the MIME object in this buffer.\\ C & Copy the MIME object to a new buffer and display this buffer using {\bf Charset} \\ E & View internally. \\ e & View {\bf externally}. \\ t & View the MIME object as a different {\bf type}.\\ p & {\bf Print} the MIME object.\\ $\mid$ & Pipe the MIME object to a process.\\ . & Take action on the MIME object.\\ \end{keys} } } %% end of article mode for reading .......................................... \newcommand{\MarkArticlesGeneral}{% formerly \Msubmap {\esamepage \begin{keys}{M M-C-r} d & (M d, M r) Mark this article as read and move to the next one. [scope]\\ D & Mark this article as read and move to previous one. [scope]\\ ! & (u, M !, M t) Tick this article (mark it as interesting) and move to the next one. [scope]\\ U & Tick this article and move to the previous one. [scope]\\ M ? & (?) Mark this article as dormant (only followups are interesting). [scope]\\ M D & Show all {\bf dormant} articles (normally they are hidden unless they have any followups).\\ M M-D & Hide all {\bf dormant} articles.\\ C-w & Mark all articles between point and mark as read.\\ M-u & (M SPC, M c) Clear all marks from this article and move to the next one. [scope]\\ M-U & Clear all marks from this article and move to the previous one. [scope]\\ % M e & (E, M x) Mark this article as {\bf expirable}. [scope]\\ % M k & (k) {\bf Kill} all articles with same subject, select next unread one.\\ M K & (C-k) {\bf Kill} all articles with the same subject as this one.\\ % M C & {\bf Catch-up} the articles that are not ticked and not dormant.\\ M C-c & {\bf Catch-up} all articles in this group.\\ M H & {\bf Catch-up} (mark read) this group to point (to-{\bf here}).\\ % M b & Set a {\bf bookmark} in this article.\\ M B & Remove the {\bf bookmark} from this article.\\ % M M-r & (x) Expunge all {\bf read} articles from this group.\\ M M-C-r & Expunge all articles having a given mark.\\ M S & (C-c M-C-s) {\bf Show} all expunged articles.\\ M M C-h & Displays some more keys doing ticking slightly differently.\\ \end{keys} The variable `gnus-summary-goto-unread' controls what happens after a mark has been set (C-x C-i g Setting Marks RET) }} \newcommand{\MarkByScore}{% \begin{keys}{M V m} M V c & {\bf Clear} all marks from all high-scored articles. [score]\\ M V k & {\bf Kill} all low-scored articles. [score]\\ M V m & Mark all high-scored articles with a given {\bf mark}. [score]\\ M V u & Mark all high-scored articles as interesting (tick them). [score]\\ \end{keys} } } \newcommand{\ProcessMark}{% {\esamepage These commands set and remove the process mark (\#). You only need to use it if the set of articles you want to operate on is non-contiguous. Else use a numeric prefix.\\* \begin{keys}{M P R} M P p & (\#, M \#) Mark this article.\\ M P u & (M-\#, M M-\#) \textbf{unmark} this article.\\ M P b & Mark all articles in {\bf buffer}.\\ M P r & Mark all articles in the {\bf region}.\\ M P g & Unmark all articles in the region.\\ M P R & Mark all articles matching a {\bf regexp}.\\ M P G & Unmark all articles matching a regexp.\\ M P t & Mark all articles in this (sub){\bf thread}.\\ M P T & Unmark all articles in this (sub){\bf thread}.\\ M P s & Mark all articles in the current {\bf series}.\\ M P S & Mark all {\bf series} that already contain a marked article.\\ M P a & Mark {\bf all} articles (in series order).\\ M P U & \textbf{unmark} all articles.\\ M P i & {\bf Invert} the list of process-marked articles.\\ M P k & Push process-mark set onto stack and unmark all articles.\\ M P y & Pop process-mark set from stack and restore it.\\ M P w & Push process-mark set on the stack.\\ M P v & Mark all articles with score over default score. [Prefix: score]\\ \end{keys} } } \newcommand{\Limiting}{% {\esamepage \begin{keys}{/M} // & (/s) Limit the summary-buffer to articles matching {\bf subject}.\\ /a & Limit the summary-buffer to articles matching {\bf author}.\\ /R & Limit the summary-buffer to articles matching {\bf recipient}.\\ /x & Limit depending on ``extra'' headers.\\ /u & (x) Limit to {\bf unread} articles. [Prefix: also exclude ticked and dormant articles]\\ /. & Limit to unseen articles.\\ /m & Limit to articles marked with specified {\bf mark}.\\ /t & Ask for a number and exclude articles younger than that many days. [Prefix: exclude older articles]\\ /n & Limit to current article. [p/p]\\ /w & Pop previous limit off stack and restore it. [Prefix: pop all limits]\\ /v & Limit to score. [score]\\ /E & (M S) Include all expunged articles in the limit.\\ /D & Include all dormant articles in the limit.\\ /* & Limit to cached articles.\\ Y C & Include all cached articles in the limit.\\ /d & Exclude all dormant articles from the limit.\\ /M & Exclude all marked articles.\\ /T & Include all articles from the current thread in the limit.\\ /c & Exclude all dormant articles that have no children from the limit.\\ /C & Mark all excluded unread articles as read. [Prefix: also mark ticked and dormant articles]\\ /o & Insert all {\bf old} articles. [Prefix: how many]\\ /N & Insert all {\bf new} articles.\\ /p & Limit to articles {\bf predicated} in the `display' group parameter.\\ /r & Limit to {\bf replied} articles. [Prefix: unreplied]\\ \end{keys} } } \newcommand{\OutputArticles}{% formerly \Osubmap {\esamepage \begin{keys}{O m} O o & (o, C-o) Save this article using the default article saver. [p/p]\\ O b & Save this article's {\bf body} in plain file format [p/p]\\ O f & Save this article in plain {\bf file} format. [p/p]\\ O F & like O f, but overwrite file's contents. [p/p]\\ O h & Save this article in {\bf mh} folder format. [p/p]\\ O m & Save this article in {\bf mail} format. [p/p]\\ O r & Save this article in {\bf rmail} format. [p/p]\\ O v & Save this article in {\bf vm} format. [p/p]\\ O p & ($\mid$) {\bf Pipe} this article to a shell command. [p/p]\\ O P & \textbf{Print} this article using Muttprint. [p/p]\\ \end{keys} } } \newcommand{\PostReplyetc}{% formerly \Ssubmap {\esamepage These commands put you in a separate news or mail buffer. See the section about composing messages for more information.\\* %After %editing the article, send it by pressing C-c C-c. If you are in a %foreign group and want to post the article using the foreign server, give %a prefix to C-c C-c.\\* \begin{keys}{S O m} S p & (a) {\bf Post} an article to this group.\\ S f & (f) Post a {\bf followup} to this article.\\ S F & (F) Post a {\bf followup} and include the original. [p/p]\\ S o p & Forward this article as a {\bf post} to a newsgroup.\\ S M-c & Complain about excessive crossposting to article's author. [p/p]\\ % S m & (m) Send a {\bf mail} to some other person.\\ S r & (r) Mail a {\bf reply} to the author of this article.\\ S R & (R) Mail a {\bf reply} and include the original. [p/p]\\ S B r & Like S r but ignore the Reply-To: header.\\ S B R & Like S R but ignore the Reply-To: header.\\ S w & Mail a {\bf wide} reply to this article.\\ S W & Mail a {\bf wide} reply to this article and include the original.\\ S v & Mail a {\bf very} wide reply to this article.\\ S V & Mail a {\bf very} wide reply to this article and include the original.\\ S o m & (C-c C-f) Forward this article by {\bf mail} to a person.\\ S D b & Resend {\bf bounced} mail.\\ S D r & {\bf Resend} mail to a different person.\\ S D e & {\bf Edit} and resend.\\ % S n & Post a followup via {\bf news} even if you got the message through mail.\\ S N & Post a followup via {\bf news} and include the original mail. [p/p]\\ % S c & (C) {\bf Cancel} this article (only works if it is your own). [p/p]\\ S s & {\bf Supersede} this article with a new one (only for own articles).\\ % S O m & Digest these series and forward by {\bf mail}. [p/p]\\ S O p & Digest these series and forward as a {\bf post} to a newsgroup. [p/p]\\ % S u & {\bf Uuencode} a file and post it as a series.\\ \end{keys} If you want to cancel or supersede an article you just posted (before it has appeared on the server), go to the *post-news* buffer, change `Message-ID' to `Cancel' or `Supersedes' and send again with C-c C-c. }} \newcommand{\Threading}{% formerly \Tsubmap {\esamepage \begin{keys}{T M-\#} T \# & Mark this thread with the process mark.\\ T M-\# & Remove process-marks from this thread.\\ % T t & Re-{\bf thread} the current article's thread.\\ T \^{} & Make the current article child of the marked (or previous) one.\\ % movement T n & (M-C-f, M-down) Go to the {\bf next} thread. [distance]\\ T p & (M-C-b, M-up) Go to the {\bf previous} thread. [distance]\\ T d & {\bf Descend} this thread. [distance]\\ T u & Ascend this thread ({\bf up}-thread). [distance]\\ T o & Go to the top of this thread.\\ % T s & {\bf Show} the thread hidden under this article.\\ T h & {\bf Hide} this (sub)thread.\\ % T i & {\bf Increase} the score of this thread.\\ T l & (M-C-l) {\bf Lower} the score of this thread.\\ % T k & (M-C-k) {\bf Kill} the current (sub)thread. [Negative prefix: tick it, positive prefix: unmark it.]\\ % T H & {\bf Hide} all threads.\\ T S & {\bf Show} all hidden threads.\\ T T & (M-C-t) {\bf Toggle} threading.\\ \end{keys} } } \newcommand{\Scoring}{% formerly \Vsubmap {\esamepage Read about Adaptive Scoring in the online info.\\* \begin{keys}{\bf A p m l} V a & {\bf Add} a new score entry, specifying all elements.\\ V c & Specify a new score file as {\bf current}.\\ V e & {\bf Edit} the current score alist.\\ V f & Edit a score {\bf file} and make it the current one.\\ V m & {\bf Mark} all articles below a given score as read.\\ V s & Set the {\bf score} of this article.\\ V t & Display all score rules applied to this article ({\bf track}).\\ W w & List {\bf words} used in scoring.\\ V x & {\bf Expunge} all low-scored articles. [score]\\ V C & {\bf Customize} current score file with a user-friendly interface.\\ V F & {\bf Flush} the cache of score files.\\ V R & {\bf Re-score} the summary buffer.\\ V S & Display the {\bf score} of this article.\\ \bf A p m l& Make a scoring entry based on this article.\\ \end{keys} The four letters stand for:\\* \quad \B{A}ction: I)ncrease, L)ower;\\* \quad \B{p}art: a)uthor (from), s)ubject, x)refs (cross-post), d)ate, l)ines, message-i)d, t)references (parent), f)ollowup, b)ody, h)ead (all headers);\\* \quad \B{m}atch type:\\* \qquad string: s)ubstring, e)xact, r)egexp, f)uzzy,\\* \qquad date: b)efore, a)t, n)this,\\* \qquad number: $<$, =, $>$;\\* \quad \B{l}ifetime: t)emporary, p)ermanent, i)mmediate. If you type the second letter in uppercase, the remaining two are assumed to be s)ubstring and t)emporary. If you type the third letter in uppercase, the last one is assumed to be t)emporary. \quad Extra keys for manual editing of a score file:\\* \begin{keys}{C-c C-c} C-c C-c & Finish editing the score file.\\ C-c C-d & Insert the current {\bf date} as number of days.\\ \end{keys} } } \newcommand{\ExtractSeries}{% formerly \Xsubmap {\esamepage Gnus recognizes if the current article is part of a series (multipart posting whose parts are identified by numbers in their subjects, e.g.{} 1/10\dots10/10) and processes the series accordingly. You can mark and process more than one series at a time. If the posting contains any archives, they are expanded and gathered in a new group.\\* \begin{keys}{X p} X b & Un-{\bf binhex} these series. [p/p]\\ X o & Simply {\bf output} these series (no decoding). [p/p]\\ X p & Unpack these {\bf postscript} series. [p/p]\\ X s & Un-{\bf shar} these series. [p/p]\\ X u & {\bf Uudecode} these series. [p/p]\\ \end{keys} Each one of these commands has four variants:\\* \begin{keys}{X v \bf Z} X \bf z & Decode these series. [p/p]\\ X \bf Z & Decode and save these series. [p/p]\\ X v \bf z & Decode and view these series. [p/p]\\ X v \bf Z & Decode, save and view these series. [p/p]\\ \end{keys} where {\bf z} or {\bf Z} identifies the decoding method (b, o, p, s, u). An alternative binding for the most-often used of these commands is\\* \begin{keys}{C-c C-v C-v} C-c C-v C-v & (X v u) Uudecode and view these series. [p/p]\\ \end{keys} }} \newcommand{\ExitSummary}{% formerly \Zsubmap {\esamepage \begin{keys}{Z G} Z Z & (q, Z Q) Exit this group.\\ Z E & (Q) {\bf Exit} without updating the group information.\\ % Z c & (c) Mark all unticked articles as read ({\bf catch-up}) and exit.\\ Z C & Mark all articles as read ({\bf catch-up}) and exit.\\ % Z n & Mark all articles as read and go to the {\bf next} group.\\ Z N & Exit and go to {\bf the} next group.\\ Z P & Exit and go to the {\bf previous} group.\\ % Z G & (M-g) Check for new articles in this group ({\bf get}).\\ Z R & (C-x C-s) Exit this group, and then enter it again ({\bf reenter}). [Prefix: select all articles, read and unread.]\\ Z s & Update and save the dribble buffer. [Prefix: save .newsrc* as well]\\ \end{keys} } } \newcommand{\MsgCompositionGeneral}{% Press C-c ? in the composition-buffer to get this information.\\* {\esamepage \begin{keys}{C-c C-m} % sending C-c C-c & Send message and exit. [Prefix: send via foreign server]\\ C-c C-s & Send message. [Prefix: send via foreign server]\\ C-c C-d & Don't send message (save as \textbf{draft}).\\ C-c C-k & \textbf{Kill} message-buffer.\\ C-c C-m & {\bf Mail} reply to the address near point. [Prefix: include the original]\\ % modify headers/body C-c C-o & Sort headers.\\ C-c C-e & \textbf{Elide} region.\\ C-c C-v & Kill everything outside region.\\ C-c C-r & Do a \textbf{Rot-13} on the body.\\ C-c C-w & Insert signature (from `message-signature-file').\\ C-c C-z & Kill everything up to signature.\\ C-c C-y & \textbf{Yank} original message.\\ C-c C-q & Fill the yanked message.\\ C-c M-C-y & \textbf{Yank} a buffer and quote it.\\ M-RET & Insert four newlines and format quoted text. [Prefix: justify as well]\\ C-c M-r & \textbf{Rename} message buffer. [Prefix: ask for new name]\\ \end{keys} } } \newcommand{\MsgCompositionMovementArticle}{% The following functions create the header-field if necessary.\\* {\esamepage \begin{keys}{C-c C-f C-u} C-c TAB & Move to \textbf{signature}.\\ C-c C-b & Move to \textbf{body}.\\ C-c C-f C-t & (C-c C-t) Move to \textbf{To:}.\\ C-c C-f C-c & Move to \textbf{Cc:}.\\ C-c C-f C-b & Move to \textbf{Bcc:}.\\ C-c C-f C-w & Move to \textbf{Fcc:}.\\ C-c C-f C-s & Move to \textbf{Subject:}.\\ C-c C-f C-r & Move to \textbf{Reply-To:}.\\ C-c C-f C-f & Move to \textbf{Followup-To:}.\\ C-c C-f C-n & (C-c C-n) Move to \textbf{Newsgroups:}.\\ C-c C-f C-u & Move to \textbf{Summary:}.\\ C-c C-f C-k & Move to \textbf{Keywords:}.\\ C-c C-f C-d & Move to \textbf{Distribution:}.\\ C-c C-f C-m & Move to \textbf{Mail-Followup-To:}.\\ C-c C-f C-o & Move to \textbf{From:}.\\ C-c C-f C-a & Insert a reasonable \textbf{Mail-Followup-To:} for an unsubscribed list. [Prefix: include addresses in \textbf{Cc:}]\\ C-c C-f TAB & (C-c C-u) Move to \textbf{Importance:}.\\ C-c M-n & Insert \textbf{Disposition-Notification-To:} (request receipt).\\ \end{keys} } } \newcommand{\MsgCompositionMML}{% {\esamepage \begin{keys}{C-c C-m P} C-c C-m f & (C-c C-a) Attach \textbf{file}.\\ C-c C-m b & Attach contents of \textbf{buffer}.\\ C-c C-m e & Attach \textbf{external} file (ftp..).\\ C-c C-m P & Create MIME-\textbf{preview} (new buffer). [Prefix: show raw MIME preview]\\ C-c C-m v & \textbf{Validate} article.\\ C-c C-m p & Insert \textbf{part}.\\ C-c C-m m & Insert \textbf{multi}-part.\\ C-c C-m q & \textbf{Quote} region.\\ C-c C-m c s & Encrypt message using \textbf{S/MIME}.\\ C-c C-m c o & Encrypt message using PGP.\\ C-c C-m c p & Encrypt message using \textbf{PGP/MIME}.\\ C-c C-m s s & Sign message using \textbf{S/MIME}.\\ C-c C-m s o & Sign message using PGP.\\ C-c C-m s p & Sign message using \textbf{PGP/MIME}.\\ C-c C-m C-n & Remove security related MML tags from message.\\ % TODO: narrow headers (C-c C-m n) ? \end{keys} } } %% TODO: \newcommand{\ServerMode}{% {\esamepage To enter this mode, press \^{} while in Group mode.\\* \begin{keys}{SPC} SPC & (RET) Browse this server.\\ a & {\bf Add} a new server.\\ c & {\bf Copy} this server.\\ e & {\bf Edit} a server.\\ k & {\bf Kill} this server. [scope]\\ l & {\bf List} all servers.\\ q & Return to the group buffer ({\bf quit}).\\ s & Request that the server scan its sources for new articles.\\ g & Request that the server regenerate its data.\\ y & {\bf Yank} the previously killed server.\\ O & Try to {\bf open} a connection to this server.\\ C & {\bf Close} connection to this server.\\ D & Mark this server as unreachable ({\bf deny}).\\ M-o & {\bf Open} the connection to all servers.\\ M-c & {\bf Close} the connection to all servers.\\ R & Make all denied servers into closed servers.\\ L & Set server status to offline.\\ \end{keys} } } \newcommand{\BrowseServer}{% {\esamepage To enter this mode, press `B' while in Group mode.\\* \begin{keys}{RET} RET & Enter the current group.\\ SPC & Enter the current group and display the first article.\\ ? & Give a very short help message.\\ n & Go to the {\bf next} group. [distance]\\ p & Go to the {\bf previous} group. [distance]\\ q & (l) {\bf Quit} browse mode.\\ u & Subscribe to the current group. [scope]\\ \end{keys} } } \newcommand{\GroupUnplugged}{% {\esamepage \begin{keys}{J S} J j & Toggle plugged-state.\\ J s & Fetch articles from all groups for offline-reading.\\ J u & Fetch all eligible articles from this group.\\ J S & \textbf{Send} all sendable messages in the drafts group.\\ % J c & Enter \textbf{category} buffer.\\ J a & \textbf{Add} this group to an Agent category [p/p].\\ J r & \textbf{Remove} this group from its Agent category [p/p].\\ J Y & Synchronize flags changed while unplugged with remote server.\\ \end{keys} } } \newcommand{\SummaryUnplugged}{% {\esamepage \begin{keys}{J M-\#} J \# & \textbf{Mark} the article for downloading.\\ J M-\# & \textbf{Unmark} the article for downloading.\\ @ & \textbf{Toggle} whether to download the article.\\ J c & Mark all undownloaded articles as read (\textbf{catch-up}).\\ J u & Download all downloadable articles from group.\\ \end{keys} } } \newcommand{\ServerUnplugged}{% {\esamepage \begin{keys}{J a} J a & \textbf{Add} the current server to the list of servers covered by the agent.\\ J r & \textbf{Remove} the current server from the list of servers covered by the agent.\\ \end{keys} } } % end {gnusref} % % % % % % % % % % % % % % % % % % % % % % % % % % % o some things might not be updated: scoring and server modes, maybe more % o Gnus Unplugged category-buffer commands need to be written \begin{document} \ifthenelse{\isundefined{\booklettrue}}{ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \raggedbottom\raggedright \twocolumn % use \tiny to shrink it to 4 pages (needs a high-resolution printer though) % \tiny \scriptsize \pagestyle{plain} \Title \par \Logo{refcard} }{ \setcounter{page}{0} \thispagestyle{empty} \vspace*{\fill} \Title \vspace{0.4in} \Logo{booklet} \vspace*{\fill} \pagebreak }%ifbooklet% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % TODO: how does this work ? %\tableofcontents \Notes % \section*{Group-Mode} \GroupModeGeneral \subsection*{Group Subscribedness-Levels} \GroupLevels \subsection*{List Groups} \ListGroups \subsection*{Create/Edit Foreign Groups} \CreateEditGroups \ifthenelse{\isundefined{\booklettrue}}{}{\pagebreak} \subsection*{Unsubscribe, Kill and Yank Groups} \SubscribeKillYankGroups \subsection*{Mark Groups} \MarkGroups \subsection*{Group-Unplugged} \GroupUnplugged % topics in group-mode \subsection*{Group Topics} \GroupTopicsGeneral \subsubsection*{Topic Sorting} \TopicSorting % \ifthenelse{\isundefined{\booklettrue}}{}{\pagebreak} % summary-mode \section*{Summary Mode} \SummaryModeGeneral \subsection*{Select Articles} \SelectArticles % \ifthenelse{\isundefined{\booklettrue}}{}{\pagebreak} \subsection*{Threading} \Threading % \subsection*{Limiting} \Limiting \subsection*{Sort the Summary-Buffer} \SortSummary \subsection*{Score (Value) Commands} \Scoring \ifthenelse{\isundefined{\booklettrue}}{% ifcard %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection*{Output Articles} \OutputArticles \subsection*{Extract Series (Uudecode etc)} \ExtractSeries }{}%ifcard% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection*{MIME operations from the Summary-Buffer} \MIMESummary \ifthenelse{\isundefined{\booklettrue}}{}{% ifbooklet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection*{Extract Series (Uudecode etc)} \ExtractSeries \subsection*{Output Articles} \OutputArticles }%ifbooklet% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \subsection*{Post, Followup, Reply, Forward, Cancel} \PostReplyetc \ifthenelse{\isundefined{\booklettrue}}{\newpage}{}% newpage ifcard \subsection*{Message Composition} \MsgCompositionGeneral \subsubsection*{Jumping in message-buffer} \MsgCompositionMovementArticle \subsubsection*{Attachments/MML} \MsgCompositionMML % marking articles \subsection*{Mark Articles} \MarkArticlesGeneral \subsubsection*{Mark Based on Score} \MarkByScore \subsubsection*{The Process Mark} \ProcessMark \subsubsection*{Mark Indication-Characters} \MarkCharacters % %\ifthenelse{\isundefined{\booklettrue}}{\newpage}{}% \newpage \subsection*{Summary-Unplugged} \SummaryUnplugged \subsection*{Mail-Group Commands} \MailGroups \subsection*{Draft-Group Commands} \DraftGroup % exiting \subsection*{Exit the Summary-Buffer} \ExitSummary % % \section*{Article Mode (reading)} \ArticleModeGeneral \subsection*{Wash the Article-Buffer} \WashArticle \subsubsection*{Blank Lines and Whitespace} \BlankAndWhitespace \subsubsection*{Picons, X-faces, Smileys} \Picons \subsubsection*{Time and Date} \TimeAndDate \ifthenelse{\isundefined{\booklettrue}}{}{\pagebreak} \subsection*{Hide/Highlight Parts of the Article} \HideHighlightArticle \subsection*{MIME operations from the Article-Buffer (reading)} \MIMEArticleMode % % \ifthenelse{\isundefined{\booklettrue}}{\pagebreak}{}% \section*{Server Mode} \ServerMode \subsection*{Unplugged-Server} \ServerUnplugged % % \section*{Browse Server Mode} \BrowseServer %\pagebreak \vspace*{\fill} \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: ```
```go // // // path_to_url // // Unless required by applicable law or agreed to in writing, software // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // +build go1.5 package types import ( "reflect" "testing" "github.com/coreos/etcd/pkg/testutil" ) // This is only tested in Go1.5+ because Go1.4 doesn't support literal IPv6 address with zone in // URI (path_to_url func TestNewURLsMapIPV6(t *testing.T) { c, err := NewURLsMap("mem1=path_to_url") if err != nil { t.Fatalf("unexpected parse error: %v", err) } wc := URLsMap(map[string]URLs{ "mem1": testutil.MustNewURLs(t, []string{"path_to_url", "path_to_url"}), "mem2": testutil.MustNewURLs(t, []string{"path_to_url"}), }) if !reflect.DeepEqual(c, wc) { t.Errorf("cluster = %#v, want %#v", c, wc) } } ```
```python #!/usr/bin/env python3 """ C declarations, CPP macros, and C functions for f2py2e. Only required declarations/macros/functions will be used. Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/05/06 11:42:34 $ Pearu Peterson """ import sys import copy from . import __version__ f2py_version = __version__.version errmess = sys.stderr.write ##################### Definitions ################## outneeds = {'includes0': [], 'includes': [], 'typedefs': [], 'typedefs_generated': [], 'userincludes': [], 'cppmacros': [], 'cfuncs': [], 'callbacks': [], 'f90modhooks': [], 'commonhooks': []} needs = {} includes0 = {'includes0': '/*need_includes0*/'} includes = {'includes': '/*need_includes*/'} userincludes = {'userincludes': '/*need_userincludes*/'} typedefs = {'typedefs': '/*need_typedefs*/'} typedefs_generated = {'typedefs_generated': '/*need_typedefs_generated*/'} cppmacros = {'cppmacros': '/*need_cppmacros*/'} cfuncs = {'cfuncs': '/*need_cfuncs*/'} callbacks = {'callbacks': '/*need_callbacks*/'} f90modhooks = {'f90modhooks': '/*need_f90modhooks*/', 'initf90modhooksstatic': '/*initf90modhooksstatic*/', 'initf90modhooksdynamic': '/*initf90modhooksdynamic*/', } commonhooks = {'commonhooks': '/*need_commonhooks*/', 'initcommonhooks': '/*need_initcommonhooks*/', } ############ Includes ################### includes0['math.h'] = '#include <math.h>' includes0['string.h'] = '#include <string.h>' includes0['setjmp.h'] = '#include <setjmp.h>' includes['Python.h'] = '#include "Python.h"' needs['arrayobject.h'] = ['Python.h'] includes['arrayobject.h'] = '''#define PY_ARRAY_UNIQUE_SYMBOL PyArray_API #include "arrayobject.h"''' includes['arrayobject.h'] = '#include "fortranobject.h"' includes['stdarg.h'] = '#include <stdarg.h>' ############# Type definitions ############### typedefs['unsigned_char'] = 'typedef unsigned char unsigned_char;' typedefs['unsigned_short'] = 'typedef unsigned short unsigned_short;' typedefs['unsigned_long'] = 'typedef unsigned long unsigned_long;' typedefs['signed_char'] = 'typedef signed char signed_char;' typedefs['long_long'] = """\ #ifdef _WIN32 typedef __int64 long_long; #else typedef long long long_long; typedef unsigned long long unsigned_long_long; #endif """ typedefs['unsigned_long_long'] = """\ #ifdef _WIN32 typedef __uint64 long_long; #else typedef unsigned long long unsigned_long_long; #endif """ typedefs['long_double'] = """\ #ifndef _LONG_DOUBLE typedef long double long_double; #endif """ typedefs[ 'complex_long_double'] = 'typedef struct {long double r,i;} complex_long_double;' typedefs['complex_float'] = 'typedef struct {float r,i;} complex_float;' typedefs['complex_double'] = 'typedef struct {double r,i;} complex_double;' typedefs['string'] = """typedef char * string;""" ############### CPP macros #################### cppmacros['CFUNCSMESS'] = """\ #ifdef DEBUGCFUNCS #define CFUNCSMESS(mess) fprintf(stderr,\"debug-capi:\"mess); #define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \\ PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\\ fprintf(stderr,\"\\n\"); #else #define CFUNCSMESS(mess) #define CFUNCSMESSPY(mess,obj) #endif """ cppmacros['F_FUNC'] = """\ #if defined(PREPEND_FORTRAN) #if defined(NO_APPEND_FORTRAN) #if defined(UPPERCASE_FORTRAN) #define F_FUNC(f,F) _##F #else #define F_FUNC(f,F) _##f #endif #else #if defined(UPPERCASE_FORTRAN) #define F_FUNC(f,F) _##F##_ #else #define F_FUNC(f,F) _##f##_ #endif #endif #else #if defined(NO_APPEND_FORTRAN) #if defined(UPPERCASE_FORTRAN) #define F_FUNC(f,F) F #else #define F_FUNC(f,F) f #endif #else #if defined(UPPERCASE_FORTRAN) #define F_FUNC(f,F) F##_ #else #define F_FUNC(f,F) f##_ #endif #endif #endif #if defined(UNDERSCORE_G77) #define F_FUNC_US(f,F) F_FUNC(f##_,F##_) #else #define F_FUNC_US(f,F) F_FUNC(f,F) #endif """ cppmacros['F_WRAPPEDFUNC'] = """\ #if defined(PREPEND_FORTRAN) #if defined(NO_APPEND_FORTRAN) #if defined(UPPERCASE_FORTRAN) #define F_WRAPPEDFUNC(f,F) _F2PYWRAP##F #else #define F_WRAPPEDFUNC(f,F) _f2pywrap##f #endif #else #if defined(UPPERCASE_FORTRAN) #define F_WRAPPEDFUNC(f,F) _F2PYWRAP##F##_ #else #define F_WRAPPEDFUNC(f,F) _f2pywrap##f##_ #endif #endif #else #if defined(NO_APPEND_FORTRAN) #if defined(UPPERCASE_FORTRAN) #define F_WRAPPEDFUNC(f,F) F2PYWRAP##F #else #define F_WRAPPEDFUNC(f,F) f2pywrap##f #endif #else #if defined(UPPERCASE_FORTRAN) #define F_WRAPPEDFUNC(f,F) F2PYWRAP##F##_ #else #define F_WRAPPEDFUNC(f,F) f2pywrap##f##_ #endif #endif #endif #if defined(UNDERSCORE_G77) #define F_WRAPPEDFUNC_US(f,F) F_WRAPPEDFUNC(f##_,F##_) #else #define F_WRAPPEDFUNC_US(f,F) F_WRAPPEDFUNC(f,F) #endif """ cppmacros['F_MODFUNC'] = """\ #if defined(F90MOD2CCONV1) /*E.g. Compaq Fortran */ #if defined(NO_APPEND_FORTRAN) #define F_MODFUNCNAME(m,f) $ ## m ## $ ## f #else #define F_MODFUNCNAME(m,f) $ ## m ## $ ## f ## _ #endif #endif #if defined(F90MOD2CCONV2) /*E.g. IBM XL Fortran, not tested though */ #if defined(NO_APPEND_FORTRAN) #define F_MODFUNCNAME(m,f) __ ## m ## _MOD_ ## f #else #define F_MODFUNCNAME(m,f) __ ## m ## _MOD_ ## f ## _ #endif #endif #if defined(F90MOD2CCONV3) /*E.g. MIPSPro Compilers */ #if defined(NO_APPEND_FORTRAN) #define F_MODFUNCNAME(m,f) f ## .in. ## m #else #define F_MODFUNCNAME(m,f) f ## .in. ## m ## _ #endif #endif /* #if defined(UPPERCASE_FORTRAN) #define F_MODFUNC(m,M,f,F) F_MODFUNCNAME(M,F) #else #define F_MODFUNC(m,M,f,F) F_MODFUNCNAME(m,f) #endif */ #define F_MODFUNC(m,f) (*(f2pymodstruct##m##.##f)) """ cppmacros['SWAPUNSAFE'] = """\ #define SWAP(a,b) (size_t)(a) = ((size_t)(a) ^ (size_t)(b));\\ (size_t)(b) = ((size_t)(a) ^ (size_t)(b));\\ (size_t)(a) = ((size_t)(a) ^ (size_t)(b)) """ cppmacros['SWAP'] = """\ #define SWAP(a,b,t) {\\ t *c;\\ c = a;\\ a = b;\\ b = c;} """ # cppmacros['ISCONTIGUOUS']='#define ISCONTIGUOUS(m) (PyArray_FLAGS(m) & # NPY_ARRAY_C_CONTIGUOUS)' cppmacros['PRINTPYOBJERR'] = """\ #define PRINTPYOBJERR(obj)\\ fprintf(stderr,\"#modulename#.error is related to \");\\ PyObject_Print((PyObject *)obj,stderr,Py_PRINT_RAW);\\ fprintf(stderr,\"\\n\"); """ cppmacros['MINMAX'] = """\ #ifndef max #define max(a,b) ((a > b) ? (a) : (b)) #endif #ifndef min #define min(a,b) ((a < b) ? (a) : (b)) #endif #ifndef MAX #define MAX(a,b) ((a > b) ? (a) : (b)) #endif #ifndef MIN #define MIN(a,b) ((a < b) ? (a) : (b)) #endif """ needs['len..'] = ['f2py_size'] cppmacros['len..'] = """\ #define rank(var) var ## _Rank #define shape(var,dim) var ## _Dims[dim] #define old_rank(var) (PyArray_NDIM((PyArrayObject *)(capi_ ## var ## _tmp))) #define old_shape(var,dim) PyArray_DIM(((PyArrayObject *)(capi_ ## var ## _tmp)),dim) #define fshape(var,dim) shape(var,rank(var)-dim-1) #define len(var) shape(var,0) #define flen(var) fshape(var,0) #define old_size(var) PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp)) /* #define index(i) capi_i ## i */ #define slen(var) capi_ ## var ## _len #define size(var, ...) f2py_size((PyArrayObject *)(capi_ ## var ## _tmp), ## __VA_ARGS__, -1) """ needs['f2py_size'] = ['stdarg.h'] cfuncs['f2py_size'] = """\ static int f2py_size(PyArrayObject* var, ...) { npy_int sz = 0; npy_int dim; npy_int rank; va_list argp; va_start(argp, var); dim = va_arg(argp, npy_int); if (dim==-1) { sz = PyArray_SIZE(var); } else { rank = PyArray_NDIM(var); if (dim>=1 && dim<=rank) sz = PyArray_DIM(var, dim-1); else fprintf(stderr, \"f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\\n\", dim, rank); } va_end(argp); return sz; } """ cppmacros[ 'pyobj_from_char1'] = '#define pyobj_from_char1(v) (PyLong_FromLong(v))' cppmacros[ 'pyobj_from_short1'] = '#define pyobj_from_short1(v) (PyLong_FromLong(v))' needs['pyobj_from_int1'] = ['signed_char'] cppmacros['pyobj_from_int1'] = '#define pyobj_from_int1(v) (PyLong_FromLong(v))' cppmacros[ 'pyobj_from_long1'] = '#define pyobj_from_long1(v) (PyLong_FromLong(v))' needs['pyobj_from_long_long1'] = ['long_long'] cppmacros['pyobj_from_long_long1'] = """\ #ifdef HAVE_LONG_LONG #define pyobj_from_long_long1(v) (PyLong_FromLongLong(v)) #else #warning HAVE_LONG_LONG is not available. Redefining pyobj_from_long_long. #define pyobj_from_long_long1(v) (PyLong_FromLong(v)) #endif """ needs['pyobj_from_long_double1'] = ['long_double'] cppmacros[ 'pyobj_from_long_double1'] = '#define pyobj_from_long_double1(v) (PyFloat_FromDouble(v))' cppmacros[ 'pyobj_from_double1'] = '#define pyobj_from_double1(v) (PyFloat_FromDouble(v))' cppmacros[ 'pyobj_from_float1'] = '#define pyobj_from_float1(v) (PyFloat_FromDouble(v))' needs['pyobj_from_complex_long_double1'] = ['complex_long_double'] cppmacros[ 'pyobj_from_complex_long_double1'] = '#define pyobj_from_complex_long_double1(v) (PyComplex_FromDoubles(v.r,v.i))' needs['pyobj_from_complex_double1'] = ['complex_double'] cppmacros[ 'pyobj_from_complex_double1'] = '#define pyobj_from_complex_double1(v) (PyComplex_FromDoubles(v.r,v.i))' needs['pyobj_from_complex_float1'] = ['complex_float'] cppmacros[ 'pyobj_from_complex_float1'] = '#define pyobj_from_complex_float1(v) (PyComplex_FromDoubles(v.r,v.i))' needs['pyobj_from_string1'] = ['string'] cppmacros[ 'pyobj_from_string1'] = '#define pyobj_from_string1(v) (PyUnicode_FromString((char *)v))' needs['pyobj_from_string1size'] = ['string'] cppmacros[ 'pyobj_from_string1size'] = '#define pyobj_from_string1size(v,len) (PyUnicode_FromStringAndSize((char *)v, len))' needs['TRYPYARRAYTEMPLATE'] = ['PRINTPYOBJERR'] cppmacros['TRYPYARRAYTEMPLATE'] = """\ /* New SciPy */ #define TRYPYARRAYTEMPLATECHAR case NPY_STRING: *(char *)(PyArray_DATA(arr))=*v; break; #define TRYPYARRAYTEMPLATELONG case NPY_LONG: *(long *)(PyArray_DATA(arr))=*v; break; #define TRYPYARRAYTEMPLATEOBJECT case NPY_OBJECT: PyArray_SETITEM(arr,PyArray_DATA(arr),pyobj_from_ ## ctype ## 1(*v)); break; #define TRYPYARRAYTEMPLATE(ctype,typecode) \\ PyArrayObject *arr = NULL;\\ if (!obj) return -2;\\ if (!PyArray_Check(obj)) return -1;\\ if (!(arr=(PyArrayObject *)obj)) {fprintf(stderr,\"TRYPYARRAYTEMPLATE:\");PRINTPYOBJERR(obj);return 0;}\\ if (PyArray_DESCR(arr)->type==typecode) {*(ctype *)(PyArray_DATA(arr))=*v; return 1;}\\ switch (PyArray_TYPE(arr)) {\\ case NPY_DOUBLE: *(double *)(PyArray_DATA(arr))=*v; break;\\ case NPY_INT: *(int *)(PyArray_DATA(arr))=*v; break;\\ case NPY_LONG: *(long *)(PyArray_DATA(arr))=*v; break;\\ case NPY_FLOAT: *(float *)(PyArray_DATA(arr))=*v; break;\\ case NPY_CDOUBLE: *(double *)(PyArray_DATA(arr))=*v; break;\\ case NPY_CFLOAT: *(float *)(PyArray_DATA(arr))=*v; break;\\ case NPY_BOOL: *(npy_bool *)(PyArray_DATA(arr))=(*v!=0); break;\\ case NPY_UBYTE: *(unsigned char *)(PyArray_DATA(arr))=*v; break;\\ case NPY_BYTE: *(signed char *)(PyArray_DATA(arr))=*v; break;\\ case NPY_SHORT: *(short *)(PyArray_DATA(arr))=*v; break;\\ case NPY_USHORT: *(npy_ushort *)(PyArray_DATA(arr))=*v; break;\\ case NPY_UINT: *(npy_uint *)(PyArray_DATA(arr))=*v; break;\\ case NPY_ULONG: *(npy_ulong *)(PyArray_DATA(arr))=*v; break;\\ case NPY_LONGLONG: *(npy_longlong *)(PyArray_DATA(arr))=*v; break;\\ case NPY_ULONGLONG: *(npy_ulonglong *)(PyArray_DATA(arr))=*v; break;\\ case NPY_LONGDOUBLE: *(npy_longdouble *)(PyArray_DATA(arr))=*v; break;\\ case NPY_CLONGDOUBLE: *(npy_longdouble *)(PyArray_DATA(arr))=*v; break;\\ case NPY_OBJECT: PyArray_SETITEM(arr, PyArray_DATA(arr), pyobj_from_ ## ctype ## 1(*v)); break;\\ default: return -2;\\ };\\ return 1 """ needs['TRYCOMPLEXPYARRAYTEMPLATE'] = ['PRINTPYOBJERR'] cppmacros['TRYCOMPLEXPYARRAYTEMPLATE'] = """\ #define TRYCOMPLEXPYARRAYTEMPLATEOBJECT case NPY_OBJECT: PyArray_SETITEM(arr, PyArray_DATA(arr), pyobj_from_complex_ ## ctype ## 1((*v))); break; #define TRYCOMPLEXPYARRAYTEMPLATE(ctype,typecode)\\ PyArrayObject *arr = NULL;\\ if (!obj) return -2;\\ if (!PyArray_Check(obj)) return -1;\\ if (!(arr=(PyArrayObject *)obj)) {fprintf(stderr,\"TRYCOMPLEXPYARRAYTEMPLATE:\");PRINTPYOBJERR(obj);return 0;}\\ if (PyArray_DESCR(arr)->type==typecode) {\\ *(ctype *)(PyArray_DATA(arr))=(*v).r;\\ *(ctype *)(PyArray_DATA(arr)+sizeof(ctype))=(*v).i;\\ return 1;\\ }\\ switch (PyArray_TYPE(arr)) {\\ case NPY_CDOUBLE: *(double *)(PyArray_DATA(arr))=(*v).r;*(double *)(PyArray_DATA(arr)+sizeof(double))=(*v).i;break;\\ case NPY_CFLOAT: *(float *)(PyArray_DATA(arr))=(*v).r;*(float *)(PyArray_DATA(arr)+sizeof(float))=(*v).i;break;\\ case NPY_DOUBLE: *(double *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_LONG: *(long *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_FLOAT: *(float *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_INT: *(int *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_SHORT: *(short *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_UBYTE: *(unsigned char *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_BYTE: *(signed char *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_BOOL: *(npy_bool *)(PyArray_DATA(arr))=((*v).r!=0 && (*v).i!=0); break;\\ case NPY_USHORT: *(npy_ushort *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_UINT: *(npy_uint *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_ULONG: *(npy_ulong *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_LONGLONG: *(npy_longlong *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_ULONGLONG: *(npy_ulonglong *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_LONGDOUBLE: *(npy_longdouble *)(PyArray_DATA(arr))=(*v).r; break;\\ case NPY_CLONGDOUBLE: *(npy_longdouble *)(PyArray_DATA(arr))=(*v).r;*(npy_longdouble *)(PyArray_DATA(arr)+sizeof(npy_longdouble))=(*v).i;break;\\ case NPY_OBJECT: PyArray_SETITEM(arr, PyArray_DATA(arr), pyobj_from_complex_ ## ctype ## 1((*v))); break;\\ default: return -2;\\ };\\ return -1; """ # cppmacros['NUMFROMARROBJ']="""\ # define NUMFROMARROBJ(typenum,ctype) \\ # if (PyArray_Check(obj)) arr = (PyArrayObject *)obj;\\ # else arr = (PyArrayObject *)PyArray_ContiguousFromObject(obj,typenum,0,0);\\ # if (arr) {\\ # if (PyArray_TYPE(arr)==NPY_OBJECT) {\\ # if (!ctype ## _from_pyobj(v,(PyArray_DESCR(arr)->getitem)(PyArray_DATA(arr)),\"\"))\\ # goto capi_fail;\\ # } else {\\ # (PyArray_DESCR(arr)->cast[typenum])(PyArray_DATA(arr),1,(char*)v,1,1);\\ # }\\ # if ((PyObject *)arr != obj) { Py_DECREF(arr); }\\ # return 1;\\ # } # """ # XXX: Note that CNUMFROMARROBJ is identical with NUMFROMARROBJ # cppmacros['CNUMFROMARROBJ']="""\ # define CNUMFROMARROBJ(typenum,ctype) \\ # if (PyArray_Check(obj)) arr = (PyArrayObject *)obj;\\ # else arr = (PyArrayObject *)PyArray_ContiguousFromObject(obj,typenum,0,0);\\ # if (arr) {\\ # if (PyArray_TYPE(arr)==NPY_OBJECT) {\\ # if (!ctype ## _from_pyobj(v,(PyArray_DESCR(arr)->getitem)(PyArray_DATA(arr)),\"\"))\\ # goto capi_fail;\\ # } else {\\ # (PyArray_DESCR(arr)->cast[typenum])((void *)(PyArray_DATA(arr)),1,(void *)(v),1,1);\\ # }\\ # if ((PyObject *)arr != obj) { Py_DECREF(arr); }\\ # return 1;\\ # } # """ needs['GETSTRFROMPYTUPLE'] = ['STRINGCOPYN', 'PRINTPYOBJERR'] cppmacros['GETSTRFROMPYTUPLE'] = """\ #define GETSTRFROMPYTUPLE(tuple,index,str,len) {\\ PyObject *rv_cb_str = PyTuple_GetItem((tuple),(index));\\ if (rv_cb_str == NULL)\\ goto capi_fail;\\ if (PyBytes_Check(rv_cb_str)) {\\ str[len-1]='\\0';\\ STRINGCOPYN((str),PyBytes_AS_STRING((PyBytesObject*)rv_cb_str),(len));\\ } else {\\ PRINTPYOBJERR(rv_cb_str);\\ PyErr_SetString(#modulename#_error,\"string object expected\");\\ goto capi_fail;\\ }\\ } """ cppmacros['GETSCALARFROMPYTUPLE'] = """\ #define GETSCALARFROMPYTUPLE(tuple,index,var,ctype,mess) {\\ if ((capi_tmp = PyTuple_GetItem((tuple),(index)))==NULL) goto capi_fail;\\ if (!(ctype ## _from_pyobj((var),capi_tmp,mess)))\\ goto capi_fail;\\ } """ cppmacros['FAILNULL'] = """\\ #define FAILNULL(p) do { \\ if ((p) == NULL) { \\ PyErr_SetString(PyExc_MemoryError, "NULL pointer found"); \\ goto capi_fail; \\ } \\ } while (0) """ needs['MEMCOPY'] = ['string.h', 'FAILNULL'] cppmacros['MEMCOPY'] = """\ #define MEMCOPY(to,from,n)\\ do { FAILNULL(to); FAILNULL(from); (void)memcpy(to,from,n); } while (0) """ cppmacros['STRINGMALLOC'] = """\ #define STRINGMALLOC(str,len)\\ if ((str = (string)malloc(sizeof(char)*(len+1))) == NULL) {\\ PyErr_SetString(PyExc_MemoryError, \"out of memory\");\\ goto capi_fail;\\ } else {\\ (str)[len] = '\\0';\\ } """ cppmacros['STRINGFREE'] = """\ #define STRINGFREE(str) do {if (!(str == NULL)) free(str);} while (0) """ needs['STRINGCOPYN'] = ['string.h', 'FAILNULL'] cppmacros['STRINGCOPYN'] = """\ #define STRINGCOPYN(to,from,buf_size) \\ do { \\ int _m = (buf_size); \\ char *_to = (to); \\ char *_from = (from); \\ FAILNULL(_to); FAILNULL(_from); \\ (void)strncpy(_to, _from, sizeof(char)*_m); \\ _to[_m-1] = '\\0'; \\ /* Padding with spaces instead of nulls */ \\ for (_m -= 2; _m >= 0 && _to[_m] == '\\0'; _m--) { \\ _to[_m] = ' '; \\ } \\ } while (0) """ needs['STRINGCOPY'] = ['string.h', 'FAILNULL'] cppmacros['STRINGCOPY'] = """\ #define STRINGCOPY(to,from)\\ do { FAILNULL(to); FAILNULL(from); (void)strcpy(to,from); } while (0) """ cppmacros['CHECKGENERIC'] = """\ #define CHECKGENERIC(check,tcheck,name) \\ if (!(check)) {\\ PyErr_SetString(#modulename#_error,\"(\"tcheck\") failed for \"name);\\ /*goto capi_fail;*/\\ } else """ cppmacros['CHECKARRAY'] = """\ #define CHECKARRAY(check,tcheck,name) \\ if (!(check)) {\\ PyErr_SetString(#modulename#_error,\"(\"tcheck\") failed for \"name);\\ /*goto capi_fail;*/\\ } else """ cppmacros['CHECKSTRING'] = """\ #define CHECKSTRING(check,tcheck,name,show,var)\\ if (!(check)) {\\ char errstring[256];\\ sprintf(errstring, \"%s: \"show, \"(\"tcheck\") failed for \"name, slen(var), var);\\ PyErr_SetString(#modulename#_error, errstring);\\ /*goto capi_fail;*/\\ } else """ cppmacros['CHECKSCALAR'] = """\ #define CHECKSCALAR(check,tcheck,name,show,var)\\ if (!(check)) {\\ char errstring[256];\\ sprintf(errstring, \"%s: \"show, \"(\"tcheck\") failed for \"name, var);\\ PyErr_SetString(#modulename#_error,errstring);\\ /*goto capi_fail;*/\\ } else """ # cppmacros['CHECKDIMS']="""\ # define CHECKDIMS(dims,rank) \\ # for (int i=0;i<(rank);i++)\\ # if (dims[i]<0) {\\ # fprintf(stderr,\"Unspecified array argument requires a complete dimension specification.\\n\");\\ # goto capi_fail;\\ # } # """ cppmacros[ 'ARRSIZE'] = '#define ARRSIZE(dims,rank) (_PyArray_multiply_list(dims,rank))' cppmacros['OLDPYNUM'] = """\ #ifdef OLDPYNUM #error You need to install NumPy version 0.13 or higher. See path_to_url #endif """ cppmacros["F2PY_THREAD_LOCAL_DECL"] = """\ #ifndef F2PY_THREAD_LOCAL_DECL #if defined(_MSC_VER) \\ || defined(_WIN32) || defined(_WIN64) \\ || defined(__MINGW32__) || defined(__MINGW64__) #define F2PY_THREAD_LOCAL_DECL __declspec(thread) #elif defined(__STDC_VERSION__) \\ && (__STDC_VERSION__ >= 201112L) \\ && !defined(__STDC_NO_THREADS__) \\ && (!defined(__GLIBC__) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 12)) /* __STDC_NO_THREADS__ was first defined in a maintenance release of glibc 2.12, see path_to_url so `!defined(__STDC_NO_THREADS__)` may give false positive for the existence of `threads.h` when using an older release of glibc 2.12 */ #include <threads.h> #define F2PY_THREAD_LOCAL_DECL thread_local #elif defined(__GNUC__) \\ && (__GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 4))) #define F2PY_THREAD_LOCAL_DECL __thread #endif #endif """ ################# C functions ############### cfuncs['calcarrindex'] = """\ static int calcarrindex(int *i,PyArrayObject *arr) { int k,ii = i[0]; for (k=1; k < PyArray_NDIM(arr); k++) ii += (ii*(PyArray_DIM(arr,k) - 1)+i[k]); /* assuming contiguous arr */ return ii; }""" cfuncs['calcarrindextr'] = """\ static int calcarrindextr(int *i,PyArrayObject *arr) { int k,ii = i[PyArray_NDIM(arr)-1]; for (k=1; k < PyArray_NDIM(arr); k++) ii += (ii*(PyArray_DIM(arr,PyArray_NDIM(arr)-k-1) - 1)+i[PyArray_NDIM(arr)-k-1]); /* assuming contiguous arr */ return ii; }""" cfuncs['forcomb'] = """\ static struct { int nd;npy_intp *d;int *i,*i_tr,tr; } forcombcache; static int initforcomb(npy_intp *dims,int nd,int tr) { int k; if (dims==NULL) return 0; if (nd<0) return 0; forcombcache.nd = nd; forcombcache.d = dims; forcombcache.tr = tr; if ((forcombcache.i = (int *)malloc(sizeof(int)*nd))==NULL) return 0; if ((forcombcache.i_tr = (int *)malloc(sizeof(int)*nd))==NULL) return 0; for (k=1;k<nd;k++) { forcombcache.i[k] = forcombcache.i_tr[nd-k-1] = 0; } forcombcache.i[0] = forcombcache.i_tr[nd-1] = -1; return 1; } static int *nextforcomb(void) { int j,*i,*i_tr,k; int nd=forcombcache.nd; if ((i=forcombcache.i) == NULL) return NULL; if ((i_tr=forcombcache.i_tr) == NULL) return NULL; if (forcombcache.d == NULL) return NULL; i[0]++; if (i[0]==forcombcache.d[0]) { j=1; while ((j<nd) && (i[j]==forcombcache.d[j]-1)) j++; if (j==nd) { free(i); free(i_tr); return NULL; } for (k=0;k<j;k++) i[k] = i_tr[nd-k-1] = 0; i[j]++; i_tr[nd-j-1]++; } else i_tr[nd-1]++; if (forcombcache.tr) return i_tr; return i; }""" needs['try_pyarr_from_string'] = ['STRINGCOPYN', 'PRINTPYOBJERR', 'string'] cfuncs['try_pyarr_from_string'] = """\ static int try_pyarr_from_string(PyObject *obj,const string str) { PyArrayObject *arr = NULL; if (PyArray_Check(obj) && (!((arr = (PyArrayObject *)obj) == NULL))) { STRINGCOPYN(PyArray_DATA(arr),str,PyArray_NBYTES(arr)); } return 1; capi_fail: PRINTPYOBJERR(obj); PyErr_SetString(#modulename#_error,\"try_pyarr_from_string failed\"); return 0; } """ needs['string_from_pyobj'] = ['string', 'STRINGMALLOC', 'STRINGCOPYN'] cfuncs['string_from_pyobj'] = """\ static int string_from_pyobj(string *str,int *len,const string inistr,PyObject *obj,const char *errmess) { PyArrayObject *arr = NULL; PyObject *tmp = NULL; #ifdef DEBUGCFUNCS fprintf(stderr,\"string_from_pyobj(str='%s',len=%d,inistr='%s',obj=%p)\\n\",(char*)str,*len,(char *)inistr,obj); #endif if (obj == Py_None) { if (*len == -1) *len = strlen(inistr); /* Will this cause problems? */ STRINGMALLOC(*str,*len); STRINGCOPYN(*str,inistr,*len+1); return 1; } if (PyArray_Check(obj)) { if ((arr = (PyArrayObject *)obj) == NULL) goto capi_fail; if (!ISCONTIGUOUS(arr)) { PyErr_SetString(PyExc_ValueError,\"array object is non-contiguous.\"); goto capi_fail; } if (*len == -1) *len = (PyArray_ITEMSIZE(arr))*PyArray_SIZE(arr); STRINGMALLOC(*str,*len); STRINGCOPYN(*str,PyArray_DATA(arr),*len+1); return 1; } if (PyBytes_Check(obj)) { tmp = obj; Py_INCREF(tmp); } else if (PyUnicode_Check(obj)) { tmp = PyUnicode_AsASCIIString(obj); } else { PyObject *tmp2; tmp2 = PyObject_Str(obj); if (tmp2) { tmp = PyUnicode_AsASCIIString(tmp2); Py_DECREF(tmp2); } else { tmp = NULL; } } if (tmp == NULL) goto capi_fail; if (*len == -1) *len = PyBytes_GET_SIZE(tmp); STRINGMALLOC(*str,*len); STRINGCOPYN(*str,PyBytes_AS_STRING(tmp),*len+1); Py_DECREF(tmp); return 1; capi_fail: Py_XDECREF(tmp); { PyObject* err = PyErr_Occurred(); if (err == NULL) { err = #modulename#_error; } PyErr_SetString(err, errmess); } return 0; } """ needs['char_from_pyobj'] = ['int_from_pyobj'] cfuncs['char_from_pyobj'] = """\ static int char_from_pyobj(char* v, PyObject *obj, const char *errmess) { int i = 0; if (int_from_pyobj(&i, obj, errmess)) { *v = (char)i; return 1; } return 0; } """ needs['signed_char_from_pyobj'] = ['int_from_pyobj', 'signed_char'] cfuncs['signed_char_from_pyobj'] = """\ static int signed_char_from_pyobj(signed_char* v, PyObject *obj, const char *errmess) { int i = 0; if (int_from_pyobj(&i, obj, errmess)) { *v = (signed_char)i; return 1; } return 0; } """ needs['short_from_pyobj'] = ['int_from_pyobj'] cfuncs['short_from_pyobj'] = """\ static int short_from_pyobj(short* v, PyObject *obj, const char *errmess) { int i = 0; if (int_from_pyobj(&i, obj, errmess)) { *v = (short)i; return 1; } return 0; } """ cfuncs['int_from_pyobj'] = """\ static int int_from_pyobj(int* v, PyObject *obj, const char *errmess) { PyObject* tmp = NULL; if (PyLong_Check(obj)) { *v = Npy__PyLong_AsInt(obj); return !(*v == -1 && PyErr_Occurred()); } tmp = PyNumber_Long(obj); if (tmp) { *v = Npy__PyLong_AsInt(tmp); Py_DECREF(tmp); return !(*v == -1 && PyErr_Occurred()); } if (PyComplex_Check(obj)) tmp = PyObject_GetAttrString(obj,\"real\"); else if (PyBytes_Check(obj) || PyUnicode_Check(obj)) /*pass*/; else if (PySequence_Check(obj)) tmp = PySequence_GetItem(obj, 0); if (tmp) { PyErr_Clear(); if (int_from_pyobj(v, tmp, errmess)) { Py_DECREF(tmp); return 1; } Py_DECREF(tmp); } { PyObject* err = PyErr_Occurred(); if (err == NULL) { err = #modulename#_error; } PyErr_SetString(err, errmess); } return 0; } """ cfuncs['long_from_pyobj'] = """\ static int long_from_pyobj(long* v, PyObject *obj, const char *errmess) { PyObject* tmp = NULL; if (PyLong_Check(obj)) { *v = PyLong_AsLong(obj); return !(*v == -1 && PyErr_Occurred()); } tmp = PyNumber_Long(obj); if (tmp) { *v = PyLong_AsLong(tmp); Py_DECREF(tmp); return !(*v == -1 && PyErr_Occurred()); } if (PyComplex_Check(obj)) tmp = PyObject_GetAttrString(obj,\"real\"); else if (PyBytes_Check(obj) || PyUnicode_Check(obj)) /*pass*/; else if (PySequence_Check(obj)) tmp = PySequence_GetItem(obj,0); if (tmp) { PyErr_Clear(); if (long_from_pyobj(v, tmp, errmess)) { Py_DECREF(tmp); return 1; } Py_DECREF(tmp); } { PyObject* err = PyErr_Occurred(); if (err == NULL) { err = #modulename#_error; } PyErr_SetString(err, errmess); } return 0; } """ needs['long_long_from_pyobj'] = ['long_long'] cfuncs['long_long_from_pyobj'] = """\ static int long_long_from_pyobj(long_long* v, PyObject *obj, const char *errmess) { PyObject* tmp = NULL; if (PyLong_Check(obj)) { *v = PyLong_AsLongLong(obj); return !(*v == -1 && PyErr_Occurred()); } tmp = PyNumber_Long(obj); if (tmp) { *v = PyLong_AsLongLong(tmp); Py_DECREF(tmp); return !(*v == -1 && PyErr_Occurred()); } if (PyComplex_Check(obj)) tmp = PyObject_GetAttrString(obj,\"real\"); else if (PyBytes_Check(obj) || PyUnicode_Check(obj)) /*pass*/; else if (PySequence_Check(obj)) tmp = PySequence_GetItem(obj,0); if (tmp) { PyErr_Clear(); if (long_long_from_pyobj(v, tmp, errmess)) { Py_DECREF(tmp); return 1; } Py_DECREF(tmp); } { PyObject* err = PyErr_Occurred(); if (err == NULL) { err = #modulename#_error; } PyErr_SetString(err,errmess); } return 0; } """ needs['long_double_from_pyobj'] = ['double_from_pyobj', 'long_double'] cfuncs['long_double_from_pyobj'] = """\ static int long_double_from_pyobj(long_double* v, PyObject *obj, const char *errmess) { double d=0; if (PyArray_CheckScalar(obj)){ if PyArray_IsScalar(obj, LongDouble) { PyArray_ScalarAsCtype(obj, v); return 1; } else if (PyArray_Check(obj) && PyArray_TYPE(obj) == NPY_LONGDOUBLE) { (*v) = *((npy_longdouble *)PyArray_DATA(obj)); return 1; } } if (double_from_pyobj(&d, obj, errmess)) { *v = (long_double)d; return 1; } return 0; } """ cfuncs['double_from_pyobj'] = """\ static int double_from_pyobj(double* v, PyObject *obj, const char *errmess) { PyObject* tmp = NULL; if (PyFloat_Check(obj)) { *v = PyFloat_AsDouble(obj); return !(*v == -1.0 && PyErr_Occurred()); } tmp = PyNumber_Float(obj); if (tmp) { *v = PyFloat_AsDouble(tmp); Py_DECREF(tmp); return !(*v == -1.0 && PyErr_Occurred()); } if (PyComplex_Check(obj)) tmp = PyObject_GetAttrString(obj,\"real\"); else if (PyBytes_Check(obj) || PyUnicode_Check(obj)) /*pass*/; else if (PySequence_Check(obj)) tmp = PySequence_GetItem(obj,0); if (tmp) { PyErr_Clear(); if (double_from_pyobj(v,tmp,errmess)) {Py_DECREF(tmp); return 1;} Py_DECREF(tmp); } { PyObject* err = PyErr_Occurred(); if (err==NULL) err = #modulename#_error; PyErr_SetString(err,errmess); } return 0; } """ needs['float_from_pyobj'] = ['double_from_pyobj'] cfuncs['float_from_pyobj'] = """\ static int float_from_pyobj(float* v, PyObject *obj, const char *errmess) { double d=0.0; if (double_from_pyobj(&d,obj,errmess)) { *v = (float)d; return 1; } return 0; } """ needs['complex_long_double_from_pyobj'] = ['complex_long_double', 'long_double', 'complex_double_from_pyobj'] cfuncs['complex_long_double_from_pyobj'] = """\ static int complex_long_double_from_pyobj(complex_long_double* v, PyObject *obj, const char *errmess) { complex_double cd = {0.0,0.0}; if (PyArray_CheckScalar(obj)){ if PyArray_IsScalar(obj, CLongDouble) { PyArray_ScalarAsCtype(obj, v); return 1; } else if (PyArray_Check(obj) && PyArray_TYPE(obj)==NPY_CLONGDOUBLE) { (*v).r = ((npy_clongdouble *)PyArray_DATA(obj))->real; (*v).i = ((npy_clongdouble *)PyArray_DATA(obj))->imag; return 1; } } if (complex_double_from_pyobj(&cd,obj,errmess)) { (*v).r = (long_double)cd.r; (*v).i = (long_double)cd.i; return 1; } return 0; } """ needs['complex_double_from_pyobj'] = ['complex_double'] cfuncs['complex_double_from_pyobj'] = """\ static int complex_double_from_pyobj(complex_double* v, PyObject *obj, const char *errmess) { Py_complex c; if (PyComplex_Check(obj)) { c = PyComplex_AsCComplex(obj); (*v).r = c.real; (*v).i = c.imag; return 1; } if (PyArray_IsScalar(obj, ComplexFloating)) { if (PyArray_IsScalar(obj, CFloat)) { npy_cfloat new; PyArray_ScalarAsCtype(obj, &new); (*v).r = (double)new.real; (*v).i = (double)new.imag; } else if (PyArray_IsScalar(obj, CLongDouble)) { npy_clongdouble new; PyArray_ScalarAsCtype(obj, &new); (*v).r = (double)new.real; (*v).i = (double)new.imag; } else { /* if (PyArray_IsScalar(obj, CDouble)) */ PyArray_ScalarAsCtype(obj, v); } return 1; } if (PyArray_CheckScalar(obj)) { /* 0-dim array or still array scalar */ PyObject *arr; if (PyArray_Check(obj)) { arr = PyArray_Cast((PyArrayObject *)obj, NPY_CDOUBLE); } else { arr = PyArray_FromScalar(obj, PyArray_DescrFromType(NPY_CDOUBLE)); } if (arr == NULL) { return 0; } (*v).r = ((npy_cdouble *)PyArray_DATA(arr))->real; (*v).i = ((npy_cdouble *)PyArray_DATA(arr))->imag; Py_DECREF(arr); return 1; } /* Python does not provide PyNumber_Complex function :-( */ (*v).i = 0.0; if (PyFloat_Check(obj)) { (*v).r = PyFloat_AsDouble(obj); return !((*v).r == -1.0 && PyErr_Occurred()); } if (PyLong_Check(obj)) { (*v).r = PyLong_AsDouble(obj); return !((*v).r == -1.0 && PyErr_Occurred()); } if (PySequence_Check(obj) && !(PyBytes_Check(obj) || PyUnicode_Check(obj))) { PyObject *tmp = PySequence_GetItem(obj,0); if (tmp) { if (complex_double_from_pyobj(v,tmp,errmess)) { Py_DECREF(tmp); return 1; } Py_DECREF(tmp); } } { PyObject* err = PyErr_Occurred(); if (err==NULL) err = PyExc_TypeError; PyErr_SetString(err,errmess); } return 0; } """ needs['complex_float_from_pyobj'] = [ 'complex_float', 'complex_double_from_pyobj'] cfuncs['complex_float_from_pyobj'] = """\ static int complex_float_from_pyobj(complex_float* v,PyObject *obj,const char *errmess) { complex_double cd={0.0,0.0}; if (complex_double_from_pyobj(&cd,obj,errmess)) { (*v).r = (float)cd.r; (*v).i = (float)cd.i; return 1; } return 0; } """ needs['try_pyarr_from_char'] = ['pyobj_from_char1', 'TRYPYARRAYTEMPLATE'] cfuncs[ 'try_pyarr_from_char'] = 'static int try_pyarr_from_char(PyObject* obj,char* v) {\n TRYPYARRAYTEMPLATE(char,\'c\');\n}\n' needs['try_pyarr_from_signed_char'] = ['TRYPYARRAYTEMPLATE', 'unsigned_char'] cfuncs[ 'try_pyarr_from_unsigned_char'] = 'static int try_pyarr_from_unsigned_char(PyObject* obj,unsigned_char* v) {\n TRYPYARRAYTEMPLATE(unsigned_char,\'b\');\n}\n' needs['try_pyarr_from_signed_char'] = ['TRYPYARRAYTEMPLATE', 'signed_char'] cfuncs[ 'try_pyarr_from_signed_char'] = 'static int try_pyarr_from_signed_char(PyObject* obj,signed_char* v) {\n TRYPYARRAYTEMPLATE(signed_char,\'1\');\n}\n' needs['try_pyarr_from_short'] = ['pyobj_from_short1', 'TRYPYARRAYTEMPLATE'] cfuncs[ 'try_pyarr_from_short'] = 'static int try_pyarr_from_short(PyObject* obj,short* v) {\n TRYPYARRAYTEMPLATE(short,\'s\');\n}\n' needs['try_pyarr_from_int'] = ['pyobj_from_int1', 'TRYPYARRAYTEMPLATE'] cfuncs[ 'try_pyarr_from_int'] = 'static int try_pyarr_from_int(PyObject* obj,int* v) {\n TRYPYARRAYTEMPLATE(int,\'i\');\n}\n' needs['try_pyarr_from_long'] = ['pyobj_from_long1', 'TRYPYARRAYTEMPLATE'] cfuncs[ 'try_pyarr_from_long'] = 'static int try_pyarr_from_long(PyObject* obj,long* v) {\n TRYPYARRAYTEMPLATE(long,\'l\');\n}\n' needs['try_pyarr_from_long_long'] = [ 'pyobj_from_long_long1', 'TRYPYARRAYTEMPLATE', 'long_long'] cfuncs[ 'try_pyarr_from_long_long'] = 'static int try_pyarr_from_long_long(PyObject* obj,long_long* v) {\n TRYPYARRAYTEMPLATE(long_long,\'L\');\n}\n' needs['try_pyarr_from_float'] = ['pyobj_from_float1', 'TRYPYARRAYTEMPLATE'] cfuncs[ 'try_pyarr_from_float'] = 'static int try_pyarr_from_float(PyObject* obj,float* v) {\n TRYPYARRAYTEMPLATE(float,\'f\');\n}\n' needs['try_pyarr_from_double'] = ['pyobj_from_double1', 'TRYPYARRAYTEMPLATE'] cfuncs[ 'try_pyarr_from_double'] = 'static int try_pyarr_from_double(PyObject* obj,double* v) {\n TRYPYARRAYTEMPLATE(double,\'d\');\n}\n' needs['try_pyarr_from_complex_float'] = [ 'pyobj_from_complex_float1', 'TRYCOMPLEXPYARRAYTEMPLATE', 'complex_float'] cfuncs[ 'try_pyarr_from_complex_float'] = 'static int try_pyarr_from_complex_float(PyObject* obj,complex_float* v) {\n TRYCOMPLEXPYARRAYTEMPLATE(float,\'F\');\n}\n' needs['try_pyarr_from_complex_double'] = [ 'pyobj_from_complex_double1', 'TRYCOMPLEXPYARRAYTEMPLATE', 'complex_double'] cfuncs[ 'try_pyarr_from_complex_double'] = 'static int try_pyarr_from_complex_double(PyObject* obj,complex_double* v) {\n TRYCOMPLEXPYARRAYTEMPLATE(double,\'D\');\n}\n' needs['create_cb_arglist'] = ['CFUNCSMESS', 'PRINTPYOBJERR', 'MINMAX'] # create the list of arguments to be used when calling back to python cfuncs['create_cb_arglist'] = """\ static int create_cb_arglist(PyObject* fun, PyTupleObject* xa , const int maxnofargs, const int nofoptargs, int *nofargs, PyTupleObject **args, const char *errmess) { PyObject *tmp = NULL; PyObject *tmp_fun = NULL; Py_ssize_t tot, opt, ext, siz, i, di = 0; CFUNCSMESS(\"create_cb_arglist\\n\"); tot=opt=ext=siz=0; /* Get the total number of arguments */ if (PyFunction_Check(fun)) { tmp_fun = fun; Py_INCREF(tmp_fun); } else { di = 1; if (PyObject_HasAttrString(fun,\"im_func\")) { tmp_fun = PyObject_GetAttrString(fun,\"im_func\"); } else if (PyObject_HasAttrString(fun,\"__call__\")) { tmp = PyObject_GetAttrString(fun,\"__call__\"); if (PyObject_HasAttrString(tmp,\"im_func\")) tmp_fun = PyObject_GetAttrString(tmp,\"im_func\"); else { tmp_fun = fun; /* built-in function */ Py_INCREF(tmp_fun); tot = maxnofargs; if (PyCFunction_Check(fun)) { /* In case the function has a co_argcount (like on PyPy) */ di = 0; } if (xa != NULL) tot += PyTuple_Size((PyObject *)xa); } Py_XDECREF(tmp); } else if (PyFortran_Check(fun) || PyFortran_Check1(fun)) { tot = maxnofargs; if (xa != NULL) tot += PyTuple_Size((PyObject *)xa); tmp_fun = fun; Py_INCREF(tmp_fun); } else if (F2PyCapsule_Check(fun)) { tot = maxnofargs; if (xa != NULL) ext = PyTuple_Size((PyObject *)xa); if(ext>0) { fprintf(stderr,\"extra arguments tuple cannot be used with CObject call-back\\n\"); goto capi_fail; } tmp_fun = fun; Py_INCREF(tmp_fun); } } if (tmp_fun == NULL) { fprintf(stderr, \"Call-back argument must be function|instance|instance.__call__|f2py-function \" \"but got %s.\\n\", ((fun == NULL) ? \"NULL\" : Py_TYPE(fun)->tp_name)); goto capi_fail; } if (PyObject_HasAttrString(tmp_fun,\"__code__\")) { if (PyObject_HasAttrString(tmp = PyObject_GetAttrString(tmp_fun,\"__code__\"),\"co_argcount\")) { PyObject *tmp_argcount = PyObject_GetAttrString(tmp,\"co_argcount\"); Py_DECREF(tmp); if (tmp_argcount == NULL) { goto capi_fail; } tot = PyLong_AsSsize_t(tmp_argcount) - di; Py_DECREF(tmp_argcount); } } /* Get the number of optional arguments */ if (PyObject_HasAttrString(tmp_fun,\"__defaults__\")) { if (PyTuple_Check(tmp = PyObject_GetAttrString(tmp_fun,\"__defaults__\"))) opt = PyTuple_Size(tmp); Py_XDECREF(tmp); } /* Get the number of extra arguments */ if (xa != NULL) ext = PyTuple_Size((PyObject *)xa); /* Calculate the size of call-backs argument list */ siz = MIN(maxnofargs+ext,tot); *nofargs = MAX(0,siz-ext); #ifdef DEBUGCFUNCS fprintf(stderr, \"debug-capi:create_cb_arglist:maxnofargs(-nofoptargs),\" \"tot,opt,ext,siz,nofargs = %d(-%d), %zd, %zd, %zd, %zd, %d\\n\", maxnofargs, nofoptargs, tot, opt, ext, siz, *nofargs); #endif if (siz < tot-opt) { fprintf(stderr, \"create_cb_arglist: Failed to build argument list \" \"(siz) with enough arguments (tot-opt) required by \" \"user-supplied function (siz,tot,opt=%zd, %zd, %zd).\\n\", siz, tot, opt); goto capi_fail; } /* Initialize argument list */ *args = (PyTupleObject *)PyTuple_New(siz); for (i=0;i<*nofargs;i++) { Py_INCREF(Py_None); PyTuple_SET_ITEM((PyObject *)(*args),i,Py_None); } if (xa != NULL) for (i=(*nofargs);i<siz;i++) { tmp = PyTuple_GetItem((PyObject *)xa,i-(*nofargs)); Py_INCREF(tmp); PyTuple_SET_ITEM(*args,i,tmp); } CFUNCSMESS(\"create_cb_arglist-end\\n\"); Py_DECREF(tmp_fun); return 1; capi_fail: if (PyErr_Occurred() == NULL) PyErr_SetString(#modulename#_error, errmess); Py_XDECREF(tmp_fun); return 0; } """ def buildcfuncs(): from .capi_maps import c2capi_map for k in c2capi_map.keys(): m = 'pyarr_from_p_%s1' % k cppmacros[ m] = '#define %s(v) (PyArray_SimpleNewFromData(0,NULL,%s,(char *)v))' % (m, c2capi_map[k]) k = 'string' m = 'pyarr_from_p_%s1' % k # NPY_CHAR compatibility, NPY_STRING with itemsize 1 cppmacros[ m] = '#define %s(v,dims) (PyArray_New(&PyArray_Type, 1, dims, NPY_STRING, NULL, v, 1, NPY_ARRAY_CARRAY, NULL))' % (m) ############ Auxiliary functions for sorting needs ################### def append_needs(need, flag=1): # This function modifies the contents of the global `outneeds` dict. if isinstance(need, list): for n in need: append_needs(n, flag) elif isinstance(need, str): if not need: return if need in includes0: n = 'includes0' elif need in includes: n = 'includes' elif need in typedefs: n = 'typedefs' elif need in typedefs_generated: n = 'typedefs_generated' elif need in cppmacros: n = 'cppmacros' elif need in cfuncs: n = 'cfuncs' elif need in callbacks: n = 'callbacks' elif need in f90modhooks: n = 'f90modhooks' elif need in commonhooks: n = 'commonhooks' else: errmess('append_needs: unknown need %s\n' % (repr(need))) return if need in outneeds[n]: return if flag: tmp = {} if need in needs: for nn in needs[need]: t = append_needs(nn, 0) if isinstance(t, dict): for nnn in t.keys(): if nnn in tmp: tmp[nnn] = tmp[nnn] + t[nnn] else: tmp[nnn] = t[nnn] for nn in tmp.keys(): for nnn in tmp[nn]: if nnn not in outneeds[nn]: outneeds[nn] = [nnn] + outneeds[nn] outneeds[n].append(need) else: tmp = {} if need in needs: for nn in needs[need]: t = append_needs(nn, flag) if isinstance(t, dict): for nnn in t.keys(): if nnn in tmp: tmp[nnn] = t[nnn] + tmp[nnn] else: tmp[nnn] = t[nnn] if n not in tmp: tmp[n] = [] tmp[n].append(need) return tmp else: errmess('append_needs: expected list or string but got :%s\n' % (repr(need))) def get_needs(): # This function modifies the contents of the global `outneeds` dict. res = {} for n in outneeds.keys(): out = [] saveout = copy.copy(outneeds[n]) while len(outneeds[n]) > 0: if outneeds[n][0] not in needs: out.append(outneeds[n][0]) del outneeds[n][0] else: flag = 0 for k in outneeds[n][1:]: if k in needs[outneeds[n][0]]: flag = 1 break if flag: outneeds[n] = outneeds[n][1:] + [outneeds[n][0]] else: out.append(outneeds[n][0]) del outneeds[n][0] if saveout and (0 not in map(lambda x, y: x == y, saveout, outneeds[n])) \ and outneeds[n] != []: print(n, saveout) errmess( 'get_needs: no progress in sorting needs, probably circular dependence, skipping.\n') out = out + saveout break saveout = copy.copy(outneeds[n]) if out == []: out = [n] res[n] = out return res ```
Jaime Gil da Costa (born July 29, 1957), better known as Gil Brother, Brother Away, Away de Petrópolis, Away Nilzer or simply as Away, is a Brazilian actor, humorist, dancer and YouTuber. Known for his quirky, no-nonsense demeanor, acerbic sense of humor, and frequent reliance on foul language and malapropisms, he reached fame during his stint as a member of the comedy troupe Hermes & Renato from 2002 to 2008. Biography Jaime Gil da Costa was born in Petrópolis, Rio de Janeiro on July 29, 1957, to machinist Augusto Carneiro da Costa and housewife Vânia Maria Pacheco Costa. Raised in poverty from childhood, he had to work to make ends meet – initially selling sweets made by his mother in the streets, and later as a flanelinha. By 1985, Gil had acquired a passion for dancing; he was inspired by soul and funk artists such as Little Richard and James Brown which he grew up listening to, and he began performing in commercial spaces and bus stations for money. He frequently clashed with the police and ended up being arrested multiple times. Due to his tendency to get into brawls, he suffered a retinal detachment in his left eye which made it blind. It was around this time when he received his nickname "Brother Away", because of his typical shouts of "Away!" as he danced. Later, he turned this into his catchphrase. In 2002, the comedy troupe Hermes & Renato, which Gil had long been acquainted with, invited him to be a member. Initially, he played one-time characters for their sketches, the most memorable of them being the lawyer "Dr. Gilmar" for their parodic telenovela Sinhá Boça, until he began hosting his own, such as the fan-favorite "Cozinha do Away". He left the troupe in 2008 citing creative differences as well as contractual and payment issues; according to Gil, he was being underpaid, and compared his tenure with the troupe to "slave labor". His allegations would later be rebutted by Hermes & Renato (then called "Banana Mecânica") in 2011. After eventually making amends, Gil later appeared in many runs of the troupe's theater play Uma Tentativa de Show beginning in 2019. Following his experience with Hermes & Renato, Gil announced he no longer intended to appear in media, but in 2011 the video production company Jigsaw Produções invited him to open his own YouTube channel, the "Canal Away". Jigsaw ended their contract with Gil in 2013 and deleted his channel, alleging he failed to fulfill certain obligations and explaining their reasoning in an over 30-minute YouTube video. In 2015, Gil opened a new channel on his own. Gil made his debut as a film actor in 2014, playing a beggar in the parody film Copa de Elite. In 2018, he made a guest appearance in the music video for the song "Rodei o Mundo" by the rock band Strike. In 2020, he narrated a McDonald's commercial promoting their new McShakes. On May 30, 2023, it was reported that a week prior, on May 23, Gil had suffered a stroke following an accidental fall in which he hit his head, being rushed to an ICU; his family members set up a crowdfunding page for his medical expenses. Gil's nephew William Passos stated that, according to his doctors, he was recovering well but would probably suffer from after-effects; he lost flexibility of his left arm and leg, but it was, as of yet, unknown if the after-effects would be permanent. On June 18, Passos announced that his uncle had left the ICU and was transferred to a bedroom at the Hospital Clínico de Corrêas in Petrópolis. References External links Gil Brother's channel on YouTube 1957 births Living people Brazilian male film actors Brazilian male television actors 21st-century Brazilian male actors Brazilian male dancers Brazilian humorists Brazilian YouTubers Afro-Brazilian male actors People from Petrópolis
The Parvis de la Défense is a square in Puteaux, located in the heart of the La Défense district, extending up to the Grande Arche. In the old division of the district, it belonged to sector 4; since the implementation of a new plan by the EPGD in 2009, it has been located on the border between the Arche Nord and Arche Sud sectors Rectangular in shape, it follows in its length the orientation of the Axe historique, of which it occupies a section of about 300 meters; from Paris, it is preceded by Place de la Défense (to the east), and the perspective is extended by the Grande Arche (to the west). In width, it stretches 120 meters between the CNIT in the north and the Quatre Temps shopping center in the south. In total, it covers an area of 3.6 hectares. Just under the slab is the exchange room for the RER (La Défense station, line A), the metro (La Défense station, terminus of line 1), the Transilien (line U and line L) and the tramway (line 2 station). References External links Le Parvis La Défense Financial districts in France Central business districts in France Economy of Paris Tourist attractions in Hauts-de-Seine
Statistics of Chinese Taipei National Football League in the 1996 season. Overview Taipower won the championship. References RSSSF Chinese Taipei National Football League seasons 1 Taipei Taipei
Przeźmierowo is a village in the administrative district of Gmina Tarnowo Podgórne, within Poznań County, Greater Poland Voivodeship, in west-central Poland. It lies approximately south-east of Tarnowo Podgórne and west of the regional capital Poznań, although it is within its metropolitan area. The village has a population of 6455. References Villages in Poznań County
Johnnie Lee Gray (born December 18, 1953) is an American former professional football player. Gray was a safety in the National Football League (NFL) with the Green Bay Packers. Early life and career Gray was born in Lake Charles, Louisiana and graduated from Lompoc High School in Lompoc, California. He played college football at Allan Hancock College and California State University, Fullerton. He was an undrafted rookie with the Green Bay Packers in the 1975 NFL season and played for the team for nine seasons. Gray was inducted into the Green Bay Packers Hall of Fame in 1993. After retiring as a player, Gray was a football analyst for a FOX affiliate. He is now a uniform inspector for the National Football League. He co-hosts Pack Attack TV program on central Wisconsin's local ABC WAOW. Johnnie also works as an instructional aide at Syble Hopp School in De Pere, WI, a school that educates children with disabilities. References External links Pro-Football-Reference.com databaseFootball.com 1953 births Living people People from Lompoc, California Players of American football from Lake Charles, Louisiana Lompoc High School alumni American football safeties Cal State Fullerton Titans football players California State University, Fullerton alumni Allan Hancock Bulldogs football players Green Bay Packers players Players of American football from Santa Barbara County, California Green Bay Packers Hall of Fame
Lillian Belle Sage (1870 – April 4, 1915) was an American educator. She taught biology and geology classes at Washington Irving High School in New York, and at Cornell University. Early life and education Lillian Belle Sage was born in Norwich, New York, the daughter of WIlliam A. Sage and Venette Dyer Sage. She graduated from Mount Holyoke College in 1899, and earned a bachelor's degree from Cornell University in 1901. Career Sage taught school in Norwich, Olean, and Albany as a young woman. In 1902 she joined the faculty of Washington Irving High School in New York City, "the largest girls' school in America". As head of the biology department, she worked with another Cornell alumna, Florence Wells Slater, to make innovative science education a specialty at Irving. She designed and built the school's vivarium to support the study of animal life for thousands of city school students. She also wrote and staged pageants at the school, and built greenhouses on the roof of the school, where students raised plants and flowers for the flower shows she also began. She led the effort to install a pipe organ and chimes at the school, in her capacity as president of the Patrick F. McGowan Memorial Association. Outside Washington Irving High School, Sage was a member of the Teachers League, the High School Teachers' Association of New York City, the Torrey Botanical Society, and the Bronx Zoological Society. She helped teach summer geology courses for science teachers at Cornell University. She read the proofs for Liberty Hyde Bailey's textbook, Botany: An Elementary Text for Schools (1901). She donated plant samples to the New York state botanist. She served on the council of Camp Fire Girls, along with Jane Addams, Jessica Blanche Peixotto, and Ernest Thompson Seton, among others. Publications "A Practical and Profitable Experiment in the New Method of Teaching Geology" (1901) "The Practical Use of Biology" (1909, with Henry R. Linville, Edgar A. Bedford, Martha F. Goddard, , and Benjamin C. Gruenberg) "Who has a Better Chance?" (1913) "A Teacher's Prescription" (1915) Personal life Sage died in April 1915, a few months after she became unconscious from a blood clot in her brain. She was 44 years old. In November 1915, she and three other deceased teachers were remembered at an event in the library of Washington Irving High School, and a reproduction of Romney's "The Stafford Children" was chosen to recall her love of children and nature. References External links Details about the pipe organ at Washington Irving High School, New York City Chapter of the American Guild of Organists 1870 births 1915 deaths People from Norwich, New York American educators Mount Holyoke College alumni Cornell University alumni
```powershell $password1 = Read-Host "Enter password" -AsSecureString $password1 = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($password1) $password1 = [Runtime.InteropServices.Marshal]::PtrToStringAuto($password1) $password2 = Read-Host "Re-enter password" -AsSecureString $password2 = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($password2) $password2 = [Runtime.InteropServices.Marshal]::PtrToStringAuto($password2) if($password1 -eq $password2){ if($password2.length -lt 6 ){ Write-Output 1 } else { Write-Output $password1 } } else{ Write-Output 0 } ```
```objective-c #pragma once #include <atomic> #include <functional> #include <base/types.h> #include <Core/Defines.h> namespace DB { class ReadBuffer; class WriteBuffer; /// See Progress. struct ProgressValues { UInt64 read_rows = 0; UInt64 read_bytes = 0; UInt64 total_rows_to_read = 0; UInt64 total_bytes_to_read = 0; UInt64 written_rows = 0; UInt64 written_bytes = 0; UInt64 result_rows = 0; UInt64 result_bytes = 0; UInt64 elapsed_ns = 0; void read(ReadBuffer & in, UInt64 server_revision); void write(WriteBuffer & out, UInt64 client_revision) const; void writeJSON(WriteBuffer & out) const; }; struct ReadProgress { UInt64 read_rows = 0; UInt64 read_bytes = 0; UInt64 total_rows_to_read = 0; UInt64 total_bytes_to_read = 0; ReadProgress(UInt64 read_rows_, UInt64 read_bytes_, UInt64 total_rows_to_read_ = 0, UInt64 total_bytes_to_read_ = 0) : read_rows(read_rows_), read_bytes(read_bytes_), total_rows_to_read(total_rows_to_read_), total_bytes_to_read(total_bytes_to_read_) {} }; struct WriteProgress { UInt64 written_rows = 0; UInt64 written_bytes = 0; WriteProgress(UInt64 written_rows_, UInt64 written_bytes_) : written_rows(written_rows_), written_bytes(written_bytes_) {} }; struct ResultProgress { UInt64 result_rows = 0; UInt64 result_bytes = 0; ResultProgress(UInt64 result_rows_, UInt64 result_bytes_) : result_rows(result_rows_), result_bytes(result_bytes_) {} }; struct FileProgress { /// Here read_bytes (raw bytes) - do not equal ReadProgress::read_bytes, which are calculated according to column types. UInt64 read_bytes = 0; UInt64 total_bytes_to_read = 0; explicit FileProgress(UInt64 read_bytes_, UInt64 total_bytes_to_read_ = 0) : read_bytes(read_bytes_), total_bytes_to_read(total_bytes_to_read_) {} }; /** Progress of query execution. * Values, transferred over network are deltas - how much was done after previously sent value. * The same struct is also used for summarized values. */ struct Progress { std::atomic<UInt64> read_rows {0}; /// Rows (source) processed. std::atomic<UInt64> read_bytes {0}; /// Bytes (uncompressed, source) processed. /** How much rows/bytes must be processed, in total, approximately. Non-zero value is sent when there is information about * some new part of job. Received values must be summed to get estimate of total rows to process. */ std::atomic<UInt64> total_rows_to_read {0}; std::atomic<UInt64> total_bytes_to_read {0}; std::atomic<UInt64> written_rows {0}; std::atomic<UInt64> written_bytes {0}; std::atomic<UInt64> result_rows {0}; std::atomic<UInt64> result_bytes {0}; std::atomic<UInt64> elapsed_ns {0}; Progress() = default; Progress(UInt64 read_rows_, UInt64 read_bytes_, UInt64 total_rows_to_read_ = 0, UInt64 total_bytes_to_read_ = 0) : read_rows(read_rows_), read_bytes(read_bytes_), total_rows_to_read(total_rows_to_read_), total_bytes_to_read(total_bytes_to_read_) {} explicit Progress(ReadProgress read_progress) : read_rows(read_progress.read_rows), read_bytes(read_progress.read_bytes), total_rows_to_read(read_progress.total_rows_to_read) {} explicit Progress(WriteProgress write_progress) : written_rows(write_progress.written_rows), written_bytes(write_progress.written_bytes) {} explicit Progress(ResultProgress result_progress) : result_rows(result_progress.result_rows), result_bytes(result_progress.result_bytes) {} explicit Progress(FileProgress file_progress) : read_bytes(file_progress.read_bytes), total_bytes_to_read(file_progress.total_bytes_to_read) {} void read(ReadBuffer & in, UInt64 server_revision); void write(WriteBuffer & out, UInt64 client_revision) const; /// Progress in JSON format (single line, without whitespaces) is used in HTTP headers. void writeJSON(WriteBuffer & out) const; /// Each value separately is changed atomically (but not whole object). bool incrementPiecewiseAtomically(const Progress & rhs); void incrementElapsedNs(UInt64 elapsed_ns_); void reset(); ProgressValues getValues() const; ProgressValues fetchValuesAndResetPiecewiseAtomically(); Progress fetchAndResetPiecewiseAtomically(); Progress & operator=(Progress && other) noexcept; Progress(Progress && other) noexcept { *this = std::move(other); } }; /** Callback to track the progress of the query. * Used in QueryPipeline and Context. * The function takes the number of rows in the last block, the number of bytes in the last block. * Note that the callback can be called from different threads. */ using ProgressCallback = std::function<void(const Progress & progress)>; } ```
Herbert Newton Wethered (1870–1957) was a versatile English author, who wrote in a number of areas of non-fiction. Life He was born on 14 November 1870, the third son of Henry Wethered, a colliery owner of Clifton, Bristol. His father Henry, who died in 1916, was the son of William Wethered and was born in Little Marlow, moving to the Bristol region around 1854, where he worked with his father and two brothers, Edwin and Joseph, in the coal business. Their sister Elizabeth married Handel Cossham. Cossham and H. O. Wills ultimately controlled the colliery. Newton Wethered was educated at Clifton College from 1880 to 1888 and graduated B.A. from Corpus Christi College, Oxford in 1892. Around 1905 he made experiments with a friend, W. Graham Robertson, a friend, trying to recover the colour print process employed by William Blake. Works From Giotto to John: The Development of Painting (1920) Medieval Craftsmanship and the Modern Amateur (1923) The Architectural Side of Golf (1929), with Tom Simpson A Short History of Gardens (1933), influenced by Marie-Luise Gothein. The Mind of the Ancient World: A Consideration of Pliny's Natural History (1937) On the Art of Thackeray (1938) The Four Paths of Pilgrimage (1947) Design for Golf (1952), with Tom Simpson Selected Essays of E. V. Lucas (1954), editor The Curious Art of Autobiography, from Benvenuto Cellini to Rudyard Kipling (1956) Family In 1890, Wethered married Marion Emmeline Lund, daughter of James Lund, and sister of Reginald William Lund, a college contemporary. They had a son and a daughter, who were the golfers Roger Wethered and Joyce Wethered. Notes 1870 births 1957 deaths Writers from Bristol Alumni of Corpus Christi College, Oxford
```java /* * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.apache.arrow.vector.ipc; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.Arrays; /** * Magic header/footer helpers for {@link ArrowFileWriter} and {@link ArrowFileReader} formatted * files. */ class ArrowMagic { private ArrowMagic() {} private static final byte[] MAGIC = "ARROW1".getBytes(StandardCharsets.UTF_8); public static final int MAGIC_LENGTH = MAGIC.length; public static void writeMagic(WriteChannel out, boolean align) throws IOException { out.write(MAGIC); if (align) { out.align(); } } public static boolean validateMagic(byte[] array) { return Arrays.equals(MAGIC, array); } } ```
The 1938–39 season was the 65th season of competitive football by Rangers. Overview Results All results are written with Rangers' score first. Scottish League Division One Scottish Cup Appearances See also 1938–39 in Scottish football 1938–39 Scottish Cup Scottish football championship-winning seasons Rangers F.C. seasons Rangers
Guillaume Veau was a thirteenth-century French trouvère. Three chansons courtoises are attributed to him in the Vatican manuscript Reg.lat.1490: J'ai amé trestout mon vivant Meudre achoison n'euc onques de chanter S'amours loiaus m'a fait soufrir The first two of these are unica, that is, they appear in no other source. They both end on a note other than the tonal centre of the first four phrases. The "moderately florid" melodies of all three are written in bar form. References Further reading Holger Petersen Dyggve. Onomastique des trouvères. Ayer Publishing, 1973. Trouvères 13th-century French people Male classical composers
Nick Harper (born 1965), English singer-songwriter and guitarist. Nick Harper may also refer to: Fictional characters Nick Harper (My Family), fictional character in the British sitcom My Family Nick Harper, main character in 2004 film Face of Terror, played by Ricky Schroder Others Nick Harper (American football) (born 1974), former American football player in the National Football League Nick Harper (politician) (born 1979), US politician active in Washington state
```java /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package com.oracle.svm.core.heap.dump; import jdk.graal.compiler.core.common.NumUtil; import com.oracle.svm.core.config.ConfigurationValues; /* Enum of all relevant HPROF types (see enum hprofTag in HotSpot). */ public enum HProfType { NORMAL_OBJECT(0x2, 0), BOOLEAN(0x4, 1), CHAR(0x5, 2), FLOAT(0x6, 4), DOUBLE(0x7, 8), BYTE(0x8, 1), SHORT(0x9, 2), INT(0xA, 4), LONG(0xB, 8); private static final HProfType[] TYPES = HProfType.values(); private final byte value; private final int size; HProfType(int value, int size) { this.value = NumUtil.safeToUByte(value); this.size = size; } public static HProfType get(byte value) { return TYPES[value]; } public byte getValue() { return value; } public int getSize() { if (size == 0) { return ConfigurationValues.getTarget().wordSize; } return size; } } ```
Estadio Complejo Deportivo Moca 86 is a football stadium in Moca, Dominican Republic. It is currently used for football matches and hosts the home games of Moca FC of the Liga Dominicana de Fútbol. The stadium holds 4,000 spectators. References Football venues in the Dominican Republic Buildings and structures in Espaillat Province Moca FC
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\Slides; class UpdateLinePropertiesRequest extends \Google\Model { /** * @var string */ public $fields; protected $linePropertiesType = LineProperties::class; protected $linePropertiesDataType = ''; /** * @var string */ public $objectId; /** * @param string */ public function setFields($fields) { $this->fields = $fields; } /** * @return string */ public function getFields() { return $this->fields; } /** * @param LineProperties */ public function setLineProperties(LineProperties $lineProperties) { $this->lineProperties = $lineProperties; } /** * @return LineProperties */ public function getLineProperties() { return $this->lineProperties; } /** * @param string */ public function setObjectId($objectId) { $this->objectId = $objectId; } /** * @return string */ public function getObjectId() { return $this->objectId; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(UpdateLinePropertiesRequest::class, 'Google_Service_Slides_UpdateLinePropertiesRequest'); ```
Enache Panait (born 6 October 1949) is a Romanian former wrestler who competed in the 1972 Summer Olympics and in the 1976 Summer Olympics. References External links 1949 births Living people Olympic wrestlers for Romania Wrestlers at the 1972 Summer Olympics Wrestlers at the 1976 Summer Olympics Romanian male sport wrestlers Place of birth missing (living people)
Henri Testelin (1616–1695) was a French painter and writer on art. Family Testelin was born in Paris as the son of Gilles Testelin, painter to king Louis XIII. He was the younger brother of the painter Louis Testelin. Académy royale In 1648, Henri Testelin became one of the founder members of the Académie royale de peinture et de sculpture. He succeeded his brother Louis as its secretary from 1650 and was nominated professor in 1656. In 1653, he suggested that academicians should regularly give lectures (Conférences) on art theory, a practise which was adopted and became a corner stone of the institution's activities. Testelin's own lectures consisted of his reading of tables in which he summarised all the aspects of art theory his colleagues had previously presented. He published these tables in 1680 as Sentimens des plus habiles peintres sur la pratique de la peinture et sculpture, mis en tables de préceptes, avec plusieurs discours académiques, ou conférences tenues en l'Académie royale des dits arts. Reworked and expanded editions were published in The Hague in 1693 or 1694 and in Paris in 1696. In 1853, French art historian Anatole de Montaiglon published the 17th-century manuscript Mémoires pour servir à l'histoire de l'Académie royale de Peinture et de Sculpture depuis 1648 jusqu'en 1664, a detailed account of the early history of the Académie royale, and identified the anonymous author as Henri Testelin. Exile In line with the increasingly intolerant religious policies of Louis XIV, Testelin was dismissed from the Academy in 1681 because he was a protestant. He left France and went into exile in Holland. He died in The Hague on 17 April 1695. Art Henri Testelin painted portraits of Louis XIV and other important personalities. These show the influence of Charles Le Brun, Testelin's close friend. Testelin was given living quarters at the Gobelins Manufactory for which he produced several cartoons for tapestry. These are mostly scenes from the life of Alexander the Great and Louis XIV based on compositions by Le Brun and the battle painter Adam Frans van der Meulen. Most of his paintings are kept in the palace of Versailles. Works by Testelin References External links 1616 births 1695 deaths French Baroque painters Dutch portrait painters Painters from Paris
```go // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package ipv4 import ( "net" "syscall" "golang.org/x/net/bpf" ) // MulticastTTL returns the time-to-live field value for outgoing // multicast packets. func (c *dgramOpt) MulticastTTL() (int, error) { if !c.ok() { return 0, syscall.EINVAL } so, ok := sockOpts[ssoMulticastTTL] if !ok { return 0, errOpNoSupport } return so.GetInt(c.Conn) } // SetMulticastTTL sets the time-to-live field value for future // outgoing multicast packets. func (c *dgramOpt) SetMulticastTTL(ttl int) error { if !c.ok() { return syscall.EINVAL } so, ok := sockOpts[ssoMulticastTTL] if !ok { return errOpNoSupport } return so.SetInt(c.Conn, ttl) } // MulticastInterface returns the default interface for multicast // packet transmissions. func (c *dgramOpt) MulticastInterface() (*net.Interface, error) { if !c.ok() { return nil, syscall.EINVAL } so, ok := sockOpts[ssoMulticastInterface] if !ok { return nil, errOpNoSupport } return so.getMulticastInterface(c.Conn) } // SetMulticastInterface sets the default interface for future // multicast packet transmissions. func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error { if !c.ok() { return syscall.EINVAL } so, ok := sockOpts[ssoMulticastInterface] if !ok { return errOpNoSupport } return so.setMulticastInterface(c.Conn, ifi) } // MulticastLoopback reports whether transmitted multicast packets // should be copied and send back to the originator. func (c *dgramOpt) MulticastLoopback() (bool, error) { if !c.ok() { return false, syscall.EINVAL } so, ok := sockOpts[ssoMulticastLoopback] if !ok { return false, errOpNoSupport } on, err := so.GetInt(c.Conn) if err != nil { return false, err } return on == 1, nil } // SetMulticastLoopback sets whether transmitted multicast packets // should be copied and send back to the originator. func (c *dgramOpt) SetMulticastLoopback(on bool) error { if !c.ok() { return syscall.EINVAL } so, ok := sockOpts[ssoMulticastLoopback] if !ok { return errOpNoSupport } return so.SetInt(c.Conn, boolint(on)) } // JoinGroup joins the group address group on the interface ifi. // By default all sources that can cast data to group are accepted. // It's possible to mute and unmute data transmission from a specific // source by using ExcludeSourceSpecificGroup and // IncludeSourceSpecificGroup. // JoinGroup uses the system assigned multicast interface when ifi is // nil, although this is not recommended because the assignment // depends on platforms and sometimes it might require routing // configuration. func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error { if !c.ok() { return syscall.EINVAL } so, ok := sockOpts[ssoJoinGroup] if !ok { return errOpNoSupport } grp := netAddrToIP4(group) if grp == nil { return errMissingAddress } return so.setGroup(c.Conn, ifi, grp) } // LeaveGroup leaves the group address group on the interface ifi // regardless of whether the group is any-source group or // source-specific group. func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error { if !c.ok() { return syscall.EINVAL } so, ok := sockOpts[ssoLeaveGroup] if !ok { return errOpNoSupport } grp := netAddrToIP4(group) if grp == nil { return errMissingAddress } return so.setGroup(c.Conn, ifi, grp) } // JoinSourceSpecificGroup joins the source-specific group comprising // group and source on the interface ifi. // JoinSourceSpecificGroup uses the system assigned multicast // interface when ifi is nil, although this is not recommended because // the assignment depends on platforms and sometimes it might require // routing configuration. func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { if !c.ok() { return syscall.EINVAL } so, ok := sockOpts[ssoJoinSourceGroup] if !ok { return errOpNoSupport } grp := netAddrToIP4(group) if grp == nil { return errMissingAddress } src := netAddrToIP4(source) if src == nil { return errMissingAddress } return so.setSourceGroup(c.Conn, ifi, grp, src) } // LeaveSourceSpecificGroup leaves the source-specific group on the // interface ifi. func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { if !c.ok() { return syscall.EINVAL } so, ok := sockOpts[ssoLeaveSourceGroup] if !ok { return errOpNoSupport } grp := netAddrToIP4(group) if grp == nil { return errMissingAddress } src := netAddrToIP4(source) if src == nil { return errMissingAddress } return so.setSourceGroup(c.Conn, ifi, grp, src) } // ExcludeSourceSpecificGroup excludes the source-specific group from // the already joined any-source groups by JoinGroup on the interface // ifi. func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { if !c.ok() { return syscall.EINVAL } so, ok := sockOpts[ssoBlockSourceGroup] if !ok { return errOpNoSupport } grp := netAddrToIP4(group) if grp == nil { return errMissingAddress } src := netAddrToIP4(source) if src == nil { return errMissingAddress } return so.setSourceGroup(c.Conn, ifi, grp, src) } // IncludeSourceSpecificGroup includes the excluded source-specific // group by ExcludeSourceSpecificGroup again on the interface ifi. func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error { if !c.ok() { return syscall.EINVAL } so, ok := sockOpts[ssoUnblockSourceGroup] if !ok { return errOpNoSupport } grp := netAddrToIP4(group) if grp == nil { return errMissingAddress } src := netAddrToIP4(source) if src == nil { return errMissingAddress } return so.setSourceGroup(c.Conn, ifi, grp, src) } // ICMPFilter returns an ICMP filter. // Currently only Linux supports this. func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) { if !c.ok() { return nil, syscall.EINVAL } so, ok := sockOpts[ssoICMPFilter] if !ok { return nil, errOpNoSupport } return so.getICMPFilter(c.Conn) } // SetICMPFilter deploys the ICMP filter. // Currently only Linux supports this. func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error { if !c.ok() { return syscall.EINVAL } so, ok := sockOpts[ssoICMPFilter] if !ok { return errOpNoSupport } return so.setICMPFilter(c.Conn, f) } // SetBPF attaches a BPF program to the connection. // // Only supported on Linux. func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error { if !c.ok() { return syscall.EINVAL } so, ok := sockOpts[ssoAttachFilter] if !ok { return errOpNoSupport } return so.setBPF(c.Conn, filter) } ```
The fiords of New Zealand ( "bluff sea") are all located in the southwest of the South Island, in a mountainous area known as Fiordland. A fiord is a narrow inlet of the sea between cliffs or steep slopes, which results from marine inundation of a glaciated valley. The spelling fiord is used in New Zealand rather than fjord, although all the maritime fiords instead use the word sound in their name. The Marlborough Sounds, a series of deep indentations in the coastline at the northern tip of the South Island, are in fact drowned river valleys, or rias. The deeply indented coastlines of Northland and Auckland also host many rias, such as the Hokianga and Waitematā Harbours. New Zealand has fifteen named maritime fiords, listed here from northernmost to southernmost. List Thompson Sound separates Secretary Island from the mainland and connects with Doubtful Sound and Bradshaw Sound at its inland end. The mouth of Bradshaw Sound is on Doubtful Sound approximately 12 km from the Tasman Sea. Freshwater fiords A number of lakes in the Fiordland and Otago regions also fill glacial valleys. Lake Te Anau has three western arms which are fiords (and are named so). Lake McKerrow to the north of Milford Sound is a fiord with a silted-up mouth. Lake Wakatipu fills a large glacial valley, as do lakes Hakapoua, Poteriteri, Monowai and Hauroko in the far south of Fiordland. Lake Manapouri has fiords as its West, North and South arms. References New Zealand Geographic Placenames Database Fjords New Zealand Fiords
Nancy Hult Ganis, (born c. 1948) is an American TV and film publicist, writer, producer and developer as well as the co-founder and partner of Out of the Blue…Entertainment. Ganis' most recent credits include the 2006 film Akeelah and the Bee and the 2011 ABC television series Pan Am. Education and early career After growing up in Detroit, Michigan, Hult's professional life started as a math teacher in her hometown's inner-city public schools. In 1968 she left teaching to fly with Pan Am as a flight attendant. During her years traveling the world as a "stewardess", especially in conversation with international journalists, she became aware of the difference between policies the U.S. stated in public and the deeds it carried out in the field. In the early 1970s she observed the flight attendant profession lose respectability, exemplified by her seeing a PSA flight crew uniformed in hot pants, which made her think she would not want to continue much longer. In 1976 she entered the University of California at Berkeley as an undergraduate and in 1978 she received a bachelor's degree in history. She applied to Berkeley's master's degree program in journalism, and was told by her adviser to avoid any mention of being a stewardess; a condition she saw as ironic because the experience had given her a wider world view than the other applicants. She was accepted to the program and she earned her master's degree in 1981. Hult next worked as a journalist and in the public affairs department at San Francisco's PBS station, KQED. In addition to these duties at KQED, Hult also worked as a segment producer and writer covering foreign affairs and public policy issues. Her next big assignment at KQED was working on The Making of Raiders of the Lost Ark; the documentary won an Emmy for the program's producer, and Hult's future husband, Sid Ganis. Following the success of the Raiders documentary, Hult Ganis worked as a developer for the PBS series Comedy Tonight. What began as a showcase featuring Bay Area comedians such as Dana Carvey later listed national headliners such as Bobcat Goldthwait, Kevin Pollak, and Ellen DeGeneres. Whoopi Goldberg hosted the series in 1987. After working as Steven Spielberg's assistant, Hult Ganis returned to San Francisco and a position as special projects director for the CBS affiliate, KPIX; during her tenure, the station went from last to first in Arbitron the major market ratings. Hollywood, films, politics After her success at KPIX, Hult Ganis started her own production and marketing firm. This venture allowed her to work with Saul Zaentz on the film Amadeus, Francis Ford Coppola on Peggy Sue Got Married and Lucasfilm on Howard the Duck. Hult Ganis moved permanently to Los Angeles in 1986 and set up the marketing department for Carolco Pictures, at that time an independent film production company. While with Carolco, Hult Ganis handled such films as Extreme Prejudice, Angel Heart, and the Tom Hanks/Sally Field vehicle, Punchline. After her move to Los Angeles, Hult Ganis became more politically active and joined the Hollywood Woman's Political Committee. This connection allowed her to co-produce the "Bells for Hope Celebration" shown at the inauguration of U.S. President Bill Clinton. Having established an association with the Clinton Administration, Hult Ganis was able to contribute once again to her first love, education, by working with the president and his advisors on education issues. In the same vein, Hult Ganis worked with Michael J. Fox on promoting the importance of having educational themes in television programs and movies to her producer and director contacts in Hollywood. In 1996, Hult Ganis and her husband, Sid Ganis, created Out of the Blue...Entertainment, a film production company with credits that list both Deuce Bigalow: Male Gigolo and Deuce Bigalow: European Gigolo; the Adam Sandler films Mr. Deeds and Big Daddy; and Akeelah and the Bee for Lionsgate Films, among others. Pan Am Out of the Blue produced the 2011 ABC series, Pan Am, a period-based show focusing on the iconic airline, Pan American World Airways, and its in-the-air employees during the early 1960s. Initial development for the series came directly from executive producer Hult Ganis' own experience as a stewardess with Pan Am from 1968 to 1976. Not only relying on her own experiences with the airline, as developer, Hult Ganis researched details for the show by reading up on Pan Am history and interviewing former Pan Am stewardesses. During the interviews, she learned about Pan Am's involvement in U.S. State Department operations and behind-the-scenes missions prior to the beginning of the Six-Day War in the Middle East. Aside from finding plot line and story development ideas, Hult Ganis also spends time monitoring the mannerisms and behaviors of the show's characters in scripts as well as on the set. This includes being watchful of costuming, speaking habits and dialect of the characters, and even the smallest of details such as gum chewing and whether or not Pan Am employees would be seen in public drinking anything in an open can or cup. In September 2011, Hult Ganis told Wired magazine online, "I brought together a lot of former Pan Am people to talk to them about their experiences. No one character is any one person, but there's elements of our stories in the stories [on the show]." Personal life and philanthropy Hult Ganis is married to motion picture executive and former president of the Academy of Motion Picture Arts and Sciences, Sid Ganis. Together, Hult Ganis and her husband participate in charity giving through a fund they have set up with The San Francisco Foundation, a network of philanthropists and civic leaders working toward investing in the San Francisco community. Hult Ganis cites growing up in civil rights-era Detroit, as well as her work in inner-city areas there, as being the catalyst for her desire to give to the community she is a part of. During a 2008 interview she stated, "...I saw at a fairly early age that there were terrible inequities in the education system. I lived in a good neighborhood so we had great public schools, but that was not the case in the inner city. I was shocked to see kids in this country who had so little and no access to a quality education. I often wondered what it was like for the other children to study or take entry exams such as an SAT without any sufficient resources available to them. Ever since then, I have always felt compelled to try to give back." References Living people American film producers Year of birth missing (living people)
```go // this source code is governed by the included BSD license. package libkb import "bytes" // BufferCloser is a Buffer that satisfies the io.Closer // interface. type BufferCloser struct { *bytes.Buffer } func NewBufferCloser() *BufferCloser { return &BufferCloser{Buffer: new(bytes.Buffer)} } func (b *BufferCloser) Close() error { return nil } ```
Sincerely Charlotte () is a 1985 French drama film directed by Caroline Huppert and starring Isabelle Huppert. Plot After her lover has been murdered, a young singer (Isabelle Huppert) is forced to hide out at the home of her ex-boyfriend (Niels Arestrup) who is currently living there with his new love (Christine Pascal). Cast Isabelle Huppert - Charlotte Niels Arestrup - Mathieu Christine Pascal - Christine Roland Blanche - Le représentant Nicolas Wostrikoff - Freddy Josine Comellas - Jacqueline Bérangère Gros - Marie-Cécile Eduardo Manet - Emilio Tina Sportolaro - Nurse Chinon Jean-Michel Ribes - Roger Luc Béraud - Intern Chinon François Berléand - The officer PTT See also Isabelle Huppert on screen and stage References External links 1985 films 1980s French-language films 1985 drama films Films directed by Caroline Huppert French drama films 1980s French films
```php <?php /* * This file is part of PhpSpec, A php toolset to drive emergent * design by specification. * * (c) Marcello Duarte <marcello.duarte@gmail.com> * (c) Konstantin Kudryashov <ever.zet@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PhpSpec\Console; interface Prompter { /** * @param string $question * @param boolean $default * @return boolean */ public function askConfirmation($question, $default = true); } ```
```objective-c #ifndef GRAPHHELPER_H #define GRAPHHELPER_H #include <QProcess> #include <QStringList> #include <QPair> #include <QQueue> #include <QPointer> #include <core/noncopyable.h> #include <core/global.h> #include <vtextedit/lrucache.h> namespace vnotex { class GraphHelper : private Noncopyable { public: typedef std::function<void(quint64, TimeStamp, const QString &, const QString &)> ResultCallback; GraphHelper(); void process(quint64 p_id, TimeStamp p_timeStamp, const QString &p_format, const QString &p_text, QObject *p_owner, const ResultCallback &p_callback); protected: virtual QStringList getFormatArgs(const QString &p_format) = 0; void clearCache(); void checkValidProgram(); static QStringList getArgsToUse(const QStringList &p_args); static QString getCommandToUse(const QString &p_command, const QString &p_format); QString m_program; QStringList m_args; // If this is not empty, @m_program and @m_args will be ignored. QString m_overriddenCommand; private: struct Task { quint64 m_id = 0; TimeStamp m_timeStamp = 0; QString m_format; QString m_text; QPointer<QObject> m_owner; ResultCallback m_callback; }; struct CacheItem { bool isNull() const { return m_data.isNull(); } QString m_format; QString m_data; }; void processOneTask(); void finishOneTask(QProcess *p_process, int p_exitCode, QProcess::ExitStatus p_exitStatus); void finishOneTask(const QString &p_data); void callbackOneTask(const Task &p_task, quint64 p_id, TimeStamp p_timeStamp, const QString &p_format, const QString &p_data) const; QQueue<Task> m_tasks; bool m_taskOngoing = false; // {text} -> CacheItem. vte::LruCache<QString, CacheItem> m_cache; // Whether @m_program is valid. bool m_programValid = false; }; } #endif // GRAPHHELPER_H ```
```smalltalk using System.Drawing; using System.Globalization; using ReClassNET.Controls; using ReClassNET.Extensions; using ReClassNET.Memory; using ReClassNET.UI; namespace ReClassNET.Nodes { public class UInt64Node : BaseNumericNode { public override int MemorySize => 8; public override void GetUserInterfaceInfo(out string name, out Image icon) { name = "UInt64 / QWORD"; icon = Properties.Resources.B16x16_Button_UInt_64; } public override Size Draw(DrawContext context, int x, int y) { var value = ReadValueFromMemory(context.Memory); return DrawNumeric(context, x, y, context.IconProvider.Unsigned, "UInt64", value.ToString(), $"0x{value:X}"); } public override void Update(HotSpot spot) { base.Update(spot); if (spot.Id == 0 || spot.Id == 1) { if (ulong.TryParse(spot.Text, out var val) || spot.Text.TryGetHexString(out var hexValue) && ulong.TryParse(hexValue, NumberStyles.HexNumber, null, out val)) { spot.Process.WriteRemoteMemory(spot.Address, val); } } } public ulong ReadValueFromMemory(MemoryBuffer memory) { return memory.ReadUInt64(Offset); } } } ```
```go // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package fx_test import ( "context" "fmt" "sync" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/fx" "go.uber.org/fx/fxtest" ) func TestShutdown(t *testing.T) { t.Parallel() t.Run("BroadcastsToMultipleChannels", func(t *testing.T) { t.Parallel() var s fx.Shutdowner app := fxtest.New( t, fx.Populate(&s), ) done1, done2 := app.Done(), app.Done() defer app.RequireStart().RequireStop() assert.NoError(t, s.Shutdown(), "error in app shutdown") assert.NotNil(t, <-done1, "done channel 1 did not receive signal") assert.NotNil(t, <-done2, "done channel 2 did not receive signal") }) t.Run("ErrorOnUnsentSignal", func(t *testing.T) { t.Parallel() var s fx.Shutdowner app := fxtest.New( t, fx.Populate(&s), ) done := app.Done() wait := app.Wait() defer app.RequireStart().RequireStop() assert.NoError(t, s.Shutdown(), "error returned from first shutdown call") assert.EqualError(t, s.Shutdown(), "send terminated signal: 2/2 channels are blocked", "unexpected error returned when shutdown is called with a blocked channel") assert.NotNil(t, <-done, "done channel did not receive signal") assert.NotNil(t, <-wait, "wait channel did not receive signal") }) t.Run("shutdown app before calling Done()", func(t *testing.T) { t.Parallel() var s fx.Shutdowner app := fxtest.New( t, fx.Populate(&s), ) require.NoError(t, app.Start(context.Background()), "error starting app") assert.NoError(t, s.Shutdown(), "error in app shutdown") done1, done2 := app.Done(), app.Done() defer app.Stop(context.Background()) // Receiving on done1 and done2 will deadlock in the event that app.Done() // doesn't work as expected. assert.NotNil(t, <-done1, "done channel 1 did not receive signal") assert.NotNil(t, <-done2, "done channel 2 did not receive signal") }) t.Run("with exit code", func(t *testing.T) { t.Parallel() var s fx.Shutdowner app := fxtest.New( t, fx.Populate(&s), ) require.NoError(t, app.Start(context.Background()), "error starting app") assert.NoError(t, s.Shutdown(fx.ExitCode(2)), "error in app shutdown") wait := <-app.Wait() defer app.Stop(context.Background()) require.Equal(t, 2, wait.ExitCode) }) t.Run("with exit code and multiple Wait", func(t *testing.T) { t.Parallel() var s fx.Shutdowner app := fxtest.New( t, fx.Populate(&s), ) require.NoError(t, app.Start(context.Background()), "error starting app") t.Cleanup(func() { app.Stop(context.Background()) }) // in t.Cleanup so this happens after all subtests return (not just this function) defer require.NoError(t, app.Stop(context.Background())) for i := 0; i < 10; i++ { t.Run(fmt.Sprintf("Wait %v", i), func(t *testing.T) { t.Parallel() wait := <-app.Wait() require.Equal(t, 2, wait.ExitCode) }) } assert.NoError(t, s.Shutdown(fx.ExitCode(2), fx.ShutdownTimeout(time.Second))) }) t.Run("from invoke", func(t *testing.T) { t.Parallel() app := fxtest.New( t, fx.Invoke(func(s fx.Shutdowner) { s.Shutdown() }), ) ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() require.NoError(t, app.Start(ctx), "error starting app") defer app.Stop(ctx) select { case <-ctx.Done(): assert.Fail(t, "app did not shutdown in time") case <-app.Wait(): // success } }) t.Run("many times", func(t *testing.T) { t.Parallel() var shutdowner fx.Shutdowner app := fxtest.New( t, fx.Populate(&shutdowner), ) for i := 0; i < 10; i++ { app.RequireStart() shutdowner.Shutdown(fx.ExitCode(i)) assert.Equal(t, i, (<-app.Wait()).ExitCode, "run %d", i) app.RequireStop() } }) } func TestDataRace(t *testing.T) { t.Parallel() var s fx.Shutdowner app := fxtest.New( t, fx.Populate(&s), ) defer app.RequireStart().RequireStop() const N = 50 ready := make(chan struct{}) // used to orchestrate goroutines for Done() and ShutdownOption() var wg sync.WaitGroup // tracks and waits for all goroutines // Spawn N goroutines, each of which call app.Done() and assert // the signal received. wg.Add(N) for i := 0; i < N; i++ { i := i go func() { defer wg.Done() <-ready done := app.Done() assert.NotNil(t, <-done, "done channel %v did not receive signal", i) }() } // call Shutdown() wg.Add(1) go func() { <-ready defer wg.Done() assert.NoError(t, s.Shutdown(), "error in app shutdown") }() close(ready) wg.Wait() } ```
Kerens is a city in Navarro County, Texas, United States. The population was 1,573 at the 2010 census. History Kerens was established in 1881 when the St. Louis Southwestern Railway of Texas was built through the county, according to the Texas Handbook of History, and was named for Judge Richard C. Kerens of St. Louis. The railroad bypassed the nearby settlement of Wadeville, and within a short time all of the businesses from Wadeville moved to the new town. By the mid-1890s, the handbook said, the town had three cotton gin-mills, four grocery stores, two hotels, two drug stores, a wagonmaker, and a weekly newspaper named the Navarro Blade. Big Tex, the giant icon of the State Fair of Texas, had his beginnings in Kerens. In 1949, residents built a Santa Claus constructed from iron drill casing and papier mache to help encourage holiday sales. In 1951, State Fair president R. L. Thornton purchased Santa's components for $750 and had Dallas artist Jack Bridges transform them into a cowboy for the annual fair. Geography Kerens is located at (32.130639, –96.229207). According to the United States Census Bureau, the city has a total area of , all land. Demographics 2020 census As of the 2020 United States census, there were 1,505 people, 631 households, and 434 families residing in the city. 2000 census As of the census of 2000, there were 1,681 people, 682 households, and 448 families residing in the city. The population density was . There were 750 housing units at an average density of . The racial makeup of the city was 70.14% White, 22.13% African American, 0.48% Native American, 0.06% Asian, 5.77% from other races, and 1.43% from two or more races. Hispanic or Latino of any race were 7.61% of the population. There were 682 households, out of which 33.0% had children under the age of 18 living with them, 48.8% were married couples living together, 13.5% had a female householder with no husband present, and 34.2% were non-families. 31.8% of all households were made up of individuals, and 20.7% had someone living alone who was 65 years of age or older. The average household size was 2.46 and the average family size was 3.13. In the city, the population was spread out, with 28.1% under the age of 18, 7.6% from 18 to 24, 26.5% from 25 to 44, 19.7% from 45 to 64, and 18.1% who were 65 years of age or older. The median age was 36 years. For every 100 females, there were 83.5 males. The median income for a household in the city was $27,969, and the median income for a family was $36,719. Males had a median income of $26,683 versus $21,600 for females. The per capita income for the city was $13,000. About 13.3% of families and 19.5% of the population were below the poverty line, including 23.8% of those under age 18 and 18.9% of those age 65 or over. Education The City of Kerens is served by the Kerens Independent School District. Climate The climate in this area is characterized by hot, humid summers and generally mild to cool winters. According to the Köppen Climate Classification system, Kerens has a humid subtropical climate, abbreviated "Cfa" on climate maps. Notable person Tom Mechler, state Republican chairman, formerly lived in Kerens, where he was engaged in the oil and gas business References External links City of Kerens – official site City-Data.com Kerens Independent School District Cities in Texas Cities in Navarro County, Texas Populated places established in 1881 1881 establishments in Texas
The Independent Paralympic Athletes Team, a team consisting of refugee and asylee Paralympic athletes, competed at the 2016 Summer Paralympics in Rio de Janeiro, Brazil, from 7 September to 18 September 2016. Its creation was announced on 5 August 2016. Participation The team was announced on August 5, 2016, by the International Paralympic Committee. Participants were nominated for the team by National Paralympic Committees who were aware of qualified sportspeople. The International Paralympic Committee stepped in to assist with getting athletes ready by doing a number of things, including insuring that athletes were classified. On 26 August 2016, the IPC announced the two members of the refugee team: Ibrahim Al Hussein of Syria, who will compete in the S10 50 and 100 m freestyle swimming events, and Shahrad Nasajpour of Iran, who will compete in F37 Discus. Tony Sainsbury was the chef de mission of the team; Sainsbury has previously been the chef de mission of the British Paralympic Team at five Paralympics. The team was considered a success and it was recreated as the Refugee Paralympic Team at the 2020 Summer Paralympics and both of the athletes in this team returned in 2020. Disability classifications Every participant at the Paralympics has their disability grouped into one of five disability categories; amputation, the condition may be congenital or sustained through injury or illness; cerebral palsy; wheelchair athletes, there is often overlap between this and other categories; visual impairment, including blindness; Les autres, any physical disability that does not fall strictly under one of the other categories, for example dwarfism or multiple sclerosis. Each Paralympic sport then has its own classifications, dependent upon the specific physical demands of competition. Events are given a code, made of numbers and letters, describing the type of event and classification of the athletes competing. Some sports, such as athletics, divide athletes by both the category and severity of their disabilities, other sports, for example swimming, group competitors from different categories together, the only separation being based on the severity of the disability. Athletics Swimming See also Refugee Olympic Team at the 2016 Summer Olympics References Refugees in South America Nations at the 2016 Summer Paralympics Independent Paralympians at the Paralympic Games
Three Rivers Community College (TRCC) is a public community college in Norwich, Connecticut. It was formed in 1992 by the merger of Mohegan Community College and Thames Valley State Technical College and is named after the three major rivers in the region: the Shetucket, the Yantic and the Thames. It is accredited by the New England Commission of Higher Education. Merged into Connecticut State Community College 2023 was the last commencement under the name "Three Rivers Community College." As of July 1, 2023, it, along with the other 11 community colleges, merged into a single state institution. It is now the Three Rivers campus of Connecticut State Community College. Campus The college was split between the Mohegan and Thames Valley campuses on opposite sides of Norwich. In 2003, the state legislature approved funding to consolidate the college at the Thames Valley campus. In 2009, the college finally consolidated into the one campus on New London Turnpike. There are also two off-campus instructional centers, one at the nearby Naval Submarine Base, the other at Ella Grasso Technical School in Groton. Three Rivers Middle College Three Rivers Community College is also the home of Three Rivers Middle College (TRMC), a dual-enrollment magnet high school. TRMC students combine the last two years of high school with up to one full year of college courses, giving them a head start on their associate degrees. References External links Official website Buildings and structures in Norwich, Connecticut Community colleges in Connecticut Universities and colleges established in 1992 Universities and colleges in New London County, Connecticut 1992 establishments in Connecticut
```c++ #include <gtest/gtest.h> #include <nnpack.h> #include <testers/convolution.h> #include <models/alexnet.h> /* * AlexNet conv2 layer */ TEST(FT8x8, conv2) { AlexNet::conv2() .batchSize(128) .errorLimit(1.0e-6) .testKernelGradient(nnp_convolution_algorithm_ft8x8); } TEST(FT16x16, conv2) { AlexNet::conv2() .batchSize(128) .errorLimit(1.0e-5) .testKernelGradient(nnp_convolution_algorithm_ft16x16); } /* * AlexNet conv3 layer */ TEST(FT8x8, conv3) { AlexNet::conv3() .batchSize(128) .errorLimit(1.0e-6) .testKernelGradient(nnp_convolution_algorithm_ft8x8); } TEST(FT16x16, conv3) { AlexNet::conv3() .batchSize(128) .errorLimit(1.0e-5) .testKernelGradient(nnp_convolution_algorithm_ft16x16); } TEST(WT8x8, DISABLED_conv3) { AlexNet::conv3() .batchSize(128) .errorLimit(1.0e-3) .testKernelGradient(nnp_convolution_algorithm_wt8x8); } /* * AlexNet conv4 layer */ TEST(FT8x8, conv4) { AlexNet::conv4() .batchSize(128) .errorLimit(1.0e-6) .testKernelGradient(nnp_convolution_algorithm_ft8x8); } TEST(FT16x16, conv4) { AlexNet::conv4() .batchSize(128) .errorLimit(1.0e-5) .testKernelGradient(nnp_convolution_algorithm_ft16x16); } TEST(WT8x8, DISABLED_conv4) { AlexNet::conv4() .batchSize(128) .errorLimit(1.0e-3) .testKernelGradient(nnp_convolution_algorithm_wt8x8); } /* * AlexNet conv5 layer */ TEST(FT8x8, conv5) { AlexNet::conv5() .batchSize(128) .errorLimit(1.0e-6) .testKernelGradient(nnp_convolution_algorithm_ft8x8); } TEST(FT16x16, conv5) { AlexNet::conv5() .batchSize(128) .errorLimit(1.0e-5) .testKernelGradient(nnp_convolution_algorithm_ft16x16); } TEST(WT8x8, DISABLED_conv5) { AlexNet::conv5() .batchSize(128) .errorLimit(1.0e-3) .testKernelGradient(nnp_convolution_algorithm_wt8x8); } int main(int argc, char* argv[]) { const enum nnp_status init_status = nnp_initialize(); assert(init_status == nnp_status_success); setenv("TERM", "xterm-256color", 0); ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } ```
```go // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. package zapcore import ( "fmt" "sync" ) // Encodes the given error into fields of an object. A field with the given // name is added for the error message. // // If the error implements fmt.Formatter, a field with the name ${key}Verbose // is also added with the full verbose error message. // // Finally, if the error implements errorGroup (from go.uber.org/multierr) or // causer (from github.com/pkg/errors), a ${key}Causes field is added with an // array of objects containing the errors this error was comprised of. // // { // "error": err.Error(), // "errorVerbose": fmt.Sprintf("%+v", err), // "errorCauses": [ // ... // ], // } func encodeError(key string, err error, enc ObjectEncoder) error { basic := err.Error() enc.AddString(key, basic) switch e := err.(type) { case errorGroup: return enc.AddArray(key+"Causes", errArray(e.Errors())) case fmt.Formatter: verbose := fmt.Sprintf("%+v", e) if verbose != basic { // This is a rich error type, like those produced by // github.com/pkg/errors. enc.AddString(key+"Verbose", verbose) } } return nil } type errorGroup interface { // Provides read-only access to the underlying list of errors, preferably // without causing any allocs. Errors() []error } type causer interface { // Provides access to the error that caused this error. Cause() error } // Note that errArry and errArrayElem are very similar to the version // implemented in the top-level error.go file. We can't re-use this because // that would require exporting errArray as part of the zapcore API. // Encodes a list of errors using the standard error encoding logic. type errArray []error func (errs errArray) MarshalLogArray(arr ArrayEncoder) error { for i := range errs { if errs[i] == nil { continue } el := newErrArrayElem(errs[i]) arr.AppendObject(el) el.Free() } return nil } var _errArrayElemPool = sync.Pool{New: func() interface{} { return &errArrayElem{} }} // Encodes any error into a {"error": ...} re-using the same errors logic. // // May be passed in place of an array to build a single-element array. type errArrayElem struct{ err error } func newErrArrayElem(err error) *errArrayElem { e := _errArrayElemPool.Get().(*errArrayElem) e.err = err return e } func (e *errArrayElem) MarshalLogArray(arr ArrayEncoder) error { return arr.AppendObject(e) } func (e *errArrayElem) MarshalLogObject(enc ObjectEncoder) error { return encodeError("error", e.err, enc) } func (e *errArrayElem) Free() { e.err = nil _errArrayElemPool.Put(e) } ```
Mileta Lisica (; 7 October 1966 – 11 November 2020) was a Serbian-Slovenian professional basketball player. Playing career Lisica had played for the Poliester from Priboj and the Sloboda from Tuzla before he came to the Crvena zvezda. With the Zvezda he won two YUBA League titles (1993 and 1994). He spent one season at the Borovica from Ruma and with them, he reached the YUBA League Playoffs Final in 1995. After that, he returned to the Zvezda and spent another season with them. In 1996, Lisica went to play for the Pivovarna Laško of the Slovenian Premier League. He played six seasons there and has been one of the team's best players. He participated at three Slovenian League All-Star Games. After leaving Slovenia, he played two seasons in the France LNB Pro A League. He played there for the Le Mans and the Limoges CSP. In November 2003, he returned to Serbia and played one season for the Lavovi 063 and two seasons for the Novi Sad. Lisica finished his playing career at the Slovenian team Rudar Trbovlje after the 2007–08 season. Personal life In 2002, Lisica got Slovenian citizenship. He had two sons Rade (born 1997) and Đorđe (born 1999), both became basketball players. Rade played for Vojvodina of the Basketball League of Serbia in 2019. Đorđe played for Zlatorog Laško. On 11 November 2020, Lisica died after a long and severe illness. Career achievements and awards Club Yugoslav League champion: 2 (with Crvena zvezda: 1992–93, 1993–94) Yugoslav Super Cup winner: 1 (with Crvena zvezda: 1993) Individual YUBA League MVP: 1994 Slovenian League MVP: 2000 Slovenian League Best Foreign Player: 2000 Slovenian League All-Star Game: 1999, 2000, 2001 See also KK Crvena zvezda accomplishments and records List of KK Crvena zvezda players with 100 games played References External links Profile at eurobasket.com Na današnji dan: Rođen Mileta Lisica 1966 births 2020 deaths KK Borovica players KK Crvena zvezda players KK Lavovi 063 players KK Novi Sad players KK Zlatorog Laško players KK Sloboda Tuzla players Le Mans Sarthe Basket players Limoges CSP players People from Priboj Sportspeople from Zlatibor District Serbian men's basketball players Slovenian men's basketball players Slovenian people of Serbian descent Serbia and Montenegro expatriate sportspeople in France Serbian expatriate basketball people in Slovenia Serbian expatriate basketball people in France Yugoslav men's basketball players Centers (basketball) Power forwards (basketball) Serbia and Montenegro men's basketball players Slovenian expatriate basketball people in France Naturalized citizens of Slovenia Naturalised basketball players
```java * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ package org.flowable.cmmn.engine.impl.agenda.operation; import java.util.Map; import org.flowable.cmmn.api.runtime.PlanItemInstanceState; import org.flowable.cmmn.engine.impl.persistence.entity.PlanItemInstanceEntity; import org.flowable.cmmn.engine.impl.util.CommandContextUtil; import org.flowable.cmmn.model.EventListener; import org.flowable.cmmn.model.PlanItemTransition; import org.flowable.common.engine.impl.interceptor.CommandContext; /** * @author Joram Barrez */ public class OccurPlanItemInstanceOperation extends AbstractMovePlanItemInstanceToTerminalStateOperation { public OccurPlanItemInstanceOperation(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity) { super(commandContext, planItemInstanceEntity); } @Override public String getNewState() { return PlanItemInstanceState.COMPLETED; } @Override public String getLifeCycleTransition() { return PlanItemTransition.OCCUR; } @Override public boolean isEvaluateRepetitionRule() { // Only event listeners can be repeating on occur return planItemInstanceEntity.getPlanItem() != null && planItemInstanceEntity.getPlanItem().getPlanItemDefinition() instanceof EventListener; } @Override protected boolean shouldAggregateForSingleInstance() { return true; } @Override protected boolean shouldAggregateForMultipleInstances() { return true; } @Override protected void internalExecute() { planItemInstanceEntity.setEndedTime(getCurrentTime(commandContext)); planItemInstanceEntity.setOccurredTime(planItemInstanceEntity.getEndedTime()); CommandContextUtil.getCmmnHistoryManager(commandContext).recordPlanItemInstanceOccurred(planItemInstanceEntity); } @Override protected Map<String, String> getAsyncLeaveTransitionMetadata() { throw new UnsupportedOperationException("Occur does not support async leave"); } @Override public String getOperationName() { return "[Occur plan item]"; } } ```
```objective-c // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // // path_to_url // // Unless required by applicable law or agreed to in writing, // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // specific language governing permissions and limitations #pragma once #include <optional> #include <string> #include <string_view> #include <utility> #include <vector> #include "arrow/type_fwd.h" namespace arrow { namespace fs { namespace internal { constexpr char kSep = '/'; // Computations on abstract paths (not local paths with system-dependent behaviour). // Abstract paths are typically used in URIs. // Split an abstract path into its individual components. ARROW_EXPORT std::vector<std::string> SplitAbstractPath(const std::string& path, char sep = kSep); // Slice the individual components of an abstract path and combine them // // If offset or length are negative then an empty string is returned // If offset is >= the number of components then an empty string is returned // If offset + length is >= the number of components then length is truncated ARROW_EXPORT std::string SliceAbstractPath(const std::string& path, int offset, int length, char sep = kSep); // Return the extension of the file ARROW_EXPORT std::string GetAbstractPathExtension(const std::string& s); // Return the depth (number of components) of an abstract path // // Trailing slashes do not count towards depth // Leading slashes do not count towards depth // // The root path ("/") has depth 0 ARROW_EXPORT int GetAbstractPathDepth(std::string_view path); // Return the parent directory and basename of an abstract path. Both values may be // empty. ARROW_EXPORT std::pair<std::string, std::string> GetAbstractPathParent(const std::string& s); // Validate an abstract path. ARROW_EXPORT Status ValidateAbstractPath(std::string_view path); // Validate the components of an abstract path. ARROW_EXPORT Status ValidateAbstractPathParts(const std::vector<std::string>& parts); // Append a non-empty stem to an abstract path. ARROW_EXPORT std::string ConcatAbstractPath(std::string_view base, std::string_view stem); // Make path relative to base, if it starts with base. Otherwise error out. ARROW_EXPORT Result<std::string> MakeAbstractPathRelative(const std::string& base, const std::string& path); ARROW_EXPORT std::string EnsureLeadingSlash(std::string_view s); ARROW_EXPORT std::string_view RemoveLeadingSlash(std::string_view s); ARROW_EXPORT std::string EnsureTrailingSlash(std::string_view s); /// \brief remove the forward slash (if any) from the given path /// \param s the input path /// \param preserve_root if true, allow a path of just "/" to remain unchanged ARROW_EXPORT std::string_view RemoveTrailingSlash(std::string_view s, bool preserve_root = false); ARROW_EXPORT Status AssertNoTrailingSlash(std::string_view s); inline bool HasTrailingSlash(std::string_view s) { return !s.empty() && s.back() == kSep; } inline bool HasLeadingSlash(std::string_view s) { return !s.empty() && s.front() == kSep; } ARROW_EXPORT bool IsAncestorOf(std::string_view ancestor, std::string_view descendant); ARROW_EXPORT std::optional<std::string_view> RemoveAncestor(std::string_view ancestor, std::string_view descendant); /// Return a vector of ancestors between a base path and a descendant. /// For example, /// /// AncestorsFromBasePath("a/b", "a/b/c/d/e") -> ["a/b/c", "a/b/c/d"] ARROW_EXPORT std::vector<std::string> AncestorsFromBasePath(std::string_view base_path, std::string_view descendant); /// Given a vector of paths of directories which must be created, produce a the minimal /// subset for passing to CreateDir(recursive=true) by removing redundant parent /// directories ARROW_EXPORT std::vector<std::string> MinimalCreateDirSet(std::vector<std::string> dirs); // Join the components of an abstract path. template <class StringIt> std::string JoinAbstractPath(StringIt it, StringIt end, char sep = kSep) { std::string path; for (; it != end; ++it) { if (it->empty()) continue; if (!path.empty()) { path += sep; } path += *it; } return path; } template <class StringRange> std::string JoinAbstractPath(const StringRange& range, char sep = kSep) { return JoinAbstractPath(range.begin(), range.end(), sep); } /// Convert slashes to backslashes, on all platforms. Mostly useful for testing. ARROW_EXPORT std::string ToBackslashes(std::string_view s); /// Ensure a local path is abstract, by converting backslashes to regular slashes /// on Windows. Return the path unchanged on other systems. ARROW_EXPORT std::string ToSlashes(std::string_view s); ARROW_EXPORT bool IsEmptyPath(std::string_view s); ARROW_EXPORT bool IsLikelyUri(std::string_view s); class ARROW_EXPORT Globber { public: ~Globber(); explicit Globber(std::string pattern); bool Matches(const std::string& path); protected: struct Impl; std::unique_ptr<Impl> impl_; }; } // namespace internal } // namespace fs } // namespace arrow ```
"$pringfield (or, How I Learned to Stop Worrying and Love Legalized Gambling)", simply known as "$pringfield", is the tenth episode of the fifth season of the American animated television series The Simpsons, and the 91st episode overall. It originally aired on the Fox network in the United States on December 16, 1993. In the episode, Springfield legalizes gambling to revitalize its economy. Mr. Burns opens a casino where Homer is hired as a blackjack dealer. Marge develops a gambling addiction, Bart opens a casino in his treehouse, and Burns' appearance and mental state deteriorate in a parody of Howard Hughes. The episode was written by Bill Oakley and Josh Weinstein, and directed by Wes Archer. Gerry Cooney and Robert Goulet guest starred as themselves. The episode features cultural references to the films Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb, The Wizard of Oz, Rain Man, and 2001: A Space Odyssey. Since airing, the episode has received mostly positive reviews from television critics. It acquired a Nielsen rating of 11.7, and was the highest-rated show on the Fox network the week it aired. Plot At a town hall, Mayor Quimby fields suggestions on ways to improve Springfield's dwindling economy. Principal Skinner suggests the town legalize gambling to rejuvenate its economy; everyone, including frequent naysayer Marge, likes the idea. Mr. Burns and Quimby work together to build a casino, where Homer is hired as a blackjack dealer. Burns designs the casino himself, with his likeness atop a mermaid's body adorning its neon sign. While waiting for Homer's shift to end, Marge finds a quarter on the casino floor and uses it to play a slot machine. When she wins, she immediately becomes addicted to gambling. Bart is too young to gamble at Burns' Casino, so he starts his own casino in his tree house, tricking Robert Goulet into performing there. Burns grows even richer from his casino, but his appearance and mental state deteriorate, making him resemble Howard Hughes. He develops paranoia and a profound fear of microscopic germs, urinating in jars and wearing tissue boxes instead of shoes on his feet. Marge spends all her time at the casino and neglects her family. She fails to notice when Maggie crawls away from the slots and is nearly mauled by a white tiger from Gunter and Ernst's circus act. She forgets to help Lisa make a costume for her geography pageant, forcing her to wear one poorly designed by her father, which consists of Homer creating a shoddy costume of Florida. Homer bursts into the casino searching for Marge. Security cameras capture his rampage, causing Burns to demote him to his old job at the power plant. After realizing how much he misses the plant, Burns decides to return to it. When Homer confronts Marge for her behavior, she finally realizes she has a gambling problem and agrees to stop. Lisa wins a special prize in the geography pageant because Homer's poor costume design makes the judges think she did it all by herself. Ralph receives the same prize for his primitive costume: a note taped to his shirt that reads "Idaho". Production The episode was written by Bill Oakley and Josh Weinstein, and directed by Wes Archer. The story of the episode originated from a newspaper article that Oakley and Weinstein found about a town in Mississippi that was introducing riverboat gambling. Oakley said another inspiration for it was that there had not been many episodes about Springfield as a whole and how "crummy" the town was, so they filled the whole first act with scenes showing how "crummy" and "dismal" Springfield was. Oakley particularly liked the animation of the lights inside the casino on the slot machines and the lamps in the ceiling. The "way they radiate out" had always amazed him. Archer, who directed the animation of the episode, also thought they turned out well. The lights were especially hard for them to animate back then because the show was animated traditionally on cels, so Archer was pleased with the results. A deleted scene from the episode shows Homer dealing cards to James Bond. The staff liked the scene, so they decided to put it in the clip show episode "The Simpsons 138th Episode Spectacular". There was a brief period when the episode had a different subplot that revolved around the restaurant chain Planet Hollywood. Groening had been told by a spokesperson that if he put Planet Hollywood in The Simpsons, the creators of the restaurant, Arnold Schwarzenegger, Bruce Willis, and Sylvester Stallone, would agree to make guest appearances on the show. The writers of The Simpsons were excited about this so they wrote a new subplot for the episode that featured Planet Hollywood and the three actors. However, for unknown reasons, they were unable to appear in the episode. Instead, Gerry Cooney and Robert Goulet guest starred as themselves. Executive producer David Mirkin enjoyed directing Goulet because he was "such a good sport" and had "a great sense of humor". Oakley thought it was nice that Goulet was willing to make fun of himself in the episode, which at the time was rare for guest stars on The Simpsons. This episode features the first appearances of Gunter and Ernst, the Siegfried and Roy-esque casino magicians who are attacked by their white tiger, Anastasia. Ten years after this episode first aired, on October 3, 2003, Roy Horn was attacked by one of the duo's white tigers. The Simpsons production team dismissed the novelty of the prediction by saying that it was "bound to happen" sooner or later. The Rich Texan also makes his debut appearance in this episode, referred to as "Senator" by Homer. Cultural references The title is a reference to the 1964 film Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb, the music of which was composed by Laurie Johnson. Two of his songs, "Happy-go-lively" and "Rue de la park" can be heard within the News on Parade segment at the beginning of the episode. Burns' bed looks similar to the one occupied by Keir Dullea's character Dave Bowman in the end of the 1968 film, 2001: A Space Odyssey. Dustin Hoffman and Tom Cruise appear at the casino to reprise their roles from the 1988 film Rain Man, although Cruise does not speak. Homer is impressed by the card-counting abilities of a man who resembles Raymond Babbitt, Hoffman's character in the film. Krusty's show at midnight is similar to Bill Cosby's 1971 album For Adults Only, which was recorded at a casino at midnight. Marge reminds Homer that his lifelong dream was to be a contestant on the television show The Gong Show. Burns's paranoid obsession with germs and cleanliness, and his refusal to leave his bedroom once the casino opens, parodies American magnate Howard Hughes, who had obsessive–compulsive disorder, and was involved in the casino business in his later years. The "Spruce Moose", an absurdly tiny wooden plane Burns makes in the episode, is a parody of Hughes' impractically enormous wooden plane, derisively nicknamed the Spruce Goose. Homer parodies the scene in the 1939 film The Wizard of Oz when the Scarecrow demonstrates his newly acquired intelligence by (incorrectly) reciting the law that governs the lengths of the sides of an isosceles triangle. Unlike in the film, somebody correctly points out that the Pythagorean theorem recited applies only to right triangles, not isosceles triangles. Reception Critical reception Since airing, the episode has received mostly positive reviews from television critics. DVD Movie Guide's Colin Jacobson commented that "this excellent episode includes a surprising number of concurrent plots. Homer also works in the casino and tries to care for the family without Marge. It balances them deftly and provides great laughs along the way." Adam Suraf of Dunkirkma.net named it the third best episode of the season. He also praised the episode's cultural references. The authors of the book I Can't Believe It's a Bigger and Better Updated Unofficial Simpsons Guide, Warren Martyn and Adrian Wood, wrote: "There's a lovely nod to the earlier episodes in which Marge protests the citizenry's hare-brained ideas at council meetings. A series of bizarre moments rather than a story—we're especially fond of Homer's photographic memory and Mr Burns' descent into insanity—but great fun." Patrick Bromley of DVD Verdict gave the episode a grade of A, and Bill Gibron of DVD Talk gave it a score of 4 out of 5. The episode is Sarah Culp of The Quindecim's eleventh-favorite episode of the show, and one of Les Winan of Box Office Prophets's favorite episodes. A scene from the episode where former United States Secretary of State Henry Kissinger meets Burns was included in the 2002 documentary film The Trials of Henry Kissinger. Ratings In its original American broadcast, "$pringfield" finished 35th in the ratings for the week of December 13 to December 19, 1993, with a Nielsen Rating of 11.7, translating to 11 million households. The episode was the highest-rated show on the Fox network that week. References External links The Simpsons (season 5) episodes 1993 American television episodes Gambling and society Works about addiction Cultural depictions of Henry Kissinger Television episodes about gambling Obsessive–compulsive disorder in fiction Fiction about animal cruelty
```kotlin package de.westnordost.streetcomplete.quests.religion enum class Religion(val osmValue: String) { // sorted by worldwide usages, *minus* country specific ones CHRISTIAN("christian"), MUSLIM("muslim"), BUDDHIST("buddhist"), HINDU("hindu"), JEWISH("jewish"), // difficult to get the numbers on this, as they are counted alternating as buddhists, // taoists, confucianists, not religious or "folk religion" in statistics. See // path_to_url // sorting relatively far up because there are many Chinese expats around the world CHINESE_FOLK("chinese_folk"), // basically the same applies to anything "Animist" because as this is not really one // religion but a kind of belief. This value was added to accommodate for those spirit houses // in Thailand, but really, animism is practiced all over the world ANIMIST("animist"), BAHAI("bahai"), SIKH("sikh"), TAOIST("taoist"), JAIN("jain"), // India SHINTO("shinto"), // Japan CAODAISM("caodaism"), // Vietnam MULTIFAITH("multifaith"), } ```
Kristali (; trans. The Crystals) are a Serbian pop rock band from Belgrade. History 1990s The band was formed in January 1993, by bassist and vocalist Dejan Gvozden and guitarist Željko Markuš, who, having performed blues and rock standards in Belgrade cafes, were joined by drummer Dejan Kostić. By the time the band had written their first hit song "Dva metra" ("Two Meters"), for which the music video was directed by Milutin Petrović, they had already featured a new bassist Milan Popović, thus leaving Gvozden on the vocal position only. The band was further expanded with the arrival of the former Del Arno Band member Nenad Potije on trombone. During the same year, the band had their first recording, the song "O kako si lepa" ("Oh, How Beautiful You Are"), released on the L.V.O. Records various artists compilation Academia vol.1, and the live version of the song, recorded at the Belgrade club Prostor on February 9, 1994, appeared on the 1995 live various artists compilation Groovanje vol. 1.<ref>[http://www.discogs.com/Various-Gruvanje-Live-Vol-1/release/2067097 Groovanje vol. 1 at Discogs]</ref> The debut album Kristali (The Crystals), released by L.V.O. Records in 1994, featured guest appearances by Eyesburn frontman Nemanja Kojić (trombone), Borivoje Borac (saxophone), Vladimir Lešić (percussion), Đorđe Vasović (keyboards) and Dža ili Bu member Aleksadar Mitanovski, who played the guitar solo on the track "Emili" ("Emily"). The album, recorded at the Belgrade Akademija studio from March until June 1994, was produced by Goran Živković "Žika" and Rodoljub Stojanović, and the album cover was designed by Goranka Matić. Through the notable songs "Dva metra" ("Two Meters"), "O kako si lepa", "Znam" ("I Know") and "Osmi dan" ("The Eighth Day"), the latter two being released on a double A-side 7" single, the band promoted pop structured songs up-to-date with the current Britpop trends in Great Britain. Available on compact cassette only, the album was quickly sold out and is today a rarity and a collector's item. The second studio album, Dolina ljubavi (The Valley of Love), released in April 1997 and produced by Igor Borojević, featured guest appearances by Block Out member Aleksandar Balać (bass), Aleksandar Tomić (saxophone), and Rambo Amadeus, who played acoustic guitar on the track "Sad se svega sećam" ("Now I Remember Everything"). The songs "Talasi" ("The Waves"), "Novi dan" ("New Day"), and "Hajde, hajde" ("Come On") followed the same musical patterns found on the debut. The following year, the band recorded the soundtrack for the theatre play Furka, and in 1999, the band appeared on the various artists cover album Korak napred 2 koraka nazad (A Step Forward 2 Steps Backwards), with the cover version of the song "Baby, baby", originally written by Srđan Šaper, and performed by the fictional band VIS Simboli in the Slobodan Šijan 1984 movie Davitelj protiv davitelja (Strangler Versus Strangler). 2000s In 2001, the band released their third studio album Sve što dolazi (All That Is To Come) featuring new members, bassist Aleksandar Šišić and drummer Bojan Dmitrašinović, whereas Gvozden, beside the vocal duties, also became the rhythm guitarist. Ten new songs, all written by Gvozden and Markuš, including the notable "Ustani, kreni" ("Stand Up, Go"), "Menjam se" ("I am Changing") and "Moje srce" ("My Heart"), were produced by Mirko Vukomanović. The following year, the band appeared on two Metropolis Records various artists compilations: the song "Sad se svega sećam" appeared on the Metropolis vol.1, "Ti si sa drugoga sveta" ("You Are From Another World") appeared on Metropolis vol.2. The remix of the song "Ustani, kreni" edited by the electronic band Intruder appeared on the Intruder 2002 album Collector's Item. The recording of the song "Tvoje pismo" ("Your Letter"), recorded at the Dejan Cukić & Spori Ritam Band November 16, 2002 Sava Centar concert, featuring Gvozden and Markuš, was released in 2003 on the Dejan Cukić & Spori Ritam Band live album DC & SRB @ SC by BK Sound. During the same year, the lineup featuring Gvozden, Markuš, bassist Dejan Škopelja, drummer Ratko Ljubičić and keyboardist Ivan Krstić celebrated the tenth anniversary of the band existence at a live performance held at the Belgrade studio VI. The recording of the performance was released on the 2004 live album Live @ studio 6, featuring rearranged versions of the songs recorded during the first decade. During the same year, the band recorded the single "Mesto za nas" ("A Place for Us"), which appeared on the Sivi kamion crvene boje (The Red Colored Grey Truck) movie soundtrack. In 2006, Gvozden appeared on the popular Hello Juice commercial, dressed as a wolf and doing the impersonation of the Three Little Pigs story, and in 2009, Multimedia records reissued the compilation Groovanje devedesete uživo, featuring the live recording of the song "O kako si lepa". During the same year, on April, the lineup Gvozden, Markuš, bassist Marko Orlović and drummer Ernest Džananović recorded the single "Vreme je" ("It Is Time") in order to promote the upcoming album of the same name. The single appeared on the 26th place of the webzine Popboks single of the year 2009 list. 2010s In October 2010, the single "Drvoseča" ("The Woodcutter"), a cover of the Crveni Koralji version of Tim Hardin's "If I Were a Carpenter", from Kristali upcoming album appeared on the 5th place of the Jelen Top 10 list for two weeks. The single remained in the Top 10 for five weeks. "Drvoseča" also appeared on the Žena sa slomljenim nosem (A Broken Nosed Woman) movie soundtrack. In March 2013, Kristali released their fourth studio album, Samo bluz (Only Blues). The album, announced with the title track, was released through PGP-RTS, and was available for free listening at Bandcamp. In June 2014, the band released the single "Divan dan" ("Beautiful Day"), announcing their new studio album. In October 2014, the band celebrated their 20th anniversary with a concert in Belgrade Youth Center. The concert featured guest appearances by the band's former members Milan Popović and Željko Markuš. Legacy In 2006, the song "Osmi dan" was ranked No. 74 on the B92 Top 100 Domestic Songs list. Discography Studio albums Kristali (1994)Dolina ljubavi (1997)Sve što dolazi (2001)Samo bluz (2013) Live albums Live @ Studio 6 (2004) Singles "Znam" / "Osmi dan"' (1994) Other appearances "Kako si lepa" (Academia vol. 1; 1993) "Kako si lepa" (Groovanje vol. 1; 1995) "Baby, baby" (Korak napred 2 koraka nazad; 1999) "Ustani, kreni (Josh samo malo Intruder edit)" (Intruder - Collector's item; 2002) "Kako si lepa" (Groovanje devedesete uživo; 2009) References EX YU ROCK enciklopedija 1960-2006'', Janjatović Petar; External links Kristali at Myspace Kristali at Facebook Kristali at YouTube Kristali at Discogs Kristali at Last.fm Kristali at Rateyourmusic Kristali at B92.fm Serbian rock music groups Serbian pop rock music groups Musical groups from Belgrade Musical groups established in 1993 1993 establishments in Yugoslavia
The Reckoning is a 1908 American silent short drama film directed by D. W. Griffith. It is an adaptation of Robert W. Chambers's 1905 novel. Cast Harry Solter as The Husband Florence Lawrence as The Wife Mack Sennett as The Lover Edward Dillon George Gebhardt as The Bartender Robert Harron as Man in Crowd Arthur V. Johnson as Policeman See also America (1924) References External links 1908 films 1908 drama films 1908 short films Silent American drama films American silent short films American black-and-white films Films based on works by Robert W. Chambers Films directed by D. W. Griffith 1900s American films
Indu Nagaraj is an Indian playback singer who primarily works in Kannada cinema. She is the recipient of a Filmfare Award for the song "Pyarge Aagbittaite" from the film Govindaya Namaha (2012). Life and career She sang for many films which had compositions by Gurukiran, Arjun Janya and V. Harikrishna. In 2012, Indu won the Filmfare Award for Best Female Playback Singer for the song "Pyarge Aagbittaite" from the film Govindaya Namaha. Discography This is a partial list of notable films of Indu Nagaraj. Television References External links Indu Nagaraj songs list Living people Kannada playback singers Women Carnatic singers Carnatic singers Singers from Mysore Kannada people Indian women playback singers Filmfare Awards South winners Women musicians from Karnataka 21st-century Indian singers Year of birth missing (living people) Film musicians from Karnataka 21st-century Indian women singers
```xml import React from 'react'; import { notifyManager, useQueryClient } from '@tanstack/react-query'; /** * Get the state of the dataProvider connection. * * Returns true if a query or a mutation is pending. * * Custom implementation because react-query's useIsFetching and useIsMutating * render each time the number of active queries changes, which is too often. * * @see useIsFetching * @see useIsMutating */ export const useLoading = (): boolean => { const client = useQueryClient(); const mountedRef = React.useRef(false); const isFetchingRef = React.useRef(client.isFetching() > 0); const isMutatingRef = React.useRef(client.isMutating() > 0); const [isLoading, setIsLoading] = React.useState<boolean>( isFetchingRef.current || isMutatingRef.current ); React.useEffect(() => { mountedRef.current = true; const unsubscribeQueryCache = client.getQueryCache().subscribe( notifyManager.batchCalls(() => { if (mountedRef.current) { isFetchingRef.current = client.isFetching() > 0; setIsLoading( isFetchingRef.current || isMutatingRef.current ); } }) ); const unsubscribeMutationCache = client.getMutationCache().subscribe( notifyManager.batchCalls(() => { if (mountedRef.current) { isMutatingRef.current = client.isMutating() > 0; setIsLoading( isFetchingRef.current || isMutatingRef.current ); } }) ); return () => { mountedRef.current = false; unsubscribeQueryCache(); unsubscribeMutationCache(); }; }, [client]); return isLoading; }; ```
```java /* * This program is free software: you can redistribute it and/or modify * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * along with this program. If not, see <path_to_url */ package com.pokegoapi.util; import POGOProtos.Inventory.Item.ItemIdOuterClass; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; /** * Offers methods to get information about pokemon as seen in the pokedex. */ public class PokeDictionary { private static final String POKE_NAMES_BUNDLE = "pokemon_names"; private static final String POKE_DESCRIPTIONS_BUNDLE = "pokemon_descriptions"; private static final String ITEM_NAMES_BUNDLE = "item_names"; /** * An array of all supported locales. */ public static final Locale[] supportedLocales = { Locale.GERMAN, Locale.ENGLISH, new Locale("es"), Locale.FRENCH, Locale.ITALIAN, Locale.JAPANESE, Locale.KOREAN, new Locale("ru"), new Locale("zh", "CN"), new Locale("zh", "HK"), new Locale("zh", "TW"), }; private static ResourceBundle getPokeBundle(String bundleBaseName, Locale locale) throws MissingResourceException { return ResourceBundle.getBundle(bundleBaseName, locale); } /** * Returns the Pokdex Name for a Pokedex ID including known translations. * Fallback to the default locale if names do not exist for the given {@link Locale}. * * @param pokedexId Pokemon index number * @param locale target name locale * @return the Pokemon name in locale * @throws MissingResourceException if can not find a matched Pokemon name for the given pokedex */ public static String getDisplayName(int pokedexId, Locale locale) throws MissingResourceException { return getPokeBundle(POKE_NAMES_BUNDLE, locale).getString(String.valueOf(pokedexId)); } /** * Returns the Pokdex Description for a Pokdex ID including known translations. * Fallback to the default locale if names do not exist for the given {@link Locale}. * * @param pokedexId Pokemon index number * @param locale target name locale * @return the Pokemon description in locale * @throws MissingResourceException if can not find a matched Pokemon description for the given pokedex */ public static String getDisplayDescription(int pokedexId, Locale locale) throws MissingResourceException { return getPokeBundle(POKE_DESCRIPTIONS_BUNDLE, locale).getString(String.valueOf(pokedexId)); } /** * Returns the item name for a given ItemId including known translations. * Fallback to the default locale if names do not exist for the given {@link Locale}. * * @param itemId Item id * @param locale target name locale * @return the item name in locale * @throws MissingResourceException if can not find a matched Pokemon name for the given pokedex */ public static String getDisplayItemName(ItemIdOuterClass.ItemId itemId, Locale locale) throws MissingResourceException { return getPokeBundle(ITEM_NAMES_BUNDLE, locale).getString(String.valueOf(itemId.getNumber())); } /** * Returns translated Pokemon name from ENGLISH locale. * Fallback to the default locale if names do not exist for the given {@link Locale}. * * @param engName pokemon ENGLISH name * @param newLocale the locale you want translate to * @return translated pokemon name * @throws MissingResourceException if can not find a matched Pokemon name for the given pokedex */ public static String translateName(String engName, Locale newLocale) throws MissingResourceException { return getDisplayName(getPokedexFromName(engName), newLocale); } /** * Returns the Pokemon index from the Pokemon name list. * * @param pokeName pokemon name in locale * @param locale the locale on this name * @return pokedex Pokedex Id if a Pokemon with the given pokedex id exists, else -1. * @throws MissingResourceException if can not find a matched Pokemon name for the given pokedex */ public static int getPokedexFromName(String pokeName, Locale locale) throws MissingResourceException { ResourceBundle nameList = getPokeBundle(pokeName, locale); for (String key : nameList.keySet()) { if (nameList.getString(key).equalsIgnoreCase(pokeName)) { return Integer.parseInt(key); } } return -1; } /** * Returns the Pokemon index from the Pokemon name list in ENGLISH. * * @param pokeName the Pokemon ENGLISH name * @return pokedex * @throws MissingResourceException if can not find a matched Pokemon name for the given pokedex */ public static int getPokedexFromName(String pokeName) throws MissingResourceException { return getPokedexFromName(pokeName, Locale.ENGLISH); } } ```
Leong Ka Hang (; born 22 November 1992 in Macau) is a former Macanese professional footballer who played as a striker. Early career Leong Ka Hang broke his arm three times when he was 15, 16 and soon after. The doctor told him to stop playing but he now wears a plastic protective guard on his left arm and has no problems. Leong Ka Hang became the Macau Footballer of the Year aged only 18, then he went to Japan for football training in August 2011 for half a month. Club career Tai Po From 8 September 2014, Leong Ka Hang has a trial with Hong Kong Premier League club Tai Po. Coach Pau Ka Yiu said he has made a good first impression but he will observe him for a little while longer before making a decision. Tai Po FC announced his signing on 6 November. Leong Ka Hang made his debut as a second-half substitute on 22 November 2014, his 22nd birthday, against Sun Pegasus, but he failed to break the deadlock and the match ended 0:0. Pegasus Leong Ka Hang joined Pegasus in the summer of 2016. He began the year as an Asian foreign player but was naturalized in December. Lee Man Following an injury-ridden 2017–18 season, Leong decided to leave Pegasus. On 13 July, he confirmed to a Macanese news outlet that he had signed with Lee Man, a club coached by former Macau manager Chan Hiu Ming. International career In 2009, Leong Ka Hang was called up by Macau for the 2010 AFC U-19 Championship qualification matches held in Thailand. He scored Macau's only goal in the 54th minute in the 5–1 defeat against Korea Republic. He scored 4 goals in the 4–3 victory to Laos and he scored again in the 2–3 defeat to Bangladesh. On 2 July 2011, in the 2014 FIFA World Cup qualifiers, he was called up for Macau national football team to play against Vietnam. In the second-leg, he scored one goal for his team. But Macau still lost to Vietnam 1–13 after two-legs. In February 2011, in the 2012 AFC Challenge Cup qualifying playoff round, Leong Ka Hang scored a goal each away and at home, but Macau lost to Cambodia 4-5 on aggregate after extra time. On 3 October 2011, Leong Ka Hang scored, giving his side the first lead of the game, against Hong Kong national football team in the 2011 Long Teng Cup. But Hong Kong came back to win 5–1. On 8 July 2012, at the 2013 AFC U-22 Championship qualifiers, Leong Ka Hang scored a goal against Australia U22 national football team but Macau lost 3–2. On 14 October 2014, Leong Ka Hang scored one goal to help Macau force a 2–2 draw with visitors Singapore in an international friendly at the football ground of Macau University of Science and Technology. On 15 November 2016, Leong Ka Hang was named the winner of the MVP award during the 2016 AFC Solidarity Cup awards ceremony at Sarawak Stadium. Career statistics International goals Scores and results list Macau's goal tally first. Honours Club Lee Man Hong Kong Sapling Cup: 2018–19 International Macau AFC Solidarity Cup: Runners-Up (2016) Individual AFC Solidarity Cup Most Valuable Player: 2016 Personal life In 15 November 2018, Leong married his girlfriend of four years, Latte Iao Lai San. References External links Leong Ka Hang at HKFA 1992 births Living people Macau men's footballers Macau men's international footballers Hong Kong First Division League players Hong Kong Premier League players C.D. Monte Carlo players Tai Po FC players Lee Man FC players Hong Kong Pegasus FC players Expatriate men's footballers in Hong Kong Men's association football forwards University of Macau alumni
The 2016 Rugby Europe Women’s U18 Sevens Championship was the third edition of the junior sevens tournament. France were hosts and also made their debut. Canada and the United States were invited; Initially, China and Japan were also invited, but withdrew from the competition and were replaced by Andorra and a local club, Romagnat. France won the tournament. Teams Romagnat Pool stages Pool A Pool B Pool C Pool D Finals Shield Bowl Plate Cup Final standings References 2016–17 in European women's rugby union
Atelopus palmatus (common name: Andersson's stubfoot toad) is a species of toad in the family Bufonidae. It is endemic to the Cordillera Oriental of eastern Ecuador and is known from the Napo and Pastaza Provinces at elevations of above sea level. Its type locality is "Rio Pastaza". Description Males measure and females in snout–vent length. Habitat and conservation Its natural habitats are humid montane forests. It is a diurnal species. Males have been observed during the night on dry leaves by a marsh, and during the day between rocks and sand by water. A female has been observed during the day in flooded leaf litter on a swamp. Gravid females carrying about 80 eggs have been found between March and July. It is most threatened by the fungal infectious disease chytridiomycosis which causes dramatic decline and affects other species of its genus. Other threats include habitat loss through agriculture (both crops and livestock), logging, planned mining and wood plantations. References palmatus Amphibians of Ecuador Endemic fauna of Ecuador Amphibians described in 1945 Taxonomy articles created by Polbot Taxa named by Lars Gabriel Andersson
```javascript async function myAction(a, b, c) { // comment 'use strict' 'use server' console.log('a') } export default function Page() { return <Button action={myAction}>Delete</Button> } ```
ThereforeGo Ministries (formerly known as Youth Unlimited, the American Federation of Reformed Young Men's Societies, the Young Calvinist League, and then the Young Calvinist Federation) is a Christian youth ministry for short-term mission trips in the United States and Canada that was formed in September 1919. The organization is a non-denominational ministry that has its roots in the Christian Reformed Church in North America, but partners with other Christian denominations. ThereforeGo is a member of the Evangelical Council for Financial Accountability (ECFA) and Standards of Excellence in Short-Term Mission (SOE). It is one of two youth ministries under the Dynamic Youth Ministries umbrella organization, with the Calvinist Cadet Corps. The non-profit is mainly known for its "SERVE" mission trips for teens, which are 5-7 day trips for middle school and high school age students, which are mostly made up of youth groups from various churches. The volunteers participate in a variety of community service projects in the host church's community. A small sample of these service projects includes that in 1998, the Ellensburg, Washington chapter of the organization spent three days removing graffiti from various parts of the city. In 2014, student teams did various service projects throughout Chicago, Illinois as part of The Chicago Project. In 2016, volunteers painted houses around Sioux City, Iowa. History In August 1950, the organization, which was then called the Young Calvinist Federation (YCF), released a report calling for the institution of educational programs and legislative programmes in order to afford African Americans "rights and opportunities equal to those enjoyed by other members of society." The American Federation of Reformed Young Women's Societies, which was founded in May 1932, merged into the YCF in December 1955. In August 1967, the YCF held an international convention in Edmonton, Alberta. From December 30, 1982, until January 2, 1983, the YCF co-sponsored a conference with members of local churches in Calgary. The name of the organization changed to Youth Unlimited (YU) in 1992 and to ThereforeGo Ministries in 2020. References Anti-racist organizations in North America Calvinist organizations established in the 20th century Christian youth organizations International human rights organizations International organizations based in the Americas Organizations based in North America Youth organizations established in 1919 Christian organizations established in 1919 Religious service organizations Social welfare parachurch organizations
Neolamprologus pectoralis is a species of cichlid endemic to Lake Tanganyika where it is usually found along the lakes southwestern coast in the Democratic Republic of the Congo. This species can reach a length of TL. This species can also be found in the aquarium trade. References Büscher, H. H., 1993. Neolamprologus bifasciatus n. sp.: ein neuer Tanganijkasee-Cichlide (Cichlidae, Lamprologini). D.A.T.Z. 46(6):385–389. pectoralis Taxa named by Heinz Heinrich Büscher Fish described in 1991 Fish of Lake Tanganyika
James Ludovic Lindsay, 26th Earl of Crawford and 9th Earl of Balcarres, KT, FRS, FRAS (28 July 184731 January 1913) was a British astronomer, politician, ornithologist, bibliophile and philatelist. A member of the Royal Society, Crawford was elected president of the Royal Astronomical Society in 1878. He was a prominent Freemason, having been initiated into Isaac Newton University Lodge at the University of Cambridge in 1866. Early life The future Earl was born at Saint-Germain-en-Laye, France on 28 July 1847, the only son of Alexander Lindsay, 25th Earl of Crawford and his wife Margaret. He was asthmatic and spent considerable periods at sea studying the more portable sections of the family library which had been established by his father. Astronomy Crawford was interested in astronomy from an early age. Along with his father, he built up a private observatory at Dun Echt, Aberdeenshire. He employed David Gill to equip the observatory, using the best available technology. Among his achievements, Gill later made the first photograph of the Great Comet of 1882, pioneering astrophotography and the mapping of the heavens. Crawford mounted expeditions to Cadiz in 1870, to observe the eclipse of the sun; India in 1871, to observe the eclipse of the sun; and then to Mauritius in 1874, to observe the transit of Venus. On the latter two expeditions Crawford employed London photographer Henry Davis, who in 1876 was appointed Crawford's personal librarian. Upon hearing of a threat to close down the Edinburgh Royal Observatory, in 1888 Crawford made a donation of astronomical instruments and his books on mathematics and the physical sciences from the Bibliotheca Lindesiana in order that a new observatory could be founded. Thanks to this donation, the new Royal Observatory, Edinburgh was opened on Blackford Hill in 1896. As well as much astronomical equipment, Crawford's observatory included an extensive collection of rare books, part of the Bibliotheca Lindesiana at Haigh Hall, which his father and he had accumulated till it was one of the most impressive private collections in Britain at the time. The Bibliotheca Lindesiana The Bibliotheca Lindesiana (i.e. Lindsayan or Lindsian library) had been planned by the 25th Earl and both he and his eldest son had been instrumental in building it up to such an extent that it was one of the most impressive private collections in Britain at the time, both for its size and for the rarity of some of the materials it contained. Alexander William Lindsay had been a book collector from his schooldays and so he continued. In 1861 he wrote to his son James (then 14 years old) a letter which describes his vision of the Bibliotheca Lindesiana; in 1864 he redrafted and enlarged it while visiting his villa in Tuscany. By now it was 250 pages long and under the name of the "Library Report" it continued to be added to during their lifetimes. He based his plan on the Manuel of J.-Ch. Brunet in which knowledge is divided into five branches: Theology, Jurisprudence, Science and Arts, Belles Lettres, History; to which Alexander added six of his own as paralipomena: Genealogy, Archaeology, Biography, Literary History, Bibliography and Encyclopaedias; and finally a Museum. Features of the collection included reacquired stock from earlier Lindsay collections, manuscripts both eastern and western, and printed books, all chosen for their intellectual and cultural importance. The bulk of the library was kept at Haigh Hall in Lancashire with a part at Balcarres. The Earl issued an extensive catalogue of the library in 1910: Catalogue of the Printed Books Preserved at Haigh Hall, Wigan, 4 vols. folio, Aberdeen University Press, printers. Companion volumes to the catalogue record the royal proclamations and philatelic literature. The cataloguing and organisation of the library was a major task for a team of librarians led by J. P. Edmond. Two catalogues were issued privately in 1895 and 1898, of the Chinese books and manuscripts (by J. P. Edmond) and of the Oriental manuscripts, Arabic, Persian, Turkish (by Michael Kerney). The manuscript collections (including Chinese and Japanese printed books) were sold in 1901 to Enriqueta Augustina Rylands for the John Rylands Library. Other parts of the collections have since been donated to or deposited in national or university libraries, including the National Library of Scotland. In 1946 the deposited collections were distributed to the British Museum, Cambridge University Library, and the John Rylands Library. Changes to these locations were made by later Earls of Crawford; apart from the Crawford family muniments those at the John Rylands Library were removed in 1988. Philately Crawford's philatelic interests grew out of his work in extending the Lindsay family's library. He purchased a large collection of philatelic literature formed by John K. Tiffany of St. Louis, the first president of the American Philatelic Society. Tiffany's was already the world's largest and most complete collection of philatelic literature. He added to this by purchases throughout Europe. He added a codicil to his will bequeathing his philatelic library to the British Museum, of which he was a Trustee. Crawford formed notable collections of the stamps of the Italian States, the United States and Great Britain. The Crawford Medal was established by the Royal Philatelic Society London in Crawford's honour for distinguished contributions to philately. It is awarded annually for "the most valuable and original contribution to the study and knowledge of philately published in book form during the two years preceding the award". The 26th Earl of Crawford by the time of his death in 1913 had amassed the greatest philatelic library of his time. Crawford's name was included as one of the "Fathers of Philately" in 1921. Politics Crawford was elected as a Conservative Member of Parliament for Wigan in 1874, and held the seat until his elevation to the peerage in 1880. Military Crawford had spent a short period as an Ensign in the Grenadier Guards, and after he became MP for Wigan he was appointed one of two lieutenant-colonels of the 4th Lancashire Rifle Volunteer Corps with his brother-in-law Arthur Bootle-Wilbraham, a former Ensign in the Coldstream Guards, as the other. On 10 October 1900 Crawford was appointed Honorary Colonel of the unit, now the 1st Volunteer Battalion, Manchester Regiment. Marriage and children On 22 July 1869, the Earl, who was then Lord Lindsay, married Emily Florence Bootle-Wilbraham (1848–1934), the daughter of Colonel the Hon Edward Bootle-Wilbraham (son of Edward Bootle-Wilbraham, 1st Baron Skelmersdale) and his wife Emily Ramsbottom (daughter of James Ramsbottom, MP, brewer and banker, of Clewer Lodge and Woodside, Windsor, Berkshire) and the sister of Ada Constance Bootle-Wilbraham, wife of Italian politician Onorato Caetani, Duke of Sermoneta and Prince of Teano. Together, James and Emily were the parents of seven children: Lady Evelyn Margaret Lindsay (8 May 1870 – 3 April 1944), married James Francis Mason, only son of James Mason of Eynsham Hall, in 1895. David Alexander Edward Lindsay, 27th Earl of Crawford (10 October 1871 – 8 March 1940), married Constance Lilian Pelly, second daughter and co-heiress of Sir Henry Pelly, 3rd Baronet, MP, and Lady Lilian Charteris (daughter of Francis Charteris, 10th Earl of Wemyss), in 1900. Hon Walter Patrick Lindsay (13 February 1873 – 2 July 1936), married Ruth Henderson, eldest daughter of Isaac Henderson, of Rome, Italy in 1902. They divorced in 1927. Major Hon Robert Hamilton Lindsay (30 March 1874 – 8 December 1911), served as aide-de-camp to the Viceroy of India and married Mary Janet Clarke, a daughter of Hon Sir William Clarke, 1st Baronet and Janet Marian Snodgrass (daughter of Hon Peter Snodgrass) in 1903. The Reverend Hon Edward Reginald Lindsay (15 March 1876 – 17 June 1951), a barrister and later Curate of St Matthew's, Bethnal Green, died unmarried. Rt Hon Sir Ronald Charles Lindsay (3 May 1877 – 21 August 1945), a diplomat who married Martha Cameron, daughter of American Senator J. Donald Cameron. Hon Lionel Lindsay (20 July 1879 – 18 August 1965), married his first cousin, Kathleen Yone Kennedy, daughter of Sir John Gordon Kennedy and Evelyn Adela Bootle-Wilbraham. Lord Crawford died on 31 January 1913. His widow, Emily, Dowager Countess of Crawford, died on 15 January 1934. Through his eldest son, the 27th Earl, he was a grandfather of eight, two sons and six daughters, including David Lindsay, 28th Earl of Crawford, Hon. James Lindsay (MP for Devon North), Lady Mary Lilian Lindsay (wife of Lord Chancellor Reginald Manningham-Buller, 1st Viscount Dilhorne, whose daughter is Baroness Manningham-Buller), and Lady Katharine Constance Lindsay (wife of Sir Godfrey Nicholson, 1st Baronet, and mother of Baroness Nicholson of Winterbourne). Through his son Robert, he was a grandfather of Australian politician Robert Lindsay. Other positions and honours Lindsay received the degree of LL.D. from the University of Edinburgh in 1882, and in the following year was nominated honorary associate of the Royal Prussian Academy of Sciences. He became a trustee of the British Museum and acted for a term as president of the Library Association. He had a strong connection to Wigan, where he was chairman of the Free Library Authority and head of the Wigan Coal Company. In January 1900 he received the Freedom of the borough of Wigan. Crawford was a member of the Council of the Zoological Society of London from 1902. Notes References Further reading Barker, Nicolas (1978) Bibliotheca Lindesiana: the Lives and Collections of Alexander William, 25th Earl of Crawford and 8th Earl of Balcarres, and James Ludovic, 26th Earl of Crawford and 9th Earl of Balcarres. London: for Presentation to the Roxburghe Club, and published by Bernard Quaritch Catalogue of the Crawford Library of Philatelic Literature at the British Library (1991). Edmond, J. P. "Suggestions for the description of books printed between 1501 and 1640"; by John Philip Edmond, Librarian to the Earl of Crawford. Library Association Record; [1902?] Nicoll, M. J. (Michael John), 1880–1925 [https://archive.org/details/threevoyagesofnatu00nico Three Voyages of a Naturalist: being an account of many little- known islands in three oceans visited by the "Valhalla," R.Y.S.; with an introduction by the Earl of Crawford External links Information on the Crawford Collection at "Royal Observatory Website". Retrieved 8 January 2005. "Inventory of the James Ludovic Lindsay collection of French manuscripts, 1767–1863", Rubenstein Library, Duke University. Crawford Collection; English Broadside Ballad Archive, University of California Santa Barbara People from Saint-Germain-en-Laye Crawford, James Ludovic Lindsay, 26th Earl of Crawford Crawford, James Ludovic Lindsay, 26th Earl of Crawford 26 Earls of Balcarres Crawford, James Ludovic Lindsay, 26th Earl of Crawford Lindsay, James Ludovic Lindsay, James Ludovic Crawford, E26 Lindsay, James Ludovic, 26th Earl of Crawford Conservative Party (UK) MPs for English constituencies British book and manuscript collectors Members of the Parliament of the United Kingdom for Wigan Freemasons of the United Grand Lodge of England Trustees of the British Museum James Fathers of philately Presidents of the Royal Astronomical Society Presidents of the Royal Philatelic Society London American Philatelic Society British Freemasons Members of Isaac Newton University Lodge Lancashire and Cheshire Antiquarian Society Alumni of the University of Edinburgh
Mulock Glacier in Antarctica is a heavily crevassed glacier which flows into the Ross Ice Shelf south of the Skelton Glacier in the Ross Dependency, Antarctica. It was named by the New Zealand Antarctic Place-Names Committee in association with Mulock Inlet for Lieutenant George Mulock, Royal Navy, surveyor with the expedition. Further reading Swithinbank, C. (1964), To the Valley Glaciers That Feed the Ross Ice Shelf, The Geographical Journal, 130(1), 32–48. doi:10.2307/1794263 S. BANNISTER, B.L.N. KENNETT, Seismic Activity in the Transantarctic Mountains - Results from a Broadband Array Deployment, Terra Antarctica 2002, 9(1),41-46 IMMEDIATE REPORT OF VICTORIA UNIVERSITY OF WELLINGTON ANTARCTIC EXPEDITION 1989-90: VUWAE 34 MARK W. SEEFELDT AND JOHN J. CASSANO, THOMAS R. PARISH, Dominant Regimes of the Ross Ice Shelf Surface Wind Field during Austral Autumn 2005 , NOVEMBER 2007, PP 1933 – 1955 Richard Levy, David Harwood, Fabio Florindo, Francesca Sangiorgi, Robert Tripati, Hilmar von Eynatten, Edward Gasson, Gerhard Kuhn, Aradhna Tripati, Robert DeConto, Christopher Fielding, Brad Field, Nicholas Golledge, Robert McKay, Timothy Naish, Matthew Olney, David Pollard, Stefan Schouten, Franco Talarico, Sophie Warny, Veronica Willmott, Gary Acton, Kurt Panter, Timothy Paulsen, Marco Taviani, and SMS Science Team, Antarctic ice sheet sensitivity to atmospheric CO2 variations in the early to mid-Miocene, PNAS first published February 22, 2016 https://doi.org/10.1073/pnas.1516030113 References Glaciers of Hillary Coast
```go // Package websockets implements to some extend WebSockets API path_to_url package websockets import ( "context" "crypto/tls" "errors" "fmt" "net" "net/http" "net/url" "strconv" "sync" "time" "github.com/gorilla/websocket" "github.com/grafana/sobek" "github.com/grafana/xk6-websockets/websockets/events" "github.com/mstoykov/k6-taskqueue-lib/taskqueue" "go.k6.io/k6/js/common" "go.k6.io/k6/js/modules" "go.k6.io/k6/metrics" ) // RootModule is the root module for the websockets API type RootModule struct{} // WebSocketsAPI is the k6 extension implementing the websocket API as defined in path_to_url type WebSocketsAPI struct { //nolint:revive vu modules.VU blobConstructor sobek.Value } var _ modules.Module = &RootModule{} // NewModuleInstance returns a new instance of the module func (r *RootModule) NewModuleInstance(vu modules.VU) modules.Instance { return &WebSocketsAPI{ vu: vu, } } // Exports implements the modules.Instance interface's Exports func (r *WebSocketsAPI) Exports() modules.Exports { r.blobConstructor = r.vu.Runtime().ToValue(r.blob) return modules.Exports{ Named: map[string]interface{}{ "WebSocket": r.websocket, "Blob": r.blobConstructor, }, } } // ReadyState is websocket specification's readystate type ReadyState uint8 const ( // CONNECTING is the state while the web socket is connecting CONNECTING ReadyState = iota // OPEN is the state after the websocket is established and before it starts closing OPEN // CLOSING is while the websocket is closing but is *not* closed yet CLOSING // CLOSED is when the websocket is finally closed CLOSED ) type webSocket struct { vu modules.VU blobConstructor sobek.Value url *url.URL conn *websocket.Conn tagsAndMeta *metrics.TagsAndMeta tq *taskqueue.TaskQueue builtinMetrics *metrics.BuiltinMetrics obj *sobek.Object // the object that is given to js to interact with the WebSocket started time.Time done chan struct{} writeQueueCh chan message eventListeners *eventListeners sendPings ping // fields that should be seen by js only be updated on the event loop readyState ReadyState bufferedAmount int binaryType string protocol string extensions []string } type ping struct { counter int timestamps map[string]time.Time } func (r *WebSocketsAPI) websocket(c sobek.ConstructorCall) *sobek.Object { rt := r.vu.Runtime() url, err := parseURL(c.Argument(0)) if err != nil { common.Throw(rt, err) } params, err := buildParams(r.vu.State(), rt, c.Argument(2)) if err != nil { common.Throw(rt, err) } subprocotolsArg := c.Argument(1) if !common.IsNullish(subprocotolsArg) { subprocotolsObj := subprocotolsArg.ToObject(rt) switch { case isString(subprocotolsObj, rt): params.subprocotols = append(params.subprocotols, subprocotolsObj.String()) case isArray(subprocotolsObj, rt): for _, key := range subprocotolsObj.Keys() { params.subprocotols = append(params.subprocotols, subprocotolsObj.Get(key).String()) } } } w := &webSocket{ vu: r.vu, blobConstructor: r.blobConstructor, url: url, tq: taskqueue.New(r.vu.RegisterCallback), readyState: CONNECTING, builtinMetrics: r.vu.State().BuiltinMetrics, done: make(chan struct{}), writeQueueCh: make(chan message), eventListeners: newEventListeners(), obj: rt.NewObject(), tagsAndMeta: params.tagsAndMeta, sendPings: ping{timestamps: make(map[string]time.Time)}, } // Maybe have this after the goroutine below ?!? defineWebsocket(rt, w) go w.establishConnection(params) return w.obj } // parseURL parses the url from the first constructor calls argument or returns an error func parseURL(urlValue sobek.Value) (*url.URL, error) { if urlValue == nil || sobek.IsUndefined(urlValue) { return nil, errors.New("WebSocket requires a url") } // TODO: throw the SyntaxError (path_to_url#dom-websocket-websocket) urlString := urlValue.String() url, err := url.Parse(urlString) if err != nil { return nil, fmt.Errorf("WebSocket requires valid url, but got %q which resulted in %w", urlString, err) } if url.Scheme != "ws" && url.Scheme != "wss" { return nil, fmt.Errorf("WebSocket requires url with scheme ws or wss, but got %q", url.Scheme) } if url.Fragment != "" { return nil, fmt.Errorf("WebSocket requires no url fragment, but got %q", url.Fragment) } return url, nil } const ( arraybufferBinaryType = "arraybuffer" blobBinaryType = "blob" ) // defineWebsocket defines all properties and methods for the WebSocket func defineWebsocket(rt *sobek.Runtime, w *webSocket) { must(rt, w.obj.DefineDataProperty( "addEventListener", rt.ToValue(w.addEventListener), sobek.FLAG_FALSE, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) must(rt, w.obj.DefineDataProperty( "send", rt.ToValue(w.send), sobek.FLAG_FALSE, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) must(rt, w.obj.DefineDataProperty( "ping", rt.ToValue(w.ping), sobek.FLAG_FALSE, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) must(rt, w.obj.DefineDataProperty( "close", rt.ToValue(w.close), sobek.FLAG_FALSE, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) must(rt, w.obj.DefineDataProperty( "url", rt.ToValue(w.url.String()), sobek.FLAG_FALSE, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) must(rt, w.obj.DefineAccessorProperty( // this needs to be with an accessor as we change the value "readyState", rt.ToValue(func() ReadyState { return w.readyState }), nil, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) must(rt, w.obj.DefineAccessorProperty( "bufferedAmount", rt.ToValue(func() sobek.Value { return rt.ToValue(w.bufferedAmount) }), nil, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) must(rt, w.obj.DefineAccessorProperty("extensions", rt.ToValue(func() sobek.Value { return rt.ToValue(w.extensions) }), nil, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) must(rt, w.obj.DefineAccessorProperty( "protocol", rt.ToValue(func() sobek.Value { return rt.ToValue(w.protocol) }), nil, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) must(rt, w.obj.DefineAccessorProperty( "binaryType", rt.ToValue(func() sobek.Value { return rt.ToValue(w.binaryType) }), rt.ToValue(func(s string) error { switch s { case blobBinaryType, arraybufferBinaryType: w.binaryType = s return nil default: return fmt.Errorf(`unknown binaryType %s, the supported ones are "blob" and "arraybuffer"`, s) } }), sobek.FLAG_FALSE, sobek.FLAG_TRUE)) setOn := func(property string, el *eventListener) { if el == nil { // this is generally should not happen, but we're being defensive common.Throw(rt, fmt.Errorf("not supported on-handler '%s'", property)) } must(rt, w.obj.DefineAccessorProperty( property, rt.ToValue(func() sobek.Value { return rt.ToValue(el.getOn) }), rt.ToValue(func(call sobek.FunctionCall) sobek.Value { arg := call.Argument(0) // it's possible to unset handlers by setting them to null if arg == nil || sobek.IsUndefined(arg) || sobek.IsNull(arg) { el.setOn(nil) return nil } fn, isFunc := sobek.AssertFunction(arg) if !isFunc { common.Throw(rt, fmt.Errorf("a value for '%s' should be callable", property)) } el.setOn(func(v sobek.Value) (sobek.Value, error) { return fn(sobek.Undefined(), v) }) return nil }), sobek.FLAG_FALSE, sobek.FLAG_TRUE)) } setOn("onmessage", w.eventListeners.getType(events.MESSAGE)) setOn("onerror", w.eventListeners.getType(events.ERROR)) setOn("onopen", w.eventListeners.getType(events.OPEN)) setOn("onclose", w.eventListeners.getType(events.CLOSE)) setOn("onping", w.eventListeners.getType(events.PING)) setOn("onpong", w.eventListeners.getType(events.PONG)) } type message struct { mtype int // message type consts as defined in gorilla/websocket/conn.go data []byte t time.Time } // documented path_to_url#concept-websocket-establish func (w *webSocket) establishConnection(params *wsParams) { state := w.vu.State() w.started = time.Now() var tlsConfig *tls.Config if state.TLSConfig != nil { tlsConfig = state.TLSConfig.Clone() tlsConfig.NextProtos = []string{"http/1.1"} } // technically we have to do a fetch request here, so ... uh do normal one ;) wsd := websocket.Dialer{ HandshakeTimeout: time.Second * 60, // TODO configurable // Pass a custom net.DialContext function to websocket.Dialer that will substitute // the underlying net.Conn with our own tracked netext.Conn NetDialContext: state.Dialer.DialContext, Proxy: http.ProxyFromEnvironment, TLSClientConfig: tlsConfig, EnableCompression: params.enableCompression, Subprotocols: params.subprocotols, } // this is needed because of how interfaces work and that wsd.Jar is http.Cookiejar if params.cookieJar != nil { wsd.Jar = params.cookieJar } ctx := w.vu.Context() start := time.Now() conn, httpResponse, connErr := wsd.DialContext(ctx, w.url.String(), params.headers) connectionEnd := time.Now() connectionDuration := metrics.D(connectionEnd.Sub(start)) systemTags := state.Options.SystemTags if conn != nil && conn.RemoteAddr() != nil { if ip, _, err := net.SplitHostPort(conn.RemoteAddr().String()); err == nil { w.tagsAndMeta.SetSystemTagOrMetaIfEnabled(systemTags, metrics.TagIP, ip) } } if httpResponse != nil { defer func() { _ = httpResponse.Body.Close() }() w.tagsAndMeta.SetSystemTagOrMetaIfEnabled(systemTags, metrics.TagStatus, strconv.Itoa(httpResponse.StatusCode)) if conn != nil { w.protocol = conn.Subprotocol() } w.extensions = httpResponse.Header.Values("Sec-WebSocket-Extensions") w.tagsAndMeta.SetSystemTagOrMetaIfEnabled(systemTags, metrics.TagSubproto, w.protocol) } w.conn = conn nameTagValue, nameTagManuallySet := params.tagsAndMeta.Tags.Get(metrics.TagName.String()) // After k6 v0.41.0, the `name` and `url` tags have the exact same values: if nameTagManuallySet { w.tagsAndMeta.SetSystemTagOrMetaIfEnabled(systemTags, metrics.TagURL, nameTagValue) } else { w.tagsAndMeta.SetSystemTagOrMetaIfEnabled(systemTags, metrics.TagURL, w.url.String()) w.tagsAndMeta.SetSystemTagOrMetaIfEnabled(systemTags, metrics.TagName, w.url.String()) } w.emitConnectionMetrics(ctx, start, connectionDuration) if connErr != nil { // Pass the error to the user script before exiting immediately w.tq.Queue(func() error { return w.connectionClosedWithError(connErr) }) w.tq.Close() return } go w.loop() w.tq.Queue(func() error { return w.connectionConnected() }) } // emitConnectionMetrics emits the metrics for a websocket connection. func (w *webSocket) emitConnectionMetrics(ctx context.Context, start time.Time, duration float64) { state := w.vu.State() metrics.PushIfNotDone(ctx, state.Samples, metrics.ConnectedSamples{ Samples: []metrics.Sample{ { TimeSeries: metrics.TimeSeries{Metric: state.BuiltinMetrics.WSSessions, Tags: w.tagsAndMeta.Tags}, Time: start, Metadata: w.tagsAndMeta.Metadata, Value: 1, }, { TimeSeries: metrics.TimeSeries{Metric: state.BuiltinMetrics.WSConnecting, Tags: w.tagsAndMeta.Tags}, Time: start, Metadata: w.tagsAndMeta.Metadata, Value: duration, }, }, Tags: w.tagsAndMeta.Tags, Time: start, }) } const writeWait = 10 * time.Second func (w *webSocket) loop() { // Pass ping/pong events through the main control loop pingChan := make(chan string) pongChan := make(chan string) w.conn.SetPingHandler(func(msg string) error { pingChan <- msg; return nil }) w.conn.SetPongHandler(func(pingID string) error { pongChan <- pingID; return nil }) ctx := w.vu.Context() wg := new(sync.WaitGroup) defer func() { metrics.PushIfNotDone(ctx, w.vu.State().Samples, metrics.Sample{ TimeSeries: metrics.TimeSeries{ Metric: w.builtinMetrics.WSSessionDuration, Tags: w.tagsAndMeta.Tags, }, Time: time.Now(), Metadata: w.tagsAndMeta.Metadata, Value: metrics.D(time.Since(w.started)), }) _ = w.conn.Close() wg.Wait() w.tq.Close() }() wg.Add(2) go w.readPump(wg) go w.writePump(wg) ctxDone := ctx.Done() for { select { case <-ctxDone: // VU is shutting down during an interrupt // socket events will not be forwarded to the VU w.queueClose() ctxDone = nil // this is to block this branch and get through w.done case <-w.done: return case pingData := <-pingChan: // Handle pings received from the server // - trigger the `ping` event // - reply with pong (needed when `SetPingHandler` is overwritten) // WriteControl is okay to be concurrent so we don't need to gsend this over writeChannel err := w.conn.WriteControl(websocket.PongMessage, []byte(pingData), time.Now().Add(writeWait)) w.tq.Queue(func() error { if err != nil { return w.callErrorListeners(err) } return w.callEventListeners(events.PING) }) case pingID := <-pongChan: w.tq.Queue(func() error { // Handle pong responses to our pings w.trackPong(pingID) return w.callEventListeners(events.PONG) }) } } } const binarytypeError = `websocket's binaryType hasn't been set to either "blob" or "arraybuffer", ` + `but a binary message has been received. ` + `"blob" is still not the default so the websocket is erroring out` func (w *webSocket) queueMessage(msg *message) { w.tq.Queue(func() error { if w.readyState != OPEN { return nil // TODO maybe still emit } // TODO maybe emit after all the listeners have fired and skip it if defaultPrevent was called?!? metrics.PushIfNotDone(w.vu.Context(), w.vu.State().Samples, metrics.Sample{ TimeSeries: metrics.TimeSeries{ Metric: w.builtinMetrics.WSMessagesReceived, Tags: w.tagsAndMeta.Tags, }, Time: msg.t, Metadata: w.tagsAndMeta.Metadata, Value: 1, }) rt := w.vu.Runtime() ev := w.newEvent(events.MESSAGE, msg.t) if msg.mtype == websocket.BinaryMessage { var data any // Lets error out for a k6 release, at least, when there's no binaryType set. // In the future, we'll use "blob" as default, as per spec: // path_to_url switch w.binaryType { case "": return errors.New(binarytypeError) case blobBinaryType: var err error data, err = rt.New(w.blobConstructor, rt.ToValue([]interface{}{msg.data})) if err != nil { return fmt.Errorf("failed to create Blob: %w", err) } case arraybufferBinaryType: data = rt.NewArrayBuffer(msg.data) default: return fmt.Errorf(`unknown binaryType %s, the supported ones are "blob" and "arraybuffer"`, w.binaryType) } must(rt, ev.DefineDataProperty("data", rt.ToValue(data), sobek.FLAG_FALSE, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) } else { must( rt, ev.DefineDataProperty("data", rt.ToValue(string(msg.data)), sobek.FLAG_FALSE, sobek.FLAG_FALSE, sobek.FLAG_TRUE), ) } must( rt, ev.DefineDataProperty("origin", rt.ToValue(w.url.String()), sobek.FLAG_FALSE, sobek.FLAG_FALSE, sobek.FLAG_TRUE), ) for _, messageListener := range w.eventListeners.all(events.MESSAGE) { if _, err := messageListener(ev); err != nil { _ = w.conn.Close() // TODO log it? _ = w.connectionClosedWithError(err) // TODO log it? return err } } return nil }) } func (w *webSocket) readPump(wg *sync.WaitGroup) { defer wg.Done() for { messageType, data, err := w.conn.ReadMessage() if err == nil { w.queueMessage(&message{ mtype: messageType, data: data, t: time.Now(), }) continue } if !websocket.IsUnexpectedCloseError( err, websocket.CloseNormalClosure, websocket.CloseGoingAway) { // maybe still log it with debug level? err = nil } if err != nil { w.tq.Queue(func() error { _ = w.conn.Close() // TODO fix this return nil }) } w.tq.Queue(func() error { return w.connectionClosedWithError(err) }) return } } func (w *webSocket) writePump(wg *sync.WaitGroup) { defer wg.Done() wg.Add(1) samplesOutput := w.vu.State().Samples ctx := w.vu.Context() writeChannel := make(chan message) go func() { defer wg.Done() for { select { case msg, ok := <-writeChannel: if !ok { return } size := len(msg.data) err := func() error { if msg.mtype != websocket.PingMessage { return w.conn.WriteMessage(msg.mtype, msg.data) } // WriteControl is concurrently okay return w.conn.WriteControl(msg.mtype, msg.data, msg.t.Add(writeWait)) }() if err != nil { w.tq.Queue(func() error { _ = w.conn.Close() // TODO fix closeErr := w.connectionClosedWithError(err) return closeErr }) return } // This from the specification needs to happen like that instead of with // atomics or locks outside of the event loop w.tq.Queue(func() error { w.bufferedAmount -= size return nil }) metrics.PushIfNotDone(ctx, samplesOutput, metrics.Sample{ TimeSeries: metrics.TimeSeries{ Metric: w.builtinMetrics.WSMessagesSent, Tags: w.tagsAndMeta.Tags, }, Time: time.Now(), Metadata: w.tagsAndMeta.Metadata, Value: 1, }) case <-w.done: return } } }() { defer close(writeChannel) queue := make([]message, 0) var wch chan message var msg message for { wch = nil // this way if nothing to read it will just block if len(queue) > 0 { msg = queue[0] wch = writeChannel } select { case msg = <-w.writeQueueCh: queue = append(queue, msg) case wch <- msg: queue = queue[:copy(queue, queue[1:])] case <-w.done: return } } } } func (w *webSocket) send(msg sobek.Value) { w.assertStateOpen() switch o := msg.Export().(type) { case string: w.bufferedAmount += len(o) w.writeQueueCh <- message{ mtype: websocket.TextMessage, data: []byte(o), t: time.Now(), } case *sobek.ArrayBuffer: b := o.Bytes() w.bufferedAmount += len(b) w.writeQueueCh <- message{ mtype: websocket.BinaryMessage, data: b, t: time.Now(), } case sobek.ArrayBuffer: b := o.Bytes() w.bufferedAmount += len(b) w.writeQueueCh <- message{ mtype: websocket.BinaryMessage, data: b, t: time.Now(), } case map[string]interface{}: rt := w.vu.Runtime() obj := msg.ToObject(rt) if !isBlob(obj, w.blobConstructor) { common.Throw(rt, fmt.Errorf("unsupported send type %T", o)) } b := extractBytes(obj, rt) w.bufferedAmount += len(b) w.writeQueueCh <- message{ mtype: websocket.BinaryMessage, data: b, t: time.Now(), } default: common.Throw(w.vu.Runtime(), fmt.Errorf("unsupported send type %T", o)) } } // Ping sends a ping message over the websocket. func (w *webSocket) ping() { w.assertStateOpen() pingID := strconv.Itoa(w.sendPings.counter) w.writeQueueCh <- message{ mtype: websocket.PingMessage, data: []byte(pingID), t: time.Now(), } w.sendPings.timestamps[pingID] = time.Now() w.sendPings.counter++ } func (w *webSocket) trackPong(pingID string) { pongTimestamp := time.Now() pingTimestamp, ok := w.sendPings.timestamps[pingID] if !ok { // We received a pong for a ping we didn't send; ignore // (this shouldn't happen with a compliant server) w.vu.State().Logger.Warnf("received pong for unknown ping ID %s", pingID) return } metrics.PushIfNotDone(w.vu.Context(), w.vu.State().Samples, metrics.Sample{ TimeSeries: metrics.TimeSeries{ Metric: w.builtinMetrics.WSPing, Tags: w.tagsAndMeta.Tags, }, Time: pongTimestamp, Metadata: w.tagsAndMeta.Metadata, Value: metrics.D(pongTimestamp.Sub(pingTimestamp)), }) } // assertStateOpen checks if the websocket is in the OPEN state // otherwise it throws an error (panic) func (w *webSocket) assertStateOpen() { if w.readyState == OPEN { return } // TODO figure out if we should give different error while being closed/closed/connecting common.Throw(w.vu.Runtime(), errors.New("InvalidStateError")) } // TODO support code and reason func (w *webSocket) close(code int, reason string) { if w.readyState == CLOSED || w.readyState == CLOSING { return } w.readyState = CLOSING if code == 0 { code = websocket.CloseNormalClosure } w.writeQueueCh <- message{ mtype: websocket.CloseMessage, data: websocket.FormatCloseMessage(code, reason), t: time.Now(), } } func (w *webSocket) queueClose() { w.tq.Queue(func() error { w.close(websocket.CloseNormalClosure, "") return nil }) } // to be run only on the eventloop // from path_to_url#feedback-from-the-protocol func (w *webSocket) connectionConnected() error { if w.readyState != CONNECTING { return nil } w.readyState = OPEN return w.callOpenListeners(time.Now()) // TODO fix time } // to be run only on the eventloop func (w *webSocket) connectionClosedWithError(err error) error { if w.readyState == CLOSED { return nil } w.readyState = CLOSED close(w.done) if err != nil { if errList := w.callErrorListeners(err); errList != nil { return errList // TODO ... still call the close listeners ?!? } } return w.callEventListeners(events.CLOSE) } // newEvent return an event implementing "implements" path_to_url#event // needs to be called on the event loop // TODO: move to events func (w *webSocket) newEvent(eventType string, t time.Time) *sobek.Object { rt := w.vu.Runtime() o := rt.NewObject() must(rt, o.DefineAccessorProperty("type", rt.ToValue(func() string { return eventType }), nil, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) must(rt, o.DefineAccessorProperty("target", rt.ToValue(func() interface{} { return w.obj }), nil, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) // skip srcElement // skip currentTarget ??!! // skip eventPhase ??!! // skip stopPropagation // skip cancelBubble // skip stopImmediatePropagation // skip a bunch more must(rt, o.DefineAccessorProperty("timestamp", rt.ToValue(func() float64 { return float64(t.UnixNano()) / 1_000_000 // milliseconds as double as per the spec // path_to_url#dom-domhighrestimestamp }), nil, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) return o } func (w *webSocket) callOpenListeners(timestamp time.Time) error { for _, openListener := range w.eventListeners.all(events.OPEN) { if _, err := openListener(w.newEvent(events.OPEN, timestamp)); err != nil { _ = w.conn.Close() // TODO log it? _ = w.connectionClosedWithError(err) // TODO log it? return err } } return nil } func (w *webSocket) callErrorListeners(e error) error { // TODO use the error even thought it is not by the spec rt := w.vu.Runtime() ev := w.newEvent(events.ERROR, time.Now()) must(rt, ev.DefineDataProperty("error", rt.ToValue(e.Error()), sobek.FLAG_FALSE, sobek.FLAG_FALSE, sobek.FLAG_TRUE)) for _, errorListener := range w.eventListeners.all(events.ERROR) { if _, err := errorListener(ev); err != nil { // TODO fix timestamp return err } } return nil } func (w *webSocket) callEventListeners(eventType string) error { for _, listener := range w.eventListeners.all(eventType) { // TODO the event here needs to be different and have an error (figure out it was for the close listeners) if _, err := listener(w.newEvent(eventType, time.Now())); err != nil { // TODO fix timestamp return err } } return nil } func (w *webSocket) addEventListener(event string, handler func(sobek.Value) (sobek.Value, error)) { // TODO support options path_to_url#parameters if handler == nil { common.Throw(w.vu.Runtime(), fmt.Errorf("handler for event type %q isn't a callable function", event)) } if err := w.eventListeners.add(event, handler); err != nil { w.vu.State().Logger.Warnf("can't add event handler: %s", err) } } // TODO add remove listeners ```
Rencurel () is a commune in the Isère department in southeastern France. Population See also Communes of the Isère department Parc naturel régional du Vercors References External links Official site Communes of Isère
```thrift // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // // path_to_url // // Unless required by applicable law or agreed to in writing, // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // specific language governing permissions and limitations namespace cpp impala namespace java org.apache.impala.thrift // NOTE: The definitions in this file are part of the binary format of the Impala query // profiles. They should preserve backwards compatibility and as such some rules apply // when making changes. Please see RuntimeProfile.thrift for more details. // Metric and counter data types. // // WARNING (IMPALA-8236): Adding new values to TUnit and using them in TCounter will break // old decoders of thrift profiles. The workaround is to only use the following units in // anything that is serialised into a TCounter: // UNIT, UNIT_PER_SECOND, CPU_TICKS, BYTES, BYTES_PER_SECOND, TIME_NS, DOUBLE_VALUE enum TUnit { // A dimensionless numerical quantity UNIT = 0 // Rate of a dimensionless numerical quantity UNIT_PER_SECOND = 1 CPU_TICKS = 2 BYTES = 3 BYTES_PER_SECOND = 4 TIME_NS = 5 DOUBLE_VALUE = 6 // No units at all, may not be a numerical quantity NONE = 7 TIME_MS = 8 TIME_S = 9 TIME_US = 10 // 100th of a percent, used to express ratios etc., range from 0 to 10000, pretty // printed as integer percentages from 0 to 100. BASIS_POINTS = 11 } // The kind of value that a metric represents. enum TMetricKind { // May go up or down over time GAUGE = 0 // A strictly increasing value COUNTER = 1 // Fixed; will never change PROPERTY = 2 STATS = 3 SET = 4 HISTOGRAM = 5 } ```
```go package client // import "github.com/docker/docker/client" import ( "bytes" "context" "fmt" "io/ioutil" "net/http" "strings" "testing" "gotest.tools/assert" is "gotest.tools/assert/cmp" ) func TestConfigRemoveUnsupported(t *testing.T) { client := &Client{ version: "1.29", client: &http.Client{}, } err := client.ConfigRemove(context.Background(), "config_id") assert.Check(t, is.Error(err, `"config remove" requires API version 1.30, but the Docker daemon API version is 1.29`)) } func TestConfigRemoveError(t *testing.T) { client := &Client{ version: "1.30", client: newMockClient(errorMock(http.StatusInternalServerError, "Server error")), } err := client.ConfigRemove(context.Background(), "config_id") if err == nil || err.Error() != "Error response from daemon: Server error" { t.Fatalf("expected a Server Error, got %v", err) } } func TestConfigRemove(t *testing.T) { expectedURL := "/v1.30/configs/config_id" client := &Client{ version: "1.30", client: newMockClient(func(req *http.Request) (*http.Response, error) { if !strings.HasPrefix(req.URL.Path, expectedURL) { return nil, fmt.Errorf("Expected URL '%s', got '%s'", expectedURL, req.URL) } if req.Method != "DELETE" { return nil, fmt.Errorf("expected DELETE method, got %s", req.Method) } return &http.Response{ StatusCode: http.StatusOK, Body: ioutil.NopCloser(bytes.NewReader([]byte("body"))), }, nil }), } err := client.ConfigRemove(context.Background(), "config_id") if err != nil { t.Fatal(err) } } ```
```javascript /** * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ 'use strict'; /** * Compute the hyperbolic arccosecant of a number. * * @module @stdlib/math/base/special/acsch * * @example * var acsch = require( '@stdlib/math/base/special/acsch' ); * * var v = acsch( 0.0 ); * // returns Infinity * * v = acsch( -1.0 ); * // returns ~-0.881 * * v = acsch( NaN ); * // returns NaN */ // MODULES // var main = require( './main.js' ); // EXPORTS // module.exports = main; ```
This is a list of films which placed number one at the weekend box office for the year 2019 in Spain. See also List of Spanish films — Spanish films by year References 2019 Spain
```java Sibling Classes Template methods in abstract classes Final object contents are not immutable How and when to use `WeakHashMap` class Fields with Java **Reflection API** ```
```php <?php /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the */ namespace Google\Service\Connectors; class AuthConfig extends \Google\Collection { protected $collection_key = 'additionalVariables'; protected $additionalVariablesType = ConfigVariable::class; protected $additionalVariablesDataType = 'array'; /** * @var string */ public $authType; protected $oauth2ClientCredentialsType = Oauth2ClientCredentials::class; protected $oauth2ClientCredentialsDataType = ''; protected $oauth2JwtBearerType = Oauth2JwtBearer::class; protected $oauth2JwtBearerDataType = ''; protected $sshPublicKeyType = SshPublicKey::class; protected $sshPublicKeyDataType = ''; protected $userPasswordType = UserPassword::class; protected $userPasswordDataType = ''; /** * @param ConfigVariable[] */ public function setAdditionalVariables($additionalVariables) { $this->additionalVariables = $additionalVariables; } /** * @return ConfigVariable[] */ public function getAdditionalVariables() { return $this->additionalVariables; } /** * @param string */ public function setAuthType($authType) { $this->authType = $authType; } /** * @return string */ public function getAuthType() { return $this->authType; } /** * @param Oauth2ClientCredentials */ public function setOauth2ClientCredentials(Oauth2ClientCredentials $oauth2ClientCredentials) { $this->oauth2ClientCredentials = $oauth2ClientCredentials; } /** * @return Oauth2ClientCredentials */ public function getOauth2ClientCredentials() { return $this->oauth2ClientCredentials; } /** * @param Oauth2JwtBearer */ public function setOauth2JwtBearer(Oauth2JwtBearer $oauth2JwtBearer) { $this->oauth2JwtBearer = $oauth2JwtBearer; } /** * @return Oauth2JwtBearer */ public function getOauth2JwtBearer() { return $this->oauth2JwtBearer; } /** * @param SshPublicKey */ public function setSshPublicKey(SshPublicKey $sshPublicKey) { $this->sshPublicKey = $sshPublicKey; } /** * @return SshPublicKey */ public function getSshPublicKey() { return $this->sshPublicKey; } /** * @param UserPassword */ public function setUserPassword(UserPassword $userPassword) { $this->userPassword = $userPassword; } /** * @return UserPassword */ public function getUserPassword() { return $this->userPassword; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(AuthConfig::class, 'Google_Service_Connectors_AuthConfig'); ```
The American Society of Dental Surgeons (ASDS) was the first national dental organization formed in the United States of America. The formation of the ASDS was preceded by the formation of the Society of Dental Surgeons of the City and State of New York when fifteen dentists came together in New York City on December 3, 1834. Six years later, at a meeting at the home of Solyman Brown B.A., M.A., M.D., D.D.S. at 17 Park Place in New York City, on August 10, 1840, Chapin A. Harris in a motion that "resolved that a National Society be formed." was instrumental in its creation. The ASDS remained the only national dental organization from 1840 to 1856, when controversy over the use of dental amalgam led to its demise. It was soon replaced by the American Dental Convention (ADC). Chapin A. Harris was also one of the foremost organizers, serving as its president in 1856–57. In 1859, a year before his death, another national dental organization, the American Dental Association, was established during a meeting in Niagara, New York. Before 1861 dentists were participant in both the ADC and the ADA, which promoted education and research in all aspects of dentistry, including dental materials and remained active throughout the American Civil War (1861—1865). However, during the war, Southern dentists withdrew from the ADC and the ADA and, in 1869, established the Southern Dental Association. The Southern Dental Association subsequently merged with the ADA in 1897 to form the National Dental Association (NDA). The NDA was renamed the American Dental Association (ADA) in 1922. Historical background In the first third of the 19th century, American dentistry was in turmoil. No legal standards or requirements as to the type of training necessary for practitioners existed to protect patients. Even if one had no formal training, let alone any schooling, they could treat patients who had dental and oral diseases."At that time there were only about three hundred trained and scientific dentists in the entire country; the rest were relatively untrained operators, outright quacks, or charlatans". "The public was at their mercy" . In 1833 two natives of England, Edward Crawcour and his nephew Moses Crawcour (incorrectly referred to as "the Crawcour brothers"), brought amalgam to the United States, and in 1844 it was reported that fifty percent of all dental restorations placed in upstate New York consisted of amalgam.[8] However, at that point the use of dental amalgam was declared to be malpractice, and the American Society of Dental Surgeons (ASDS), the only US dental association at the time, forced all of its members to sign a pledge to abstain from using the mercury fillings.[9] This was the beginning of what is known as the first dental amalgam war.[10] The dispute ended in 1856 with the disbanding of the old association. The American Dental Association (ADA) was founded in its place in 1859, which has since then strongly defended dental amalgam from allegations of being too risky from the health standpoint.[11] The ratio of the mercury to the remaining metallic mixture in dental amalgam has not always been 50:50. It was as high as 66:33 in 1930. Relative ratios between the other metals used in dental amalgams has also been highly variable. Conventional (or gamma2)-amalgams have 32% silver and 14% tin, and they are most susceptible to corrosion due to their low copper content. Non-gamma2 dental amalgams have been developed that were, however, found to release higher levels of mercury vapor compared with traditional amalgams. Amalgam is the dental material that has the strongest tendency to create galvanic currents and high electric potentials as it ages. The rate of mercury release with the corrosion is accelerated when the amalgam filling is in contact with old restorations or coupled with gold artifacts present in the mouth. Before 1840 there was not a single school of dentistry anywhere in the world and teaching to practitioners of the trade was based on the preceptoral—or apprenticeship—method. There was no standardized curriculum and what was taught was left to the discretion of the preceptor. Nevertheless, there were several ethical, visionary professionals who had received formal medical training as well as dental training, these professionals undertook to right the situation. Among these, following in the footsteps of Pierre Fauchard the "father of modem dentistry", were some of the profession's immortals, including Chapin A. Harris, Horace H. Hayden, Solyman Brown, and Eleazar Parmly. These professionals would also, following the establishment of the ASDS, be instrumental in opening the first dental school in the world, the Baltimore College of Dental Surgery. The University of Maryland School of Dentistry is the dental school of the University System of Maryland. It was founded as an independent institution, the Baltimore College of Dental Surgery, in 1840 and was the birthplace of the Doctor of Dental Surgery (D.D.S.) degree. It is known as the first dental college in the world.[1][2] It is headquartered at the University of Maryland, Baltimore campus. It is the only dental school in Maryland. See also Amalgam (dentistry) Dentistry Footnotes Dental organizations based in the United States 1840 establishments in New York (state) Organizations established in 1840
Hemizonia congesta, known by the common name hayfield tarweed, is a species of flowering plant in the family Asteraceae, native to western North America. Description Hemizonia congesta is a spindly, thin-stemmed annual herb growing erect to in height. Like other tarweeds the stem and foliage are glandular and have an odor reminiscent of tar. Most of the long, narrow, pointed leaves are located on the lower portion of the stem below the branching flower stalks. The inflorescences are covered in glandular hairs and hold daisy-like flower heads. Each head has a center of yellowish dark-tipped disc florets and a fringe of bright yellow to white ray florets, often with purplish striping on the undersides. The ray florets are toothed or lobed on the tips, with the middle tooth thinner than the others. Subspecies There are many Hemizonia congesta subspecies, which can vary in appearance. They include: Hemizonia congesta subsp. calyculata — Mendocino tarplant Hemizonia congesta subsp. clevelandii Hemizonia congesta subsp. congesta Hemizonia congesta subsp. leucocephala — hayfield tarplant Hemizonia congesta subsp. luzulifolia Hemizonia congesta subsp. tracyi — Tracy's tarplant Distribution and habitat Hemizonia congesta is native to California and Oregon, where it is a common member of the flora of a number of habitats, particularly in grasslands and fields. It is a native plant in the Central Valley (California), and the California Coast Ranges. See also Deinandra — the genus many other Hemizonia species were reclassified within''. References C.Michael Hogan, ed; 2010; Encyclopedia of Life; Hemizonia congesta overview. External links Calflora Database: Hemizonia congesta (Hayfield tarweed) Jepson Manual eFlora (TJM2) treatment: Hemizonia congesta USDA Plants Profile: Hemizonia congesta (Hayfield tarweed) Hemizonia congesta — U.C. Photo gallery Madieae Flora of California Flora of Oregon Natural history of the California chaparral and woodlands Natural history of the California Coast Ranges Natural history of the Central Valley (California) Natural history of the San Francisco Bay Area Taxa named by Augustin Pyramus de Candolle Flora without expected TNC conservation status
Elizabeth Riddell (21 March 1910 – 3 July 1998) was a New Zealand-born Australian poet and journalist. Life Born in Napier, New Zealand, Elizabeth Richmond Riddell came to Australia in 1928 where she worked at Smith's Weekly and won a Walkley Award. She married Edward Neville 'Blue' Greatorex (1901–1964) in Sydney in 1935. The couple did not have children. In 1935 she moved to England and during World War II worked for Ezra Norton at The Daily Mirror, chiefly in New York City. Her first short book of poems, The Untrammelled, was published in 1940. After the war she returned to Australia to continue working as a journalist, and in the 1960s became art critic and feature writer for The Australian. She was the first Walkley Award winner for The Australian, winning in 1968 and 1969 for 'Best Newspaper Feature Story'. In 1986 she was awarded Critic of the Year by the Australian Book Review. Riddell's poetry won the Kenneth Slessor Prize for Poetry in 1992 and the Patrick White Award in 1995. Widowed in 1964, Riddell died in 1998. Bibliography The Untrammelled. Sydney: Viking, 1940. Poems. Sydney: Ure Smith, 1948. Song for a Crowning. W. H. Paling, 1953. Songs with music by G. S. English. Forbears. Sydney: Angus & Robertson, 1961. Country Tune. J. Albert, 1973. Songs with music by G. S. English. From the midnight courtyard. Angus & Robertson, 1989. Selected Poems. Angus & Robertson, 1992. The Difficult Island. Molonglo, 1994. References External links His Day poem The Letter poem Elizabeth Riddell Video interview & transcript 1910 births 1998 deaths Australian art critics New Zealand emigrants to Australia People from Napier, New Zealand Patrick White Award winners ALS Gold Medal winners Australian women art critics Australian women journalists Australian women poets 20th-century Australian women writers 20th-century Australian poets 20th-century Australian journalists
Cynanchum violator is a species of flowering plant in the family Apocynaceae, native to wet tropical areas of Táchira state, Venezuela. A scrambling subshrub, it is so named because it possesses a number of character traits often used to delimitate sections and even genera in related taxa. References violator Endemic flora of Venezuela Plants described in 1953
```go // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !go1.11 // +build !go1.11 package gcimporter import "go/types" func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface { named := make([]*types.Named, len(embeddeds)) for i, e := range embeddeds { var ok bool named[i], ok = e.(*types.Named) if !ok { panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11") } } return types.NewInterface(methods, named) } ```
Diplodira is a monotypic moth genus in the family Erebidae. Its only species, Diplodira jamaicalis, is endemic to Jamaica. Both the genus and the species were first described by William Schaus in 1916. References Moths described in 1916 Herminiinae Endemic fauna of Jamaica Monotypic moth genera
Brunswick stew is a tomato-based stew generally involving local beans, vegetables, and originally small game meat such as squirrel or rabbit, though today often chicken. The exact origin of the stew is disputed. The states of Virginia and Georgia both claim its birth, with Brunswick County in Virginia and the city of Brunswick in Georgia claiming it was developed there. It may have originated earlier in some form in the city of Braunschweig (English: Brunswick) in the Duchy of Brunswick-Lüneburg in today's northern Germany. Ingredients Recipes for Brunswick stew vary greatly, but it is usually a tomato-based stew, containing various types of lima beans (butter beans), corn, okra, and other vegetables, and one or more types of meat. Originally it was small game such as squirrel, rabbit or opossum meat, but chicken is most common today. Eastern North Carolina Brunswick Stew has potatoes, which thicken it considerably. Eastern Virginia Brunswick Stew tends to be thinner, with more tomato flavor. Today chicken and rabbit are more common in Virginia, pork in Georgia, and only in recent years Eastern North Carolina–style pulled pork barbecue may be found there. Squirrel Brunswick stew instructions are found in James Beard's American Cookery. Origin The stew's specific origin is unknown. Brunswick County, Virginia, and the city of Brunswick, Georgia, both named after the German Duchy of Brunswick-Lüneburg, then home to the House of Hanover which ruled the British throne, claim to have created it. A plaque on an old iron pot in Brunswick, Georgia, says the first Brunswick stew was made in it on July 2, 1898, on nearby St. Simons Island. A competing story claims a Virginia state legislator's chef invented the recipe in 1828 on a hunting expedition. Neither claim traces to the origin of those regions. Marjorie Kinnan Rawlings, in her Cross Creek Cookery (1942), wrote that the stew, said to have been one of Queen Victoria's favorites, may have come from Braunschweig, Germany, one of the historic capitals of the Duchy of Brunswick-Lüneburg and traditionally known as "Brunswick" in British English. According to the Virginia Writers Project's guide to Virginia, published in 1941, the stew originated in Brunswick County, Virginia: Native to this county is Brunswick Stew, a flavorous brew first concocted by a group of hunters. One of the party, who had been detailed to stay in the camp as a cook, lazily threw all the supplies into a pot, it is said, and cooked the mixture over a slow fire. When his companions returned, cold and exhausted, they found the concoction a most appetizing dish. The time-honored directions for making this luscious meal are: boil about 9 pounds of game—squirrels are preferred—in 2 gallons of water until tender; add to the rich stock 6 pounds of tomatoes, 1 pound of butter-beans, 6 slices of bacon, 1 red pepper, salt to taste; cook 6 hours and add 6 ears of corn cut from the cob; boil for 8 minutes. See also List of stews References External links A Georgia Brunswick stew recipe Brunswick stew at New Georgia Encyclopedia American stews Cuisine of the Southern United States Brunswick, Georgia Brunswick County, Virginia Rabbit dishes History of American cuisine Wild game dishes Chicken soups Legume dishes Maize dishes Okra dishes North Carolina cuisine Virginia cuisine Culture in Braunschweig