text
stringlengths
2
1.04M
meta
dict
class Matricula(object): def __init__(self,matricula): self.id = matricula.getId() self.id_disciplina = matricula.getId_disciplina() self.id_usuario = matricula.getId_usuario() self.id_turma = matricula.getTurma() self.status = matricula.getStatus()
{ "content_hash": "06e89e7b1b0e6ed1489f3e7f235328da", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 51, "avg_line_length": 37.285714285714285, "alnum_prop": 0.7279693486590039, "repo_name": "AEDA-Solutions/matweb", "id": "39df4fcecbae9b16ac2d44f892db49c85090d72a", "size": "261", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "backend/Models/Matricula/Matricula.py", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "475557" }, { "name": "HTML", "bytes": "12097161" }, { "name": "JavaScript", "bytes": "190487" }, { "name": "PHP", "bytes": "1122" }, { "name": "Python", "bytes": "152996" }, { "name": "Shell", "bytes": "80" } ], "symlink_target": "" }
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Welcome extends DLSM_Controller { function __construct(){ parent::__construct(); } public function index() { echo "Funciona controllador"; //echo $ths->config->item(); echo __BASE_URL.'<br>'; echo __URL_BOOTSTRAP_CSS.'<br>'; echo __URL_BOOTSTRAP_JS.'<br>'; echo __URL_JQUERY.'<br>'; echo __URL_CSS.'<br>'; echo __URL_IMAGES.'<br>'; echo __URL_VIDEOS.'<br>'; echo __URL_FONTAWESOME.'<br>'; //$this->load->view('welcome_message'); } }
{ "content_hash": "8e599748e3b1c0524aa507176b3f71f6", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 63, "avg_line_length": 22.875, "alnum_prop": 0.6065573770491803, "repo_name": "diccionariolsm/diccionario", "id": "d93f41a2a3d9ba5058fd5feb52ddf590fbea3d6a", "size": "549", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "application/controllers/Welcome.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "505" }, { "name": "CSS", "bytes": "186833" }, { "name": "HTML", "bytes": "5633" }, { "name": "JavaScript", "bytes": "451481" }, { "name": "PHP", "bytes": "3253350" } ], "symlink_target": "" }
local ffi = require 'ffi' local find = {} find.__index = find -- default is to get verbose on errors find.verbose=false find.verboseError=true find.verboseFallback=true -- constants to index array tables below local Fwd, BwdFilter, BwdData = 1, 2, 3 -- constants to select algo family, to index algoFamilies local GetFamily, FindFamily, FindExFamily = 1,2,3 local warmupIterations = 0 local Meg = 1024*1024 -- cudnnGetxxx APIs: default, when cudnn.benchmark == false local getAlgos = {'cudnnGetConvolutionForwardAlgorithm', 'cudnnGetConvolutionBackwardFilterAlgorithm', 'cudnnGetConvolutionBackwardDataAlgorithm'} local getWSAlgos = {'cudnnGetConvolutionForwardWorkspaceSize', 'cudnnGetConvolutionBackwardFilterWorkspaceSize', 'cudnnGetConvolutionBackwardDataWorkspaceSize'} -- cudnnFindxxx APIs: default, when cudnn.benchmark == true local findAlgos = {'cudnnFindConvolutionForwardAlgorithm', 'cudnnFindConvolutionBackwardFilterAlgorithm', 'cudnnFindConvolutionBackwardDataAlgorithm'} -- cudnnFindxxxEx APIs: default, when cudnn.benchmark == true and cudnn.useFindEx == true local findExAlgos = {'cudnnFindConvolutionForwardAlgorithmEx', 'cudnnFindConvolutionBackwardFilterAlgorithmEx', 'cudnnFindConvolutionBackwardDataAlgorithmEx'} local algoFamilies = { getAlgos, findAlgos, findExAlgos} local fwdAlgoNames = { "IMPLICIT_GEMM", "IMPLICIT_PRECOMP_GEMM", "GEMM", "DIRECT", "FFT", "FFT_TILING", "WINOGRAD", "WINOGRAD_NONFUSED" } local bwdFilterAlgoNames = { "ALGO_0", "ALGO_1", "FFT", "ALGO_3", "WINOGRAD", "WINOGRAD_NONFUSED" } local bwdDataAlgoNames = { "ALGO_0", "ALGO_1", "FFT", "FFT_TILING", "WINOGRAD", "WINOGRAD_NONFUSED" } local algoNames = {fwdAlgoNames, bwdFilterAlgoNames, bwdDataAlgoNames} local function convDataString(layer) local info = '' if layer.convDescData then local desc = layer.convDescData info = ' convDesc=[mode : ' .. desc.mode .. ' datatype : ' .. desc.dataType .. ']' end return info .. ' hash=' .. layer.autotunerHash end local function verboseCall(layer, f, ...) local status = cudnn.call(f, ...) if (status ~= ffi.C.CUDNN_STATUS_SUCCESS) and (find.verbose or find.verboseError) then print("\n" .. f .. " failed: ", tonumber(status), convDataString(layer)) end return status end find.verboseCall = verboseCall local function checkedCall(layer, f, ...) local status = verboseCall(layer, f, ...) if status ~= ffi.C.CUDNN_STATUS_SUCCESS then local str = ffi.string(cudnn.C.cudnnGetErrorString(status)) error('Error in CuDNN: ' .. str .. ' ('..f..')') end return status end find.checkedCall = checkedCall local function noFallback(layer) if find.verbose or find.verboseFallback then print("\nfind.defaultFallback: verboseCall failed for: ", convDataString(layer)) end return false end local function fallbackWarning(layer, msg) if find.verbose or find.verboseFallback then print("\n *** find.verboseFallback: " .. msg .. "\n *** Falling back to 32-bit math for: " .. convDataString(layer)) print(" *** [ Set cudnn.find.verboseFallback to false to disable this message ] *** ") print(" *** [ Alternatively, you may force CUDNN to always operate on CudaHalfTensors via 32-bit float conversion, in Lua: ] ***\n" .." *** cudnn.configureMath({ ['torch.CudaHalfTensor'] = 'CUDNN_DATA_FLOAT'} ) ***") print(" *** [ Note: result may be faster or slower than native FP16, depending on your GPU and CUDNN operations ] *** ") end end local function defaultFallback(layer, replay) -- read conv descriptor local convDescData = layer.convDescData if convDescData and convDescData.dataType == "CUDNN_DATA_HALF" then fallbackWarning(layer, replay and "16->32 bit fallback replay " or "No native FP16 algo found, will try 32-bit math") -- update our record with fallback value convDescData.dataType = "CUDNN_DATA_FLOAT" -- update the descriptor in CUDNN cudnn.setConvolutionDescriptor(convDescData, layer.convDesc) return true else return false end end -- Find State and Cache (per device) local function initState(id) local finder = {} setmetatable(finder,find) finder.id = id finder:resetAlgorithmCache() finder.iteration = 0 if cutorch.hasHalf then finder.fallback = defaultFallback end return finder end local finders = nil -- this resets algorithm cache for device local function setAlgoFamily() return cudnn.benchmark and (cudnn.useFindEx and FindExFamily or FindFamily) or GetFamily end function find:resetAlgorithmCache() self.calculatedWorkspaceSize = {} self:calculateMaxWorkspaceSize() self.algoFamily = setAlgoFamily() self.autotunerCache = {{}, {}, {}} end function find.reset(warmup) cutorch:synchronizeAll() finders = {} warmupIterations = warmup or 0 end function find.get() local device = cutorch.getDevice() local it = finders[device] if not it then it = initState(device) finders[device] = it end return it end function find:lookup(layer, findAPI_idx) return self.autotunerCache[findAPI_idx][layer.autotunerHash] end -- record algo, memory in cache function find:store(layer, findAPI_idx, cachedAlgo) if warmupIterations==0 then self.autotunerCache[findAPI_idx][layer.autotunerHash] = cachedAlgo end end function find:calculateMaxWorkspaceSize(reserve, fraction) if not reserve or reserve < cudnn.reservedGPUBytes then reserve = cudnn.reservedGPUBytes end local max_fraction = cudnn.maxWorkspaceGPUMemPercent/100 if not fraction or fraction > max_fraction then fraction = max_fraction end local buf, curSize = cudnn.getSharedWorkspace() -- check current usage local freeMemory, totalMemory = cutorch.getMemoryUsage(self.id) local newSize= (freeMemory+curSize-reserve) * fraction self.maxWorkspaceSize = newSize if find.verbose then print("calculateMaxWorkspaceSize Memory: ", freeMemory/Meg, "M free, " , totalMemory/Meg, "M total, " , self.maxWorkspaceSize/Meg, "M Workspace" ) end end function find:setCalculatedWorkspaceSize(greater) local device = cutorch.getDevice() for stream,bytes in pairs (self.calculatedWorkspaceSize) do cudnn.setSharedWorkspaceSize(bytes, greater, device, stream) end end function find:pickAlgoAndCalculateWorkspaceSize(cachedAlgo) local stream = cutorch.getStream() if not self.calculatedWorkspaceSize[stream] then self.calculatedWorkspaceSize[stream] = 0 end if self.calculatedWorkspaceSize[stream] > self.maxWorkspaceSize then self.calculatedWorkspaceSize[stream] = self.maxWorkspaceSize end -- find algo with a size that keeps the sum of stream sizes within ws size for a=1,#cachedAlgo do local algoSize = cachedAlgo[a].memory local delta = algoSize - self.calculatedWorkspaceSize[stream] if delta > 0 then -- check if we still fit local totalWS = 0 for s,sz in pairs(self.calculatedWorkspaceSize) do totalWS = totalWS + sz end if totalWS + delta < self.maxWorkspaceSize then self.calculatedWorkspaceSize[stream] = algoSize return a end else -- keep previously calculated WS size for the stream return a end -- delta end return 0 end function find:reserveBytes(layer) local reserve = cudnn.reservedGPUBytes -- todo: implement layer method returning memory allocation size reserve = reserve + 2*layer.weight:nElement()*layer.weight:elementSize() return reserve end function find:verifyReserveForWeights(layer) local freeMemory, totalMemory = cutorch.getMemoryUsage(self.id) local reserve = self:reserveBytes(layer) if freeMemory < reserve then -- let's make sure we still have space to reallocate our data cudnn.adjustSharedWorkspaceSize(freeMemory - reserve) end end function find:checkIteration(layer, findAPI_idx) if warmupIterations == 0 then return end if not layer.iteration then layer.iteration = {0,0,0} end -- find last iteration local max_iter = 0 for k,v in pairs(layer.iteration) do if v > max_iter then max_iter = v end end if (self.iteration < max_iter and max_iter > 1) then self.iteration = max_iter if find.verbose then print ("CUDNN Find SM: iteration #", self.iteration) end if warmupIterations > 0 then warmupIterations = warmupIterations -1 end end layer.iteration[findAPI_idx] = layer.iteration[findAPI_idx] + 1 end local cachedAlgo local nAlgos = 10 -- pre-allocated parameters for the APIs: Fwd, Bwd and BwdD use all different enums local perfResultsArray = { ffi.new('cudnnConvolutionFwdAlgoPerf_t[?]', nAlgos), ffi.new('cudnnConvolutionBwdFilterAlgoPerf_t[?]', nAlgos), ffi.new('cudnnConvolutionBwdDataAlgoPerf_t[?]', nAlgos) } local numPerfResults = ffi.new('int[1]') local algType = { ffi.new('cudnnConvolutionFwdAlgo_t[?]', 1), ffi.new('cudnnConvolutionBwdFilterAlgo_t[?]', 1), ffi.new('cudnnConvolutionBwdDataAlgo_t[?]', 1)} function find:setupAlgo(layer, findAPI_idx, algSearchMode, params) local retAlgo local cacheHit = '[found in cache]' local useFallback = false -- Check if it's a new iteration, decrement warmup self:checkIteration(layer, findAPI_idx) local curWorkspace, curWorkspaceSize = cudnn.getSharedWorkspace() local validResults = 0 local API = algoFamilies[self.algoFamily][findAPI_idx] local perfResults = perfResultsArray[findAPI_idx] -- try to find algo in the cache first cachedAlgo = self:lookup(layer, findAPI_idx) if cachedAlgo then validResults = #cachedAlgo useFallback = cachedAlgo[1].fallback -- need to replay fallback on cache hit if useFallback then self.fallback(layer, true) end else cacheHit = '' cachedAlgo = {} --algo family might have changed, reset it self.algoFamily = setAlgoFamily() local API = algoFamilies[self.algoFamily][findAPI_idx] if self.algoFamily == FindExFamily then -- clone output tensor local paramstmp = params[7] params[7] = paramstmp:clone() -- temporarily set WS size to the max self:calculateMaxWorkspaceSize() cudnn.setSharedWorkspaceSize(self.maxWorkspaceSize) else if self.algoFamily == FindFamily then -- Find() APIs use free GPU memory to find algo, release our WS bytes cudnn.setSharedWorkspaceSize(0) end end local function callCudnn(layer) local ret = 0 validResults = 0 if not layer.convDesc or not layer.convDesc[0] then error("No convDesc set on layer!") end if self.algoFamily == FindExFamily then -- query temp workspace size local tempWorkspace, tempWorkspaceSize = cudnn.getSharedWorkspace() ret = verboseCall(layer, API, cudnn.getHandle(), params[1], params[2]:data(), params[3], params[4]:data(), layer.convDesc[0], params[6], params[7]:data(), nAlgos, numPerfResults, perfResults, tempWorkspace, tempWorkspaceSize) params[7]=paramstmp else if self.algoFamily == FindFamily then ret = verboseCall(layer, API, cudnn.getHandle(), params[1], params[3], layer.convDesc[0], params[6], nAlgos, numPerfResults, perfResults) else -- GetFamily: emulate findXXX results layout numPerfResults[0]=1 perfResults[0].algo = 0 perfResults[0].memory = 0 perfResults[0].status = 1 local algWorkspaceLimit = layer.workspace_limit or (layer.nInputPlane * layer.kH * layer.kW * layer.weight.elementSize()) ret = cudnn.call(API, cudnn.getHandle(), params[1], params[3], layer.convDesc[0], params[6], algSearchMode, algWorkspaceLimit, algType[findAPI_idx]) if ret ~= 0 then return ret end local retAlgo = algType[findAPI_idx][0] if find.verbose then print(string.format( "\n" .. API .. ": %d (ws limit: %d) mode = %s", tonumber(retAlgo), algWorkspaceLimit, algSearchMode)) end local bufSizeptr = ffi.new("size_t[1]") ret = cudnn.call(getWSAlgos[findAPI_idx], cudnn.getHandle(), params[1], params[3], layer.convDesc[0], params[6], retAlgo, bufSizeptr) local bufSize = tonumber(bufSizeptr[0]) if ret ~= 0 then return ret end if find.verbose then print(string.format( "\n" .. getWSAlgos[findAPI_idx] .. ": bufSize: %d, current ws: %d", bufSize, tonumber(curWorkspaceSize))) end perfResults[0].algo = retAlgo perfResults[0].memory = bufSize perfResults[0].status = ret end end if find.verbose then print("\ncallCudnn: ", API, "returned ", numPerfResults[0], " results , status = " , ret, "status[0] = " , perfResults[0].status, "\n") end if ret ~= 0 then return ret end for r=0,numPerfResults[0]-1 do local res = perfResults[r] if res.status == 0 then validResults = validResults+1 cachedAlgo[validResults] = { algo = tonumber(res.algo), memory = tonumber(res.memory), time = tonumber(res.time), status = tonumber(res.status), fallback = useFallback} if find.verbose then local fallback = '' if (useFallback) then fallback = "[FALLBACK]" end print(string.format( "\n" .. API .. " algo[%d]: %s (%d, status: %d), time: %.04f, memory: %8d, count: %d" .. " %s " .. cacheHit .. fallback, validResults, algoNames[findAPI_idx][cachedAlgo[validResults].algo+1], cachedAlgo[validResults].algo, cachedAlgo[validResults].status, cachedAlgo[validResults].time, cachedAlgo[validResults].memory, r, convDataString(layer))) end end end if validResults < 1 then return 1 end return 0 end local function performanceFallback(layer) -- read conv descriptor local convDescData = layer.convDescData if convDescData and convDescData.dataType == "CUDNN_DATA_HALF" then local savedResults = cachedAlgo local savedNum = validResults cachedAlgo = {} validResults = 0 useFallback = true -- update our record with fallback value layer.convDescData.dataType = "CUDNN_DATA_FLOAT" -- update the descriptor in CUDNN cudnn.setConvolutionDescriptor(layer.convDescData, layer.convDesc) -- do the actual call local status = callCudnn(layer) -- check if we got better results with float32 if status == 0 and validResults > 0 and cachedAlgo[1].time < savedResults[1].time then if find.verbose or find.verboseFallback then local msg = string.format("find.performanceFallback: found 32-bit float op is faster (%f) than FP16(%f), memory increase: %fM", cachedAlgo[1].time, savedResults[1].time, (tonumber(cachedAlgo[1].memory)-tonumber(savedResults[1].memory))/Meg) fallbackWarning(layer, msg) end return end -- restore if we didn't cachedAlgo = savedResults validResults = savedNum -- update our record with fallback value layer.convDescData.dataType = "CUDNN_DATA_HALF" -- update the descriptor in CUDNN cudnn.setConvolutionDescriptor(layer.convDescData, layer.convDesc) end end -- do the actual call local status = callCudnn(layer) if status ~= 0 or validResults < 1 then if self.fallback and self.fallback(layer) then useFallback = true status = callCudnn(layer) end -- check again if status ~= 0 or validResults < 1 then error (API .. ' failed, sizes: ' .. convDataString(layer)) end else -- if we are running Find or FindEx in native fp16, check if this algo is actiually faster in pseudo if self.algoFamily ~= GetFamily then performanceFallback(layer) end end self:store(layer, findAPI_idx, cachedAlgo) -- restore WS size if we fiddled with it if self.algoFamily ~= GetFamily then cudnn.setSharedWorkspaceSize(curWorkspaceSize) end end -- this may return different algo if size does not fit retAlgo = self:pickAlgoAndCalculateWorkspaceSize(cachedAlgo) if retAlgo > 0 then self:setCalculatedWorkspaceSize(true) else -- TODO: fallback to recalculate error("No algorithms found that would fit in free GPU memory") return -1 end if cudnn.verbose or find.verbose then local freeMemory, totalMemory = cutorch.getMemoryUsage(self.id) local fallback = "" if (useFallback) then fallback = "[FALLBACK]" end print(string.format( "\n" .. API .. ": %s(%d)[%d of %d] Workspace: %8fM (current ws size %fM, max: %dM free: %dM) %s" .. cacheHit .. fallback, algoNames[findAPI_idx][cachedAlgo[retAlgo].algo+1], cachedAlgo[retAlgo].algo, retAlgo, #cachedAlgo, tonumber(cachedAlgo[retAlgo].memory)/Meg, curWorkspaceSize/Meg, self.maxWorkspaceSize/Meg, freeMemory/Meg, convDataString(layer))) end return cachedAlgo[retAlgo].algo end function find:prepare(layer, input_slice, output_slice) local function shape(x) return table.concat(x:size():totable(),',') end local function vals(x) return table.concat(x,',') end layer.autotunerHash = '-dimA' .. shape(input_slice) ..' -filtA' .. shape(layer.weight) ..' ' .. shape(output_slice) ..' -padA' .. vals(layer.pad) ..' -convStrideA' .. vals(layer.stride) .. ' ' .. cudnn.configmap(torch.type(layer.weight)) layer.iteration = nil layer.input_slice = input_slice layer.output_slice = output_slice end local function setupWS(layer, params, algo, fn) local bufSizeptr = ffi.new("size_t[1]") cudnn.errcheck(getWSAlgos[fn], cudnn.getHandle(), params[1], params[3], layer.convDesc[0], params[6], algo, bufSizeptr) local bufSize = tonumber(bufSizeptr[0]) cudnn.setSharedWorkspaceSize(bufSize, true) end function find:forwardAlgorithm(layer, params) if layer.fmode then setupWS(layer, params, layer.fmode, Fwd) return layer.fmode end local algSearchMode = 'CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT' if layer.fastest_mode or cudnn.fastest == true then algSearchMode = 'CUDNN_CONVOLUTION_FWD_PREFER_FASTEST' end return self:setupAlgo(layer, Fwd, algSearchMode, params) end function find:backwardFilterAlgorithm(layer, params) -- Check if we are in "sticky" mode if layer.bwmode then setupWS(layer, params, layer.bwmode, BwdFilter) return layer.bwmode end local algSearchMode = 'CUDNN_CONVOLUTION_BWD_FILTER_NO_WORKSPACE' if layer.fastest_mode or cudnn.fastest == true then algSearchMode = 'CUDNN_CONVOLUTION_BWD_FILTER_PREFER_FASTEST' end local ret = self:setupAlgo(layer, BwdFilter, algSearchMode, params) return ret end function find:backwardDataAlgorithm(layer, params) -- Check if we are in "sticky" mode if layer.bdmode then setupWS(layer, params, layer.bdmode, BwdData) return layer.bdmode end local algSearchMode = 'CUDNN_CONVOLUTION_BWD_DATA_NO_WORKSPACE' if layer.fastest_mode or cudnn.fastest == true then algSearchMode = 'CUDNN_CONVOLUTION_BWD_DATA_PREFER_FASTEST' end return self:setupAlgo(layer, BwdData, algSearchMode, params) end find.reset() return find
{ "content_hash": "eff35b445ae49ed1624b7853e15f293a", "timestamp": "", "source": "github", "line_count": 590, "max_line_length": 153, "avg_line_length": 38.20508474576271, "alnum_prop": 0.5934075684308593, "repo_name": "soumith/cudnn.torch", "id": "045ed86eba6a671028845e2a7d24004a039312a4", "size": "22541", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "find.lua", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "CMake", "bytes": "7320" }, { "name": "Lua", "bytes": "332929" } ], "symlink_target": "" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>V8 API Reference Guide for node.js v7.7.4: Member List</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">V8 API Reference Guide for node.js v7.7.4 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="classv8_1_1ScriptCompiler.html">ScriptCompiler</a></li><li class="navelem"><a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">StreamedSource</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">v8::ScriptCompiler::StreamedSource Member List</div> </div> </div><!--header--> <div class="contents"> <p>This is the complete list of members for <a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a>, including all inherited members.</p> <table class="directory"> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>Encoding</b> enum name (defined in <a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a>)</td><td class="entry"><a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>GetCachedData</b>() const (defined in <a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a>)</td><td class="entry"><a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>impl</b>() const (defined in <a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a>)</td><td class="entry"><a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>ONE_BYTE</b> enum value (defined in <a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a>)</td><td class="entry"><a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>operator=</b>(const StreamedSource &amp;)=delete (defined in <a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a>)</td><td class="entry"><a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>StreamedSource</b>(ExternalSourceStream *source_stream, Encoding encoding) (defined in <a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a>)</td><td class="entry"><a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>StreamedSource</b>(const StreamedSource &amp;)=delete (defined in <a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a>)</td><td class="entry"><a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>TWO_BYTE</b> enum value (defined in <a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a>)</td><td class="entry"><a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>UTF8</b> enum value (defined in <a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a>)</td><td class="entry"><a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>~StreamedSource</b>() (defined in <a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a>)</td><td class="entry"><a class="el" href="classv8_1_1ScriptCompiler_1_1StreamedSource.html">v8::ScriptCompiler::StreamedSource</a></td><td class="entry"></td></tr> </table></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.11 </small></address> </body> </html>
{ "content_hash": "63c96a0f58b3792da2e808ab7b879ec3", "timestamp": "", "source": "github", "line_count": 116, "max_line_length": 405, "avg_line_length": 71.68103448275862, "alnum_prop": 0.6863499699338544, "repo_name": "v8-dox/v8-dox.github.io", "id": "d0b2113d451c9815786a4fcb6145017361e4ad66", "size": "8315", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ca31986/html/classv8_1_1ScriptCompiler_1_1StreamedSource-members.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
package org.elasticsearch.search.aggregations.metrics; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.util.CollectionUtils; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.aggregations.AggregationTestScriptsPlugin; import org.elasticsearch.search.aggregations.InternalAggregation; import org.elasticsearch.search.aggregations.bucket.filter.Filter; import org.elasticsearch.search.aggregations.bucket.global.Global; import org.elasticsearch.search.aggregations.bucket.histogram.Histogram; import org.elasticsearch.search.aggregations.bucket.histogram.Histogram.Order; import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.search.aggregations.metrics.percentiles.Percentile; import org.elasticsearch.search.aggregations.metrics.percentiles.PercentileRanks; import org.elasticsearch.search.aggregations.metrics.percentiles.PercentileRanksAggregationBuilder; import org.elasticsearch.search.aggregations.metrics.percentiles.PercentilesMethod; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import static java.util.Collections.emptyMap; import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery; import static org.elasticsearch.index.query.QueryBuilders.termQuery; import static org.elasticsearch.search.aggregations.AggregationBuilders.filter; import static org.elasticsearch.search.aggregations.AggregationBuilders.global; import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram; import static org.elasticsearch.search.aggregations.AggregationBuilders.percentileRanks; import static org.elasticsearch.search.aggregations.AggregationBuilders.terms; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThanOrEqualTo; import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.sameInstance; public class TDigestPercentileRanksIT extends AbstractNumericTestCase { @Override protected Collection<Class<? extends Plugin>> nodePlugins() { return Collections.singleton(AggregationTestScriptsPlugin.class); } private static double[] randomPercents(long minValue, long maxValue) { final int length = randomIntBetween(1, 20); final double[] percents = new double[length]; for (int i = 0; i < percents.length; ++i) { switch (randomInt(20)) { case 0: percents[i] = minValue; break; case 1: percents[i] = maxValue; break; default: percents[i] = (randomDouble() * (maxValue - minValue)) + minValue; break; } } Arrays.sort(percents); Loggers.getLogger(TDigestPercentileRanksIT.class).info("Using values={}", Arrays.toString(percents)); return percents; } private static PercentileRanksAggregationBuilder randomCompression(PercentileRanksAggregationBuilder builder) { if (randomBoolean()) { builder.compression(randomIntBetween(20, 120) + randomDouble()); } return builder; } private void assertConsistent(double[] pcts, PercentileRanks values, long minValue, long maxValue) { final List<Percentile> percentileList = CollectionUtils.iterableAsArrayList(values); assertEquals(pcts.length, percentileList.size()); for (int i = 0; i < pcts.length; ++i) { final Percentile percentile = percentileList.get(i); assertThat(percentile.getValue(), equalTo(pcts[i])); assertThat(percentile.getPercent(), greaterThanOrEqualTo(0.0)); assertThat(percentile.getPercent(), lessThanOrEqualTo(100.0)); if (percentile.getPercent() == 0) { assertThat(percentile.getValue(), lessThanOrEqualTo((double) minValue)); } if (percentile.getPercent() == 100) { assertThat(percentile.getValue(), greaterThanOrEqualTo((double) maxValue)); } } for (int i = 1; i < percentileList.size(); ++i) { assertThat(percentileList.get(i).getValue(), greaterThanOrEqualTo(percentileList.get(i - 1).getValue())); } } @Override public void testEmptyAggregation() throws Exception { SearchResponse searchResponse = client().prepareSearch("empty_bucket_idx") .setQuery(matchAllQuery()) .addAggregation(histogram("histo").field("value").interval(1L).minDocCount(0) .subAggregation(randomCompression(percentileRanks("percentile_ranks").field("value")) .values(10, 15))) .execute().actionGet(); assertThat(searchResponse.getHits().getTotalHits(), equalTo(2L)); Histogram histo = searchResponse.getAggregations().get("histo"); assertThat(histo, notNullValue()); Histogram.Bucket bucket = histo.getBuckets().get(1); assertThat(bucket, notNullValue()); PercentileRanks reversePercentiles = bucket.getAggregations().get("percentile_ranks"); assertThat(reversePercentiles, notNullValue()); assertThat(reversePercentiles.getName(), equalTo("percentile_ranks")); assertThat(reversePercentiles.percent(10), equalTo(Double.NaN)); assertThat(reversePercentiles.percent(15), equalTo(Double.NaN)); } @Override public void testUnmapped() throws Exception { SearchResponse searchResponse = client().prepareSearch("idx_unmapped") .setQuery(matchAllQuery()) .addAggregation(randomCompression(percentileRanks("percentile_ranks")) .field("value") .values(0, 10, 15, 100)) .execute().actionGet(); assertThat(searchResponse.getHits().getTotalHits(), equalTo(0L)); PercentileRanks reversePercentiles = searchResponse.getAggregations().get("percentile_ranks"); assertThat(reversePercentiles, notNullValue()); assertThat(reversePercentiles.getName(), equalTo("percentile_ranks")); assertThat(reversePercentiles.percent(0), equalTo(Double.NaN)); assertThat(reversePercentiles.percent(10), equalTo(Double.NaN)); assertThat(reversePercentiles.percent(15), equalTo(Double.NaN)); assertThat(reversePercentiles.percent(100), equalTo(Double.NaN)); } @Override public void testSingleValuedField() throws Exception { final double[] pcts = randomPercents(minValue, maxValue); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation(randomCompression(percentileRanks("percentile_ranks")) .field("value") .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValue, maxValue); } @Override public void testSingleValuedFieldGetProperty() throws Exception { final double[] pcts = randomPercents(minValue, maxValue); SearchResponse searchResponse = client() .prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation( global("global").subAggregation( randomCompression(percentileRanks("percentile_ranks")).field("value").values(pcts))).execute() .actionGet(); assertHitCount(searchResponse, 10); Global global = searchResponse.getAggregations().get("global"); assertThat(global, notNullValue()); assertThat(global.getName(), equalTo("global")); assertThat(global.getDocCount(), equalTo(10L)); assertThat(global.getAggregations(), notNullValue()); assertThat(global.getAggregations().asMap().size(), equalTo(1)); PercentileRanks values = global.getAggregations().get("percentile_ranks"); assertThat(values, notNullValue()); assertThat(values.getName(), equalTo("percentile_ranks")); assertThat(((InternalAggregation)global).getProperty("percentile_ranks"), sameInstance(values)); } public void testSingleValuedFieldOutsideRange() throws Exception { final double[] pcts = new double[] {minValue - 1, maxValue + 1}; SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation(randomCompression(percentileRanks("percentile_ranks")) .field("value") .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValue, maxValue); } @Override public void testSingleValuedFieldPartiallyUnmapped() throws Exception { final double[] pcts = randomPercents(minValue, maxValue); SearchResponse searchResponse = client().prepareSearch("idx", "idx_unmapped") .setQuery(matchAllQuery()) .addAggregation(randomCompression(percentileRanks("percentile_ranks")) .field("value") .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValue, maxValue); } @Override public void testSingleValuedFieldWithValueScript() throws Exception { final double[] pcts = randomPercents(minValue - 1, maxValue - 1); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation( randomCompression( percentileRanks("percentile_ranks")) .field("value") .script(new Script(ScriptType.INLINE, AggregationTestScriptsPlugin.NAME, "_value - 1", emptyMap())) .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValue - 1, maxValue - 1); } @Override public void testSingleValuedFieldWithValueScriptWithParams() throws Exception { Map<String, Object> params = new HashMap<>(); params.put("dec", 1); final double[] pcts = randomPercents(minValue - 1, maxValue - 1); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation( randomCompression( percentileRanks("percentile_ranks")) .field("value") .script(new Script(ScriptType.INLINE, AggregationTestScriptsPlugin.NAME, "_value - dec", params)) .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValue - 1, maxValue - 1); } @Override public void testMultiValuedField() throws Exception { final double[] pcts = randomPercents(minValues, maxValues); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation(randomCompression(percentileRanks("percentile_ranks")) .field("values") .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValues, maxValues); } @Override public void testMultiValuedFieldWithValueScript() throws Exception { final double[] pcts = randomPercents(minValues - 1, maxValues - 1); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation( randomCompression( percentileRanks("percentile_ranks")) .field("values") .script(new Script(ScriptType.INLINE, AggregationTestScriptsPlugin.NAME, "_value - 1", emptyMap())) .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValues - 1, maxValues - 1); } public void testMultiValuedFieldWithValueScriptReverse() throws Exception { final double[] pcts = randomPercents(-maxValues, -minValues); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation( randomCompression( percentileRanks("percentile_ranks")) .field("values") .script(new Script(ScriptType.INLINE, AggregationTestScriptsPlugin.NAME, "_value * -1", emptyMap())) .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, -maxValues, -minValues); } @Override public void testMultiValuedFieldWithValueScriptWithParams() throws Exception { Map<String, Object> params = new HashMap<>(); params.put("dec", 1); final double[] pcts = randomPercents(minValues - 1, maxValues - 1); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation( randomCompression( percentileRanks("percentile_ranks")) .field("values") .script(new Script(ScriptType.INLINE, AggregationTestScriptsPlugin.NAME, "_value - dec", params)) .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValues - 1, maxValues - 1); } @Override public void testScriptSingleValued() throws Exception { final double[] pcts = randomPercents(minValue, maxValue); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation( randomCompression( percentileRanks("percentile_ranks")) .script(new Script(ScriptType.INLINE, AggregationTestScriptsPlugin.NAME, "doc['value'].value", emptyMap())) .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValue, maxValue); } @Override public void testScriptSingleValuedWithParams() throws Exception { Map<String, Object> params = new HashMap<>(); params.put("dec", 1); Script script = new Script(ScriptType.INLINE, AggregationTestScriptsPlugin.NAME, "doc['value'].value - dec", params); final double[] pcts = randomPercents(minValue - 1, maxValue - 1); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation( randomCompression( percentileRanks("percentile_ranks")) .script(script) .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValue - 1, maxValue - 1); } @Override public void testScriptMultiValued() throws Exception { final double[] pcts = randomPercents(minValues, maxValues); Script script = new Script(ScriptType.INLINE, AggregationTestScriptsPlugin.NAME, "doc['values'].values", emptyMap()); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation( randomCompression( percentileRanks("percentile_ranks")) .script(script) .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValues, maxValues); } @Override public void testScriptMultiValuedWithParams() throws Exception { Script script = AggregationTestScriptsPlugin.DECREMENT_ALL_VALUES; final double[] pcts = randomPercents(minValues - 1, maxValues - 1); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation( randomCompression( percentileRanks("percentile_ranks")) .script(script) .values(pcts)) .execute().actionGet(); assertHitCount(searchResponse, 10); final PercentileRanks values = searchResponse.getAggregations().get("percentile_ranks"); assertConsistent(pcts, values, minValues - 1, maxValues - 1); } public void testOrderBySubAggregation() { boolean asc = randomBoolean(); SearchResponse searchResponse = client().prepareSearch("idx") .setQuery(matchAllQuery()) .addAggregation( histogram("histo").field("value").interval(2L) .subAggregation(randomCompression(percentileRanks("percentile_ranks").field("value").values(99))) .order(Order.aggregation("percentile_ranks", "99", asc))) .execute().actionGet(); assertHitCount(searchResponse, 10); Histogram histo = searchResponse.getAggregations().get("histo"); double previous = asc ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY; for (Histogram.Bucket bucket : histo.getBuckets()) { PercentileRanks values = bucket.getAggregations().get("percentile_ranks"); double p99 = values.percent(99); if (asc) { assertThat(p99, greaterThanOrEqualTo(previous)); } else { assertThat(p99, lessThanOrEqualTo(previous)); } previous = p99; } } @Override public void testOrderByEmptyAggregation() throws Exception { SearchResponse searchResponse = client().prepareSearch("idx").setQuery(matchAllQuery()) .addAggregation(terms("terms").field("value").order(Terms.Order.compound(Terms.Order.aggregation("filter>ranks.99", true))) .subAggregation(filter("filter", termQuery("value", 100)) .subAggregation(percentileRanks("ranks").method(PercentilesMethod.TDIGEST).values(99).field("value")))) .get(); assertHitCount(searchResponse, 10); Terms terms = searchResponse.getAggregations().get("terms"); assertThat(terms, notNullValue()); List<Terms.Bucket> buckets = terms.getBuckets(); assertThat(buckets, notNullValue()); assertThat(buckets.size(), equalTo(10)); for (int i = 0; i < 10; i++) { Terms.Bucket bucket = buckets.get(i); assertThat(bucket, notNullValue()); assertThat(bucket.getKeyAsNumber(), equalTo((long) i + 1)); assertThat(bucket.getDocCount(), equalTo(1L)); Filter filter = bucket.getAggregations().get("filter"); assertThat(filter, notNullValue()); assertThat(filter.getDocCount(), equalTo(0L)); PercentileRanks ranks = filter.getAggregations().get("ranks"); assertThat(ranks, notNullValue()); assertThat(ranks.percent(99), equalTo(Double.NaN)); } } /** * Make sure that a request using a script does not get cached and a request * not using a script does get cached. */ public void testDontCacheScripts() throws Exception { assertAcked(prepareCreate("cache_test_idx").addMapping("type", "d", "type=long") .setSettings(Settings.builder().put("requests.cache.enable", true).put("number_of_shards", 1).put("number_of_replicas", 1)) .get()); indexRandom(true, client().prepareIndex("cache_test_idx", "type", "1").setSource("s", 1), client().prepareIndex("cache_test_idx", "type", "2").setSource("s", 2)); // Make sure we are starting with a clear cache assertThat(client().admin().indices().prepareStats("cache_test_idx").setRequestCache(true).get().getTotal().getRequestCache() .getHitCount(), equalTo(0L)); assertThat(client().admin().indices().prepareStats("cache_test_idx").setRequestCache(true).get().getTotal().getRequestCache() .getMissCount(), equalTo(0L)); // Test that a request using a script does not get cached SearchResponse r = client().prepareSearch("cache_test_idx").setSize(0).addAggregation(percentileRanks("foo").field("d").values(50.0) .script(new Script(ScriptType.INLINE, AggregationTestScriptsPlugin.NAME, "_value - 1", emptyMap()))).get(); assertSearchResponse(r); assertThat(client().admin().indices().prepareStats("cache_test_idx").setRequestCache(true).get().getTotal().getRequestCache() .getHitCount(), equalTo(0L)); assertThat(client().admin().indices().prepareStats("cache_test_idx").setRequestCache(true).get().getTotal().getRequestCache() .getMissCount(), equalTo(0L)); // To make sure that the cache is working test that a request not using // a script is cached r = client().prepareSearch("cache_test_idx").setSize(0).addAggregation(percentileRanks("foo").field("d").values(50.0)).get(); assertSearchResponse(r); assertThat(client().admin().indices().prepareStats("cache_test_idx").setRequestCache(true).get().getTotal().getRequestCache() .getHitCount(), equalTo(0L)); assertThat(client().admin().indices().prepareStats("cache_test_idx").setRequestCache(true).get().getTotal().getRequestCache() .getMissCount(), equalTo(1L)); } }
{ "content_hash": "6339d293f0b72ab496bba386163c392a", "timestamp": "", "source": "github", "line_count": 509, "max_line_length": 140, "avg_line_length": 47.88015717092338, "alnum_prop": 0.6312420499774322, "repo_name": "winstonewert/elasticsearch", "id": "057731e275a0834cd93528effc788435435fbc0e", "size": "25159", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "core/src/test/java/org/elasticsearch/search/aggregations/metrics/TDigestPercentileRanksIT.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "11082" }, { "name": "Batchfile", "bytes": "14049" }, { "name": "Emacs Lisp", "bytes": "3341" }, { "name": "FreeMarker", "bytes": "45" }, { "name": "Groovy", "bytes": "315474" }, { "name": "HTML", "bytes": "3399" }, { "name": "Java", "bytes": "40518482" }, { "name": "Perl", "bytes": "7271" }, { "name": "Python", "bytes": "54437" }, { "name": "Shell", "bytes": "112791" } ], "symlink_target": "" }
from . import description from .base import ItemCollector
{ "content_hash": "657104736a6704c1de0844191c5adfbd", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 31, "avg_line_length": 29, "alnum_prop": 0.8275862068965517, "repo_name": "davidfoerster/schema-matching", "id": "1863ebacfd25a2b74bebaf6eb44cd5ad0376dea1", "size": "58", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/schema_matching/collector/__init__.py", "mode": "33188", "license": "mit", "language": [ { "name": "Makefile", "bytes": "719" }, { "name": "Python", "bytes": "74814" } ], "symlink_target": "" }
package com.github.scompo.notifer.app.events.producers; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.time.ZonedDateTime; import com.github.scompo.notifer.api.events.Event; import com.github.scompo.notifer.api.events.producers.AbstractEventProducer; import com.github.scompo.notifer.app.events.EventImpl; public class CommandLineEventProducer extends AbstractEventProducer implements Runnable { private ZonedDateTime readDate() { ZonedDateTime res = null; String str = readString("time: "); int hour = new Integer(str.split(":")[0]); int minute = new Integer(str.split(":")[1]); ZonedDateTime now = ZonedDateTime.now(); res = now.withSecond(0).withHour(hour).withMinute(minute); return res; } private String readName() { String res = null; res = readString("name: "); return res; } private String readString(String string) { System.err.print(string); String readLine = null; try { readLine = new BufferedReader(new InputStreamReader(System.in)).readLine(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); throw new RuntimeException(e); } return readLine; } @Override public void doStart() { run(); } @Override public void run() { System.err.println("commands: exit, add"); String command = readString("command: "); while (!"exit".equalsIgnoreCase(command)) { if ("add".equalsIgnoreCase(command)) { String readName = readName(); ZonedDateTime readDate = readDate(); Event eventFromCmd = new EventImpl(readName, readDate); notifyObservers(eventFromCmd); } command = readString("command: "); } } }
{ "content_hash": "4cddf886d227298e8dc20301104118c8", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 89, "avg_line_length": 21.878048780487806, "alnum_prop": 0.6755852842809364, "repo_name": "scompo/notifier", "id": "d460f914583d6f8a690494cbe172ebaf63d98d1f", "size": "1794", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/github/scompo/notifer/app/events/producers/CommandLineEventProducer.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Java", "bytes": "13398" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_26) on Sat Jun 21 06:31:08 UTC 2014 --> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <TITLE> org.apache.hadoop.metrics2.sink.ganglia Class Hierarchy (Apache Hadoop Main 2.4.1 API) </TITLE> <META NAME="date" CONTENT="2014-06-21"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="org.apache.hadoop.metrics2.sink.ganglia Class Hierarchy (Apache Hadoop Main 2.4.1 API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../../org/apache/hadoop/metrics2/sink/package-tree.html"><B>PREV</B></A>&nbsp; &nbsp;<A HREF="../../../../../../org/apache/hadoop/metrics2/source/package-tree.html"><B>NEXT</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/hadoop/metrics2/sink/ganglia/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> Hierarchy For Package org.apache.hadoop.metrics2.sink.ganglia </H2> </CENTER> <DL> <DT><B>Package Hierarchies:</B><DD><A HREF="../../../../../../overview-tree.html">All Packages</A></DL> <HR> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../../org/apache/hadoop/metrics2/sink/package-tree.html"><B>PREV</B></A>&nbsp; &nbsp;<A HREF="../../../../../../org/apache/hadoop/metrics2/source/package-tree.html"><B>NEXT</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/hadoop/metrics2/sink/ganglia/package-tree.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright &#169; 2014 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved. </BODY> </HTML>
{ "content_hash": "0619a63536a7dee1455775b218d13034", "timestamp": "", "source": "github", "line_count": 147, "max_line_length": 162, "avg_line_length": 42.734693877551024, "alnum_prop": 0.6098376313276027, "repo_name": "devansh2015/hadoop-2.4.1", "id": "cf4fd08101557386ac4821826d93683528aa519b", "size": "6282", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "share/doc/hadoop/api/org/apache/hadoop/metrics2/sink/ganglia/package-tree.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "94903" }, { "name": "C", "bytes": "29267" }, { "name": "C++", "bytes": "16604" }, { "name": "CSS", "bytes": "430608" }, { "name": "HTML", "bytes": "61553856" }, { "name": "JavaScript", "bytes": "15941" }, { "name": "Shell", "bytes": "170866" }, { "name": "XSLT", "bytes": "21772" } ], "symlink_target": "" }
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>AsyncCommand | Quiver-Framework</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">Quiver-Framework</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-externals" checked /> <label class="tsd-widget" for="tsd-filter-externals">Externals</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Globals</a> </li> <li> <a href="asynccommand.html">AsyncCommand</a> </li> </ul> <h1>Class AsyncCommand</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-comment"> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Asynchronous command implementation</p> </div> <dl class="tsd-comment-tags"> <dt>author</dt> <dd><p>Kristaps Peļņa</p> </dd> </dl> </div> </section> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <a href="command.html" class="tsd-signature-type">Command</a> <ul class="tsd-hierarchy"> <li> <span class="target">AsyncCommand</span> <ul class="tsd-hierarchy"> <li> <a href="macrocommand.html" class="tsd-signature-type">MacroCommand</a> </li> </ul> </li> </ul> </li> </ul> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section "> <h3>Methods</h3> <ul class="tsd-index-list"> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="asynccommand.html#complete" class="tsd-kind-icon">complete</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="asynccommand.html#execute" class="tsd-kind-icon">execute</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="asynccommand.html#listenoncomplete" class="tsd-kind-icon">listen<wbr>OnComplete</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected"> <a name="complete" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagProtected">Protected</span> complete</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected"> <li class="tsd-signature tsd-kind-icon">complete<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/kristapsPelna/Quiver-Framework/blob/8e9118a/src/commandMap/command/AsyncCommand.ts#L42">src/commandMap/command/AsyncCommand.ts:42</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Should be executed when the command has finished</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"> <a name="execute" class="tsd-anchor"></a> <h3>execute</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"> <li class="tsd-signature tsd-kind-icon">execute<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Overrides <a href="command.html">Command</a>.<a href="command.html#execute">execute</a></p> <ul> <li>Defined in <a href="https://github.com/kristapsPelna/Quiver-Framework/blob/8e9118a/src/commandMap/command/AsyncCommand.ts#L24">src/commandMap/command/AsyncCommand.ts:24</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Invoked as command is executed</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"> <a name="listenoncomplete" class="tsd-anchor"></a> <h3>listen<wbr>OnComplete</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">listen<wbr>OnComplete<span class="tsd-signature-symbol">(</span>listener<span class="tsd-signature-symbol">: </span><a href="../interfaces/eventlistener.html" class="tsd-signature-type">EventListener</a>, scope<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Object</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <ul> <li>Defined in <a href="https://github.com/kristapsPelna/Quiver-Framework/blob/8e9118a/src/commandMap/command/AsyncCommand.ts#L31">src/commandMap/command/AsyncCommand.ts:31</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Provide a listener and optional scope to be called when this command is completed</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>listener: <a href="../interfaces/eventlistener.html" class="tsd-signature-type">EventListener</a></h5> <div class="tsd-comment tsd-typography"> <p>Event listener function</p> </div> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> scope: <span class="tsd-signature-type">Object</span></h5> <div class="tsd-comment tsd-typography"> <p>Scope of the listener function</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Globals</em></a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> </ul> <ul class="current"> <li class="current tsd-kind-class"> <a href="asynccommand.html" class="tsd-kind-icon">Async<wbr>Command</a> <ul> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected"> <a href="asynccommand.html#complete" class="tsd-kind-icon">complete</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"> <a href="asynccommand.html#execute" class="tsd-kind-icon">execute</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class"> <a href="asynccommand.html#listenoncomplete" class="tsd-kind-icon">listen<wbr>OnComplete</a> </li> </ul> </li> </ul> <ul class="after-current"> </ul> </nav> </div> </div> </div> <footer> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li> <li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li> <li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li> <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li> <li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li> <li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li> <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li> <li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li> <li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li> <li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li> <li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li> <li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li> </ul> </div> </div> </footer> <div class="overlay"></div> <script src="../assets/js/main.js"></script> <script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script> </body> </html>
{ "content_hash": "450aa5caa1bd726f37f102bdc74c137c", "timestamp": "", "source": "github", "line_count": 296, "max_line_length": 483, "avg_line_length": 48.33783783783784, "alnum_prop": 0.6440452893486162, "repo_name": "kristapsPelna/Quiver-Framework", "id": "c8006df5a868863555074424985387cc59ee1dca", "size": "14310", "binary": false, "copies": "1", "ref": "refs/heads/dev", "path": "docs/classes/asynccommand.html", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "1362" }, { "name": "TypeScript", "bytes": "172193" } ], "symlink_target": "" }
<?php /** * Created by PhpStorm. * User: kota * Date: 28.04.16 * Time: 1:24 */ namespace JqGridBackend\Exception; class InvalidArgumentException extends \InvalidArgumentException { }
{ "content_hash": "13dee408f4c1720cef21abf0e3c0c9b4", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 64, "avg_line_length": 15.75, "alnum_prop": 0.7195767195767195, "repo_name": "kota-shade/jq-grid-backend", "id": "557706f6ade835649631aadb300a1e0f10417410", "size": "189", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Exception/InvalidArgumentException.php", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "2873" }, { "name": "PHP", "bytes": "46361" } ], "symlink_target": "" }
import pickle, json with open('../data/Reviews.json') as data_file: data = json.load(data_file) with open('../data/dish_search.json') as data_file: data2 = json.load(data_file) def rating_vs_numrev(option): ''' graph_data[rating] = num of reviews - plots rating vs corresponding num of reviews(donut) ''' graph_data = dict() graph_data[1.0], graph_data[1.5], graph_data[2.0], graph_data[2.5], graph_data[3.0], graph_data[3.5],graph_data[4.0], graph_data[4.5], graph_data[5.0] = 0,0,0,0,0,0,0,0,0 #review[0] - text review of a menu item #review[1] - rating of that menu item for values in data.values(): for review in values: graph_data[review[1]] += 1 total_num_of_reviews = sum(graph_data.values()) for key in graph_data.keys(): graph_data[key] = (float(graph_data[key])/total_num_of_reviews)*100 if option == 1: with open('../data/visualizations/rating_vs_numrev.json', 'w') as outfile: json.dump(graph_data, outfile) elif option == 2: return graph_data def rating_vs_avgrevlen(): ''' graph_data[rating] = length of all corresponding reviews - plots rating vs average length of reviews for that rating ''' graph_data = dict() graph_data[1.0], graph_data[1.5], graph_data[2.0], graph_data[2.5], graph_data[3.0], graph_data[3.5],graph_data[4.0], graph_data[4.5], graph_data[5.0] = 0,0,0,0,0,0,0,0,0 for values in data.values(): for review in values: graph_data[review[1]] += len(review[0].split()) numrev = rating_vs_numrev(2) for key in graph_data.keys(): graph_data[key] = graph_data[key] / numrev[key] with open('../data/visualizations/rating_vs_avgrevlen.json', 'w') as outfile: json.dump(graph_data, outfile) def price_vs_popl(option): ''' graph_data[price] = total popl - plots price vs num of reviews(popl) for that price ''' graph_data = dict() for values in data2.values(): key = int(values[0][2]) if key not in graph_data.keys(): graph_data[key] = values[0][4] else: graph_data[key] += values[0][4] if option == 1: with open('../data/visualizations/price_vs_popl.json', 'w') as outfile: json.dump(graph_data,outfile) if option == 2: return graph_data def price_vs_rating(): ''' graph_data[price] = rating - plots price vs average rating given to menu items of that price ''' graph_data = dict() for values in data2.values(): key = int(values[0][2]) if key not in graph_data.keys(): graph_data[key] = round(values[0][3]/values[0][4],2) else: graph_data[key] += round(values[0][3]/values[0][4],2) price_reviews = price_vs_popl(2) for key in graph_data.keys(): graph_data[key] = float(graph_data[key]) / price_reviews[key] with open('../data/visualizations/price_vs_rating.json', 'w') as outfile: json.dump(graph_data,outfile) if __name__ == "__main__": rating_vs_numrev(1) rating_vs_avgrevlen() price_vs_popl(1) price_vs_rating()
{ "content_hash": "c05c07b7484ac72574b7b73987069dcd", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 174, "avg_line_length": 34.77173913043478, "alnum_prop": 0.5939356048765239, "repo_name": "anirudhagar13/Zomato-Food-Review", "id": "6243dc05e988fb449ff9f790f6b9c9c1274734a6", "size": "3199", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "visualize/visualize_2.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "31012" }, { "name": "HTML", "bytes": "14313" }, { "name": "JavaScript", "bytes": "8859" }, { "name": "PHP", "bytes": "1136" }, { "name": "Python", "bytes": "24840" } ], "symlink_target": "" }
/* * Axamit, gc.support@axamit.com */ /** * Sling jobs consumers of the application. * * @author Axamit, gc.support@axamit.com */ @Version("1.0") @Export(optional = "provide:=true") package com.axamit.gc.core.jobs; import aQute.bnd.annotation.Export; import aQute.bnd.annotation.Version;
{ "content_hash": "cd672a4bc38fa660c14de817a31e6950", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 43, "avg_line_length": 19.733333333333334, "alnum_prop": 0.706081081081081, "repo_name": "axamit/gathercontent-aem-integration", "id": "41031f5d712235efc4227788437927f748796b4d", "size": "296", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "core/src/main/java/com/axamit/gc/core/jobs/package-info.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "13559" }, { "name": "HTML", "bytes": "51278" }, { "name": "Java", "bytes": "438192" }, { "name": "JavaScript", "bytes": "182417" } ], "symlink_target": "" }
[![Build Status](https://travis-ci.org/ma-si/zendframework-application.svg?branch=master)](https://travis-ci.org/ma-si/zendframework-application) [![Packagist](https://img.shields.io/packagist/v/aist/zendframework-application.svg)]() [![Code Climate](https://codeclimate.com/github/ma-si/zendframework-application/badges/gpa.svg)](https://codeclimate.com/github/ma-si/aist-insight) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ma-si/zendframework-application/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ma-si/zendframework-application/?branch=master) [![License](https://poser.pugx.org/aist/zendframework-application/license)](https://packagist.org/packages/aist/zendframework-application) ## Introduction This is a simple, skeleton application using the ZF2 MVC layer and module systems. This application is meant to be used as a starting place for those looking to get their feet wet with ZF2. ## Installation using Composer The easiest way to create a new ZF2 project is to use [Composer](https://getcomposer.org/). If you don't have it already installed, then please install as per the [documentation](https://getcomposer.org/doc/00-intro.md). Create your new ZF2 project: ```sh composer create-project -n -sdev aist/zendframework-application path/to/install ``` ### Installation using a tarball with a local Composer If you don't have composer installed globally then another way to create a new ZF2 project is to download the tarball and install it: 1. Download the [tarball](https://github.com/ma-si/zendframework-application/tarball/master), extract it and then install the dependencies with a locally installed Composer: ```sh cd my/project/dir curl -#L https://github.com/zendframework/ZendSkeletonApplication/tarball/master | tar xz --strip-components=1 ``` 2. Download composer into your project directory and install the dependencies: ```sh curl -s https://getcomposer.org/installer | php php composer.phar install ``` If you don't have access to curl, then install Composer into your project as per the [documentation](https://getcomposer.org/doc/00-intro.md). ## Web server setup ### PHP CLI server The simplest way to get started if you are using PHP 5.4 or above is to start the internal PHP cli-server in the root directory: ```sh php -S 0.0.0.0:8080 -t public/ public/index.php ``` This will start the cli-server on port 8080, and bind it to all network interfaces. **Note:** The built-in CLI server is *for development only*. ### Vagrant server This project supports a basic [Vagrant](http://docs.vagrantup.com/v2/getting-started/index.html) configuration with an inline shell provisioner to run the Skeleton Application in a [VirtualBox](https://www.virtualbox.org/wiki/Downloads). 1. Run vagrant up command ```sh vagrant up ``` 2. Visit [http://localhost:8085](http://localhost:8085) in your browser Look in [Vagrantfile](Vagrantfile) for configuration details. ### Apache setup To setup apache, setup a virtual host to point to the public/ directory of the project and you should be ready to go! It should look something like below: ``` <VirtualHost *:80> ServerName zf2-app.dev DocumentRoot /path/to/aist-zendframework-application/public ErrorLog /var/www/aist-zendframework-application/data/logs/error.log CustomLog /var/www/aist-zendframework-application/data/logs/access.log combined <Directory /var/www/aist-zendframework-application/public/> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all <IfModule mod_authz_core.c> Require all granted </IfModule> </Directory> </VirtualHost> ``` ### Nginx setup To setup nginx, open your `/path/to/nginx/nginx.conf` and add an [include directive](http://nginx.org/en/docs/ngx_core_module.html#include) below into `http` block if it does not already exist: ``` http { # ... include sites-enabled/*.conf; } ``` Create a virtual host configuration file for your project under `/path/to/nginx/sites-enabled/zf2-app.localhost.conf` it should look something like below: ``` server { listen 80; server_name zf2-app.localhost; root /path/to/zf2-app/public; location / { index index.php; try_files $uri $uri/ @php; } location @php { # Pass the PHP requests to FastCGI server (php-fpm) on 127.0.0.1:9000 fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME /path/to/zf2-app/public/index.php; include fastcgi_params; } } ``` Restart the nginx, now you should be ready to go!
{ "content_hash": "cf871553083a28c055f17c3c7652af46", "timestamp": "", "source": "github", "line_count": 130, "max_line_length": 202, "avg_line_length": 35.761538461538464, "alnum_prop": 0.7291890729189073, "repo_name": "ma-si/zendframework-application", "id": "f0308ea3d91ddaf852fddd8c160908387413d5f5", "size": "4862", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ApacheConf", "bytes": "711" }, { "name": "CSS", "bytes": "1042" }, { "name": "HTML", "bytes": "13248" }, { "name": "PHP", "bytes": "18729" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8" ?> <!-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Camunda licenses this file to you under the Apache License, Version 2.0; you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="org.camunda.bpm.engine.impl.dmn.entity.repository.DecisionRequirementsDefinitionEntity"> <!-- INSERT --> <insert id="insertDecisionRequirementsDefinition" parameterType="org.camunda.bpm.engine.impl.dmn.entity.repository.DecisionRequirementsDefinitionEntity"> insert into ${prefix}ACT_RE_DECISION_REQ_DEF( ID_, CATEGORY_, NAME_, KEY_, VERSION_, DEPLOYMENT_ID_, RESOURCE_NAME_, DGRM_RESOURCE_NAME_, TENANT_ID_, REV_) values (#{id, jdbcType=VARCHAR}, #{category, jdbcType=VARCHAR}, #{name, jdbcType=VARCHAR}, #{key, jdbcType=VARCHAR}, #{version, jdbcType=INTEGER}, #{deploymentId, jdbcType=VARCHAR}, #{resourceName, jdbcType=VARCHAR}, #{diagramResourceName, jdbcType=VARCHAR}, #{tenantId, jdbcType=VARCHAR}, 1 ) </insert> <!-- UPDATE --> <update id="updateDecisionRequirementsDefinition" parameterType="org.camunda.bpm.engine.impl.dmn.entity.repository.DecisionRequirementsDefinitionEntity"> update ${prefix}ACT_RE_DECISION_REQ_DEF set REV_ = #{revisionNext, jdbcType=INTEGER} where ID_ = #{id, jdbcType=VARCHAR} and REV_ = #{revision, jdbcType=INTEGER} </update> <!-- DELETE --> <delete id="deleteDecisionRequirementsDefinitionsByDeploymentId" parameterType="string"> delete from ${prefix}ACT_RE_DECISION_REQ_DEF where DEPLOYMENT_ID_ = #{deploymentId} </delete> <!-- RESULTMAP --> <resultMap id="decisionRequirementsDefinitionsResultMap" type="org.camunda.bpm.engine.impl.dmn.entity.repository.DecisionRequirementsDefinitionEntity"> <id property="id" column="ID_" jdbcType="VARCHAR" /> <result property="revision" column="REV_" /> <result property="category" column="CATEGORY_" /> <result property="name" column="NAME_" /> <result property="key" column="KEY_" jdbcType="VARCHAR" /> <result property="version" column="VERSION_" jdbcType="INTEGER"/> <result property="deploymentId" column="DEPLOYMENT_ID_" jdbcType="VARCHAR"/> <result property="resourceName" column="RESOURCE_NAME_" jdbcType="VARCHAR"/> <result property="diagramResourceName" column="DGRM_RESOURCE_NAME_" jdbcType="VARCHAR"/> <result property="tenantId" column="TENANT_ID_" jdbcType="VARCHAR"/> </resultMap> <!-- SELECT --> <select id="selectDecisionRequirementsDefinition" parameterType="string" resultMap="decisionRequirementsDefinitionsResultMap"> select * from ${prefix}ACT_RE_DECISION_REQ_DEF where ID_ = #{decisionRequirementsDefinitionId} </select> <select id="selectDecisionRequirementsDefinitionByDeploymentId" parameterType="string" resultMap="decisionRequirementsDefinitionsResultMap"> select * from ${prefix}ACT_RE_DECISION_REQ_DEF where DEPLOYMENT_ID_ = #{parameter} </select> <select id="selectDecisionRequirementsDefinitionByDeploymentAndKey" parameterType="map" resultMap="decisionRequirementsDefinitionsResultMap"> select * from ${prefix}ACT_RE_DECISION_REQ_DEF where DEPLOYMENT_ID_ = #{deploymentId} and KEY_ = #{decisionRequirementsDefinitionKey} </select> <select id="selectLatestDecisionRequirementsDefinitionByKey" parameterType="org.camunda.bpm.engine.impl.db.ListQueryParameterObject" resultMap="decisionRequirementsDefinitionsResultMap"> select * from ${prefix}ACT_RE_DECISION_REQ_DEF d1 inner join (select KEY_, TENANT_ID_, max(VERSION_) as MAX_VERSION from ${prefix}ACT_RE_DECISION_REQ_DEF RES where KEY_ = #{parameter} <include refid="org.camunda.bpm.engine.impl.persistence.entity.TenantEntity.queryTenantCheck" /> group by TENANT_ID_, KEY_) d2 on d1.KEY_ = d2.KEY_ where d1.VERSION_ = d2.MAX_VERSION and (d1.TENANT_ID_ = d2.TENANT_ID_ or (d1.TENANT_ID_ is null and d2.TENANT_ID_ is null)) </select> <select id="selectLatestDecisionRequirementsDefinitionByKeyWithoutTenantId" parameterType="map" resultMap="decisionRequirementsDefinitionsResultMap"> select * from ${prefix}ACT_RE_DECISION_REQ_DEF where KEY_ = #{decisionRequirementsDefinitionKey} and TENANT_ID_ is null and VERSION_ = ( select max(VERSION_) from ${prefix}ACT_RE_DECISION_REQ_DEF where KEY_ = #{decisionRequirementsDefinitionKey} and TENANT_ID_ is null) </select> <select id="selectLatestDecisionRequirementsDefinitionByKeyAndTenantId" parameterType="map" resultMap="decisionRequirementsDefinitionsResultMap"> select * from ${prefix}ACT_RE_DECISION_REQ_DEF RES where KEY_ = #{decisionRequirementsDefinitionKey} and TENANT_ID_ = #{tenantId} and VERSION_ = ( select max(VERSION_) from ${prefix}ACT_RE_DECISION_REQ_DEF where KEY_ = #{decisionRequirementsDefinitionKey} and TENANT_ID_ = #{tenantId}) </select> <select id="selectPreviousDecisionRequirementsDefinitionId" parameterType="map" resultType="string"> select distinct RES.* from ${prefix}ACT_RE_DECISION_REQ_DEF RES where RES.KEY_ = #{key} <if test="tenantId != null"> AND TENANT_ID_ = #{tenantId} </if> <if test="tenantId == null"> AND TENANT_ID_ is null </if> and RES.VERSION_ = ( select MAX(VERSION_) from ${prefix}ACT_RE_DECISION_REQ_DEF where KEY_ = #{key} <if test="tenantId != null"> AND TENANT_ID_ = #{tenantId} </if> <if test="tenantId == null"> AND TENANT_ID_ is null </if> AND VERSION_ &lt; #{version}) </select> <select id="selectDecisionRequirementsDefinitionsByQueryCriteria" parameterType="org.camunda.bpm.engine.impl.dmn.entity.repository.DecisionRequirementsDefinitionQueryImpl" resultMap="decisionRequirementsDefinitionsResultMap"> <include refid="org.camunda.bpm.engine.impl.persistence.entity.Commons.bindOrderBy"/> ${limitBefore} select ${distinct} RES.* ${limitBetween} <include refid="selectDecisionRequirementsDefinitionsByQueryCriteriaSql"/> ${orderBy} ${limitAfter} </select> <select id="selectDecisionRequirementsDefinitionCountByQueryCriteria" parameterType="org.camunda.bpm.engine.impl.dmn.entity.repository.DecisionRequirementsDefinitionQueryImpl" resultType="long"> ${countDistinctBeforeStart} RES.ID_ ${countDistinctBeforeEnd} <include refid="selectDecisionRequirementsDefinitionsByQueryCriteriaSql"/> ${countDistinctAfterEnd} </select> <!-- mysql specific sql --> <select id="selectDecisionRequirementsDefinitionsByQueryCriteria_mysql" parameterType="org.camunda.bpm.engine.impl.dmn.entity.repository.DecisionRequirementsDefinitionQueryImpl" resultMap="decisionRequirementsDefinitionsResultMap"> <include refid="org.camunda.bpm.engine.impl.persistence.entity.Commons.bindOrderBy"/> ${limitBefore} select ${distinct} RES.* ${limitBetween} <include refid="selectDecisionRequirementsDefinitionsByQueryCriteriaSql"/> ${orderBy} ${limitAfter} </select> <select id="selectDecisionRequirementsDefinitionCountByQueryCriteria_mysql" parameterType="org.camunda.bpm.engine.impl.dmn.entity.repository.DecisionRequirementsDefinitionQueryImpl" resultType="long"> ${countDistinctBeforeStart} RES.ID_ ${countDistinctBeforeEnd} <include refid="selectDecisionRequirementsDefinitionsByQueryCriteriaSql"/> ${countDistinctAfterEnd} </select> <sql id="selectDecisionRequirementsDefinitionsByQueryCriteriaSql"> from ${prefix}ACT_RE_DECISION_REQ_DEF RES <if test="latest"> inner join (select KEY_, TENANT_ID_, max(VERSION_) as MAX_VERSION from ${prefix}ACT_RE_DECISION_REQ_DEF <where> <if test="key != null"> KEY_ = #{key} </if> </where> group by TENANT_ID_, KEY_) VER on RES.KEY_ = VER.KEY_ </if> <if test="authCheck.shouldPerformAuthorizatioCheck &amp;&amp; !authCheck.revokeAuthorizationCheckEnabled &amp;&amp; authCheck.authUserId != null"> <include refid="org.camunda.bpm.engine.impl.persistence.entity.AuthorizationEntity.authCheckJoinWithoutOnClause" /> AUTH ON (AUTH.RESOURCE_ID_ ${authJoinStart} RES.ID_ ${authJoinSeparator} RES.KEY_ ${authJoinSeparator} '*' ${authJoinEnd}) </if> <where> <if test="id != null"> RES.ID_ = #{id} </if> <if test="ids != null &amp;&amp; ids.length > 0"> and RES.ID_ in <foreach item="item" index="index" collection="ids" open="(" separator="," close=")"> #{item} </foreach> </if> <if test="category != null"> and RES.CATEGORY_ = #{category} </if> <if test="categoryLike != null"> and RES.CATEGORY_ like #{categoryLike} ESCAPE ${escapeChar} </if> <if test="name != null"> and RES.NAME_ = #{name} </if> <if test="nameLike != null"> and RES.NAME_ like #{nameLike} ESCAPE ${escapeChar} </if> <if test="key != null"> and RES.KEY_ = #{key} </if> <if test="keyLike != null"> and RES.KEY_ like #{keyLike} ESCAPE ${escapeChar} </if> <if test="resourceName != null"> and RES.RESOURCE_NAME_ = #{resourceName} </if> <if test="resourceNameLike != null"> and RES.RESOURCE_NAME_ like #{resourceNameLike} ESCAPE ${escapeChar} </if> <if test="version != null"> and RES.VERSION_ = #{version} </if> <if test="deploymentId != null"> and RES.DEPLOYMENT_ID_ = #{deploymentId} </if> <if test="latest"> and RES.VERSION_ = VER.MAX_VERSION and (RES.TENANT_ID_ = VER.TENANT_ID_ or (RES.TENANT_ID_ is null and VER.TENANT_ID_ is null)) </if> <if test="isTenantIdSet"> <if test="tenantIds != null &amp;&amp; tenantIds.length > 0"> and ( RES.TENANT_ID_ in <foreach item="tenantId" index="index" collection="tenantIds" open="(" separator="," close=")"> #{tenantId} </foreach> <if test="includeDefinitionsWithoutTenantId"> or RES.TENANT_ID_ is null </if> ) </if> <if test="tenantIds == null"> and RES.TENANT_ID_ is null </if> </if> <include refid="org.camunda.bpm.engine.impl.persistence.entity.AuthorizationEntity.queryAuthorizationCheck" /> <include refid="org.camunda.bpm.engine.impl.persistence.entity.TenantEntity.queryTenantCheck" /> </where> </sql> </mapper>
{ "content_hash": "edb9e1a81502e7f35272c0ce47814293", "timestamp": "", "source": "github", "line_count": 279, "max_line_length": 233, "avg_line_length": 41.992831541218635, "alnum_prop": 0.6625128030044384, "repo_name": "camunda/camunda-bpm-platform", "id": "d0365d380b7d7283e45cbd28afd4c6743110c749", "size": "11716", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/DecisionRequirementsDefinition.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "8608" }, { "name": "CSS", "bytes": "5486" }, { "name": "Fluent", "bytes": "3111" }, { "name": "FreeMarker", "bytes": "1443842" }, { "name": "Groovy", "bytes": "1904" }, { "name": "HTML", "bytes": "961289" }, { "name": "Handlebars", "bytes": "759" }, { "name": "Java", "bytes": "44079665" }, { "name": "JavaScript", "bytes": "3064086" }, { "name": "Less", "bytes": "154956" }, { "name": "Python", "bytes": "192" }, { "name": "Ruby", "bytes": "60" }, { "name": "SQLPL", "bytes": "44180" }, { "name": "Shell", "bytes": "11634" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using Gdk; using Gtk; using ICSharpCode.PackageManagement; using MonoDevelop.Ide; using NuGet; namespace MonoDevelop.PackageManagement { [System.ComponentModel.ToolboxItem(true)] public partial class PackagesWidget : Gtk.Bin { PackagesViewModel viewModel; List<PackageSource> packageSources; ListStore packageStore; CellRendererText treeViewColumnTextRenderer; const int PackageViewModelColumn = 2; public PackagesWidget () { this.Build (); this.InitializeTreeView (); } void InitializeTreeView () { packageStore = new ListStore (typeof (Pixbuf), typeof (string), typeof(PackageViewModel)); packagesTreeView.Model = packageStore; packagesTreeView.AppendColumn (CreateTreeViewColumn ()); packagesTreeView.Selection.Changed += PackagesTreeViewSelectionChanged; includePrereleaseCheckButton.Clicked += IncludePrereleaseCheckButtonClicked; AddSearchingMessageToTreeView (); } TreeViewColumn CreateTreeViewColumn () { var column = new TreeViewColumn (); var iconRenderer = new CellRendererPixbuf (); column.PackStart (iconRenderer, false); column.AddAttribute (iconRenderer, "pixbuf", column: 0); treeViewColumnTextRenderer = new CellRendererText (); treeViewColumnTextRenderer.WrapMode = Pango.WrapMode.Word; treeViewColumnTextRenderer.WrapWidth = 250; column.PackStart (treeViewColumnTextRenderer, true); column.AddAttribute (treeViewColumnTextRenderer, "markup", column: 1); return column; } void AddSearchingMessageToTreeView () { packageStore.AppendValues ( ImageService.GetPixbuf (Gtk.Stock.Info, IconSize.LargeToolbar), Mono.Unix.Catalog.GetString ("Searching..."), null); } void PackagesTreeViewSelectionChanged (object sender, EventArgs e) { ShowSelectedPackage (); } void IncludePrereleaseCheckButtonClicked (object sender, EventArgs e) { viewModel.IncludePrerelease = !viewModel.IncludePrerelease; } public void LoadViewModel (PackagesViewModel viewModel) { this.viewModel = viewModel; this.includePrereleaseCheckButton.Visible = viewModel.ShowPrerelease; this.packageSearchHBox.Visible = viewModel.IsSearchable; ClearSelectedPackageInformation (); PopulatePackageSources (); viewModel.PropertyChanged += ViewModelPropertyChanged; this.pagedResultsWidget.LoadPackagesViewModel (viewModel); this.pagedResultsHBox.Visible = viewModel.IsPaged; this.updateAllPackagesButtonBox.Visible = viewModel.IsUpdateAllPackagesEnabled; } List<PackageSource> PackageSources { get { if (packageSources == null) { packageSources = viewModel.PackageSources.ToList (); } return packageSources; } } void PopulatePackageSources () { this.packageSourceComboBox.Visible = viewModel.ShowPackageSources; if (viewModel.ShowPackageSources) { for (int index = 0; index < PackageSources.Count; ++index) { PackageSource packageSource = PackageSources [index]; this.packageSourceComboBox.InsertText (index, packageSource.Name); } this.packageSourceComboBox.Active = GetSelectedPackageSourceIndexFromViewModel (); } } int GetSelectedPackageSourceIndexFromViewModel () { if (viewModel.SelectedPackageSource == null) { return -1; } return PackageSources.IndexOf (viewModel.SelectedPackageSource); } void PackageSourceChanged (object sender, EventArgs e) { viewModel.SelectedPackageSource = GetSelectedPackageSource (); } PackageSource GetSelectedPackageSource () { if (this.packageSourceComboBox.Active == -1) { return null; } return PackageSources [this.packageSourceComboBox.Active]; } void SearchButtonClicked (object sender, EventArgs e) { Search (); } void Search () { viewModel.SearchTerms = this.packageSearchEntry.Text; viewModel.SearchCommand.Execute (null); } void ShowSelectedPackage () { PackageViewModel packageViewModel = GetSelectedPackageViewModel (); if (packageViewModel != null) { ShowPackageInformation (packageViewModel); } else { ClearSelectedPackageInformation (); } } PackageViewModel GetSelectedPackageViewModel () { TreeIter item; if (packagesTreeView.Selection.GetSelected (out item)) { return packageStore.GetValue (item, PackageViewModelColumn) as PackageViewModel; } return null; } void ShowPackageInformation (PackageViewModel packageViewModel) { this.packageVersionTextBox.Text = packageViewModel.Version.ToString (); this.packageCreatedByTextBox.Text = packageViewModel.GetAuthors (); this.packageLastUpdatedTextBox.Text = packageViewModel.GetLastPublishedDisplayText (); this.packageDownloadsTextBox.Text = packageViewModel.GetDownloadCountDisplayText (); this.packageDescriptionTextView.Buffer.Text = packageViewModel.Description; this.packageIdTextBox.Text = packageViewModel.Id; this.packageIdTextBox.Visible = packageViewModel.HasNoGalleryUrl; ShowUri (this.packageIdButton, packageViewModel.GalleryUrl, packageViewModel.Id); ShowUri (this.moreInformationButton, packageViewModel.ProjectUrl); ShowUri (this.viewLicenseTermsButton, packageViewModel.LicenseUrl); this.packageDependenciesListHBox.Visible = packageViewModel.HasDependencies; this.packageDependenciesNoneLabel.Visible = !packageViewModel.HasDependencies; this.packageDependenciesListLabel.Text = packageViewModel.GetPackageDependenciesDisplayText (); EnablePackageActionButtons (packageViewModel); this.packageInfoFrameVBox.Visible = true; this.managePackageButtonBox.Visible = true; } void ClearSelectedPackageInformation () { this.packageInfoFrameVBox.Visible = false; this.managePackageButtonBox.Visible = false; } void ShowUri (HyperlinkWidget hyperlinkWidget, Uri uri, string label) { hyperlinkWidget.Label = label; ShowUri (hyperlinkWidget, uri); } void ShowUri (HyperlinkWidget hyperlinkWidget, Uri uri) { if (uri == null) { hyperlinkWidget.Visible = false; } else { hyperlinkWidget.Visible = true; hyperlinkWidget.Uri = uri.ToString (); } } void EnablePackageActionButtons (PackageViewModel packageViewModel) { this.addPackageButton.Visible = !packageViewModel.IsManaged; this.removePackageButton.Visible = !packageViewModel.IsManaged; this.managePackageButton.Visible = packageViewModel.IsManaged; this.addPackageButton.Sensitive = !packageViewModel.IsAdded; this.removePackageButton.Sensitive = packageViewModel.IsAdded; } void ViewModelPropertyChanged (object sender, PropertyChangedEventArgs e) { this.packageStore.Clear (); if (viewModel.HasError) { AddErrorToTreeView (); } if (viewModel.IsReadingPackages) { AddSearchingMessageToTreeView (); } foreach (PackageViewModel packageViewModel in viewModel.PackageViewModels) { AppendPackageToTreeView (packageViewModel); } this.pagedResultsHBox.Visible = viewModel.IsPaged; this.updateAllPackagesButtonBox.Visible = viewModel.IsUpdateAllPackagesEnabled; } void AddErrorToTreeView () { packageStore.AppendValues ( ImageService.GetPixbuf (Gtk.Stock.DialogError, IconSize.LargeToolbar), viewModel.ErrorMessage, null); } void PackageSearchEntryActivated (object sender, EventArgs e) { Search (); } void AppendPackageToTreeView (PackageViewModel packageViewModel) { packageStore.AppendValues ( ImageService.GetPixbuf ("md-nuget-package", IconSize.Dnd), packageViewModel.GetDisplayTextMarkup (), packageViewModel); } void OnAddPackageButtonClicked (object sender, EventArgs e) { PackageViewModel packageViewModel = GetSelectedPackageViewModel (); packageViewModel.AddPackage (); EnablePackageActionButtons (packageViewModel); } void RemovePackageButtonClicked (object sender, EventArgs e) { PackageViewModel packageViewModel = GetSelectedPackageViewModel (); packageViewModel.RemovePackage (); EnablePackageActionButtons (packageViewModel); } void ManagePackagesButtonClicked (object sender, EventArgs e) { PackageViewModel packageViewModel = GetSelectedPackageViewModel (); packageViewModel.ManagePackage (); } void UpdateAllPackagesButtonClicked (object sender, EventArgs e) { viewModel.UpdateAllPackagesCommand.Execute (null); } protected override void OnDestroyed () { if (viewModel != null) { viewModel.PropertyChanged -= ViewModelPropertyChanged; } base.OnDestroyed (); } } }
{ "content_hash": "db89815fc5e0725df7331aa2dd46602a", "timestamp": "", "source": "github", "line_count": 298, "max_line_length": 98, "avg_line_length": 30.151006711409394, "alnum_prop": 0.7259877573734002, "repo_name": "mrward/monodevelop-nuget-addin", "id": "90756a3990b65aed5edd6a8d0ad3c6fb81a5f7c5", "size": "10218", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement.Gui/PackagesWidget.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "584847" } ], "symlink_target": "" }
# Copyright 2003, 2004, 2005 Infrae # Released under the BSD license (see LICENSE.txt) from __future__ import nested_scopes import urllib2 import base64 from urllib import urlencode from StringIO import StringIO from types import SliceType from lxml import etree import time import codecs from oaipmh import common, metadata, validation, error from oaipmh.datestamp import datestamp_to_datetime, datetime_to_datestamp WAIT_DEFAULT = 120 # two minutes WAIT_MAX = 5 class Error(Exception): pass class BaseClient(common.OAIPMH): def __init__(self, metadata_registry=None): self._metadata_registry = ( metadata_registry or metadata.global_metadata_registry) self._ignore_bad_character_hack = 0 self._day_granularity = False def updateGranularity(self): """Update the granularity setting dependent on that the server says. """ identify = self.identify() granularity = identify.granularity() if granularity == 'YYYY-MM-DD': self._day_granularity = True elif granularity == 'YYYY-MM-DDThh:mm:ssZ': self._day_granularity= False else: raise Error, "Non-standard granularity on server: %s" % granularity def handleVerb(self, verb, kw): # validate kw first validation.validateArguments(verb, kw) # encode datetimes as datestamps from_ = kw.get('from_') if from_ is not None: # turn it into 'from', not 'from_' before doing actual request kw['from'] = datetime_to_datestamp(from_, self._day_granularity) if 'from_' in kw: # always remove it from the kw, no matter whether it be None or not del kw['from_'] until = kw.get('until') if until is not None: kw['until'] = datetime_to_datestamp(until, self._day_granularity) elif 'until' in kw: # until is None but is explicitly in kw, remove it del kw['until'] # now call underlying implementation method_name = verb + '_impl' return getattr(self, method_name)( kw, self.makeRequestErrorHandling(verb=verb, **kw)) def getNamespaces(self): """Get OAI namespaces. """ return {'oai': 'http://www.openarchives.org/OAI/2.0/'} def getMetadataRegistry(self): """Return the metadata registry in use. Do we want to allow the returning of the global registry? """ return self._metadata_registry def ignoreBadCharacters(self, true_or_false): """Set to ignore bad characters in UTF-8 input. This is a hack to get around well-formedness errors of input sources which *should* be in UTF-8 but for some reason aren't completely. """ self._ignore_bad_character_hack = true_or_false def parse(self, xml): """Parse the XML to a lxml tree. """ # XXX this is only safe for UTF-8 encoded content, # and we're basically hacking around non-wellformedness anyway, # but oh well if self._ignore_bad_character_hack: xml = unicode(xml, 'UTF-8', 'replace') # also get rid of character code 12 xml = xml.replace(chr(12), '?') xml = xml.encode('UTF-8') return etree.XML(xml) # implementation of the various methods, delegated here by # handleVerb method def GetRecord_impl(self, args, tree): records, token = self.buildRecords( args['metadataPrefix'], self.getNamespaces(), self._metadata_registry, tree ) assert token is None return records[0] def GetMetadata_impl(self, args, tree): return tree def Identify_impl(self, args, tree): namespaces = self.getNamespaces() evaluator = etree.XPathEvaluator(tree, namespaces=namespaces) identify_node = evaluator.evaluate( '/oai:OAI-PMH/oai:Identify')[0] identify_evaluator = etree.XPathEvaluator(identify_node, namespaces=namespaces) e = identify_evaluator.evaluate repositoryName = e('string(oai:repositoryName/text())') baseURL = e('string(oai:baseURL/text())') protocolVersion = e('string(oai:protocolVersion/text())') adminEmails = e('oai:adminEmail/text()') earliestDatestamp = datestamp_to_datetime( e('string(oai:earliestDatestamp/text())')) deletedRecord = e('string(oai:deletedRecord/text())') granularity = e('string(oai:granularity/text())') compression = e('oai:compression/text()') # XXX description identify = common.Identify( repositoryName, baseURL, protocolVersion, adminEmails, earliestDatestamp, deletedRecord, granularity, compression) return identify def ListIdentifiers_impl(self, args, tree): namespaces = self.getNamespaces() def firstBatch(): return self.buildIdentifiers(namespaces, tree) def nextBatch(token): tree = self.makeRequestErrorHandling(verb='ListIdentifiers', resumptionToken=token) return self.buildIdentifiers(namespaces, tree) return ResumptionListGenerator(firstBatch, nextBatch) def ListMetadataFormats_impl(self, args, tree): namespaces = self.getNamespaces() evaluator = etree.XPathEvaluator(tree, namespaces=namespaces) metadataFormat_nodes = evaluator.evaluate( '/oai:OAI-PMH/oai:ListMetadataFormats/oai:metadataFormat') metadataFormats = [] for metadataFormat_node in metadataFormat_nodes: e = etree.XPathEvaluator(metadataFormat_node, namespaces=namespaces).evaluate metadataPrefix = e('string(oai:metadataPrefix/text())') schema = e('string(oai:schema/text())') metadataNamespace = e('string(oai:metadataNamespace/text())') metadataFormat = (metadataPrefix, schema, metadataNamespace) metadataFormats.append(metadataFormat) return metadataFormats def ListRecords_impl(self, args, tree): namespaces = self.getNamespaces() metadata_prefix = args['metadataPrefix'] metadata_registry = self._metadata_registry def firstBatch(): return self.buildRecords( metadata_prefix, namespaces, metadata_registry, tree) def nextBatch(token): tree = self.makeRequestErrorHandling( verb='ListRecords', resumptionToken=token) return self.buildRecords( metadata_prefix, namespaces, metadata_registry, tree) return ResumptionListGenerator(firstBatch, nextBatch) def ListSets_impl(self, args, tree): namespaces = self.getNamespaces() def firstBatch(): return self.buildSets(namespaces, tree) def nextBatch(token): tree = self.makeRequestErrorHandling( verb='ListSets', resumptionToken=token) return self.buildSets(namespaces, tree) return ResumptionListGenerator(firstBatch, nextBatch) # various helper methods def buildRecords(self, metadata_prefix, namespaces, metadata_registry, tree): # first find resumption token if available evaluator = etree.XPathEvaluator(tree, namespaces=namespaces) token = evaluator.evaluate( 'string(/oai:OAI-PMH/*/oai:resumptionToken/text())') if token.strip() == '': token = None record_nodes = evaluator.evaluate( '/oai:OAI-PMH/*/oai:record') result = [] for record_node in record_nodes: record_evaluator = etree.XPathEvaluator(record_node, namespaces=namespaces) e = record_evaluator.evaluate # find header node header_node = e('oai:header')[0] # create header header = buildHeader(header_node, namespaces) # find metadata node metadata_list = e('oai:metadata') if metadata_list: metadata_node = metadata_list[0] # create metadata metadata = metadata_registry.readMetadata(metadata_prefix, metadata_node) else: metadata = None # XXX TODO: about, should be third element of tuple result.append((header, metadata, None)) return result, token def buildIdentifiers(self, namespaces, tree): evaluator = etree.XPathEvaluator(tree, namespaces=namespaces) # first find resumption token is available token = evaluator.evaluate( 'string(/oai:OAI-PMH/oai:ListIdentifiers/oai:resumptionToken/text())') if token.strip() == '': token = None header_nodes = evaluator.evaluate( '/oai:OAI-PMH/oai:ListIdentifiers/oai:header') result = [] for header_node in header_nodes: header = buildHeader(header_node, namespaces) result.append(header) return result, token def buildSets(self, namespaces, tree): evaluator = etree.XPathEvaluator(tree, namespaces=namespaces) # first find resumption token if available token = evaluator.evaluate( 'string(/oai:OAI-PMH/oai:ListSets/oai:resumptionToken/text())') if token.strip() == '': token = None set_nodes = evaluator.evaluate( '/oai:OAI-PMH/oai:ListSets/oai:set') sets = [] for set_node in set_nodes: e = etree.XPathEvaluator(set_node, namespaces=namespaces).evaluate # make sure we get back unicode strings instead # of lxml.etree._ElementUnicodeResult objects. setSpec = unicode(e('string(oai:setSpec/text())')) setName = unicode(e('string(oai:setName/text())')) # XXX setDescription nodes sets.append((setSpec, setName, None)) return sets, token def makeRequestErrorHandling(self, **kw): xml = self.makeRequest(**kw) try: tree = self.parse(xml) except SyntaxError: raise error.XMLSyntaxError(kw) # check whether there are errors first e_errors = tree.xpath('/oai:OAI-PMH/oai:error', namespaces=self.getNamespaces()) if e_errors: # XXX right now only raise first error found, does not # collect error info for e_error in e_errors: code = e_error.get('code') msg = e_error.text if code not in ['badArgument', 'badResumptionToken', 'badVerb', 'cannotDisseminateFormat', 'idDoesNotExist', 'noRecordsMatch', 'noMetadataFormats', 'noSetHierarchy']: raise error.UnknownError,\ "Unknown error code from server: %s, message: %s" % ( code, msg) # find exception in error module and raise with msg raise getattr(error, code[0].upper() + code[1:] + 'Error'), msg return tree def makeRequest(self, **kw): raise NotImplementedError class Client(BaseClient): def __init__( self, base_url, metadata_registry=None, credentials=None, local_file=False): BaseClient.__init__(self, metadata_registry) self._base_url = base_url self._local_file = local_file if credentials is not None: self._credentials = base64.encodestring('%s:%s' % credentials) else: self._credentials = None def makeRequest(self, **kw): """Either load a local XML file or actually retrieve XML from a server. """ if self._local_file: with codecs.open(self._base_url, 'r', 'utf-8') as xmlfile: text = xmlfile.read() return text.encode('ascii', 'replace') else: # XXX include From header? headers = {'User-Agent': 'pyoai'} if self._credentials is not None: headers['Authorization'] = 'Basic ' + self._credentials.strip() request = urllib2.Request( self._base_url, data=urlencode(kw), headers=headers) return retrieveFromUrlWaiting(request) def buildHeader(header_node, namespaces): e = etree.XPathEvaluator(header_node, namespaces=namespaces).evaluate identifier = e('string(oai:identifier/text())') datestamp = datestamp_to_datetime( str(e('string(oai:datestamp/text())'))) setspec = [str(s) for s in e('oai:setSpec/text()')] deleted = e("@status = 'deleted'") return common.Header(header_node, identifier, datestamp, setspec, deleted) def ResumptionListGenerator(firstBatch, nextBatch): result, token = firstBatch() while 1: itemFound = False for item in result: yield item itemFound = True if token is None or not itemFound: break result, token = nextBatch(token) def retrieveFromUrlWaiting(request, wait_max=WAIT_MAX, wait_default=WAIT_DEFAULT): """Get text from URL, handling 503 Retry-After. """ for i in range(wait_max): try: f = urllib2.urlopen(request) text = f.read() f.close() # we successfully opened without having to wait break except urllib2.HTTPError, e: if e.code == 503: try: retryAfter = int(e.hdrs.get('Retry-After')) except TypeError: retryAfter = None if retryAfter is None: time.sleep(wait_default) else: time.sleep(retryAfter) else: # reraise any other HTTP error raise else: raise Error, "Waited too often (more than %s times)" % wait_max return text class ServerClient(BaseClient): def __init__(self, server, metadata_registry=None): BaseClient.__init__(self, metadata_registry) self._server = server def makeRequest(self, **kw): return self._server.handleRequest(kw)
{ "content_hash": "a2c81bc90793d884c98809f5ec28fb0f", "timestamp": "", "source": "github", "line_count": 383, "max_line_length": 88, "avg_line_length": 39.55874673629243, "alnum_prop": 0.5691373506699228, "repo_name": "wetneb/pyoai", "id": "0717a83c1e1fc33623254165f3521765720ea355", "size": "15151", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/oaipmh/client.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "3917" }, { "name": "Python", "bytes": "104659" } ], "symlink_target": "" }
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{ "content_hash": "c381e1ed76b19cb01060dc1db017f0c3", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 10.23076923076923, "alnum_prop": 0.6917293233082706, "repo_name": "mdoering/backbone", "id": "7d2aac1738ddb73224cf5ecc46daff834a0ddf45", "size": "198", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Rhodophyta/Florideophyceae/Gigartinales/Mychodeaceae/Mychodea/Mychodea carnosa/ Syn. Mychodea membranacea/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
const Kolibri = require('kolibri'); const FacilityUserResource = Kolibri.resources.FacilityUserResource; const ChannelResource = Kolibri.resources.ChannelResource; const TaskResource = Kolibri.resources.TaskResource; const RoleResource = Kolibri.resources.RoleResource; const constants = require('./state/constants'); const UserKinds = require('core-constants').UserKinds; const PageNames = constants.PageNames; // ================================ // USER MANAGEMENT ACTIONS /** * Vuex State Mappers * * The methods below help map data from * the API to state in the Vuex store */ function _userState(data) { // assume just one role for now let kind = UserKinds.LEARNER; if (data.roles.length && data.roles[0].kind === 'admin') { kind = UserKinds.ADMIN; } return { id: data.id, facility_id: data.facility, username: data.username, full_name: data.full_name, roles: data.roles, kind, // unused for now }; } /** * Do a POST to create new user * @param {object} payload * @param {string} role */ function createUser(store, payload, role) { const FacilityUserModel = FacilityUserResource.createModel(payload); const newUserPromise = FacilityUserModel.save(payload); // returns a promise so the result can be used by the caller return newUserPromise.then((model) => { // assign role to this new user if the role is not learner if (role === 'learner' || !role) { store.dispatch('ADD_USER', _userState(model)); } else { const rolePayload = { user: model.id, collection: model.facility, kind: role, }; const RoleModel = RoleResource.createModel(rolePayload); const newRolePromise = RoleModel.save(rolePayload); newRolePromise.then((results) => { FacilityUserModel.fetch({}, true).then(updatedModel => { store.dispatch('ADD_USER', _userState(updatedModel)); }); }).catch((error) => { store.dispatch('CORE_SET_ERROR', JSON.stringify(error, null, '\t')); }); } }).catch((error) => Promise.reject(error)); } /** * Do a PATCH to update existing user * @param {string} id * @param {object} payload * @param {string} role */ function updateUser(store, id, payload, role) { const FacilityUserModel = FacilityUserResource.getModel(id); const oldRoldID = FacilityUserModel.attributes.roles.length ? FacilityUserModel.attributes.roles[0].id : null; const oldRole = FacilityUserModel.attributes.roles.length ? FacilityUserModel.attributes.roles[0].kind : 'learner'; if (oldRole !== role) { // the role changed if (oldRole === 'learner') { // role is admin or coach. const rolePayload = { user: id, collection: FacilityUserModel.attributes.facility, kind: role, }; const RoleModel = RoleResource.createModel(rolePayload); RoleModel.save(rolePayload).then((newRole) => { FacilityUserModel.save(payload).then(responses => { // force role change because if the role is the only changing attribute // FacilityUserModel.save() will not send request to server. responses.roles = [newRole]; store.dispatch('UPDATE_USERS', [responses]); }) .catch((error) => { store.dispatch('CORE_SET_ERROR', JSON.stringify(error, null, '\t')); }); }); } else if (role !== 'learner') { // oldRole is admin and role is coach or oldRole is coach and role is admin. const OldRoleModel = RoleResource.getModel(oldRoldID); OldRoleModel.delete().then(() => { // create new role when old role is successfully deleted. const rolePayload = { user: id, collection: FacilityUserModel.attributes.facility, kind: role, }; const RoleModel = RoleResource.createModel(rolePayload); RoleModel.save(rolePayload).then((newRole) => { // update the facilityUser when new role is successfully created. FacilityUserModel.save(payload).then(responses => { // force role change because if the role is the only changing attribute // FacilityUserModel.save() will not send request to server. responses.roles = [newRole]; store.dispatch('UPDATE_USERS', [responses]); }) .catch((error) => { store.dispatch('CORE_SET_ERROR', JSON.stringify(error, null, '\t')); }); }); }) .catch((error) => { store.dispatch('CORE_SET_ERROR', JSON.stringify(error, null, '\t')); }); } else { // role is learner and oldRole is admin or coach. const OldRoleModel = RoleResource.getModel(oldRoldID); OldRoleModel.delete().then(() => { FacilityUserModel.save(payload).then(responses => { // force role change because if the role is the only changing attribute // FacilityUserModel.save() will not send request to server. responses.roles = []; store.dispatch('UPDATE_USERS', [responses]); }) .catch((error) => { store.dispatch('CORE_SET_ERROR', JSON.stringify(error, null, '\t')); }); }); } } else { // the role is not changed FacilityUserModel.save(payload).then(responses => { store.dispatch('UPDATE_USERS', [responses]); }) .catch((error) => { store.dispatch('CORE_SET_ERROR', JSON.stringify(error, null, '\t')); }); } } /** * Do a DELETE to delete the user. * @param {string or Integer} id */ function deleteUser(store, id) { if (!id) { // if no id passed, abort the function return; } const FacilityUserModel = FacilityUserResource.getModel(id); const deleteUserPromise = FacilityUserModel.delete(); deleteUserPromise.then((user) => { store.dispatch('DELETE_USER', id); }) .catch((error) => { store.dispatch('CORE_SET_ERROR', JSON.stringify(error, null, '\t')); }); } // An action for setting up the initial state of the app by fetching data from the server function showUserPage(store) { store.dispatch('CORE_SET_PAGE_LOADING', true); store.dispatch('SET_PAGE_NAME', PageNames.USER_MGMT_PAGE); const userCollection = FacilityUserResource.getCollection(); const facilityIdPromise = FacilityUserResource.getCurrentFacility(); const userPromise = userCollection.fetch(); const promises = [facilityIdPromise, userPromise]; Promise.all(promises).then(([facilityId, users]) => { store.dispatch('SET_FACILITY', facilityId[0]); // for mvp, we assume only one facility exists const pageState = { users: users.map(_userState), }; store.dispatch('SET_PAGE_STATE', pageState); store.dispatch('CORE_SET_PAGE_LOADING', false); store.dispatch('CORE_SET_ERROR', null); }, rejects => { store.dispatch('CORE_SET_ERROR', JSON.stringify(rejects, null, '\t')); store.dispatch('CORE_SET_PAGE_LOADING', false); }); } // ================================ // CONTENT IMPORT/EXPORT ACTIONS function showContentPage(store) { store.dispatch('CORE_SET_PAGE_LOADING', true); store.dispatch('SET_PAGE_NAME', PageNames.CONTENT_MGMT_PAGE); // const taskCollectionPromise = TaskResource.getCollection().fetch(); const taskCollectionPromise = Promise.resolve([]); // TODO - remove taskCollectionPromise.then((taskList) => { const pageState = { showWizard: false }; pageState.taskList = taskList; if (taskList.length) { // only one task at a time for now store.dispatch('SET_CONTENT_WIZARD_STATE', false, {}); } const channelCollectionPromise = ChannelResource.getCollection({}).fetch(); channelCollectionPromise.then((channelList) => { pageState.channelList = channelList; store.dispatch('SET_PAGE_STATE', pageState); store.dispatch('CORE_SET_PAGE_LOADING', false); }); }) .catch((error) => { store.dispatch('CORE_SET_ERROR', JSON.stringify(error, null, '\t')); store.dispatch('CORE_SET_PAGE_LOADING', false); }); } function startImportWizard(store) { store.dispatch('SET_CONTENT_WIZARD_STATE', true, { type: 'import', page: 'start', }); } function startExportWizard(store) { store.dispatch('SET_CONTENT_WIZARD_STATE', true, { type: 'import', page: 'start', }); } function cancelImportExportWizard(store) { store.dispatch('SET_CONTENT_WIZARD_STATE', false, {}); } // background worker calls this to continually update UI function updateTasks(store) { const taskCollectionPromise = TaskResource.getCollection().fetch(); taskCollectionPromise.then((taskList) => { const pageState = { showWizard: false }; pageState.taskList = taskList; if (taskList.length) { // only one task at a time for now store.dispatch('SET_CONTENT_WIZARD_STATE', false, {}); } const channelCollectionPromise = ChannelResource.getCollection({}).fetch(); channelCollectionPromise.then((channelList) => { pageState.channelList = channelList; store.dispatch('SET_PAGE_STATE', pageState); }); }) .catch((error) => { store.dispatch('CORE_SET_ERROR', JSON.stringify(error, null, '\t')); }); } function clearTasks(store, id) { const currentTaskPromise = TaskResource.getModel(id).delete(id); currentTaskPromise.then(() => { // only 1 task should be running, but we set to empty array store.dispatch('SET_TASKS', []); }) .catch((error) => { store.dispatch('CORE_SET_ERROR', JSON.stringify(error, null, '\t')); }); } // ================================ // OTHER ACTIONS function showDataPage(store) { store.dispatch('SET_PAGE_NAME', PageNames.DATA_EXPORT_PAGE); store.dispatch('SET_PAGE_STATE', {}); store.dispatch('CORE_SET_PAGE_LOADING', false); store.dispatch('CORE_SET_ERROR', null); } function showScratchpad(store) { store.dispatch('SET_PAGE_NAME', PageNames.SCRATCHPAD); store.dispatch('SET_PAGE_STATE', {}); store.dispatch('CORE_SET_PAGE_LOADING', false); store.dispatch('CORE_SET_ERROR', null); } module.exports = { createUser, updateUser, deleteUser, showUserPage, showContentPage, updateTasks, clearTasks, startImportWizard, startExportWizard, cancelImportExportWizard, showDataPage, showScratchpad, };
{ "content_hash": "2f87033e5c0d1a3ccbbf109ce1dd2895", "timestamp": "", "source": "github", "line_count": 320, "max_line_length": 97, "avg_line_length": 31.953125, "alnum_prop": 0.6491931540342298, "repo_name": "66eli77/kolibri", "id": "fa0a6e50595d5fb90b7d2c0d90a8b21ddc147fb7", "size": "10225", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "kolibri/plugins/management/assets/src/actions.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "5193" }, { "name": "HTML", "bytes": "2741" }, { "name": "JavaScript", "bytes": "185967" }, { "name": "Makefile", "bytes": "2607" }, { "name": "Python", "bytes": "451615" }, { "name": "Shell", "bytes": "6705" }, { "name": "Vue", "bytes": "132704" } ], "symlink_target": "" }
package org.apache.oozie.executor.jpa; import org.apache.oozie.ErrorCode; import org.apache.oozie.FaultInjection; import javax.persistence.EntityManager; import javax.persistence.Query; import java.util.Collection; /** * Delete Coord actions of long running coordinators, return the number of actions that were deleted. */ public class CoordActionsDeleteJPAExecutor implements JPAExecutor<Integer> { private Collection<String> deleteList; /** * Initialize the JPAExecutor using the delete list of CoordinatorActionBeans * @param deleteList */ public CoordActionsDeleteJPAExecutor(Collection<String> deleteList) { this.deleteList = deleteList; } public CoordActionsDeleteJPAExecutor() { } /** * Sets the delete list for CoordinatorActionBeans * * @param deleteList */ public void setDeleteList(Collection<String> deleteList) { this.deleteList = deleteList; } /* * (non-Javadoc) * * @see org.apache.oozie.executor.jpa.JPAExecutor#getName() */ @Override public String getName() { return "CoordActionsDeleteJPAExecutor"; } /* * (non-Javadoc) * * @see org.apache.oozie.executor.jpa.JPAExecutor#execute(javax.persistence. * EntityManager) */ @Override public Integer execute(EntityManager em) throws JPAExecutorException { int actionsDeleted = 0; try { // Only used by test cases to check for rollback of transaction FaultInjection.activate("org.apache.oozie.command.SkipCommitFaultInjection"); if (deleteList != null && !deleteList.isEmpty()) { // Delete coordActions Query g = em.createNamedQuery("DELETE_ACTIONS_FOR_LONG_RUNNING_COORDINATOR"); g.setParameter("actionId", deleteList); actionsDeleted = g.executeUpdate(); } } catch (Exception e) { throw new JPAExecutorException(ErrorCode.E0603, e.getMessage(), e); } return actionsDeleted; } }
{ "content_hash": "c1576a44145a6614f58ac6468f5da4b2", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 101, "avg_line_length": 29.507042253521128, "alnum_prop": 0.6520286396181384, "repo_name": "cbaenziger/oozie", "id": "8dd20cc2316186d2a6ee33b19bafaa155dcb6084", "size": "2902", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "core/src/main/java/org/apache/oozie/executor/jpa/CoordActionsDeleteJPAExecutor.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "16115" }, { "name": "CSS", "bytes": "27272" }, { "name": "HTML", "bytes": "8786" }, { "name": "Java", "bytes": "10168055" }, { "name": "JavaScript", "bytes": "143427" }, { "name": "PowerShell", "bytes": "9356" }, { "name": "Python", "bytes": "1349" }, { "name": "Shell", "bytes": "114386" } ], "symlink_target": "" }
package com.matthewtamlin.spyglass.processor.validation; import com.google.common.collect.ImmutableList; import com.matthewtamlin.spyglass.markers.annotations.defaults.DefaultToNull; import com.matthewtamlin.spyglass.markers.annotations.placeholders.UseNull; import com.matthewtamlin.spyglass.processor.annotationretrievers.DefaultRetriever; import com.matthewtamlin.spyglass.processor.annotationretrievers.PlaceholderRetriever; import com.matthewtamlin.spyglass.processor.annotationretrievers.UnconditionalHandlerRetriever; import com.matthewtamlin.spyglass.processor.codegeneration.GetDefaultMethodGenerator; import com.matthewtamlin.spyglass.processor.codegeneration.GetPlaceholderMethodGenerator; import com.matthewtamlin.spyglass.processor.codegeneration.GetValueMethodGenerator; import com.matthewtamlin.spyglass.processor.mirrorhelpers.TypeMirrorHelper; import com.squareup.javapoet.MethodSpec; import javax.inject.Inject; import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.VariableElement; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.Elements; import javax.lang.model.util.Types; import java.util.List; import static com.matthewtamlin.java_utilities.checkers.NullChecker.checkNotNull; public class TypeValidator implements Validator { private final Elements elementHelper; private final Types typeHelper; private final TypeMirrorHelper typeMirrorHelper; private final List<Rule> rules; @Inject public TypeValidator( final Elements elementUtil, final Types typeUtil, final TypeMirrorHelper typeMirrorHelper, final GetValueMethodGenerator getValueMethodGenerator, final GetDefaultMethodGenerator getDefaultMethodGenerator, final GetPlaceholderMethodGenerator getPlaceholderMethodGenerator) { this.elementHelper = checkNotNull(elementUtil); this.typeHelper = checkNotNull(typeUtil); this.typeMirrorHelper = checkNotNull(typeMirrorHelper); checkNotNull(getValueMethodGenerator); checkNotNull(getDefaultMethodGenerator); checkNotNull(getPlaceholderMethodGenerator); rules = ImmutableList.of( element -> { if (!UnconditionalHandlerRetriever.hasAnnotation(element)) { return Result.createSuccessful(); } final AnnotationMirror annotation = UnconditionalHandlerRetriever.getAnnotation(element); final MethodSpec supplier = getValueMethodGenerator.generateFor(annotation); final TypeMirror suppliedType = returnTypeToTypeMirror(supplier); final TypeMirror recipientType = getParameterWithoutPlaceholderAnnotation(element).asType(); if (!isAssignableOrConvertible(suppliedType, recipientType)) { return Result.createFailure( "Misused handler annotation found. \'%1$s\' cannot be cast to \'%2$s\'.", suppliedType, recipientType); } return Result.createSuccessful(); }, element -> { if (!DefaultRetriever.hasAnnotation(element)) { return Result.createSuccessful(); } final AnnotationMirror annotation = DefaultRetriever.getAnnotation(element); final String annotationName = annotation.getAnnotationType().toString(); final MethodSpec supplier = getDefaultMethodGenerator.generateFor(annotation); final TypeMirror suppliedType = returnTypeToTypeMirror(supplier); final TypeMirror recipientType = getParameterWithoutPlaceholderAnnotation(element).asType(); if (annotationName.equals(DefaultToNull.class.getName())) { if (typeMirrorHelper.isPrimitive(recipientType)) { return Result.createFailure( "Misused default annotation found. Primitive parameters cannot receive null."); } else { return Result.createSuccessful(); } } if (!isAssignableOrConvertible(suppliedType, recipientType)) { return Result.createFailure( "Misused default annotation found. \'%1$s\' cannot be cast to \'%2$s\'.", suppliedType, recipientType); } return Result.createSuccessful(); }, new Rule() { @Override public Result checkElement(final ExecutableElement element) { for (final VariableElement parameter : element.getParameters()) { if (PlaceholderRetriever.hasAnnotation(parameter)) { final Result result = checkParameter(parameter); if (!result.isSuccessful()) { return result; } } } return Result.createSuccessful(); } private Result checkParameter(final VariableElement parameter) { final AnnotationMirror annotation = PlaceholderRetriever.getAnnotation(parameter); final String annotationName = annotation.getAnnotationType().toString(); final MethodSpec supplier = getPlaceholderMethodGenerator.generateFor(annotation, 0); final TypeMirror suppliedType = returnTypeToTypeMirror(supplier); final TypeMirror recipientType = parameter.asType(); if (annotationName.equals(UseNull.class.getName())) { if (typeMirrorHelper.isPrimitive(recipientType)) { return Result.createFailure( "Misused placeholder annotation found. Primitive parameters cannot receive null."); } else { return Result.createSuccessful(); } } if (!isAssignableOrConvertible(suppliedType, recipientType)) { return Result.createFailure( "Misused placeholder annotation found. \'%1$s\' cannot be cast to \'%2$s\'.", suppliedType, recipientType); } return Result.createSuccessful(); } }); } public Result validate(final ExecutableElement element) { for (final Rule rule : rules) { final Result result = rule.checkElement(element); if (!result.isSuccessful()) { return result; } } return Result.createSuccessful(); } private TypeMirror returnTypeToTypeMirror(final MethodSpec methodSpec) { return elementHelper.getTypeElement(methodSpec.returnType.toString()).asType(); } private static VariableElement getParameterWithoutPlaceholderAnnotation(final ExecutableElement method) { for (final VariableElement parameter : method.getParameters()) { if (!PlaceholderRetriever.hasAnnotation(parameter)) { return parameter; } } return null; } private boolean isAssignableOrConvertible(final TypeMirror suppliedType, final TypeMirror recipientType) { return typeHelper.isAssignable(suppliedType, recipientType) || (typeMirrorHelper.isNumber(suppliedType) && typeMirrorHelper.isNumber(recipientType)) || (typeMirrorHelper.isCharacter(suppliedType) && typeMirrorHelper.isCharacter(recipientType)); } private interface Rule { public Result checkElement(ExecutableElement element); } }
{ "content_hash": "16c321831613956ce6e978afb694b7d2", "timestamp": "", "source": "github", "line_count": 189, "max_line_length": 108, "avg_line_length": 40.02116402116402, "alnum_prop": 0.6727921734531994, "repo_name": "MatthewTamlin/Spyglass", "id": "97df88cb75626112947fbbebba279d1dff3ebba8", "size": "8172", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "processor/src/main/java/com/matthewtamlin/spyglass/processor/validation/TypeValidator.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "822034" } ], "symlink_target": "" }
package com.bigbug.android.pp.ui.widget; import android.annotation.TargetApi; import android.os.Build; import android.widget.OverScroller; /** * A utility class for using {@link android.widget.OverScroller} in a backward-compatible fashion. */ public class OverScrollerCompat { /** * Disallow instantiation. */ private OverScrollerCompat() { } /** * @see android.view.ScaleGestureDetector#getCurrentSpanY() */ @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public static float getCurrVelocity(OverScroller overScroller) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { return overScroller.getCurrVelocity(); } else { return 0; } } }
{ "content_hash": "32082d2396cca1ae0112c2697b6c168c", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 98, "avg_line_length": 27.178571428571427, "alnum_prop": 0.6741130091984231, "repo_name": "bigbugbb/PrayerPartner", "id": "2bc49bfcd91f37037b979a648c7c3cad5cc357d8", "size": "761", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/java/com/bigbug/android/pp/ui/widget/OverScrollerCompat.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "460617" } ], "symlink_target": "" }
import { IReduxState } from '../app/types'; import { getToolbarButtons } from '../base/config/functions.web'; import { hasAvailableDevices } from '../base/devices/functions'; import { MEET_FEATURES } from '../base/jwt/constants'; import { isJwtFeatureEnabled } from '../base/jwt/functions'; import { isScreenMediaShared } from '../screen-share/functions'; import { isWhiteboardVisible } from '../whiteboard/functions'; import { TOOLBAR_TIMEOUT } from './constants'; export * from './functions.any'; /** * Helper for getting the height of the toolbox. * * @returns {number} The height of the toolbox. */ export function getToolboxHeight() { const toolbox = document.getElementById('new-toolbox'); return toolbox?.clientHeight || 0; } /** * Indicates if a toolbar button is enabled. * * @param {string} name - The name of the setting section as defined in * interface_config.js. * @param {IReduxState} state - The redux state. * @returns {boolean|undefined} - True to indicate that the given toolbar button * is enabled, false - otherwise. */ export function isButtonEnabled(name: string, state: IReduxState) { const toolbarButtons = getToolbarButtons(state); return toolbarButtons.indexOf(name) !== -1; } /** * Indicates if the toolbox is visible or not. * * @param {IReduxState} state - The state from the Redux store. * @returns {boolean} - True to indicate that the toolbox is visible, false - * otherwise. */ export function isToolboxVisible(state: IReduxState) { const { iAmRecorder, iAmSipGateway, toolbarConfig } = state['features/base/config']; const { alwaysVisible } = toolbarConfig || {}; const { timeoutID, visible } = state['features/toolbox']; const { audioSettingsVisible, videoSettingsVisible } = state['features/settings']; const whiteboardVisible = isWhiteboardVisible(state); return Boolean(!iAmRecorder && !iAmSipGateway && ( timeoutID || visible || alwaysVisible || audioSettingsVisible || videoSettingsVisible || whiteboardVisible )); } /** * Indicates if the audio settings button is disabled or not. * * @param {IReduxState} state - The state from the Redux store. * @returns {boolean} */ export function isAudioSettingsButtonDisabled(state: IReduxState) { return !(hasAvailableDevices(state, 'audioInput') || hasAvailableDevices(state, 'audioOutput')) || state['features/base/config'].startSilent; } /** * Indicates if the desktop share button is disabled or not. * * @param {IReduxState} state - The state from the Redux store. * @returns {boolean} */ export function isDesktopShareButtonDisabled(state: IReduxState) { const { muted, unmuteBlocked } = state['features/base/media'].video; const videoOrShareInProgress = !muted || isScreenMediaShared(state); const enabledInJwt = isJwtFeatureEnabled(state, MEET_FEATURES.SCREEN_SHARING, true, true); return !enabledInJwt || (unmuteBlocked && !videoOrShareInProgress); } /** * Indicates if the video settings button is disabled or not. * * @param {IReduxState} state - The state from the Redux store. * @returns {boolean} */ export function isVideoSettingsButtonDisabled(state: IReduxState) { return !hasAvailableDevices(state, 'videoInput'); } /** * Indicates if the video mute button is disabled or not. * * @param {IReduxState} state - The state from the Redux store. * @returns {boolean} */ export function isVideoMuteButtonDisabled(state: IReduxState) { const { muted, unmuteBlocked } = state['features/base/media'].video; return !hasAvailableDevices(state, 'videoInput') || (unmuteBlocked && Boolean(muted)); } /** * If an overflow drawer should be displayed or not. * This is usually done for mobile devices or on narrow screens. * * @param {IReduxState} state - The state from the Redux store. * @returns {boolean} */ export function showOverflowDrawer(state: IReduxState) { return state['features/toolbox'].overflowDrawer; } /** * Indicates whether the toolbox is enabled or not. * * @param {IReduxState} state - The state from the Redux store. * @returns {boolean} */ export function isToolboxEnabled(state: IReduxState) { return state['features/toolbox'].enabled; } /** * Returns the toolbar timeout from config or the default value. * * @param {IReduxState} state - The state from the Redux store. * @returns {number} - Toolbar timeout in milliseconds. */ export function getToolbarTimeout(state: IReduxState) { const { toolbarConfig } = state['features/base/config']; return toolbarConfig?.timeout || TOOLBAR_TIMEOUT; }
{ "content_hash": "38a8a9ad0e3d8283d35f7aadad067418", "timestamp": "", "source": "github", "line_count": 147, "max_line_length": 94, "avg_line_length": 32.12244897959184, "alnum_prop": 0.6956797966963151, "repo_name": "jitsi/jitsi-meet", "id": "6054fa3c95fe7be45a6bf4b1ff705bf3205f9fce", "size": "4722", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "react/features/toolbox/functions.web.ts", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "829" }, { "name": "HTML", "bytes": "20408" }, { "name": "Java", "bytes": "232895" }, { "name": "JavaScript", "bytes": "2550511" }, { "name": "Lua", "bytes": "301404" }, { "name": "Makefile", "bytes": "4160" }, { "name": "Objective-C", "bytes": "154389" }, { "name": "Ruby", "bytes": "7816" }, { "name": "SCSS", "bytes": "152946" }, { "name": "Shell", "bytes": "36422" }, { "name": "Starlark", "bytes": "152" }, { "name": "Swift", "bytes": "50411" }, { "name": "TypeScript", "bytes": "2866536" } ], "symlink_target": "" }
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in Elench. fung. (Greifswald) 1: 231 (1828) #### Original name Clavaria fusiformis Sowerby, 1799 ### Remarks null
{ "content_hash": "df37cd7923e2bb79d0d95c9fb083ded2", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 40, "avg_line_length": 15.23076923076923, "alnum_prop": 0.7121212121212122, "repo_name": "mdoering/backbone", "id": "ee36c87e9424a1567cf423b6f3697e8b5636c58c", "size": "277", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Fungi/Basidiomycota/Agaricomycetes/Agaricales/Clavariaceae/Clavulinopsis/Clavulinopsis fusiformis/ Syn. Clavaria inaequalis fusiformis/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
package org.syncope.core.persistence.validation.entity; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.validation.Constraint; import javax.validation.Payload; @Target({ ElementType.TYPE }) @Retention(RetentionPolicy.RUNTIME) @Constraint(validatedBy = SchemaMappingValidator.class) @Documented public @interface SchemaMappingCheck { String message() default "{org.syncope.core.validation.mapping}"; Class<?>[] groups() default {}; Class<? extends Payload>[] payload() default {}; }
{ "content_hash": "aa77be085018312ea80a3f93afc4e4df", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 69, "avg_line_length": 26.8, "alnum_prop": 0.7805970149253731, "repo_name": "ilgrosso/oldSyncopeIdM", "id": "2a338e8a8a817fdcf8b6faaf50d2868a8f7cab96", "size": "1477", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "core/src/main/java/org/syncope/core/persistence/validation/entity/SchemaMappingCheck.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "10244" }, { "name": "HTML", "bytes": "206870" }, { "name": "Java", "bytes": "2600073" }, { "name": "JavaScript", "bytes": "107263" }, { "name": "XSLT", "bytes": "16752" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net; using System.IO; namespace GoGetURL { [ComVisible(true)] [Guid("CCCFB659-D65B-4B41-B0F7-9BEB83329671")] public interface IGoGetURL{ String GetContentsAtURLString(String sURL); } [ComVisible(true)] [Guid("ECD0A309-F898-4F9E-9054-6ECE3672DCD2")] [ClassInterface(ClassInterfaceType.AutoDual)] public class GoGetURL : IGoGetURL { public String GetContentsAtURLString(String sURL) { String theURL = sURL; String theResult = ""; HttpWebRequest webReq = WebRequest.Create(theURL) as HttpWebRequest; HttpWebResponse webResponse = webReq.GetResponse() as HttpWebResponse; if (webResponse.StatusCode != HttpStatusCode.OK) { theResult = String.Format("Error (HTTP {0}: {1}).", webResponse.StatusCode, webResponse.StatusDescription); } else { Stream dataStream = webResponse.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); theResult = reader.ReadToEnd(); } return theResult; } } }
{ "content_hash": "97fe0d27d39b778f48996c3ff5564c11", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 115, "avg_line_length": 31.18421052631579, "alnum_prop": 0.7130801687763713, "repo_name": "mmeents/GoGetURLContentAt", "id": "e0db5769e4613b3e4093540ee3c6398bcf8c5d96", "size": "1187", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "BaseInterfaceAndControl.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "1838" } ], "symlink_target": "" }
'use strict'; exports.__esModule = true; exports['default'] = { optional: ' (optional)', required: '', add: 'Add', remove: 'Remove', up: 'Up', down: 'Down' }; module.exports = exports['default'];
{ "content_hash": "e2e37971a7ff552f6b6deeb4d54dddb9", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 36, "avg_line_length": 17.333333333333332, "alnum_prop": 0.5913461538461539, "repo_name": "geminiyellow/tcomb-form", "id": "65f0c725c386c53ae166e19e725fed4fc562e918", "size": "208", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "lib/i18n/en.js", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "545" }, { "name": "JavaScript", "bytes": "122751" } ], "symlink_target": "" }
extern OutputType g_address_type; EditAddressDialog::EditAddressDialog(Mode _mode, QWidget* parent) : QDialog(parent), ui(new Ui::EditAddressDialog), mapper(0), mode(_mode), model(0) { ui->setupUi(this); GUIUtil::setupAddressWidget(ui->addressEdit, this); switch (mode) { case NewReceivingAddress: setWindowTitle(tr("New receiving address")); ui->addressEdit->setEnabled(false); ui->addressEdit->setVisible(false); ui->label_2->setVisible(false); ui->addressType->setVisible(true); ui->bech32RB->setEnabled(true); ui->stealthRB->setEnabled(true); ui->segwitRB->setEnabled(true); ui->legacyRB->setEnabled(true); //Check default addresstype getDefaultAddressButton()->setChecked(true); break; case NewSendingAddress: setWindowTitle(tr("New sending address")); ui->addressType->hide(); break; case EditReceivingAddress: setWindowTitle(tr("Edit receiving address")); ui->addressEdit->setEnabled(false); ui->addressType->hide(); break; case EditSendingAddress: setWindowTitle(tr("Edit sending address")); ui->addressType->hide(); break; } mapper = new QDataWidgetMapper(this); mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit); } EditAddressDialog::~EditAddressDialog() { delete ui; } void EditAddressDialog::setModel(AddressTableModel* _model) { this->model = _model; if (!_model) return; mapper->setModel(_model); mapper->addMapping(ui->labelEdit, AddressTableModel::Label); mapper->addMapping(ui->addressEdit, AddressTableModel::Address); } void EditAddressDialog::loadRow(int row) { mapper->setCurrentIndex(row); } bool EditAddressDialog::saveCurrentRow() { if (!model) return false; switch (mode) { case NewReceivingAddress: case NewSendingAddress: OutputType type; if (ui->legacyRB->isChecked()) type = OUTPUT_TYPE_LEGACY; else if (ui->stealthRB->isChecked()) type = OUTPUT_TYPE_STEALTH; else if (ui->bech32RB->isChecked()) type = OUTPUT_TYPE_BECH32; else if (ui->segwitRB->isChecked()) type = OUTPUT_TYPE_P2SH_SEGWIT; address = model->addRow( mode == NewSendingAddress ? AddressTableModel::Send : AddressTableModel::Receive, ui->labelEdit->text(), ui->addressEdit->text(), type); break; case EditReceivingAddress: case EditSendingAddress: if (mapper->submit()) { address = ui->addressEdit->text(); } break; } return !address.isEmpty(); } void EditAddressDialog::accept() { if (!model) return; if (!saveCurrentRow()) { switch (model->getEditStatus()) { case AddressTableModel::OK: // Failed with unknown reason. Just reject. break; case AddressTableModel::NO_CHANGES: // No changes were made during edit operation. Just reject. break; case AddressTableModel::INVALID_ADDRESS: QMessageBox::warning(this, windowTitle(), tr("The entered address \"%1\" is not a valid DeepOnion address.").arg(ui->addressEdit->text()), QMessageBox::Ok, QMessageBox::Ok); break; case AddressTableModel::DUPLICATE_ADDRESS: QMessageBox::warning(this, windowTitle(), tr("The entered address \"%1\" is already in the address book.").arg(ui->addressEdit->text()), QMessageBox::Ok, QMessageBox::Ok); break; case AddressTableModel::WALLET_UNLOCK_FAILURE: QMessageBox::critical(this, windowTitle(), tr("Could not unlock wallet."), QMessageBox::Ok, QMessageBox::Ok); break; case AddressTableModel::KEY_GENERATION_FAILURE: QMessageBox::critical(this, windowTitle(), tr("New key generation failed."), QMessageBox::Ok, QMessageBox::Ok); break; } return; } QDialog::accept(); } QString EditAddressDialog::getAddress() const { return address; } void EditAddressDialog::setAddress(const QString& _address) { this->address = _address; ui->addressEdit->setText(_address); } QRadioButton* EditAddressDialog::getDefaultAddressButton() { switch (OUTPUT_TYPE_DEFAULT) { case OUTPUT_TYPE_LEGACY: addDefaultInfoText(ui->legacyRB); return ui->legacyRB; case OUTPUT_TYPE_P2SH_SEGWIT: addDefaultInfoText(ui->segwitRB); return ui->segwitRB; case OUTPUT_TYPE_BECH32: addDefaultInfoText(ui->bech32RB); return ui->bech32RB; case OUTPUT_TYPE_STEALTH: addDefaultInfoText(ui->stealthRB); return ui->stealthRB; } }
{ "content_hash": "20b8d3225a485bb40345072b69e68ddd", "timestamp": "", "source": "github", "line_count": 168, "max_line_length": 112, "avg_line_length": 31.041666666666668, "alnum_prop": 0.5804410354745925, "repo_name": "deeponion/deeponion", "id": "603ed42fa46ae00df6b9d6397c68473bfe18a396", "size": "5628", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/qt/editaddressdialog.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "28453" }, { "name": "C", "bytes": "3750777" }, { "name": "C++", "bytes": "5920857" }, { "name": "CSS", "bytes": "2635" }, { "name": "HTML", "bytes": "21860" }, { "name": "Java", "bytes": "30290" }, { "name": "M4", "bytes": "215189" }, { "name": "Makefile", "bytes": "121025" }, { "name": "Objective-C++", "bytes": "5497" }, { "name": "Python", "bytes": "1576477" }, { "name": "QMake", "bytes": "756" }, { "name": "Sage", "bytes": "30188" }, { "name": "Shell", "bytes": "136149" } ], "symlink_target": "" }
<section data-ng-controller="PicturesController" data-ng-init="findOne()"> <div class="page-header"> <h1>Edit Picture</h1> </div> <div class="col-md-12"> <form class="form-horizontal" data-ng-submit="update()" novalidate> <fieldset> <div class="form-group"> <label class="control-label" for="name">Name</label> <div class="controls"> <input type="text" data-ng-model="picture.name" id="name" class="form-control" placeholder="Name" required> </div> </div> <div class="form-group"> <input type="submit" value="Update" class="btn btn-default"> </div> <div data-ng-show="error" class="text-danger"> <strong data-ng-bind="error"></strong> </div> </fieldset> </form> </div> </section>
{ "content_hash": "1fb8046980dd1996ca1354b80713b375", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 131, "avg_line_length": 40.17391304347826, "alnum_prop": 0.512987012987013, "repo_name": "princeV/meanjs040_fileupload_mdb", "id": "d965ab24fbce9f355582b135b6edce7cd7c8be16", "size": "924", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "modules/pictures/client/views/edit-picture.client.view.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "1155" }, { "name": "HTML", "bytes": "36807" }, { "name": "JavaScript", "bytes": "186718" }, { "name": "Shell", "bytes": "414" } ], "symlink_target": "" }
package com.nesterenya; public interface Application {}
{ "content_hash": "5bb0f0a0b947a0e81955c187f9090177", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 31, "avg_line_length": 19, "alnum_prop": 0.8070175438596491, "repo_name": "GSTU/java-spring-rest-getstarted", "id": "f8a8b993029277b5ec4f6728def0140cb937cf2e", "size": "57", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "coreservices/src/main/java/com/nesterenya/Application.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "174" }, { "name": "Java", "bytes": "4741" } ], "symlink_target": "" }
<?php declare(strict_types = 1); namespace Tp\DataApi; use ArrayAccess; use ReflectionClass; use ReflectionMethod; use ReflectionProperty; use ReturnTypeWillChange; use Tp\Utils; abstract class DataApiObject implements ArrayAccess { public function __construct(array $data = []) { $keys = static::keys(); $filtered = Utils::filterKeys($data, $keys); foreach ($filtered as $key => $value) { $this[$key] = $value; } } public function toArray(): array { $data = []; $keys = self::keys(); foreach ($keys as $name) { $data[$name] = static::demodelizeRecursive($this->{$name}); /* @phpstan-ignore-line */ } return $data; } /** * @return string[] */ public static function keys(): array { $calledClass = static::class; $reflection = new ReflectionClass($calledClass); // Filter out static properties and those beginning with an underscore. $allProperties = $reflection->getProperties(); $dataProperties = array_filter( $allProperties, static function (ReflectionProperty $property): bool { return self::filterDataProperties($property); } ); $sortedDataProperties = static::sortDataProperties($dataProperties); $propertyNames = []; foreach ($sortedDataProperties as $property) { $propertyNames[] = $property->getName(); } return $propertyNames; } private static function filterDataProperties( ReflectionProperty $property ): bool { $underscored = strpos($property->getName(), '_') === 0; return !$underscored && !$property->isStatic(); } /** * Prepend inherited properties. * * @param ReflectionProperty[] $dataProperties * @return ReflectionProperty[] */ private static function sortDataProperties(array $dataProperties): array { $inherited = []; $own = []; $calledClassName = static::class; foreach ($dataProperties as $property) { $propertyClass = $property->getDeclaringClass(); $propertyClassName = $propertyClass->getName(); if ($propertyClassName === $calledClassName) { $own[] = $property; } else { $inherited[] = $property; } } return array_merge($inherited, $own); } protected static function demodelizeRecursive($value) { if ($value instanceof self) { $demodelized = $value->toArray(); } else { if (is_array($value)) { $demodelized = []; foreach ($value as $k => $v) { $demodelized[$k] = static::demodelizeRecursive($v); } } else { $demodelized = $value; } } return $demodelized; } /* *** ArrayAccess *** */ /** * @param string $offset * @return bool */ public function offsetExists($offset): bool { $keys = static::keys(); return in_array($offset, $keys, true); } /** * @param string $offset * @return mixed */ #[ReturnTypeWillChange] public function offsetGet($offset) { $getterName = 'get' . ucfirst($offset); return $this->{$getterName}(); /* @phpstan-ignore-line */ } /** * @param string $offset * @param mixed $value */ public function offsetSet($offset, $value): void { $setterName = 'set' . ucfirst($offset); if ($value !== null && is_string($value)) { $reflectionMethod = new ReflectionMethod($this, $setterName); $parameterType = $reflectionMethod->getParameters()[0]->getType(); assert($parameterType !== null); switch ($parameterType->getName()) { case 'int': $value = intval($value); break; case 'float': $value = floatval($value); break; case 'bool': $value = $value === '1'; break; } } $this->{$setterName}($value); /* @phpstan-ignore-line */ } /** * @param string $offset */ public function offsetUnset($offset): void { $this->offsetSet($offset, null); } }
{ "content_hash": "e4174d2c1234f36e6b524b6f70a8ac3e", "timestamp": "", "source": "github", "line_count": 181, "max_line_length": 89, "avg_line_length": 20.46961325966851, "alnum_prop": 0.6364372469635627, "repo_name": "Trejjam/ThePay-lib", "id": "e436cac153a01048138f13f17ae2cb33de468f25", "size": "3705", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/DataApi/DataApiObject.php", "mode": "33188", "license": "mit", "language": [ { "name": "Makefile", "bytes": "713" }, { "name": "PHP", "bytes": "114661" }, { "name": "Shell", "bytes": "144" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <!-- Generated 17-May-2008 15:12:47.6093750 --> <!-- Generated by MathSBML 2.7.4 --> <!-- Generated using Mathematica Version 5.2 for Microsoft Windows (June 20, 2005) --> <sbml xmlns="http://www.sbml.org/sbml/level2/version3" level="2" version="3"> <model id="case00665" name="case00665" metaid="_case00665"> <!-- <listOfFunctionDefinitions/> --> <!-- <listOfUnitDefinitions/> --> <!-- <listOfCompartmentTypes/> --> <!-- <listOfSpeciesTypes/> --> <listOfCompartments> <compartment id="C" name="C" spatialDimensions="3" units="volume" size="1"/> </listOfCompartments> <listOfSpecies> <species id="X0" name="X0" compartment="C" boundaryCondition="false" constant="false" initialAmount="1.25" substanceUnits="substance" hasOnlySubstanceUnits="false"/> <species id="X1" name="X1" compartment="C" boundaryCondition="false" constant="false" initialAmount="1.5" substanceUnits="substance" hasOnlySubstanceUnits="false"/> <species id="T" name="T" compartment="C" boundaryCondition="false" constant="false" initialAmount="1" substanceUnits="substance" hasOnlySubstanceUnits="false"/> <species id="S1" name="S1" compartment="C" boundaryCondition="false" constant="false" initialAmount="3.75" substanceUnits="substance" hasOnlySubstanceUnits="false"/> </listOfSpecies> <listOfParameters> <parameter id="k1" name="k1" value="0.1"/> <parameter id="k2" name="k2" value="0.2"/> </listOfParameters> <!-- <listOfInitialAssignments/> --> <listOfRules> <algebraicRule metaid="rule1"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <apply> <plus/> <apply> <times/> <cn type="integer">-1</cn> <ci>S1</ci> </apply> <ci>T</ci> <ci>X0</ci> <ci>X1</ci> </apply> </math> </algebraicRule> </listOfRules> <!-- <listOfConstraints/> --> <listOfReactions> <reaction id="reaction1" name="reaction1" reversible="false" fast="false"> <listOfReactants> <speciesReference species="X0"/> </listOfReactants> <listOfProducts> <speciesReference species="T"/> </listOfProducts> <!-- <listOfModifiers/> --> <kineticLaw> <math xmlns="http://www.w3.org/1998/Math/MathML"> <apply> <times/> <ci>C</ci> <ci>k1</ci> <ci>X0</ci> </apply> </math> <!-- <listOfParameters/> --> </kineticLaw> </reaction> <reaction id="reaction2" name="reaction2" reversible="false" fast="false"> <listOfReactants> <speciesReference species="T"/> </listOfReactants> <listOfProducts> <speciesReference species="X1"/> </listOfProducts> <!-- <listOfModifiers/> --> <kineticLaw> <math xmlns="http://www.w3.org/1998/Math/MathML"> <apply> <times/> <ci>C</ci> <ci>k2</ci> <ci>T</ci> </apply> </math> <!-- <listOfParameters/> --> </kineticLaw> </reaction> </listOfReactions> <listOfEvents> <event id="event1" name="event1"> <trigger> <math xmlns="http://www.w3.org/1998/Math/MathML"> <apply> <gt/> <ci>X1</ci> <cn type="integer">2</cn> </apply> </math> </trigger> <delay> <math xmlns="http://www.w3.org/1998/Math/MathML"> <cn type="real">4.3</cn> </math> </delay> <listOfEventAssignments> <eventAssignment variable="X1"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <cn type="integer">1</cn> </math> </eventAssignment> </listOfEventAssignments> </event> </listOfEvents> </model> </sbml>
{ "content_hash": "3199e354f1eb19927d7616062ea9b2cb", "timestamp": "", "source": "github", "line_count": 158, "max_line_length": 86, "avg_line_length": 24.879746835443036, "alnum_prop": 0.5614347494276266, "repo_name": "stanleygu/sbmltest2archive", "id": "b9f328a8a5d40ff5aab4d97b44e33c9f3a8e53ab", "size": "3931", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "sbml-test-cases/cases/semantic/00665/00665-sbml-l2v3.xml", "mode": "33188", "license": "mit", "language": [ { "name": "M", "bytes": "12509" }, { "name": "Mathematica", "bytes": "721776" }, { "name": "Matlab", "bytes": "1729754" }, { "name": "Objective-C", "bytes": "144988" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <toolspec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" model="0.1" xsi:noNamespaceSchemaLocation="../scape-core/src/main/resources/eu/scape_project/core/model/toolspec/toolspec.xsd"> <id>convert</id> <name>Inkscape converter (svg2pdf)</name> <homepage>http://inkscape.org/</homepage> <version>1.0</version> <installation> <os type="linux"> tomcat6,inkscape </os> <os type="windows"> Install inkscape </os> </installation> <services> <service sid="1" name="inkscape-svg2pdf" type="migrate" servicepackage="eu.scape_project.pc.services" contextpathprefix="/scapeservices"> <description>Inkscape conversion service (svg2pdf)</description> <operations> <operation oid="1" name="convert"> <description>Converts SVG to PDF</description> <command>inkscape ${input} --export-pdf=${output} --export-area-drawing</command> <inputs> <input name="input"> <Datatype>xsd:anyURI</Datatype> <Required>true</Required> <CliMapping>input</CliMapping> <Documentation>URL reference to input file</Documentation> <Default>http://scape.keep.pt/scape/testdata/Tux.svg</Default> </input> </inputs> <outputs> <output name="output"> <Datatype>xsd:anyURI</Datatype> <Required>false</Required> <CliMapping>output</CliMapping> <Documentation>URL reference to output file</Documentation> <PrefixFromInput>input</PrefixFromInput> <Extension>pdf</Extension> </output> </outputs> </operation> </operations> <deployto> <deployref default="true" ref="local"/> </deployto> </service> </services> <deployments> <deployment id="local"> <identifier>http://scape.keep.pt</identifier> <host>scape.keep.pt</host> <ports> <port type="http">80</port> <port type="https">8043</port> </ports> <manager> <user>tomcat</user> <password>tomcat</password> <path>manager</path> </manager> <toolsbasedir/> <dataexchange> <accessdir>/var/lib/tomcat6/webapps/scape/tmp/</accessdir> <accessurl>http://scape.keep.pt/scape/tmp/</accessurl> </dataexchange> </deployment> </deployments> </toolspec>
{ "content_hash": "3fe24aa99068221a67de9a0e9c62160f", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 191, "avg_line_length": 36.705882352941174, "alnum_prop": 0.5957532051282052, "repo_name": "openpreserve/scape", "id": "dc97d29e7e27ac76d4ee51017c89ac6fa2a12c1f", "size": "2496", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "pc-as/old_stuff/services/scape-pc-as-inkscape-svg2pdf.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "37734" }, { "name": "C++", "bytes": "307178" }, { "name": "CMake", "bytes": "21610" }, { "name": "CSS", "bytes": "40274" }, { "name": "Groff", "bytes": "9546" }, { "name": "HTML", "bytes": "20306" }, { "name": "Java", "bytes": "401809" }, { "name": "JavaScript", "bytes": "44677" }, { "name": "Makefile", "bytes": "10559" }, { "name": "PHP", "bytes": "1480" }, { "name": "Perl", "bytes": "26461" }, { "name": "PostScript", "bytes": "26" }, { "name": "Python", "bytes": "52195" }, { "name": "Ruby", "bytes": "66320" }, { "name": "Shell", "bytes": "94797" }, { "name": "TeX", "bytes": "34835" } ], "symlink_target": "" }
layout: docs title: Running builds as local process --- <!-- markdownlint-disable MD022 MD032 --> # Running builds as local process {:.no_toc} * Comment to trigger ToC generation {:toc} <!-- markdownlint-enable MD022 MD032 --> ## Prepare agent machine ### Minimum requirements: * Windows Server 2012 R2 (Windows 8.1) or higher * .NET Framework 4.5.2 * Disk space should be enough to clone repository and store build artefacts * Internet connectivity * Currently we require outbound Internet connectivity at TCP (not HTTP) level (behind router or NAT). We are working on proxy support, please watch [this](https://github.com/appveyor/ci/issues/1303) issue ## Setup agent machine software ### Download and install AppVeyor Host agent on agent machine * [Download location](https://www.appveyor.com/downloads/host-agent/windows/latest/AppveyorHostAgent.msi) * Installation settings * **Host authorization token**: token generated or manually entered during [Setting up custom cloud and images in AppVeyor](/docs/enterprise/running-builds-as-local-process/#setting-up-custom-cloud-and-images-in-appveyor) step ### Optionally configure Host agent to run in "Interactive" mode This setting can be useful if you need to run UI tests. * [Enable auto-logon](https://github.com/appveyor/ci/blob/master/scripts/enterprise/enable_auto_logon.ps1) [[raw](https://raw.githubusercontent.com/appveyor/ci/master/scripts/enterprise/enable_auto_logon.ps1)] * [Add Appveyor Host Agent to auto-run](https://github.com/appveyor/ci/blob/master/scripts/enterprise/add_appveyor_host_agent_to_auto_run.ps1) [[raw](https://raw.githubusercontent.com/appveyor/ci/master/scripts/enterprise/add_appveyor_host_agent_to_auto_run.ps1)] Restart computer to ensure that changes auto-logon/run works as expected. ### Download and install AppVeyor build agent on agent machine * [Download location](https://www.appveyor.com/downloads/build-agent/latest/AppveyorBuildAgent.msi) * Accept all default settings during installation * [Set Build Agent mode to Local process](https://github.com/appveyor/ci/blob/master/scripts/enterprise/set_local_process_build_agent_mode.ps1) [[raw](https://raw.githubusercontent.com/appveyor/ci/master/scripts/enterprise/set_local_process_build_agent_mode.ps1)] ### Download and install additional software required by build process Follow [these steps](/docs/enterprise/setup-master-vm/) to configure VM and install software required for your build process. It is tested PowerShell scripts which can be simply copy-pasted to PowerShell window (started in privileged mode). Specifically: * [Basic configuration](/docs/enterprise/setup-master-vm/#basic-configuration) and [Essential 3rd-party software](/docs/enterprise/setup-master-vm/#essential-3rd-party-software) - we strongly recommend to install everything from those sections. * [Build framework](/docs/enterprise/setup-master-vm/#build-framework) - you can skip one of MSBuild and Visual Studio versions or both if you don't need them. * [Test framework](/docs/enterprise/setup-master-vm/#test-framework) - you can skip that step if you are running your own custom test script/framework. * [AppVeyor Build Agent](/docs/enterprise/setup-master-vm/#appveyor-build-agent) and [Configuring agent to run in "Interactive" mode](/docs/enterprise/setup-master-vm/#configuring-agent-to-run-in-interactive-mode) - these steps are mandatory. Install any additional software required for your builds. ## Setting up custom cloud and images in AppVeyor * Login to AppVeyor portal * Navigate to your account level **Settings** in the top manu and select **Build environment** option from the drop-down * If **Build environment** option is not available, please contact [support@appveyor.com](mailto:support@appveyor.com) and ask to enable **Private build clouds** feature * Press **Add cloud**, select cloud type **Process** **Complete the following settings**: * **Name**: Name for your local process environment. Make it meaningful and short to be able to use in YAML configuration. * **Host authorization token**: generate host authorization token or enter it manually. * **Workers capacity**: In local process context this means number of AppVeyor build agents could be spin up in parallel. * Note that every build agent consumes about at least 15 Mb of memory, with additional overhead which depends on build tool is being used. * CPU consumption is also can vary depending on specific build tool/scenario * Number of parallel build cannot be greater than what is allowed in AppVeyor plan regardless of **Workers capacity** setting. * **Project builds directory**: Set folder to be used to clone and run builds on agent machine * **Build Agent directory**: leave it blanc is Agent installation happened with default settings, otherwise set accordingly. * Open **Failure strategy** and set the following: * **Job start timeout, seconds**: 180 should good enough for modern server. However, please feel free to increase according to your observation with specific machine. * **Provisioning attempts**: 2 is good for start. Later you may need to change it according to your observations ## Make build worker image available for configuration Though *image* term does not fit into local process scenario, it is required to set some *image* to be able to wire specific environment to specific project. * Navigate to **Build environment** > **Build worker images** * Press **Add image** * Enter any name you like as **IMAGE NAME** ## How to route build to your own cloud At **project** level: * **UI**: * **Settings** > **Environment** > **Build cloud**: Select your local process environment name from drop-down * **Settings** > **Environment** > **Build worker image**: Select your image name set in previous step from drop-down * **YAML**: ```yaml build_cloud: <process_environment_name> image: <process_environment_image> ```
{ "content_hash": "daba5de3d7e346ff727e4e1a60e9fa01", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 267, "avg_line_length": 60.59183673469388, "alnum_prop": 0.7660828561805322, "repo_name": "appveyor/website", "id": "6b3491953ee4b3eb121d6c31a1f436b7204266bf", "size": "5942", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/docs/server/running-builds-as-local-process.md", "mode": "33188", "license": "mit", "language": [ { "name": "ASP.NET", "bytes": "96" }, { "name": "CSS", "bytes": "26771" }, { "name": "HTML", "bytes": "156285" }, { "name": "JavaScript", "bytes": "12325" }, { "name": "Ruby", "bytes": "190" } ], "symlink_target": "" }
using System; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; using Steamworks.Data; namespace Steamworks { internal unsafe class ISteamRemoteStorage : SteamInterface { internal ISteamRemoteStorage( bool IsGameServer ) { SetupInterface( IsGameServer ); } [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamRemoteStorage_v016", CallingConvention = Platform.CC)] internal static extern IntPtr SteamAPI_SteamRemoteStorage_v016(); public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamRemoteStorage_v016(); #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWrite", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _FileWrite( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData ); #endregion internal bool FileWrite( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData ) { var returnValue = _FileWrite( Self, pchFile, pvData, cubData ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileRead", CallingConvention = Platform.CC)] private static extern int _FileRead( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead ); #endregion internal int FileRead( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead ) { var returnValue = _FileRead( Self, pchFile, pvData, cubDataToRead ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteAsync", CallingConvention = Platform.CC)] private static extern SteamAPICall_t _FileWriteAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData ); #endregion internal CallResult<RemoteStorageFileWriteAsyncComplete_t> FileWriteAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData ) { var returnValue = _FileWriteAsync( Self, pchFile, pvData, cubData ); return new CallResult<RemoteStorageFileWriteAsyncComplete_t>( returnValue, IsServer ); } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsync", CallingConvention = Platform.CC)] private static extern SteamAPICall_t _FileReadAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead ); #endregion internal CallResult<RemoteStorageFileReadAsyncComplete_t> FileReadAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead ) { var returnValue = _FileReadAsync( Self, pchFile, nOffset, cubToRead ); return new CallResult<RemoteStorageFileReadAsyncComplete_t>( returnValue, IsServer ); } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsyncComplete", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _FileReadAsyncComplete( IntPtr self, SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead ); #endregion internal bool FileReadAsyncComplete( SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead ) { var returnValue = _FileReadAsyncComplete( Self, hReadCall, pvBuffer, cubToRead ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileForget", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _FileForget( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal bool FileForget( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) { var returnValue = _FileForget( Self, pchFile ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileDelete", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _FileDelete( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal bool FileDelete( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) { var returnValue = _FileDelete( Self, pchFile ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileShare", CallingConvention = Platform.CC)] private static extern SteamAPICall_t _FileShare( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal CallResult<RemoteStorageFileShareResult_t> FileShare( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) { var returnValue = _FileShare( Self, pchFile ); return new CallResult<RemoteStorageFileShareResult_t>( returnValue, IsServer ); } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetSyncPlatforms", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _SetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform ); #endregion internal bool SetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform ) { var returnValue = _SetSyncPlatforms( Self, pchFile, eRemoteStoragePlatform ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamOpen", CallingConvention = Platform.CC)] private static extern UGCFileWriteStreamHandle_t _FileWriteStreamOpen( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal UGCFileWriteStreamHandle_t FileWriteStreamOpen( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) { var returnValue = _FileWriteStreamOpen( Self, pchFile ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamWriteChunk", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _FileWriteStreamWriteChunk( IntPtr self, UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData ); #endregion internal bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData ) { var returnValue = _FileWriteStreamWriteChunk( Self, writeHandle, pvData, cubData ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamClose", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _FileWriteStreamClose( IntPtr self, UGCFileWriteStreamHandle_t writeHandle ); #endregion internal bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle ) { var returnValue = _FileWriteStreamClose( Self, writeHandle ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamCancel", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _FileWriteStreamCancel( IntPtr self, UGCFileWriteStreamHandle_t writeHandle ); #endregion internal bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle ) { var returnValue = _FileWriteStreamCancel( Self, writeHandle ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileExists", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _FileExists( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal bool FileExists( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) { var returnValue = _FileExists( Self, pchFile ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FilePersisted", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _FilePersisted( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal bool FilePersisted( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) { var returnValue = _FilePersisted( Self, pchFile ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileSize", CallingConvention = Platform.CC)] private static extern int _GetFileSize( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal int GetFileSize( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) { var returnValue = _GetFileSize( Self, pchFile ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileTimestamp", CallingConvention = Platform.CC)] private static extern long _GetFileTimestamp( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal long GetFileTimestamp( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) { var returnValue = _GetFileTimestamp( Self, pchFile ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetSyncPlatforms", CallingConvention = Platform.CC)] private static extern RemoteStoragePlatform _GetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal RemoteStoragePlatform GetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) { var returnValue = _GetSyncPlatforms( Self, pchFile ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileCount", CallingConvention = Platform.CC)] private static extern int _GetFileCount( IntPtr self ); #endregion internal int GetFileCount() { var returnValue = _GetFileCount( Self ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileNameAndSize", CallingConvention = Platform.CC)] private static extern Utf8StringPointer _GetFileNameAndSize( IntPtr self, int iFile, ref int pnFileSizeInBytes ); #endregion internal string GetFileNameAndSize( int iFile, ref int pnFileSizeInBytes ) { var returnValue = _GetFileNameAndSize( Self, iFile, ref pnFileSizeInBytes ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetQuota", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _GetQuota( IntPtr self, ref ulong pnTotalBytes, ref ulong puAvailableBytes ); #endregion internal bool GetQuota( ref ulong pnTotalBytes, ref ulong puAvailableBytes ) { var returnValue = _GetQuota( Self, ref pnTotalBytes, ref puAvailableBytes ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForAccount", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _IsCloudEnabledForAccount( IntPtr self ); #endregion internal bool IsCloudEnabledForAccount() { var returnValue = _IsCloudEnabledForAccount( Self ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForApp", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _IsCloudEnabledForApp( IntPtr self ); #endregion internal bool IsCloudEnabledForApp() { var returnValue = _IsCloudEnabledForApp( Self ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetCloudEnabledForApp", CallingConvention = Platform.CC)] private static extern void _SetCloudEnabledForApp( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled ); #endregion internal void SetCloudEnabledForApp( [MarshalAs( UnmanagedType.U1 )] bool bEnabled ) { _SetCloudEnabledForApp( Self, bEnabled ); } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownload", CallingConvention = Platform.CC)] private static extern SteamAPICall_t _UGCDownload( IntPtr self, UGCHandle_t hContent, uint unPriority ); #endregion internal CallResult<RemoteStorageDownloadUGCResult_t> UGCDownload( UGCHandle_t hContent, uint unPriority ) { var returnValue = _UGCDownload( Self, hContent, unPriority ); return new CallResult<RemoteStorageDownloadUGCResult_t>( returnValue, IsServer ); } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDownloadProgress", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _GetUGCDownloadProgress( IntPtr self, UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected ); #endregion internal bool GetUGCDownloadProgress( UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected ) { var returnValue = _GetUGCDownloadProgress( Self, hContent, ref pnBytesDownloaded, ref pnBytesExpected ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDetails", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _GetUGCDetails( IntPtr self, UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner ); #endregion internal bool GetUGCDetails( UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner ) { var returnValue = _GetUGCDetails( Self, hContent, ref pnAppID, ref ppchName, ref pnFileSizeInBytes, ref pSteamIDOwner ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCRead", CallingConvention = Platform.CC)] private static extern int _UGCRead( IntPtr self, UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction ); #endregion internal int UGCRead( UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction ) { var returnValue = _UGCRead( Self, hContent, pvData, cubDataToRead, cOffset, eAction ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCCount", CallingConvention = Platform.CC)] private static extern int _GetCachedUGCCount( IntPtr self ); #endregion internal int GetCachedUGCCount() { var returnValue = _GetCachedUGCCount( Self ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCHandle", CallingConvention = Platform.CC)] private static extern UGCHandle_t _GetCachedUGCHandle( IntPtr self, int iCachedContent ); #endregion internal UGCHandle_t GetCachedUGCHandle( int iCachedContent ) { var returnValue = _GetCachedUGCHandle( Self, iCachedContent ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation", CallingConvention = Platform.CC)] private static extern SteamAPICall_t _UGCDownloadToLocation( IntPtr self, UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority ); #endregion internal CallResult<RemoteStorageDownloadUGCResult_t> UGCDownloadToLocation( UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority ) { var returnValue = _UGCDownloadToLocation( Self, hContent, pchLocation, unPriority ); return new CallResult<RemoteStorageDownloadUGCResult_t>( returnValue, IsServer ); } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetLocalFileChangeCount", CallingConvention = Platform.CC)] private static extern int _GetLocalFileChangeCount( IntPtr self ); #endregion internal int GetLocalFileChangeCount() { var returnValue = _GetLocalFileChangeCount( Self ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetLocalFileChange", CallingConvention = Platform.CC)] private static extern Utf8StringPointer _GetLocalFileChange( IntPtr self, int iFile, ref RemoteStorageLocalFileChange pEChangeType, ref RemoteStorageFilePathType pEFilePathType ); #endregion internal string GetLocalFileChange( int iFile, ref RemoteStorageLocalFileChange pEChangeType, ref RemoteStorageFilePathType pEFilePathType ) { var returnValue = _GetLocalFileChange( Self, iFile, ref pEChangeType, ref pEFilePathType ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_BeginFileWriteBatch", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _BeginFileWriteBatch( IntPtr self ); #endregion internal bool BeginFileWriteBatch() { var returnValue = _BeginFileWriteBatch( Self ); return returnValue; } #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_EndFileWriteBatch", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] private static extern bool _EndFileWriteBatch( IntPtr self ); #endregion internal bool EndFileWriteBatch() { var returnValue = _EndFileWriteBatch( Self ); return returnValue; } } }
{ "content_hash": "a9ce3ffdcdcd7a6cbe2cd38c8ab0623c", "timestamp": "", "source": "github", "line_count": 425, "max_line_length": 230, "avg_line_length": 47.43529411764706, "alnum_prop": 0.7749503968253968, "repo_name": "Facepunch/Facepunch.Steamworks", "id": "c1a872115a02f3fe52e6dac22a951141dc7416e2", "size": "20160", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Facepunch.Steamworks/Generated/Interfaces/ISteamRemoteStorage.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "377" }, { "name": "C", "bytes": "185995" }, { "name": "C#", "bytes": "1287460" }, { "name": "C++", "bytes": "725543" } ], "symlink_target": "" }
/** * The core accounting implementation. This is the core book keeping module. Everything that is an entry in prima nota, * journal or general ledger is handled by this package in one way or another. This package is the base for all other * accounting modules since it provides the data to work with. * * @author klenkes {@literal <rlichti@kaiserpfalz-edv.de>} * @version 0.3.0 * @since 2016-03-24 */ package de.kaiserpfalzedv.office.finance.accounting.api;
{ "content_hash": "e385d6e95f7f0bb1a354fb9133a1a6b7", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 119, "avg_line_length": 39, "alnum_prop": 0.75, "repo_name": "klenkes74/kp-office", "id": "7562480d53fcd1851ce4ee129c6cdb31b2d38f2d", "size": "1092", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "kp-finance-root/kp-finance-accounting/src/main/java/de/kaiserpfalzedv/office/finance/accounting/api/package-info.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "30222" }, { "name": "HTML", "bytes": "842" }, { "name": "Java", "bytes": "1180354" } ], "symlink_target": "" }
package org.springframework.osgi.iandt.cycles; import java.util.Collection; /** * Integration test for checking cyclic injection between an importer and its * listeners. * * @author Costin Leau */ public class CollectionCycleTest extends BaseImporterCycleTest { private Collection importer; protected String[] getConfigLocations() { return new String[] { "/org/springframework/osgi/iandt/cycles/top-level-collection-importer.xml" }; } protected void onSetUp() throws Exception { super.onSetUp(); importer = (Collection) applicationContext.getBean("importer"); } public void testListenerA() throws Exception { assertEquals(importer.toString(), listenerA.getTarget().toString()); } public void testListenerB() throws Exception { assertEquals(importer.toString(), listenerB.getTarget().toString()); } public void testListenersBetweenThem() throws Exception { assertSame(listenerA.getTarget(), listenerB.getTarget()); } }
{ "content_hash": "f83c3b00a928765e7c69d0cb55b1a098", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 101, "avg_line_length": 25.58974358974359, "alnum_prop": 0.7244488977955912, "repo_name": "BeamFoundry/spring-osgi", "id": "0679e780664aafc2a1c4a69fe9623c561b9d8678", "size": "1635", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spring-dm/integration-tests/tests/src/test/java/org/springframework/osgi/iandt/cycles/CollectionCycleTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "27277" }, { "name": "Java", "bytes": "2517744" }, { "name": "XSLT", "bytes": "39288" } ], "symlink_target": "" }
package MapGeneration.Graph.PolygonProperties.Biomes; import java.awt.*; /** * Created by Phoenicia on 02.02.2017. */ public class Grassland implements Biome { private static Grassland instance; private Grassland() { } public static Grassland getInstance() { if(instance == null) instance = new Grassland(); return instance; } @Override public Color getBiomeColor() { return new Color(175,255, 0); } @Override public TexturePaint getBiomeTexture() { return null; } }
{ "content_hash": "f9da25bed498ad82e685668499592012", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 56, "avg_line_length": 18.6, "alnum_prop": 0.6344086021505376, "repo_name": "lively-world/world-map", "id": "0d30c08b6da8911b44294d29af411cc06fea89ad", "size": "558", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/MapGeneration/Graph/PolygonProperties/Biomes/Grassland.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "49935" } ], "symlink_target": "" }
var gulp = require('gulp'); var webserver = require('gulp-webserver'); var nodemon = require('gulp-nodemon'); //conflics with pouchdb and file locks var exec = require('gulp-exec'); var notify = require('gulp-notify'); var notifier = require('node-notifier'); // var env = require('gulp-env'); var User = require('./app/model/user.js'); gulp.task('webserver', function() { gulp.src('staticsite') .pipe(webserver({ path: '/', port: 8001, livereload: false, host: 'auth.vcap.me', open: true, fallback: 'index.html' })); }); gulp.task('nodemon', function () { nodemon({ script: 'server.js' , env: { 'NODE_ENV': 'development', 'PORT':8000, 'DEBUG': 'server:*' } }) }); gulp.task('default', ['webserver', 'nodemon']); gulp.task('createuser', function(){ createUser(); notifier.notify({title: 'creating user', message: 'end...'}); }) function createUser(){ var user = new User({ name: 'johndoe', password: 'password', admin: true }); // save the sample user user.save(function(err) { if (err) { errorHandler(err); } else { debug('create a test user'); } }); } function errorHandler (err) { console.error('didn\'t create user.. ', err); this.emit('end'); }
{ "content_hash": "92eac6adb201fbddaaa12db931200734", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 77, "avg_line_length": 20.682539682539684, "alnum_prop": 0.5832693783576363, "repo_name": "cicorias/central-authentication", "id": "cf618f2659de523a1691b6c6bf98341eab85587a", "size": "1303", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "gulpfile.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "1848" }, { "name": "JavaScript", "bytes": "16574" } ], "symlink_target": "" }
package net.floodlightcontroller.odin.master; import java.net.InetAddress; import java.net.InetSocketAddress; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.ConcurrentHashMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import net.floodlightcontroller.core.IFloodlightProviderService; import net.floodlightcontroller.core.IOFSwitch; import net.floodlightcontroller.odin.master.IOdinAgent; import net.floodlightcontroller.odin.master.OdinAgentFactory; import net.floodlightcontroller.odin.master.OdinClient; import net.floodlightcontroller.odin.master.OdinMaster; class AgentManager { private final ConcurrentHashMap<InetAddress, IOdinAgent> agentMap = new ConcurrentHashMap<InetAddress,IOdinAgent>(); protected static Logger log = LoggerFactory.getLogger(OdinMaster.class); private IFloodlightProviderService floodlightProvider; private final ClientManager clientManager; private final PoolManager poolManager; private final Timer failureDetectionTimer = new Timer(); private int agentTimeout = 6000; protected AgentManager (ClientManager clientManager, PoolManager poolManager) { this.clientManager = clientManager; this.poolManager = poolManager; } protected void setFloodlightProvider(final IFloodlightProviderService provider) { floodlightProvider = provider; } protected void setAgentTimeout (final int timeout) { assert (timeout > 0); agentTimeout = timeout; } /** * Confirm if the agent corresponding to an InetAddress * is being tracked. * * @param odinAgentInetAddress * @return true if the agent is being tracked */ protected boolean isTracked(final InetAddress odinAgentInetAddress) { return agentMap.containsKey(odinAgentInetAddress); } /** * Get the list of agents being tracked for a particular pool * @return agentMap */ protected Map<InetAddress, IOdinAgent> getAgents() { return Collections.unmodifiableMap(agentMap); } /** * Get a reference to an agent * * @param agentInetAddr */ protected IOdinAgent getAgent(final InetAddress agentInetAddr) { assert (agentInetAddr != null); return agentMap.get(agentInetAddr); } /** * Removes an agent from the agent manager * * @param agentInetAddr */ protected void removeAgent(InetAddress agentInetAddr) { synchronized (this) { agentMap.remove(agentInetAddr); } } // Handle protocol messages here /** * Handle a ping from an agent. If an agent was added to the * agent map, return true. * * @param odinAgentAddr * @return true if an agent was added */ protected boolean receivePing(final InetAddress odinAgentAddr) { log.info("Ping message from: " + odinAgentAddr); /* * If this is not the first time we're hearing from this * agent, then skip. */ if (odinAgentAddr == null || isTracked (odinAgentAddr)) { return false; } IOFSwitch ofSwitch = null; /* * If the OFSwitch corresponding to the agent has already * registered here, then set it in the OdinAgent object. * We avoid registering the agent until its corresponding * OFSwitch has done so. */ for (IOFSwitch sw: floodlightProvider.getSwitches().values()) { /* * We're binding by IP addresses now, because we want to pool * an OFSwitch with its corresponding OdinAgent, if any. */ String switchIpAddr = ((InetSocketAddress) sw.getChannel().getRemoteAddress()).getAddress().getHostAddress(); if (switchIpAddr.equals(odinAgentAddr.getHostAddress())) { ofSwitch = sw; break; } } if (ofSwitch == null) return false; synchronized (this) { /* Possible if a thread has waited * outside this critical region for * too long */ if (isTracked(odinAgentAddr)) return false; IOdinAgent oa = OdinAgentFactory.getOdinAgent(); oa.setSwitch(ofSwitch); oa.init(odinAgentAddr); oa.setLastHeard(System.currentTimeMillis()); List<String> poolListForAgent = poolManager.getPoolsForAgent(odinAgentAddr); /* * It is possible that the controller is recovering from a failure, * so query the agent to see what LVAPs it hosts, and add them * to our client tracker accordingly. */ for (OdinClient client: oa.getLvapsRemote()) { OdinClient trackedClient = clientManager.getClients().get(client.getMacAddress()); if (trackedClient == null){ clientManager.addClient(client); trackedClient = clientManager.getClients().get(client.getMacAddress()); /* * We need to find the pool the client was previously assigned to. * The only information we have at this point is the * SSID list of the client's LVAP. This can be simplified in * future by adding a "pool" field to the LVAP struct. */ for (String pool: poolListForAgent) { /* * Every SSID in every pool is unique, so we need to use only one * of the lvap's SSIDs to find the right pool. */ String ssid = client.getLvap().getSsids().get(0); if (poolManager.getSsidListForPool(pool).contains(ssid)) { poolManager.mapClientToPool(trackedClient, pool); break; } } } if (trackedClient.getLvap().getAgent() == null) { trackedClient.getLvap().setAgent(oa); } else if (!trackedClient.getLvap().getAgent().getIpAddress().equals(odinAgentAddr)) { /* * Race condition: * - client associated at AP1 before the master failure, * - master crashes. * - master re-starts, AP2 connects to the master first. * - client scans, master assigns it to AP2. * - AP1 now joins the master again, but it has the client's LVAP as well. * - Master should now clear the LVAP from AP1. */ oa.removeClientLvap(client); } } agentMap.put(odinAgentAddr, oa); log.info("Adding OdinAgent to map: " + odinAgentAddr.getHostAddress()); /* This TimerTask checks the lastHeard value * of the agent in order to handle failure detection */ failureDetectionTimer.scheduleAtFixedRate(new OdinAgentFailureDetectorTask(oa), 1, agentTimeout/2); } return true; } private class OdinAgentFailureDetectorTask extends TimerTask { private final IOdinAgent agent; OdinAgentFailureDetectorTask (final IOdinAgent oa){ this.agent = oa; } @Override public void run() { log.info("Executing failure check against: " + agent.getIpAddress()); if ((System.currentTimeMillis() - agent.getLastHeard()) >= agentTimeout) { log.error("Agent: " + agent.getIpAddress() + " has timed out"); /* This is default behaviour, maybe we should * re-assign the client based on some specific * behaviour */ // TODO: There should be a way to lock the master // during such operations for (OdinClient oc: agent.getLvapsLocal()) { clientManager.getClients().get(oc.getMacAddress()).getLvap().setAgent(null); } // Agent should now be cleared out removeAgent(agent.getIpAddress()); this.cancel(); } } } }
{ "content_hash": "c4fef8e6cf8a4a9c2321c40917edc9ab", "timestamp": "", "source": "github", "line_count": 250, "max_line_length": 117, "avg_line_length": 30.108, "alnum_prop": 0.6662681015012621, "repo_name": "lalithsuresh/odin-master", "id": "8bbdd195738e5bed6fea8bc6268ed81971a9c3de", "size": "7527", "binary": false, "copies": "1", "ref": "refs/heads/odin", "path": "src/main/java/net/floodlightcontroller/odin/master/AgentManager.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "93011" }, { "name": "Java", "bytes": "2208274" }, { "name": "JavaScript", "bytes": "42625" }, { "name": "Python", "bytes": "21224" }, { "name": "Shell", "bytes": "2503" } ], "symlink_target": "" }
(function ($, angular, _) { var WaterSenseApplication = angular.module('WaterSenseApplication', ['ngRoute', 'angular-chartist', 'amChartsDirective', 'ngMap']); var APP_URL = $("meta[name=app_url]").attr('content'); function url_view(path) { return APP_URL + '/view' + path; } function url_api(path) { return APP_URL + path; } function digestDate(dateString) { var day = dateString.slice(0, 2); var month = dateString.slice(3, 5); var year = dateString.slice(6, 10); var hour = dateString.slice(11, 14); return new Date(parseInt(year), parseInt(month), parseInt(day), parseInt(hour), 0, 0); } function digestDate2(dateString) { var day = dateString.slice(0, 2); var month = dateString.slice(3, 5); var year = dateString.slice(6, 10); return new Date(parseInt(year), parseInt(month), parseInt(day), 0, 0, 0); } function formatDate(date) { return date.getDate() + "/" + (date.getMonth() + 1) + " " + date.getHours() + "h"; } function digestAvgValue(valueString) { return parseFloat(valueString, 10).toFixed(3); } function formatHour(date) { return date.getDate() + " " + date.getUTCHours() + "h"; } function formatDateDaily(date) { var d = new Date(date); return d.getDate() + "/" + (d.getMonth() + 1); } function calcDailyAverage(records) { var s = _.groupBy(records, function (e) { var d = digestDate(e.DATA); return d.getMonth() + "/" + d.getDate(); }); return _.map(s, function (e, key) { var ext_temp = _.reduce(e, function (a, b) { return a + b.ext_temp; }, 0); var water_temp = _.reduce(e, function (a, b) { return a + b.water_temp; }, 0); var luminosity = _.reduce(e, function (a, b) { return a + b.luminosity; }, 0); var ph = _.reduce(e, function (a, b) { return a + b.ph; }, 0); return { DATA: key, ext_temp: ext_temp / e.length, water_temp: water_temp / e.length, luminosity: luminosity / e.length, ph: ph / e.length }; }); } WaterSenseApplication.service('IQA', [ function () { var self = this; self.cetesbIndex = function (iqa) { if (iqa <= 19) { return "PÉSSIMA"; } if (iqa <= 36) { return "RUIM"; } if (iqa <= 50) { return "ACEITÁVEL"; } if (iqa <= 79) { return "BOA"; } return "ÓTIMA"; }; self.conamaIndex = function (iqa) { if (iqa <= 25) { return "PÉSSIMA"; } if (iqa <= 50) { return "RUIM"; } if (iqa <= 70) { return "ACEITÁVEL"; } if (iqa <= 90) { return "BOA"; } return "ÓTIMA"; }; } ]); WaterSenseApplication.service('SensorRepository', [ function () { var self = this; self.all = function (callback) { $.get(url_api("/Sensor"), function (data) { callback(data); }); }; self.find = function (id, callback) { $.get(url_api("/Sensor/" + id), function (data) { callback(data); }); }; } ]); WaterSenseApplication.service('PeriodicMeasurementRepository', [ function () { var self = this; self.create = function (sensor, obj, callback) { $.ajax({ url: url_api('/PeriodicMeasurement'), data: _.extend({sensor: sensor}, obj), type: 'post', dataType: 'json' }).done(function (data) { callback(data); }); }; self.last20 = function (sensor, variable, callback) { $.ajax({ url: url_api("/PeriodicMeasurement/find"), data: {'sensor': sensor, 'limit': 20, 'variable': variable}, type: 'post', dataType: 'json' }).done(function (data) { callback(data); }); }; } ]); WaterSenseApplication.service('IQARepository', [ function () { var self = this; self.daily = function (sensor, limit, callback) { $.ajax({ url: url_api("/IQA/daily"), data: {'sensor': sensor, 'limit': limit }, type: 'get', dataType: 'json' }).done(function (data) { callback(data); }); }; } ]); WaterSenseApplication.service('SubscriberRepository', [ function () { var self = this; self.create = function (sensor, subscriber, callback) { $.ajax({ url: url_api("/EmailSubscription"), data: _.extend({ sensor: sensor }, subscriber), method: 'post', dataType: 'json' }).done(function (data) { callback(data); }); }; } ]); WaterSenseApplication.service('SensorSignalRepository', [ function () { var self = this; self.last1000 = function (sensor, callback) { $.ajax({ url: url_api("/SensorSignal/find"), data: {'sensor': sensor, 'limit': 1000}, type: 'get', dataType: 'json' }).done(function (data) { callback(data); }); }; self.last20 = function (sensor, callback) { $.ajax({ url: url_api("/SensorSignal/find"), data: {'sensor': sensor}, type: 'get', dataType: 'json' }).done(function (data) { callback(data); }); }; self.daily_avg = function (sensor, limit, callback) { $.ajax({ url: url_api('/SensorSignal/daily_avg'), data: {'sensor': sensor, 'limit': limit}, type: 'get', dataType: 'json' }).done(function (data) { callback(data); }); }; self.hourly_avg = function (sensor, limit, callback) { $.ajax({ url: url_api('/SensorSignal/hourly_avg'), data: {'sensor': sensor, 'limit': limit}, type: 'get', dataType: 'json' }).done(function (data) { callback(data); }); }; self.today = function (sensor, callback) { $.ajax({ url: url_api("/SensorSignal/today"), data: {'sensor': sensor}, type: 'get', dataType: 'json' }).done(function (data) { callback(data); }); }; } ]); WaterSenseApplication.controller('IndexCtrl', ['$scope', 'SensorRepository', function ($scope, SensorRepository) { $scope.sensorList = []; $scope.formatDescription = function (text) { if (text.length <= 123) return text; return text.slice(0, 120) + "..."; }; SensorRepository.all(function (data) { $scope.$apply(function () { $scope.sensorList = data; }); }); } ]); WaterSenseApplication.controller('ExtTempSensorControlCtrl', ['$scope', '$routeParams', '$q', '$timeout', 'SensorRepository', 'SensorSignalRepository', function ($scope, $routeParams, $q, $timeout, SensorRepository, SensorSignalRepository) { $scope.sensor = {}; $scope.dailyExtTempDataset = []; $scope.weeklyExtTempDataset = []; $scope.monthlyExtTempDataset = []; $scope.dailyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.map($scope.dailyExtTempDataset, function (e) { return { date: new Date(e.createdAt), ext_temp: e.ext_temp } })); return deferred.promise; }; $scope.weeklyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.orderBy( _.map($scope.weeklyExtTempDataset, function (e) { return { date: new Date(e.DATA), ext_temp: parseFloat(e.ext_temp).toFixed(4) }; }), function (e) { return e.date; }) ); return deferred.promise; }; $scope.monthlyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.map($scope.monthlyExtTempDataset, function (e) { return { date: new Date(e.DATA), ext_temp: parseFloat(e.ext_temp).toFixed(4) } })); return deferred.promise; }; $scope.dailyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.dailyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left" }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "fillAlphas": 0.4, "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 5, "title": "Temperatura Ambiente", "valueField": "ext_temp", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "ss", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); $scope.weeklyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.weeklyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left" }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 50, "title": "Temperatura Ambiente", "valueField": "ext_temp", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "hh", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); $scope.monthlyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.monthlyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left" }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 50, "title": "Temperatura Ambiente", "valueField": "ext_temp", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "mm", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; SensorSignalRepository.today(s.id, function (records) { $scope.$apply(function () { $scope.dailyExtTempDataset = records; }); }); SensorSignalRepository.hourly_avg(s.id, 7 * 24, function (records) { $scope.$apply(function () { $scope.weeklyExtTempDataset = records; }); }); SensorSignalRepository.daily_avg(s.id, 30 * 12, function (records) { $scope.$apply(function () { $scope.monthlyExtTempDataset = records; }); }); }); }); } ]); WaterSenseApplication.controller('WaterTempSensorControlCtrl', ['$scope', '$routeParams', '$q', '$timeout', 'SensorRepository', 'SensorSignalRepository', function ($scope, $routeParams, $q, $timeout, SensorRepository, SensorSignalRepository) { $scope.sensor = {}; $scope.dailyWaterTempDataset = []; $scope.weeklyWaterTempDataset = []; $scope.monthlyWaterTempDataset = []; $scope.dailyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.map($scope.dailyWaterTempDataset, function (e) { return { date: new Date(e.createdAt), water_temp: e.water_temp } })); return deferred.promise; }; $scope.weeklyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.orderBy( _.map($scope.weeklyWaterTempDataset, function (e) { return { date: new Date(e.DATA), water_temp: parseFloat(e.water_temp).toFixed(4) }; }), function (e) { return e.date; }) ); return deferred.promise; }; $scope.monthlyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.map($scope.monthlyWaterTempDataset, function (e) { return { date: new Date(e.DATA), water_temp: parseFloat(e.water_temp).toFixed(4) } })); return deferred.promise; }; $scope.dailyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.dailyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left" }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "fillAlphas": 0.4, "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 5, "title": "Temperatura da Água", "valueField": "water_temp", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "ss", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); $scope.weeklyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.weeklyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left" }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 50, "title": "Temperatura da Água", "valueField": "water_temp", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "mm", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); $scope.monthlyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.monthlyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left" }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 50, "title": "Temperatura da Água", "valueField": "water_temp", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "mm", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; SensorSignalRepository.today(s.id, function (records) { $scope.$apply(function () { $scope.dailyWaterTempDataset = records; }); }); SensorSignalRepository.hourly_avg(s.id, 7 * 24, function (records) { $scope.$apply(function () { $scope.weeklyWaterTempDataset = records; }); }); SensorSignalRepository.daily_avg(s.id, 30 * 12, function (records) { $scope.$apply(function () { $scope.monthlyWaterTempDataset = records; }); }); }); }); } ]); WaterSenseApplication.controller('LuminositySensorControlCtrl', ['$scope', '$routeParams', '$q', '$timeout', 'SensorRepository', 'SensorSignalRepository', function ($scope, $routeParams, $q, $timeout, SensorRepository, SensorSignalRepository) { $scope.sensor = {}; $scope.dailyLuminosityDataset = []; $scope.weeklyLuminosityDataset = []; $scope.monthlyLuminosityDataset = []; $scope.dailyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.map($scope.dailyLuminosityDataset, function (e) { return { date: new Date(e.createdAt), luminosity: e.luminosity } })); return deferred.promise; }; $scope.weeklyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.orderBy( _.map($scope.weeklyLuminosityDataset, function (e) { return { date: new Date(e.DATA), luminosity: parseFloat(e.luminosity).toFixed(4) }; }), function (e) { return e.date; }) ); return deferred.promise; }; $scope.monthlyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.map($scope.monthlyLuminosityDataset, function (e) { return { date: new Date(e.DATA), luminosity: parseFloat(e.luminosity).toFixed(4) } })); return deferred.promise; }; $scope.dailyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.dailyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left" }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "fillAlphas": 0.4, "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 5, "title": "Luminosidade", "valueField": "luminosity", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "ss", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); $scope.weeklyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.weeklyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left" }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 50, "title": "Luminosidade", "valueField": "luminosity", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "mm", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); $scope.monthlyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.monthlyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left" }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 50, "title": "Luminosidade", "valueField": "luminosity", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "mm", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; SensorSignalRepository.today(s.id, function (records) { $scope.$apply(function () { $scope.dailyLuminosityDataset = records; }); }); SensorSignalRepository.hourly_avg(s.id, 7 * 24, function (records) { $scope.$apply(function () { $scope.weeklyLuminosityDataset = records; }); }); SensorSignalRepository.daily_avg(s.id, 30 * 12, function (records) { $scope.$apply(function () { $scope.monthlyLuminosityDataset = records; }); }); }); }); } ]); WaterSenseApplication.controller('PHSensorControlCtrl', ['$scope', '$routeParams', '$q', '$timeout', 'SensorRepository', 'SensorSignalRepository', function ($scope, $routeParams, $q, $timeout, SensorRepository, SensorSignalRepository) { $scope.sensor = {}; $scope.dailyPHDataset = []; $scope.weeklyPHDataset = []; $scope.monthlyPHDataset = []; $scope.dailyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.map($scope.dailyPHDataset, function (e) { return { date: new Date(e.createdAt), ph: e.ph } })); return deferred.promise; }; $scope.weeklyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.orderBy( _.map($scope.weeklyPHDataset, function (e) { return { date: new Date(e.DATA), ph: parseFloat(e.ph).toFixed(4) }; }), function (e) { return e.date; }) ); return deferred.promise; }; $scope.monthlyDataFromPromise = function(){ var deferred = $q.defer(); deferred.resolve(_.map($scope.monthlyPHDataset, function (e) { return { date: new Date(e.DATA), ph: parseFloat(e.ph).toFixed(4) } })); return deferred.promise; }; $scope.dailyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.dailyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left", "guides": [ { "dashLength": 6, "inside": true, "label": "Limite superior segundo Ministério da Saúde", "lineAlpha": 1, "value": 9.5 }, { "dashLength": 6, "inside": true, "label": "Limite superior segundo CONAMA", "lineAlpha": 1, "value": 9.0 }, { "dashLength": 6, "inside": true, "label": "Limite inferior segundo Ministério da Saúde", "lineAlpha": 1, "value": 6.0 }] }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "fillAlphas": 0.4, "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 5, "title": "PH", "valueField": "ph", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "ss", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); $scope.weeklyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.weeklyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left", "guides": [ { "dashLength": 6, "inside": true, "label": "Limite superior segundo Ministério da Saúde", "lineAlpha": 1, "value": 9.5 }, { "dashLength": 6, "inside": true, "label": "Limite superior segundo CONAMA", "lineAlpha": 1, "value": 9.0 }, { "dashLength": 6, "inside": true, "label": "Limite inferior segundo Ministério da Saúde", "lineAlpha": 1, "value": 6.0 }] }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 50, "title": "PH", "valueField": "ph", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "hh", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); $scope.monthlyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.monthlyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left", "guides": [ { "dashLength": 6, "inside": true, "label": "Limite superior segundo Ministério da Saúde", "lineAlpha": 1, "value": 9.5 }, { "dashLength": 6, "inside": true, "label": "Limite superior segundo CONAMA", "lineAlpha": 1, "value": 9.0 }, { "dashLength": 6, "inside": true, "label": "Limite inferior segundo Ministério da Saúde", "lineAlpha": 1, "value": 6.0 }] }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 50, "title": "PH", "valueField": "ph", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "mm", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; SensorSignalRepository.today(s.id, function (records) { $scope.$apply(function () { $scope.dailyPHDataset = records; }); }); SensorSignalRepository.hourly_avg(s.id, 7 * 24, function (records) { $scope.$apply(function () { $scope.weeklyPHDataset = records; }); }); SensorSignalRepository.daily_avg(s.id, 30 * 12, function (records) { $scope.$apply(function () { $scope.monthlyPHDataset = records; }); }); }); }); } ]); WaterSenseApplication.controller('IQASensorControlCtrl', ['$scope', '$routeParams', '$q', '$timeout', 'SensorRepository', 'IQARepository', function ($scope, $routeParams, $q, $timeout, SensorRepository, IQARepository) { $scope.sensor = {}; $scope.monthlyIQADataset = []; $scope.annualyIQADataset = []; $scope.monthlyDataFromPromise = function () { var deferred = $q.defer(); deferred.resolve(_.map($scope.monhtlyIQADataset, function (e) { return { date: new Date(e.DATA), iqa: e.IQA } })); return deferred.promise; }; $scope.annualyDataFromPromise = function () { var deferred = $q.defer(); deferred.resolve(_.map($scope.annualyIQADataset, function (e) { return { date: new Date(e.DATA), iqa: e.IQA } })); return deferred.promise; }; $scope.monthlyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.monthlyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left" }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "fillAlphas": 0.4, "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 5, "title": "IQA", "valueField": "iqa", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "ss", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); $scope.annualyChartOptions = $timeout(function () { return { "type": "serial", "theme": "light", "marginRight": 30, "autoMarginOffset": 20, "marginTop": 7, "data": $scope.annualyDataFromPromise(), "valueAxes": [{ "axisAlpha": 0.2, "dashLength": 1, "position": "left" }], "mouseWheelZoomEnabled": true, "graphs": [{ "id": "g1", "fillAlphas": 0.4, "balloonText": "[[value]]", "bullet": "round", "bulletBorderAlpha": 1, "bulletColor": "#FFFFFF", "hideBulletsCount": 5, "title": "IQA", "valueField": "iqa", "useLineColorForBulletBorder": true, "balloon":{ "drop":true } }], "chartCursor": { "limitToGraph":"g1" }, "categoryField": "date", "categoryAxis": { "minPeriod": "ss", "parseDates": true, "axisColor": "#DADADA", "dashLength": 1, "minorGridEnabled": true }, "export": { "enabled": true } }; }, 3000); SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; IQARepository.daily(s.id, 30, function (iqas) { $scope.$apply(function () { $scope.monthlyIQADataset = iqas; }); }); }); }); } ]); WaterSenseApplication.controller('PeriodicNewSensorCtrl', ['$scope', '$routeParams', '$location', 'SensorRepository', 'PeriodicMeasurementRepository', function ($scope, $routeParams, $location, SensorRepository, PeriodicMeasurementRepository) { $scope.sendPeriodicMeasurement = function () { var bag = {}; bag.p_name = $scope.userName; bag.p_email = $scope.userEmail; bag.variable = $scope.variable; bag.measurement = $scope.measurement; PeriodicMeasurementRepository.create($scope.sensor.id, bag, function () { $scope.$apply(function () { alert("Nova medição inserida com sucesso."); $location.path('/sensor/' + $scope.sensor.id); }); }); }; SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('SubscriberNewSensorCtrl', ['$scope', '$routeParams', 'SensorRepository', 'SubscriberRepository', function ($scope, $routeParams, SensorRepository, SubscriberRepository) { $scope.subscribeToSensor = function () { var bag = {}; bag.email = $scope.p_email; bag.name = $scope.p_name; SubscriberRepository.create($routeParams.sensorId, bag, function (res) { alert("Você receberá as notificações deste sensor!"); $location.path('/sensor/' + $routeParams.sensorId); }); }; SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('ReportWeekelySensorDetail', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { $scope.generateReport = function () { var bag = {}; bag.institution = $scope.institution; bag.resp = $scope.resp; bag.obs = $scope.obs; }; SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('ReportMonthlySensorDetail', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('ExtTempSensorInfoCtrl', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('WaterTempSensorInfoCtrl', ['$scope', '$routeParams', 'SensorRepository', 'IQA', function ($scope, $routeParams, SensorRepository, IQA) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('DetailLuminositySensorInfoCtrl', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('PHSensorInfoCtrl', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('DissolvedO2SensorInfoCtrl', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('FecalMatterSensorInfoCtrl', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('DBOSensorInfoCtrl', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('TotalNitrogenSensorInfoCtrl', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('PhosphorusTotalSensorInfoCtrl', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('TurbiditySensorInfoCtrl', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('TotalSolidsSensorInfoCtrl', ['$scope', '$routeParams', 'SensorRepository', function ($scope, $routeParams, SensorRepository) { SensorRepository.find($routeParams.sensorId, function (s) { $scope.$apply(function () { $scope.sensor = s; }); }); } ]); WaterSenseApplication.controller('DetailSensorCtrl', ['$scope', '$routeParams', 'SensorRepository', 'SensorSignalRepository', 'PeriodicMeasurementRepository', 'IQARepository', 'IQA', 'NgMap', function ($scope, $routeParams, SensorRepository, SensorSignalRepository, PeriodicMeasurementRepository, IQARepository, IQA, NgMap) { $scope.sensor = {}; $scope.chartOptions = { height: 270, chartPadding: 15 }; $scope.extTempDataset = {}; $scope.waterTempDataset = {}; $scope.luminosityDataset = {}; $scope.phDataset = {}; $scope.dissolvedO2Dataset = {}; $scope.fecalMatterDataset = {}; $scope.dboDataset = {}; $scope.fecalMatterDataset = {}; $scope.nitrogenTotalDataset = {}; $scope.phosphorusTotalDataset = {}; $scope.turbidityDataset = {}; $scope.totalSolidsDataset = {}; $scope.mapLat = 0; $scope.mapLng = 0; $scope.formatCreateDate = function (date) { var d = new Date(date); return d.getDay() + "/" + d.getMonth() + "/" + d.getFullYear(); }; $scope.formatValue = function (value) { return value ? value.toFixed(3) : ""; }; $scope.getCetesbIndex = IQA.cetesbIndex; $scope.getConamaIndex = IQA.conamaIndex; SensorRepository.find($routeParams.sensorId, function (data) { $scope.$apply(function () { $scope.sensor = data; $scope.mapLat = data.setup_position.latitude; $scope.mapLng = data.setup_position.longitude; SensorSignalRepository.daily_avg($routeParams.sensorId, 20, function (data) { $scope.$apply(function () { $scope.daily_avg = _.last(data); if ($scope.sensor.ext_temp_active) { $scope.extTempDataset.labels = _.map(data, function (e, key) { if (key % 3 == 0) { return e['DATA']; } return ''; }); $scope.extTempDataset.series = [ _.map(data, function (e) { return e.ext_temp; }) ]; } if ($scope.sensor.water_temp_active) { $scope.waterTempDataset.labels = _.map(data, function (e, key) { if (key % 3 == 0) { return e['DATA']; } return ''; }); $scope.waterTempDataset.series = [ _.map(data, function (e) { return e.water_temp; }) ]; } if ($scope.sensor.luminosity_active) { $scope.luminosityDataset.labels = _.map(data, function (e, key) { if (key % 3 == 0) { return e['DATA']; } return ''; }); $scope.luminosityDataset.series = [ _.map(data, function (e) { return e.luminosity; }) ]; } if ($scope.sensor.ph_active) { $scope.phDataset.labels = _.map(data, function (e, key) { if (key % 3 == 0) { return e['DATA']; } return ''; }); $scope.phDataset.series = [ _.map(data, function (e) { return e.ph; }) ]; } }); }); if ($scope.sensor.dissolved_o2_active) { PeriodicMeasurementRepository.last20($routeParams.sensorId, "dissolved_o2", function (data) { $scope.$apply(function () { $scope.dissolvedO2Dataset.labels = _.map(data, function (e, key) { if (data.length <= 6) return formatDateDaily(e.createdAt); if (key % 3 == 0) { return formatDateDaily(e.createdAt); } return ''; }); $scope.dissolvedO2Dataset.series = [ _.map(data, function (e) { return e.measurement; }) ]; }); }); } if ($scope.sensor.fecal_matter_active) { PeriodicMeasurementRepository.last20($routeParams.sensorId, "fecal_matter", function (data) { $scope.$apply(function () { $scope.fecalMatterDataset.labels = _.map(data, function (e, key) { if (data.length <= 6) return formatDateDaily(e.createdAt); if (key % 3 == 0) { return formatDateDaily(e.createdAt); } return ''; }); $scope.fecalMatterDataset.series = [ _.map(data, function (e) { return e.measurement; }) ]; }); }); } if ($scope.sensor.dbo_active) { PeriodicMeasurementRepository.last20($routeParams.sensorId, "dbo", function (data) { $scope.$apply(function () { $scope.dboDataset.labels = _.map(data, function (e, key) { if (data.length <= 6) return formatDateDaily(e.createdAt); if (key % 3 == 0) { return formatDateDaily(e.createdAt); } return ''; }); $scope.dboDataset.series = [ _.map(data, function (e) { return e.measurement; }) ]; }); }); } if ($scope.sensor.total_nitrogen_active) { PeriodicMeasurementRepository.last20($routeParams.sensorId, "total_nitrogen", function (data) { $scope.$apply(function () { $scope.nitrogenTotalDataset.labels = _.map(data, function (e, key) { if (data.length <= 6) return formatDateDaily(e.createdAt); if (key % 3 == 0) { return formatDateDaily(e.createdAt); } return ''; }); $scope.nitrogenTotalDataset.series = [ _.map(data, function (e) { return e.measurement; }) ]; }); }); } if ($scope.sensor.phosphorus_total_active) { PeriodicMeasurementRepository.last20($routeParams.sensorId, "total_phosphorus", function (data) { $scope.$apply(function () { $scope.phosphorusTotalDataset.labels = _.map(data, function (e, key) { if (data.length <= 6) return formatDateDaily(e.createdAt); if (key % 3 == 0) { return formatDateDaily(e.createdAt); } return ''; }); $scope.phosphorusTotalDataset.series = [ _.map(data, function (e) { return e.measurement; }) ]; }); }); } if ($scope.sensor.turbidity_active) { PeriodicMeasurementRepository.last20($routeParams.sensorId, "turbidity", function (data) { $scope.$apply(function () { $scope.turbidityDataset.labels = _.map(data, function (e, key) { if (data.length <= 6) return formatDateDaily(e.createdAt); if (key % 3 == 0) { return formatDateDaily(e.createdAt); } return ''; }); $scope.turbidityDataset.series = [ _.map(data, function (e) { return e.measurement; }) ]; }); }); } if ($scope.sensor.total_solids_active) { PeriodicMeasurementRepository.last20($routeParams.sensorId, "total_solids", function (data) { $scope.$apply(function () { $scope.totalSolidsDataset.labels = _.map(data, function (e, key) { if (data.length <= 6) return formatDateDaily(e.createdAt); if (key % 3 == 0) { return formatDateDaily(e.createdAt); } return ''; }); $scope.totalSolidsDataset.series = [ _.map(data, function (e) { return e.measurement; }) ]; }); }); } IQARepository.daily($routeParams.sensorId, 1, function (data) { $scope.$apply(function () { $scope.iqa_last = data[0]; console.log($scope.iqa_last); }); }); }); }); } ]); WaterSenseApplication.config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/', { templateUrl: url_view('/index'), controller: 'IndexCtrl' }) .when('/sensor/:sensorId', { templateUrl: url_view('/sensor_detail'), controller: 'DetailSensorCtrl' }) .when('/sensor/:sensorId/periodic/new', { templateUrl: url_view('/sensor_detail_periodic_new'), controller: 'PeriodicNewSensorCtrl' }) .when('/sensor/:sensorId/ext_temp/control', { templateUrl: url_view('/sensor_detail_ext_temp_control'), controller: 'ExtTempSensorControlCtrl' }) .when('/sensor/:sensorId/water_temp/control', { templateUrl: url_view('/sensor_detail_water_temp_control'), controller: 'WaterTempSensorControlCtrl' }) .when('/sensor/:sensorId/luminosity/control', { templateUrl: url_view('/sensor_detail_luminosity_control'), controller: 'LuminositySensorControlCtrl' }) .when('/sensor/:sensorId/ph/control', { templateUrl: url_view('/sensor_detail_ph_control'), controller: 'PHSensorControlCtrl' }) .when('/sensor/:sensorId/iqa/control', { templateUrl: url_view('/sensor_detail_iqa_control'), controller: 'IQASensorControlCtrl' }) .when('/sensor/:sensorId/subscriber/new', { templateUrl: url_view('/sensor_subscriber_new'), controller: 'SubscriberNewSensorCtrl' }) .when('/sensor/:sensorId/report/weekely', { templateUrl: url_view('/sensor_report_weekly'), controller: 'ReportWeekelySensorDetail' }) .when('/sensor/:sensorId/report/monthly', { templateUrl: url_view('/sensor_report_monthly'), controller: 'ReportWeekelySensorDetail' }) .when('/sensor/:sensorId/ext_temp/info', { templateUrl: url_view('/sensor_detail_ext_temp_info'), controller: 'ExtTempSensorInfoCtrl' }) .when('/sensor/:sensorId/water_temp/info', { templateUrl: url_view('/sensor_detail_water_temp_info'), controller: 'WaterTempSensorInfoCtrl' }) .when('/sensor/:sensorId/luminosity/info', { templateUrl: url_view('/sensor_detail_luminosity_info'), controller: 'DetailLuminositySensorInfoCtrl' }) .when('/sensor/:sensorId/ph/info', { templateUrl: url_view('/sensor_detail_ph_info'), controller: 'PHSensorInfoCtrl' }) .when('/sensor/:sensorId/dissolved_o2/info', { templateUrl: url_view('/sensor_detail_dissolved_o2_info'), controller: 'DissolvedO2SensorInfoCtrl' }) .when('/sensor/:sensorId/fecal_matter/info', { templateUrl: url_view('/sensor_detail_fecal_matter_info'), controller: 'FecalMatterSensorInfoCtrl' }) .when('/sensor/:sensorId/dbo/info', { templateUrl: url_view('/sensor_detail_dbo_info'), controller: 'DBOSensorInfoCtrl' }) .when('/sensor/:sensorId/total_nitrogen/info', { templateUrl: url_view('/sensor_detail_total_nitrogen_info'), controller: 'TotalNitrogenSensorInfoCtrl' }) .when('/sensor/:sensorId/phosphorus_total/info', { templateUrl: url_view('/sensor_detail_phosphorus_info'), controller: 'PhosphorusTotalSensorInfoCtrl' }) .when('/sensor/:sensorId/turbidity/info', { templateUrl: url_view('/sensor_detail_turbidity_info'), controller: 'TurbiditySensorInfoCtrl' }) .when('/sensor/:sensorId/total_solids/info', { templateUrl: url_view('/sensor_detail_total_solids_info'), controller: 'TotalSolidsSensorInfoCtrl' }); } ]); }).call(this, jQuery, angular, _);
{ "content_hash": "e2f5c1e94341a9735ad6d5c09166beda", "timestamp": "", "source": "github", "line_count": 1967, "max_line_length": 142, "avg_line_length": 31.378240976105744, "alnum_prop": 0.43918601448453526, "repo_name": "diegomrodz/WaterSenseWebApp", "id": "0ddbf9f956f408a060c17b441d45ffcc3ef5bf09", "size": "61748", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "assets/js/app.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "13706619" }, { "name": "HTML", "bytes": "276731" }, { "name": "JavaScript", "bytes": "5053675" } ], "symlink_target": "" }
.. _index: Welcome to the PyWPS |release| documentation! ============================================= PyWPS is a server side implementation of the `OGC Web Processing Service (OGC WPS) standard <http://opengeospatial.org/standards/wps>`_, using the `Python <http://python.org>`_ programming language. PyWPS is currently supporting WPS 1.0.0. Support for the version 2.0.0. of OGC WPS standard is presently being planned. Like the bicycle in the logo, PyWPS is: * simple to maintain * fast to drive * able to carry a lot * easy to hack **Mount your bike and setup your PyWPS instance!** .. todo:: * request queue management (probably linked from documentation) * inputs and outputs IOhandler class description (file, stream, ...) Contents: --------- .. toctree:: :maxdepth: 3 wps pywps install configuration process deployment migration external-tools extensions api contributing exceptions ================== Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search`
{ "content_hash": "a8da2969d6a01891dd8d60f1ba8cb9ac", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 75, "avg_line_length": 20.384615384615383, "alnum_prop": 0.6509433962264151, "repo_name": "tomkralidis/pywps", "id": "d427eb4c6d3ca108355e81ff35bbe44762d23cc5", "size": "1060", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "docs/index.rst", "mode": "33188", "license": "mit", "language": [ { "name": "Python", "bytes": "310546" } ], "symlink_target": "" }
package net // TODO(rsc): // support for raw ethernet sockets import "os" // Addr represents a network end point address. type Addr interface { Network() string // name of the network String() string // string form of address } // Conn is a generic stream-oriented network connection. type Conn interface { // Read reads data from the connection. // Read can be made to time out and return a net.Error with Timeout() == true // after a fixed time limit; see SetTimeout and SetReadTimeout. Read(b []byte) (n int, err os.Error) // Write writes data to the connection. // Write can be made to time out and return a net.Error with Timeout() == true // after a fixed time limit; see SetTimeout and SetWriteTimeout. Write(b []byte) (n int, err os.Error) // Close closes the connection. Close() os.Error // LocalAddr returns the local network address. LocalAddr() Addr // RemoteAddr returns the remote network address. RemoteAddr() Addr // SetTimeout sets the read and write deadlines associated // with the connection. SetTimeout(nsec int64) os.Error // SetReadTimeout sets the time (in nanoseconds) that // Read will wait for data before returning an error with Timeout() == true. // Setting nsec == 0 (the default) disables the deadline. SetReadTimeout(nsec int64) os.Error // SetWriteTimeout sets the time (in nanoseconds) that // Write will wait to send its data before returning an error with Timeout() == true. // Setting nsec == 0 (the default) disables the deadline. // Even if write times out, it may return n > 0, indicating that // some of the data was successfully written. SetWriteTimeout(nsec int64) os.Error } // An Error represents a network error. type Error interface { os.Error Timeout() bool // Is the error a timeout? Temporary() bool // Is the error temporary? } // PacketConn is a generic packet-oriented network connection. type PacketConn interface { // ReadFrom reads a packet from the connection, // copying the payload into b. It returns the number of // bytes copied into b and the return address that // was on the packet. // ReadFrom can be made to time out and return // an error with Timeout() == true after a fixed time limit; // see SetTimeout and SetReadTimeout. ReadFrom(b []byte) (n int, addr Addr, err os.Error) // WriteTo writes a packet with payload b to addr. // WriteTo can be made to time out and return // an error with Timeout() == true after a fixed time limit; // see SetTimeout and SetWriteTimeout. // On packet-oriented connections, write timeouts are rare. WriteTo(b []byte, addr Addr) (n int, err os.Error) // Close closes the connection. Close() os.Error // LocalAddr returns the local network address. LocalAddr() Addr // SetTimeout sets the read and write deadlines associated // with the connection. SetTimeout(nsec int64) os.Error // SetReadTimeout sets the time (in nanoseconds) that // Read will wait for data before returning an error with Timeout() == true. // Setting nsec == 0 (the default) disables the deadline. SetReadTimeout(nsec int64) os.Error // SetWriteTimeout sets the time (in nanoseconds) that // Write will wait to send its data before returning an error with Timeout() == true. // Setting nsec == 0 (the default) disables the deadline. // Even if write times out, it may return n > 0, indicating that // some of the data was successfully written. SetWriteTimeout(nsec int64) os.Error } // A Listener is a generic network listener for stream-oriented protocols. type Listener interface { // Accept waits for and returns the next connection to the listener. Accept() (c Conn, err os.Error) // Close closes the listener. Close() os.Error // Addr returns the listener's network address. Addr() Addr } var errMissingAddress = os.ErrorString("missing address") type OpError struct { Op string Net string Addr Addr Error os.Error } func (e *OpError) String() string { if e == nil { return "<nil>" } s := e.Op if e.Net != "" { s += " " + e.Net } if e.Addr != nil { s += " " + e.Addr.String() } s += ": " + e.Error.String() return s } type temporary interface { Temporary() bool } func (e *OpError) Temporary() bool { t, ok := e.Error.(temporary) return ok && t.Temporary() } type timeout interface { Timeout() bool } func (e *OpError) Timeout() bool { t, ok := e.Error.(timeout) return ok && t.Timeout() } type AddrError struct { Error string Addr string } func (e *AddrError) String() string { if e == nil { return "<nil>" } s := e.Error if e.Addr != "" { s += " " + e.Addr } return s } func (e *AddrError) Temporary() bool { return false } func (e *AddrError) Timeout() bool { return false } type UnknownNetworkError string func (e UnknownNetworkError) String() string { return "unknown network " + string(e) } func (e UnknownNetworkError) Temporary() bool { return false } func (e UnknownNetworkError) Timeout() bool { return false }
{ "content_hash": "551f5b10fbb5d0eb9b4708dc67793c52", "timestamp": "", "source": "github", "line_count": 182, "max_line_length": 87, "avg_line_length": 27.23076923076923, "alnum_prop": 0.7033898305084746, "repo_name": "SDpower/golang", "id": "51db107395401b9a77bfb7aaad9e4bff33a03661", "size": "5262", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/pkg/net/net.go", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
<?php namespace Magento\Email\Controller\Adminhtml\Email\Template; class Preview extends \Magento\Email\Controller\Adminhtml\Email\Template { /** * Preview transactional email action * * @return void */ public function execute() { try { $this->_view->loadLayout(); $this->_view->getPage()->getConfig()->getTitle()->prepend(__('Email Preview')); $this->_view->renderLayout(); } catch (\Exception $e) { $this->messageManager->addError(__('An error occurred. The email template can not be opened for preview.')); $this->_redirect('adminhtml/*/'); } } }
{ "content_hash": "b02ba8a080067a27f4e45ffc279d9825", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 120, "avg_line_length": 29.217391304347824, "alnum_prop": 0.5803571428571429, "repo_name": "j-froehlich/magento2_wk", "id": "30a14bbe7b8b32a7526f486c7c0c6925c24e5c49", "size": "783", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "vendor/magento/module-email/Controller/Adminhtml/Email/Template/Preview.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "13636" }, { "name": "CSS", "bytes": "2076720" }, { "name": "HTML", "bytes": "6151072" }, { "name": "JavaScript", "bytes": "2488727" }, { "name": "PHP", "bytes": "12466046" }, { "name": "Shell", "bytes": "6088" }, { "name": "XSLT", "bytes": "19979" } ], "symlink_target": "" }
name "mysql_zend" maintainer "Maurice Kherlakian" maintainer_email "maurice.k@zend.com" license "Apache 2.0" description "Installs MySQL" version "1.0.0" depends "mysql", "~> 6.0.20"
{ "content_hash": "94abadc070b5132f5b91852280b0eaea", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 37, "avg_line_length": 26.625, "alnum_prop": 0.6338028169014085, "repo_name": "zend-patterns/ZendServerVagrantBerkshelf", "id": "f11fc27fda85e0a203ca16d3577de4e7eb435abc", "size": "213", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "cookbooks/mysql_zend/metadata.rb", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Ruby", "bytes": "612" } ], "symlink_target": "" }
package stainless package extraction package imperative /** Cleanup the program after running imperative desugaring. * * This functions simplifies away typical pattern of expressions * that can be generated during xlang desugaring phase. The most * common case is the generation of function returning tuple with * Unit in it, which can be safely eliminated. * We also eliminate expressions that deconstruct a tuple just to * reconstruct it right after. */ class ImperativeCleanup(override val s: Trees, override val t: oo.Trees) (using override val context: inox.Context) extends oo.SimplePhase with SimplyCachedFunctions with SimplyCachedSorts with oo.SimplyCachedTypeDefs with oo.SimplyCachedClasses { self => override protected def getContext(symbols: s.Symbols) = new TransformerContext(self.s, self.t)(using symbols) protected class TransformerContext(override val s: self.s.type, override val t: self.t.type) (using val symbols: s.Symbols) extends oo.ConcreteTreeTransformer(s, t) { // CheckingTransformer { import symbols._ def isImperativeFlag(f: s.Flag): Boolean = f match { case s.IsPure | s.IsVar | s.IsMutable => true case _ => false } override def transform(tpe: s.Type): t.Type = tpe match { case s.MutableMapType(from, to) => t.MapType(transform(from), transform(to)) case s.TypeParameter(id, flags) if flags exists isImperativeFlag => t.TypeParameter(id, flags filterNot isImperativeFlag map transform).copiedFrom(tpe) case s.TypeBounds(lo, hi, flags) if flags exists isImperativeFlag => t.TypeBounds(transform(lo), transform(hi), flags filterNot isImperativeFlag map transform) case _ => super.transform(tpe) } object Lets { def unapply(e: s.Expr): Option[(Seq[(s.ValDef, s.Expr)], s.Expr)] = e match { case s.Let(vd, e0, body) => unapply(body).map { case (lets, rest) => ((vd, e0) +: lets, rest) } case _ => Some((Seq(), e)) } } object ReconstructTuple { def unapply(e: s.Expr): Option[s.Expr] = e match { case s.Let(vd, tuple, Lets(lets, s.Tuple(es))) => val letsMap = lets.map { case (vd, e) => (vd.id, e) }.toMap if ( vd.getType.isInstanceOf[s.TupleType] && es.length == vd.getType.asInstanceOf[s.TupleType].bases.length && es.zipWithIndex.forall { case (e0 : s.Variable, i) => letsMap.contains(e0.id) && letsMap(e0.id) == s.TupleSelect(vd.toVariable, i + 1) case (e0, i) => e0 == s.TupleSelect(vd.toVariable, i + 1) } ) Some(tuple) else None case s.Let(vd, e, Lets(Seq(), v)) if v == vd.toVariable => Some(e) case _ => None } } override def transform(expr: s.Expr): t.Expr = { super.transform(s.exprOps.postMap { expr => expr match { case s.BoolBitwiseAnd(lhs, rhs) => Some(s.And(lhs, rhs).copiedFrom(expr)) case s.BoolBitwiseOr(lhs, rhs) => Some(s.Or(lhs, rhs).copiedFrom(expr)) case s.BoolBitwiseXor(lhs, rhs) => Some(s.Not(s.Equals(lhs, rhs).copiedFrom(expr)).copiedFrom(expr)) case s.Variable(id, tpe, flags) => Some(s.Variable(id, tpe, flags filterNot isImperativeFlag).copiedFrom(expr)) case s.MutableMapWithDefault(from, to, default) => Some(s.FiniteMap(Seq(), s.Application(default, Seq()), from, to)) case s.MutableMapApply(map, index) => Some(s.MapApply(map, index)) case s.MutableMapUpdated(map, key, value) => Some(s.MapUpdated(map, key, value)) case s.MutableMapDuplicate(map) => Some(map) case ReconstructTuple(tuple) => Some(tuple) case s.LetRec(fds, body) => Some(s.LetRec(fds.map(fd => fd.copy(flags = fd.flags filterNot isImperativeFlag)), body)) case _ => None } } (expr)) } override def transform(vd: s.ValDef): t.ValDef = { val (newId, newTpe) = transform(vd.id, vd.tpe) t.ValDef(newId, newTpe, (vd.flags filterNot isImperativeFlag) map transform).copiedFrom(vd) } } private def checkNoOld(expr: s.Expr): Unit = s.exprOps.preTraversal { case o @ s.Old(_) => throw MalformedStainlessCode(o, s"Stainless `old` can only occur in postconditions.") case _ => () } (expr) private def checkValidOldUsage(expr: s.Expr): Unit = s.exprOps.preTraversal { case o @ s.Old(s.ADTSelector(v: s.Variable, id)) => throw MalformedStainlessCode(o, s"Stainless `old` can only occur on `this` and variables. Did you mean `old($v).$id`?") case o @ s.Old(s.ClassSelector(v: s.Variable, id)) => throw MalformedStainlessCode(o, s"Stainless `old` can only occur on `this` and variables. Did you mean `old($v).$id`?") case o @ s.Old(e) => throw MalformedStainlessCode(o, s"Stainless `old` is only defined on `this` and variables.") case _ => () } (expr) override protected def extractFunction(context: TransformerContext, fd: s.FunDef): (t.FunDef, Unit) = { val (specs, body) = s.exprOps.deconstructSpecs(fd.fullBody) specs foreach { case post: s.exprOps.Postcondition => // The new imperative phase allows for arbitrary expressions inside `old(...)`. if (!ImperativeCleanup.this.context.options.findOptionOrDefault(optFullImperative)) { post.traverse(checkValidOldUsage _) } case spec => spec.traverse(checkNoOld _) } body foreach checkNoOld super.extractFunction(context, fd.copy(flags = fd.flags filterNot context.isImperativeFlag)) } override protected def extractSort(context: TransformerContext, sort: s.ADTSort): (t.ADTSort, Unit) = { super.extractSort(context, sort.copy(flags = sort.flags filterNot context.isImperativeFlag)) } override protected def extractClass(context: TransformerContext, cd: s.ClassDef): (t.ClassDef, Unit) = { super.extractClass(context, cd.copy(flags = cd.flags filterNot context.isImperativeFlag)) } override protected def extractTypeDef(context: TransformerContext, td: s.TypeDef): (t.TypeDef, Unit) = { super.extractTypeDef(context, td.copy(flags = td.flags filterNot context.isImperativeFlag)) } } object ImperativeCleanup { def apply(ts: Trees, tt: oo.Trees)(using inox.Context): ExtractionPipeline { val s: ts.type val t: tt.type } = { class Impl(override val s: ts.type, override val t: tt.type) extends ImperativeCleanup(s, t) new Impl(ts, tt) } }
{ "content_hash": "8f07f4c22cda57badd62e9fa8c8c6190", "timestamp": "", "source": "github", "line_count": 167, "max_line_length": 134, "avg_line_length": 39.82634730538922, "alnum_prop": 0.6430611938054428, "repo_name": "epfl-lara/stainless", "id": "28147c9034c0c52c39239b57f4ac60c2f8520366", "size": "6691", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "core/src/main/scala/stainless/extraction/imperative/ImperativeCleanup.scala", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "206" }, { "name": "CSS", "bytes": "46032" }, { "name": "Coq", "bytes": "37167" }, { "name": "Dockerfile", "bytes": "683" }, { "name": "HTML", "bytes": "4276517" }, { "name": "JavaScript", "bytes": "49474" }, { "name": "Nix", "bytes": "277" }, { "name": "Python", "bytes": "2117" }, { "name": "Scala", "bytes": "3396410" }, { "name": "Shell", "bytes": "22068" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8" ?> <Moc-Config> <MOC MOC_NAME="IpcRecTaskInfo" Module="MRS" ACCESS_CONTROL="add,delete,modify,read" DEST_SVC="" FILTER=""> <Parameter name="SessionId" desc="任务号" type="string" range="[1,64]" constrain="PRI" mode="display" /> <Parameter name="TaskStatus" desc="任务状态" type="enum" range="0,1,2,3" vlist="0:IDLE(初始化),1:RECEIVEING(正在存储),2:FAIL(失败),3:SUCCESS(成功)" constrain="NOT NULL" mode="update" /> <Parameter name="IpcIndex" desc="设备ID" type="int" range="[1,65535]" constrain="NOT NULL" mode="update" /> <Parameter name="IpcVpn" desc="设备VPN" type="int" range="" constrain="NOT NULL" /> <Parameter name="OptStatus" desc="操作状态" type="int" range="[1,65536]" constrain="NOT NULL" mode="update" /> <Parameter name="ErrType" desc="错误类型" type="int" range="[1,65536]" constrain="NOT NULL" mode="update" /> <Parameter name="StartTime" desc="开始时间" type="datetime" range="[1,64]" constrain="NOT NULL" mode="update" /> <Parameter name="EndTime" desc="结束时间" type="datetime" range="[1,64]" constrain="NOT NULL" ge="EndTime,BeginTime" mode="update" /> </MOC> </Moc-Config>
{ "content_hash": "f2abe6772c42ea6643f0762f7a4dbf5f", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 172, "avg_line_length": 85.46153846153847, "alnum_prop": 0.6795679567956796, "repo_name": "eSDK/esdk_elte_player", "id": "19c4fc01fce66755f9e0fb7f8036529dfee58117", "size": "1199", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "platform/SDK/conf/cm_service/IpcRecTaskInfo.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "706635" }, { "name": "C++", "bytes": "7576519" }, { "name": "CSS", "bytes": "195" }, { "name": "Objective-C", "bytes": "239675" }, { "name": "Shell", "bytes": "248593" } ], "symlink_target": "" }
package com.wenhaiz.himusic.http; public class API { public static class XiaMi{ static final String BASE = "https://www.xiami.com"; public static final String GET_COLLECT_LIST = "/api/list/collect"; public static final String GET_COLLECT_DETAIL = "/api/collect/initialize"; public static final String GET_ALBUM_LIST = "/api/list/album"; public static final String GET_ALBUM_DETAIL = "/api/album/initialize"; // public static final String GET_SONG_DETAIL = "/api/song/getSongDetails"; public static final String GET_SONG_PLAY_INFO = "/api/song/getPlayInfo"; public static final String GET_RANK_LIST = "/api/billboard/getBillboards"; public static final String GET_RANK_DETAIL = "/api/billboard/getBillboardDetail"; public static final String SEARCH_SONGS = "/api/search/searchSongs"; public static final String GET_SEARCH_TIPS = "/api/search/searchTips"; // public static final String GET_ARTIST_LIST = "/api/artist/getHotArtists"; // public static final String GET_ARTIST_DETAIL = "/api/artist/initialize"; public static String getSongDetailUrl(Long songId) { return BASE + "/song/playlist/id/" + songId + "/object_name/default/object_id/0/cat/json"; } public static String getArtistDetailUrl(String artistId, int page) { return "http://api.xiami.com/web?v=2.0&app_key=1&id=" + artistId + "&page=" + page + "&limit=20&_ksTS=1459931285956_216&r=artist/detail"; } public static String getArtistHotSongsUrl(String artistId, int page) { return "http://api.xiami.com/web?v=2.0&app_key=1&id=" + artistId + "&page=" + page + "&limit=20&r=artist/hot-songs"; } } }
{ "content_hash": "f607d807f8a796cf0e89545dc9507162", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 128, "avg_line_length": 42.45238095238095, "alnum_prop": 0.6528323051037577, "repo_name": "wenhaiz/ListenAll", "id": "cb73d64ecdbf4d4db201f68374fa9378b890aa3f", "size": "1783", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/java/com/wenhaiz/himusic/http/API.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "40771" }, { "name": "Kotlin", "bytes": "283021" } ], "symlink_target": "" }
'use strict'; var range = require('annomath').range; module.exports = function(config) { return function setAll(o) { return range(config.lightAmount).map(function(v) { return { id: v, rgb: o.rgb }; }); }; };
{ "content_hash": "b4e903bcecf760231d2be9dd521e4d44", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 58, "avg_line_length": 19.4, "alnum_prop": 0.4845360824742268, "repo_name": "bebraw/effectserver-client", "id": "7adaeedd9772d660dbcf081801a206a27abfbd4d", "size": "291", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "effects/setAll.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "4718" } ], "symlink_target": "" }
namespace sf { class WindowListener; namespace priv { //////////////////////////////////////////////////////////// /// \brief Abstract base class for OS-specific window implementation /// //////////////////////////////////////////////////////////// class WindowImpl : NonCopyable { public: //////////////////////////////////////////////////////////// /// \brief Create a new window depending on the current OS /// /// \param mode Video mode to use /// \param title Title of the window /// \param style Window style /// \param settings Additional settings for the underlying OpenGL context /// /// \return Pointer to the created window (don't forget to delete it) /// //////////////////////////////////////////////////////////// static WindowImpl* create(VideoMode mode, const String& title, Uint32 style, const ContextSettings& settings); //////////////////////////////////////////////////////////// /// \brief Create a new window depending on to the current OS /// /// \param handle Platform-specific handle of the control /// /// \return Pointer to the created window (don't forget to delete it) /// //////////////////////////////////////////////////////////// static WindowImpl* create(WindowHandle handle); public: //////////////////////////////////////////////////////////// /// \brief Destructor /// //////////////////////////////////////////////////////////// virtual ~WindowImpl(); //////////////////////////////////////////////////////////// /// \brief Change the joystick threshold, i.e. the value below which /// no move event will be generated /// /// \param threshold New threshold, in range [0, 100] /// //////////////////////////////////////////////////////////// void setJoystickThreshold(float threshold); //////////////////////////////////////////////////////////// /// \brief Return the next window event available /// /// If there's no event available, this function calls the /// window's internal event processing function. /// The \a block parameter controls the behavior of the function /// if no event is available: if it is true then the function /// doesn't return until a new event is triggered; otherwise it /// returns false to indicate that no event is available. /// /// \param event Event to be returned /// \param block Use true to block the thread until an event arrives /// //////////////////////////////////////////////////////////// bool popEvent(Event& event, bool block); //////////////////////////////////////////////////////////// /// \brief Get the OS-specific handle of the window /// /// \return Handle of the window /// //////////////////////////////////////////////////////////// virtual WindowHandle getSystemHandle() const = 0; //////////////////////////////////////////////////////////// /// \brief Get the position of the window /// /// \return Position of the window, in pixels /// //////////////////////////////////////////////////////////// virtual Vector2i getPosition() const = 0; //////////////////////////////////////////////////////////// /// \brief Change the position of the window on screen /// /// \param position New position of the window, in pixels /// //////////////////////////////////////////////////////////// virtual void setPosition(const Vector2i& position) = 0; //////////////////////////////////////////////////////////// /// \brief Get the client size of the window /// /// \return Size of the window, in pixels /// //////////////////////////////////////////////////////////// virtual Vector2u getSize() const = 0; //////////////////////////////////////////////////////////// /// \brief Change the size of the rendering region of the window /// /// \param size New size, in pixels /// //////////////////////////////////////////////////////////// virtual void setSize(const Vector2u& size) = 0; //////////////////////////////////////////////////////////// /// \brief Change the title of the window /// /// \param title New title /// //////////////////////////////////////////////////////////// virtual void setTitle(const String& title) = 0; //////////////////////////////////////////////////////////// /// \brief Change the window's icon /// /// \param width Icon's width, in pixels /// \param height Icon's height, in pixels /// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits /// //////////////////////////////////////////////////////////// virtual void setIcon(unsigned int width, unsigned int height, const Uint8* pixels) = 0; //////////////////////////////////////////////////////////// /// \brief Show or hide the window /// /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// virtual void setVisible(bool visible) = 0; //////////////////////////////////////////////////////////// /// \brief Show or hide the mouse cursor /// /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// virtual void setMouseCursorVisible(bool visible) = 0; //////////////////////////////////////////////////////////// /// \brief Grab or release the mouse cursor and keeps it from leaving /// /// \param grabbed True to enable, false to disable /// //////////////////////////////////////////////////////////// virtual void setMouseCursorGrabbed(bool grabbed) = 0; //////////////////////////////////////////////////////////// /// \brief Enable or disable automatic key-repeat /// /// \param enabled True to enable, false to disable /// //////////////////////////////////////////////////////////// virtual void setKeyRepeatEnabled(bool enabled) = 0; //////////////////////////////////////////////////////////// /// \brief Request the current window to be made the active /// foreground window /// //////////////////////////////////////////////////////////// virtual void requestFocus() = 0; //////////////////////////////////////////////////////////// /// \brief Check whether the window has the input focus /// /// \return True if window has focus, false otherwise /// //////////////////////////////////////////////////////////// virtual bool hasFocus() const = 0; protected: //////////////////////////////////////////////////////////// /// \brief Default constructor /// //////////////////////////////////////////////////////////// WindowImpl(); //////////////////////////////////////////////////////////// /// \brief Push a new event into the event queue /// /// This function is to be used by derived classes, to /// notify the SFML window that a new event was triggered /// by the system. /// /// \param event Event to push /// //////////////////////////////////////////////////////////// void pushEvent(const Event& event); //////////////////////////////////////////////////////////// /// \brief Process incoming events from the operating system /// //////////////////////////////////////////////////////////// virtual void processEvents() = 0; private: //////////////////////////////////////////////////////////// /// \brief Read the joysticks state and generate the appropriate events /// //////////////////////////////////////////////////////////// void processJoystickEvents(); //////////////////////////////////////////////////////////// /// \brief Read the sensors state and generate the appropriate events /// //////////////////////////////////////////////////////////// void processSensorEvents(); //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// std::queue<Event> m_events; ///< Queue of available events JoystickState m_joystickStates[Joystick::Count]; ///< Previous state of the joysticks Vector3f m_sensorValue[Sensor::Count]; ///< Previous value of the sensors float m_joystickThreshold; ///< Joystick threshold (minimum motion for "move" event to be generated) }; } // namespace priv } // namespace sf #endif // SFML_WINDOWIMPL_HPP
{ "content_hash": "986108a53a32d334bcf8f528ca48cac5", "timestamp": "", "source": "github", "line_count": 230, "max_line_length": 130, "avg_line_length": 37.71304347826087, "alnum_prop": 0.39797094765967256, "repo_name": "evanbowman/FLIGHT", "id": "1243506e53bd1466b3f07befe05d68fcce60826e", "size": "10404", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "deps/SFML-2.4.1/src/SFML/Window/WindowImpl.hpp", "mode": "33261", "license": "bsd-2-clause", "language": [ { "name": "C++", "bytes": "216673" }, { "name": "CMake", "bytes": "2719" }, { "name": "GLSL", "bytes": "10021" } ], "symlink_target": "" }
from jc_install import * import sys if __name__ == '__main__': if len(sys.argv) < 2: raise Exception('argc less than 1') mode = sys.argv[1] installDir = sys.argv[2] doLocalInstall(mode, installDir) print('post-install finished')
{ "content_hash": "3b972ef5909e905549732c50f86d4354", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 43, "avg_line_length": 19.214285714285715, "alnum_prop": 0.5947955390334573, "repo_name": "SilverIce/JContainers", "id": "7cd2c2bde7d055632d2b25e35d12a7692c7df982", "size": "269", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "post-build/install_Local.py", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "218230" }, { "name": "Batchfile", "bytes": "26020" }, { "name": "C", "bytes": "2296023" }, { "name": "C++", "bytes": "47518731" }, { "name": "CMake", "bytes": "12647" }, { "name": "CSS", "bytes": "2521" }, { "name": "HTML", "bytes": "98074" }, { "name": "Lua", "bytes": "29693" }, { "name": "M4", "bytes": "19951" }, { "name": "Makefile", "bytes": "895877" }, { "name": "Objective-C", "bytes": "3908" }, { "name": "Papyrus", "bytes": "64719" }, { "name": "Perl", "bytes": "7850" }, { "name": "Python", "bytes": "795259" }, { "name": "Shell", "bytes": "297931" }, { "name": "XSLT", "bytes": "759" }, { "name": "Yacc", "bytes": "19623" } ], "symlink_target": "" }
<?php namespace Wetcat\Fortie\Providers\Articles; use Wetcat\Fortie\FortieRequest; use Wetcat\Fortie\Providers\ProviderBase; use Wetcat\Fortie\Traits\CountTrait; use Wetcat\Fortie\Traits\CreateTrait; use Wetcat\Fortie\Traits\DeleteTrait; use Wetcat\Fortie\Traits\FetchTrait; use Wetcat\Fortie\Traits\FindTrait; use Wetcat\Fortie\Traits\UpdateTrait; class Provider extends ProviderBase { use CountTrait, CreateTrait, DeleteTrait, FetchTrait, FindTrait, UpdateTrait; protected $wrapper = 'Article'; protected $wrapperGroup = 'Articles'; protected $attributes = [ 'Url', 'ArticleNumber', 'Bulky', 'ConstructionAccount', 'Depth', 'Description', 'DisposableQuantity', 'EAN', 'EUAccount', 'EUVATAccount', 'ExportAccount', 'Height', 'Housework', 'HouseworkType', 'Manufacturer', 'ManufacturerArticleNumber', 'Note', 'PurchaseAccount', 'PurchasePrice', 'QuantityInStock', 'ReservedQuantity', 'SalesAccount', 'SalesPrice', 'StockGoods', 'StockPlace', 'StockValue', 'StockWarning', 'SupplierName', 'SupplierNumber', 'Type', 'Unit', 'VAT', 'WebshopArticle', 'Weight', 'Width', 'Expired', ]; protected $writeable = [ 'ArticleNumber', 'Bulky', 'ConstructionAccount', 'Depth', 'Description', 'EAN', 'EUAccount', 'EUVATAccount', 'ExportAccount', 'Height', 'Housework', 'HouseworkType', 'Manufacturer', 'ManufacturerArticleNumber', 'Note', 'PurchaseAccount', 'PurchasePrice', 'QuantityInStock', 'ReservedQuantity', 'SalesAccount', 'StockGoods', 'StockPlace', 'StockWarning', 'SupplierNumber', 'Type', 'Unit', 'VAT', 'WebshopArticle', 'Weight', 'Width', 'Expired', ]; protected $required_create = [ 'Description', ]; protected $required_update = [ 'ArticleNumber', ]; /** * The possible values for filtering the articles. * * @var array */ protected $available_filters = [ 'active', 'inactive' ]; /** * Override the REST path */ protected $basePath = 'articles'; }
{ "content_hash": "c7229a6d1a3db780bfded51b2b235492", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 52, "avg_line_length": 17.706349206349206, "alnum_prop": 0.6145226355894218, "repo_name": "wetcat-studios/fortie", "id": "ece43fca000650a2249b178cbfeccb8efa43599b", "size": "2827", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "src/Providers/Articles/Provider.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "PHP", "bytes": "190919" } ], "symlink_target": "" }
#ifndef TUDAT_FIELD_TRANSFORM_H #define TUDAT_FIELD_TRANSFORM_H #include <boost/shared_ptr.hpp> #include <string> namespace tudat { namespace input_output { //! Field transform base class. /*! * This abstract class belongs to the parser-extractor architecture implemented in Tudat. This base * class can be used to derive specific transformation classes that take strings and return * shared-pointers to transformed strings. * \sa Extractor, Parser */ class FieldTransform { public: //! Default destructor. virtual ~FieldTransform( ) { } //! Transform input string. /*! * Returns a transformed string. * \param input Input string. * \return Shared-pointer to transformed string. */ virtual boost::shared_ptr< std::string > transform( const std::string& input ) = 0; protected: private: }; //! Typedef for shared-pointer to FieldTransform object. typedef boost::shared_ptr< FieldTransform > FieldTransformPointer; } // namespace input_output } // namespace tudat #endif // TUDAT_FIELD_TRANSFORM_H
{ "content_hash": "fa780acc96a6fde60e831e4704faafc5", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 99, "avg_line_length": 21.979166666666668, "alnum_prop": 0.7165876777251184, "repo_name": "JPelamatti/TudatDevelopment", "id": "09e6ded52732b9e4c1e7fa46014ad8ec00262e2a", "size": "3081", "binary": false, "copies": "2", "ref": "refs/heads/PropagationDevelopmentBranch", "path": "Tudat/InputOutput/fieldTransform.h", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "5305" }, { "name": "C++", "bytes": "5503425" }, { "name": "CMake", "bytes": "237472" }, { "name": "Matlab", "bytes": "2141" } ], "symlink_target": "" }
#include "uberdelegate.h" #include "dwarfmodel.h" #include "dwarfmodelproxy.h" #include "gamedatareader.h" #include "dwarf.h" #include "defines.h" #include "columntypes.h" #include "utils.h" #include "dwarftherapist.h" #include "skill.h" #include "labor.h" #include "defaultfonts.h" #include "item.h" #include "viewcolumn.h" #include "gridview.h" #include <QPainter> const float UberDelegate::MIN_DRAW_SIZE = 0.05625f; const float UberDelegate::MAX_CELL_FILL = 0.76f; UberDelegate::UberDelegate(QObject *parent) : QStyledItemDelegate(parent) , m_model(0) , m_proxy(0) { read_settings(); connect(DT, SIGNAL(settings_changed()), this, SLOT(read_settings())); // Build a star shape for drawing later (http://doc.trolltech.com/4.5/itemviews-stardelegate-starrating-cpp.html) double pi = 3.14; // nobody cares, these are tiny for (int i = 0; i < 5; ++i) { // star points are 5 per circle which are 2pi/5 radians apart // we want to cross center by drawing points that are 4pi/5 radians apart // in order. The winding-fill will fill it in nicely as we draw each point // skip a point on each iteration by moving 4*pi/5 around the circle // which is basically .8 * pi m_star_shape << QPointF( 0.4 * cos(i * pi * 0.8), // x 0.4 * sin(i * pi * 0.8) // y ); } m_diamond_shape << QPointF(0.5, 0.1) //top << QPointF(0.75, 0.5) // right << QPointF(0.5, 0.9) //bottom << QPointF(0.25, 0.5); // left } void UberDelegate::read_settings() { QSettings *s = DT->user_settings(); s->beginGroup("options"); auto_contrast = s->value("auto_contrast", true).toBool(); show_aggregates = s->value("show_aggregates", true).toBool(); s->beginGroup("colors"); color_skill = s->value("skill").value<QColor>(); color_dirty_border = s->value("dirty_border").value<QColor>(); color_had_mood = s->value("had_mood_border").value<QColor>(); color_mood = s->value("highest_mood_border").value<QColor>(); color_active_labor = s->value("active_labor").value<QColor>(); color_active_group = s->value("active_group").value<QColor>(); color_inactive_group= s->value("inactive_group").value<QColor>(); color_partial_group = s->value("partial_group").value<QColor>(); color_guides = s->value("guides").value<QColor>(); color_border = s->value("border").value<QColor>(); s->endGroup(); //colors s->beginGroup("grid"); cell_size = s->value("cell_size", DEFAULT_CELL_SIZE).toInt(); cell_padding = s->value("cell_padding", 0).toInt(); cell_size += (cell_padding*2)+2; //increase the cell size by padding m_skill_drawing_method = static_cast<SKILL_DRAWING_METHOD>(s->value("skill_drawing_method", SDM_NUMERIC).toInt()); draw_happiness_icons = s->value("happiness_icons",false).toBool(); color_mood_cells = s->value("color_mood_cells",false).toBool(); color_health_cells = s->value("color_health_cells",true).toBool(); color_attribute_syns = s->value("color_attribute_syns",true).toBool(); color_pref_matches = s->value("color_pref_matches",false).toBool(); m_fnt = s->value("font", QFont(DefaultFonts::getRowFontName(), DefaultFonts::getRowFontSize())).value<QFont>(); gradient_cell_bg = s->value("shade_cells",true).toBool(); s->endGroup(); //grid s->endGroup(); //options } void UberDelegate::paint(QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &proxy_idx) const { if (!proxy_idx.isValid()) { return; } bool cell_is_agg = proxy_idx.data(DwarfModel::DR_IS_AGGREGATE).toBool(); bool drawing_aggregate = false; if(m_model && m_model->current_grouping() != DwarfModel::GB_NOTHING && show_aggregates && cell_is_agg) drawing_aggregate = true; //name column's cells are drawn differently if (proxy_idx.column() == 0) { QStyledItemDelegate::paint(p, opt, proxy_idx); }else{ //all other cells paint_cell(p, opt, proxy_idx,drawing_aggregate); //vertical guide lines when columns are selected if (m_model && proxy_idx.column() == m_model->selected_col()) { p->save(); p->setPen(QPen(color_guides)); p->drawLine(opt.rect.topLeft(), opt.rect.bottomLeft()); p->drawLine(opt.rect.topRight(), opt.rect.bottomRight()); p->restore(); } } paint_guide_borders(opt,p); } void UberDelegate::paint_cell(QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &idx, const bool drawing_aggregate) const { QModelIndex model_idx = idx; if (m_proxy) model_idx = m_proxy->mapToSource(idx); COLUMN_TYPE type = static_cast<COLUMN_TYPE>(model_idx.data(DwarfModel::DR_COL_TYPE).toInt()); QRect adjusted = opt.rect.adjusted(cell_padding, cell_padding, -cell_padding, -cell_padding); float rating = model_idx.data(DwarfModel::DR_RATING).toFloat(); QString text_rating = model_idx.data(DwarfModel::DR_DISPLAY_RATING).toString(); float limit = 100.0; Dwarf *d = 0; if(m_model){ d = m_model->get_dwarf_by_id(idx.data(DwarfModel::DR_ID).toInt()); } // if(!d && !drawing_aggregate){ // return QStyledItemDelegate::paint(p, opt, idx); // } int state = idx.data(DwarfModel::DR_STATE).toInt(); QColor state_color = QColor(Qt::transparent); if(m_model){ ViewColumn *vc = m_model->current_grid_view()->get_column(idx.column()); if(vc){ state_color = vc->get_state_color(state); } } switch (type) { case CT_SKILL: { QColor bg = paint_bg(adjusted, p, opt, idx); limit = 15.0; if(rating >= 0){ paint_values(adjusted, rating, text_rating, bg, p, opt, idx, 0, 0, limit, 0, 0); } if(d){ paint_mood_cell(adjusted,p,opt,idx,model_idx.data(DwarfModel::DR_OTHER_ID).toInt(),false,d); } } break; case CT_LABOR: { if (!drawing_aggregate && d) { int labor_id = idx.data(DwarfModel::DR_LABOR_ID).toInt(); QColor bg = paint_bg_active(adjusted,d->labor_enabled(labor_id),p,opt,idx,state,state_color); limit = 15.0; if(rating >= 0){ paint_values(adjusted, rating, text_rating, bg, p, opt, idx, 0, 0, limit, 0, 0); } paint_mood_cell(adjusted,p,opt,idx,GameDataReader::ptr()->get_labor(labor_id)->skill_id, d->is_labor_state_dirty(labor_id),d); }else { paint_labor_aggregate(adjusted, p, opt, idx); } } break; case CT_HAPPINESS: { paint_bg(adjusted, p, opt, idx, true, state_color); if(draw_happiness_icons || (d && d->in_stressed_mood())){ paint_icon(adjusted,p,opt,idx); }else{ paint_grid(adjusted, false, p, opt, idx); } } break; case CT_EQUIPMENT: { Item::ITEM_STATE i_status = static_cast<Item::ITEM_STATE>(idx.data(DwarfModel::DR_SPECIAL_FLAG).toInt()); paint_bg(adjusted, p, opt, idx, true, state_color); paint_wear_cell(adjusted,p,opt,idx,i_status); } break; case CT_ITEMTYPE: { QColor bg = paint_bg(adjusted, p, opt, idx, true, model_idx.data(Qt::BackgroundColorRole).value<QColor>()); //if we're drawing numbers, we only want to draw counts for squads //this is a special case because we're drawing different information if it's text mode if(m_skill_drawing_method == SDM_NUMERIC && rating == 100) rating = -1; if(rating != 100){ //only show red squares for missing items (0-50 rating) paint_values(adjusted, rating/2.0f, text_rating, bg, p, opt, idx, 50.0f,5.0f,95.0f,0,0,false); } Item::ITEM_STATE i_status = static_cast<Item::ITEM_STATE>(idx.data(DwarfModel::DR_SPECIAL_FLAG).toInt()); paint_wear_cell(adjusted,p,opt,idx,i_status); } break; case CT_ROLE: case CT_SUPER_LABOR: case CT_CUSTOM_PROFESSION: { bool is_dirty = false; bool is_active = false; bool cp_border = false; if(type == CT_CUSTOM_PROFESSION){ QString custom_prof_name = idx.data(DwarfModel::DR_CUSTOM_PROF).toString(); if(!custom_prof_name.isEmpty()){ if(d && d->profession() == custom_prof_name){ cp_border = true; } is_dirty = d->is_custom_profession_dirty(custom_prof_name); } } int dirty_alpha = 255; int active_alpha = 255; int min_alpha = 75; if(d && d->can_set_labors()){ if(idx.data(DwarfModel::DR_LABORS).canConvert<QVariantList>()){ QVariantList labors = idx.data(DwarfModel::DR_LABORS).toList(); int active_count = 0; int dirty_count = 0; foreach(QVariant id, labors){ if(d->labor_enabled(id.toInt())){ is_active = true; active_count++; } if(d->is_labor_state_dirty(id.toInt())){ is_dirty = true; dirty_count++; } } float perc = 0.0; if(is_active){ perc = (float)active_count / labors.count(); if(labors.count() > 5){ if(perc <= 0.33) active_alpha = 63; else if(perc <= 0.66) active_alpha = 127; else if(perc <= 0.90) active_alpha = 190; }else{ active_alpha *= perc; } } if(is_dirty){ if(dirty_count > 0){ dirty_alpha = (255 * ((float)dirty_count / labors.count())); if(dirty_alpha < min_alpha) dirty_alpha = min_alpha; } } } } QColor bg; QColor bg_color = state_color; //color_active_labor; if(is_active){ bg_color.setAlpha(active_alpha); } bg = paint_bg_active(adjusted, is_active, p, opt, idx, state, bg_color); if(type == CT_ROLE){ paint_values(adjusted, rating, text_rating, bg, p, opt, idx, 50.0f, 5.0f, 95.0f, 42.5f, 57.5f); }else if(rating >= 0){ limit = 15.0f; paint_values(adjusted, rating, text_rating, bg, p, opt, idx, 0, 0, limit, 0, 0); } if(is_dirty){ //dirty border always has priority QColor color_dirty_adjusted = color_dirty_border; color_dirty_adjusted.setAlpha(dirty_alpha); paint_border(adjusted,p,color_dirty_adjusted); paint_grid(adjusted,false,p,opt,idx,false); }else if(cp_border){ //border for matching custom prof paint_border(adjusted,p,color_active_labor); paint_grid(adjusted, false, p, opt, idx,false); }else{ //normal border, or role pref border int pref_alpha = idx.data(DwarfModel::DR_SPECIAL_FLAG).toInt(); if(color_pref_matches && type == CT_ROLE && pref_alpha > 0){ if(pref_alpha < min_alpha) pref_alpha = min_alpha; else if(pref_alpha > 255) pref_alpha = 255; QColor color_prefs = Role::color_has_prefs(); color_prefs.setAlpha(pref_alpha); paint_border(adjusted,p,color_prefs); paint_grid(adjusted, false, p, opt, idx, false); }else{ paint_grid(adjusted, false, p, opt, idx); } } } break; case CT_IDLE: { paint_bg(adjusted, p, opt, idx, true, model_idx.data(Qt::BackgroundColorRole).value<QColor>()); paint_icon(adjusted,p,opt,idx); } break; case CT_PROFESSION: { paint_bg(adjusted, p, opt, idx, true, model_idx.data(Qt::BackgroundColorRole).value<QColor>()); paint_icon(adjusted,p,opt,idx); } break; case CT_HIGHEST_MOOD: { paint_bg(adjusted, p, opt, idx, true, model_idx.data(Qt::BackgroundColorRole).value<QColor>()); paint_icon(adjusted,p,opt,idx); bool had_mood = idx.data(DwarfModel::DR_SPECIAL_FLAG).toBool(); if(had_mood){ p->save(); QRect moodr = adjusted; moodr.adjust(2,2,-2,-2); p->setPen(QPen(Qt::darkRed,2)); p->drawLine(moodr.bottomLeft(), moodr.topRight()); p->restore(); } } break; case CT_TRAIT: case CT_BELIEF: { QColor bg = paint_bg(adjusted, p, opt, idx); if(type==CT_TRAIT && rating == -1) rating = 50; //don't draw if the unit doesn't have the trait at all paint_values(adjusted, rating, text_rating, bg, p, opt, idx, 50, 10, 90); int alpha = idx.data(DwarfModel::DR_SPECIAL_FLAG).toInt(); if(alpha > 0){ paint_border(adjusted,p,QColor(168, 10, 44, alpha)); paint_grid(adjusted, false, p, opt, idx, false); }else{ paint_grid(adjusted, false, p, opt, idx); } } break; case CT_ATTRIBUTE: { QColor bg = paint_bg(adjusted, p, opt, idx); paint_values(adjusted, rating, text_rating, bg, p, opt, idx, 50.0f, 2.0f, 98.0f,30.0f,70.0f); if(color_attribute_syns && idx.data(DwarfModel::DR_SPECIAL_FLAG).toInt() > 0){ paint_border(adjusted,p,Attribute::color_affected_by_syns()); paint_grid(adjusted, false, p, opt, idx, false); }else{ paint_grid(adjusted, false, p, opt, idx); } } break; case CT_WEAPON: { QColor bg = paint_bg(adjusted, p, opt, idx); paint_values(adjusted, rating, text_rating, bg, p, opt, idx, 50.0f, 1, 99, 49, 51, true); paint_grid(adjusted, false, p, opt, idx); } break; case CT_FLAGS: { if(d){ int bit_pos = idx.data(DwarfModel::DR_OTHER_ID).toInt(); paint_bg_active(adjusted, d->get_flag_value(bit_pos), p, opt, idx, state, state_color); paint_grid(adjusted,d->is_flag_dirty(bit_pos),p,opt,idx); }else{ QStyledItemDelegate::paint(p, opt, idx); } } break; case CT_TRAINED: { QColor bg = paint_bg(adjusted, p, opt, idx, false, model_idx.data(Qt::BackgroundColorRole).value<QColor>()); //arbitrary ignore range is used just to hide tame animals paint_values(adjusted, rating, text_rating, bg, p, opt, idx, 50.0f, 1.0f, 95.0f, 49.9f, 50.1f, true); paint_grid(adjusted, false, p, opt, idx); } break; case CT_KILLS: { QColor bg = paint_bg(adjusted, p, opt, idx, false, model_idx.data(Qt::BackgroundColorRole).value<QColor>()); paint_values(adjusted, rating, text_rating, bg, p, opt, idx, 50.0f, 1.0f, 95.0f, 49.9f, 50.1f, true); paint_grid(adjusted, false, p, opt, idx); } break; case CT_HEALTH: { QColor bg = paint_bg(adjusted, p, opt, idx, false, model_idx.data(Qt::BackgroundColorRole).value<QColor>()); //draw the symbol text in bold p->save(); if (rating != 0) { if(color_health_cells){ p->setPen(model_idx.data(Qt::TextColorRole).value<QColor>()); }else{ if(auto_contrast){ p->setPen(complement(bg)); }else{ p->setPen(Qt::black); } } QFont tmp = m_fnt; tmp.setBold(true); p->setFont(tmp); p->drawText(opt.rect, Qt::AlignCenter, text_rating); } p->restore(); paint_grid(adjusted, false, p, opt, idx); } break; case CT_SPACER: case CT_DEFAULT: default: { if(adjusted.width() > 0){ paint_bg(adjusted, p, opt, idx, false, QColor(Qt::transparent)); } break; } } } void UberDelegate::paint_icon(const QRect &adjusted, QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &proxy_idx) const { QModelIndex idx = proxy_idx; if (m_proxy) idx = m_proxy->mapToSource(proxy_idx); p->save(); QIcon icon = idx.data(Qt::DecorationRole).value<QIcon>(); QRect adj_with_borders(adjusted.topLeft(),adjusted.bottomRight()); adj_with_borders.adjust(0,0,-2,-2); //adjust for the grid lines so the image is inside QPixmap pixmap = icon.pixmap(adj_with_borders.size()); QSize iconSize = icon.actualSize(pixmap.size()); //line width is one, so center the image inside that QPointF topLeft(adjusted.x() + ((adjusted.width()-iconSize.width())/(float)2) ,adjusted.y() + ((adjusted.height()-iconSize.height())/(float)2)); p->drawPixmap(topLeft,pixmap); p->restore(); paint_grid(adjusted, false, p, opt, idx); } QColor UberDelegate::paint_bg_active(const QRect &adjusted, bool active, QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &proxy_idx, const int &state, const QColor &active_col_override) const{ QModelIndex idx = proxy_idx; if (m_proxy) idx = m_proxy->mapToSource(proxy_idx); QColor bg = idx.data(DwarfModel::DR_DEFAULT_BG_COLOR).value<QColor>(); p->save(); p->fillRect(opt.rect, bg); if(active || state == ViewColumn::STATE_DISABLED || state == ViewColumn::STATE_ACTIVE){ //always draw disabled or active if(active_col_override != QColor(Qt::black)) bg = active_col_override; else bg = color_active_labor; } if(gradient_cell_bg){ QLinearGradient grad(adjusted.topLeft(),adjusted.bottomRight()); grad.setColorAt(0,bg); bg.setAlpha(70); grad.setColorAt(1,bg); p->fillRect(adjusted, grad); }else{ p->fillRect(adjusted, QBrush(bg)); } p->restore(); return bg; } QColor UberDelegate::paint_bg(const QRect &adjusted, QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &proxy_idx, const bool use_gradient, const QColor &col_override) const{ QModelIndex idx = proxy_idx; if (m_proxy) idx = m_proxy->mapToSource(proxy_idx); QColor bg = idx.data(DwarfModel::DR_DEFAULT_BG_COLOR).value<QColor>(); p->save(); p->fillRect(opt.rect, bg); if (col_override != QColor(Qt::black)) bg = col_override; if(use_gradient && gradient_cell_bg){ QLinearGradient grad(adjusted.topLeft(),adjusted.bottomRight()); grad.setColorAt(0,bg); bg.setAlpha(75); grad.setColorAt(1,bg); p->fillRect(adjusted, grad); }else{ p->fillRect(adjusted, QBrush(bg)); } p->restore(); return bg; } QColor UberDelegate::get_pen_color(const QColor bg) const{ QColor c = Qt::black; if (auto_contrast){ c = complement(bg); if(c.toHsv().value() > 50){ return QColor(Qt::gray); }else{ return QColor(Qt::black); } } return c; } void UberDelegate::paint_values(const QRect &adjusted, float rating, QString text_rating, QColor bg, QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &idx, float median, float min_limit, float max_limit, float min_ignore, float max_ignore, bool bold_text) const{ QColor color_fill = color_skill; QPen pn; pn.setColor(get_pen_color(bg)); pn.setWidth(0); if (auto_contrast) color_fill = complement(bg); QModelIndex model_idx = idx; if (m_proxy) model_idx = m_proxy->mapToSource(idx); //some columns will ignore a mid range of values and draw nothing //however this is NEVER done when using the numeric drawing method if((min_ignore != 0 || max_ignore != 0) && m_skill_drawing_method != SDM_NUMERIC){ if (rating >= min_ignore && rating <= max_ignore){ return; //paint nothing for mid ranges } } //if we have a median, draw values below it in red //if the auto-contrast is drawing in white, it means we've got a very dark background //so also adjust our negative drawing color to a bright orange if (rating < median){ QColor neg = QColor("#DB241A"); if(auto_contrast && color_fill.toHsv().value() == 255){ neg.setGreen(neg.green() + 76); neg.setBlue(0); color_fill = QColor::fromHsv(neg.hue(), neg.saturation(), 200); }else{ color_fill = neg; } pn.setColor(Qt::gray); } //check the median passed in and covert to normal: 0-50-100 if necessary float adj_rating = rating; if(median > 0){ if(median != 50.0f){ if(rating < median){ adj_rating = adj_rating / median * 50.0f; }else{ adj_rating = ((adj_rating - median) / (100.0f-median) * 50.0f) + 50.0f; } } // //also invert the value if it was below the median, and rescale our drawing values from 0-50 and 50-100 // if(adj_rating > 50.0f){ // adj_rating = (adj_rating - 50.0f) * 2.0f; // }else{ // adj_rating = 100 - (adj_rating * 2.0f); // } } p->save(); switch(m_skill_drawing_method) { default: case SDM_GROWING_CENTRAL_BOX: if (adj_rating >= max_limit || adj_rating <= min_limit) { // draw diamond p->setRenderHint(QPainter::Antialiasing); p->setPen(pn); p->setBrush(QBrush(color_fill)); p->translate(opt.rect.x() + 2, opt.rect.y() + 2); p->scale(opt.rect.width() - 4, opt.rect.height() - 4); p->drawPolygon(m_diamond_shape); } else if (adj_rating > -1) { //0.05625 (MIN_DRAW_SIZE) is the smallest dot we can draw here, so scale to ensure the smallest exp value (1/500 or .002) can always be drawn //relative to our maximum limit for this range. this could still be improved to take into account the cell size, as having even //smaller cells than the default (16) may not draw very low dabbling skill xp levels double size = MAX_CELL_FILL; if((median > 0 && adj_rating > 50.0f) || median == 0){ if(max_ignore > max_limit){ size = ((adj_rating-median) * (MAX_CELL_FILL - MIN_DRAW_SIZE)) / (max_limit - median) + MIN_DRAW_SIZE; }else{ size = ((adj_rating-max_ignore) * (MAX_CELL_FILL - MIN_DRAW_SIZE)) / (max_limit - max_ignore) + MIN_DRAW_SIZE; } }else{ if(min_ignore < min_limit){ size = ((adj_rating-min_limit) * (MAX_CELL_FILL - MIN_DRAW_SIZE)) / (median - min_limit); }else{ size = ((adj_rating-min_limit) * (MAX_CELL_FILL - MIN_DRAW_SIZE)) / (min_ignore - min_limit); } size = MAX_CELL_FILL - size + MIN_DRAW_SIZE; } //double size = (((adj_rating-0) * (perc_of_cell - 0.05625)) / (100.0f-0)) + 0.05625; //size = roundf(size * 100) / 100; //this is to aid in the problem of an odd number of pixel in an even size cell, or vice versa double inset = (1.0f - size) / 2.0f; p->translate(adjusted.x(),adjusted.y()); p->scale(adjusted.width(),adjusted.height()); p->fillRect(QRectF(inset, inset, size, size), QBrush(color_fill)); } break; case SDM_GROWING_FILL: if (rating >= max_limit) { // draw diamond p->setRenderHint(QPainter::Antialiasing); p->setPen(pn); p->setBrush(QBrush(color_fill)); p->translate(opt.rect.x() + 2, opt.rect.y() + 2); p->scale(opt.rect.width() - 4, opt.rect.height() - 4); p->drawPolygon(m_diamond_shape); } else if (rating > -1 && rating < max_limit) { float size = 0.8f * (rating / max_limit) + 0.1f; p->translate(adjusted.x(), adjusted.y()); p->scale(adjusted.width(), adjusted.height()); p->fillRect(QRectF(0, 0, size, 1), QBrush(color_fill)); } break; case SDM_GLYPH_LINES: { p->setBrush(QBrush(color_fill)); //match pen to brush for glyphs pn.setColor(color_fill); p->setPen(pn); p->translate(adjusted.x(), adjusted.y()); p->scale(adjusted.width(), adjusted.height()); QVector<QLineF> lines; if(rating >= max_limit){ p->resetTransform(); p->setPen(pn); p->translate(adjusted.x() + adjusted.width()/2.0, adjusted.y() + adjusted.height()/2.0); p->scale(adjusted.width(), adjusted.height()); p->rotate(-18); p->setRenderHint(QPainter::Antialiasing); p->drawPolygon(m_star_shape, Qt::WindingFill); }else{ //scale rating down to 0-14 + 1 to ensure dabbling is drawn adj_rating = floor((((rating-0)/(max_limit-0))*0.15)*100); switch ((int)adj_rating) {//((int)rating) { case 0: //dabbling lines << QLineF(QPointF(0.499, 0.5), QPointF(0.501, 0.5)); break; case 15: { p->resetTransform(); p->translate(adjusted.x() + adjusted.width()/2.0, adjusted.y() + adjusted.height()/2.0); p->scale(adjusted.width(), adjusted.height()); p->rotate(-18); p->setRenderHint(QPainter::Antialiasing); p->drawPolygon(m_star_shape, Qt::WindingFill); } break; case 14: { QPolygonF poly; poly << QPointF(0.5, 0.1) << QPointF(0.5, 0.5) << QPointF(0.9, 0.5); p->drawPolygon(poly); } case 13: { QPolygonF poly; poly << QPointF(0.1, 0.5) << QPointF(0.5, 0.5) << QPointF(0.5, 0.9); p->drawPolygon(poly); } case 12: { QPolygonF poly; poly << QPointF(0.9, 0.5) << QPointF(0.5, 0.5) << QPointF(0.5, 0.9); p->drawPolygon(poly); } case 11: { QPolygonF poly; poly << QPointF(0.1, 0.5) << QPointF(0.5, 0.5) << QPointF(0.5, 0.1); p->drawPolygon(poly); } case 10: // accomplished lines << QLineF(QPointF(0.5, 0.1), QPointF(0.9, 0.5)); case 9: //professional lines << QLineF(QPointF(0.1, 0.5), QPointF(0.5, 0.1)); case 8: //expert lines << QLineF(QPointF(0.5, 0.9), QPointF(0.1, 0.5)); case 7: //adept lines << QLineF(QPointF(0.5, 0.9), QPointF(0.9, 0.5)); case 6: //talented lines << QLineF(QPointF(0.5, 0.5), QPointF(0.5, 0.9)); case 5: //proficient lines << QLineF(QPointF(0.5, 0.5), QPointF(0.9, 0.5)); case 4: //skilled lines << QLineF(QPointF(0.5, 0.1), QPointF(0.5, 0.5)); case 3: //competent lines << QLineF(QPointF(0.1, 0.5), QPointF(0.5, 0.5)); case 2: //untitled lines << QLineF(QPointF(0.7, 0.3), QPointF(0.3, 0.7)); case 1: //novice lines << QLineF(QPointF(0.3, 0.3), QPointF(0.7, 0.7)); break; } p->drawLines(lines); } } break; case SDM_NUMERIC: if (rating > -1) { // don't draw 0s everywhere p->setPen(color_fill); //for some reason df's masterwork glyph's quality is reduced when using bold if(bold_text && !text_rating.contains(QChar(0x263C))){ QFont tmp = m_fnt; tmp.setBold(true); p->setFont(tmp); } p->drawText(opt.rect, Qt::AlignCenter, text_rating); } break; } p->restore(); } void UberDelegate::paint_wear_cell(const QRect &adjusted, QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &proxy_idx, const Item::ITEM_STATE i_status) const { if(!m_proxy){ paint_grid(adjusted, false, p, opt, proxy_idx); return; } if(i_status > 0){ paint_border(adjusted,p,Item::get_color(i_status)); paint_grid(adjusted, false, p, opt, proxy_idx, false); //draw dirty border and guides }else{ paint_grid(adjusted, false, p, opt, proxy_idx); } } void UberDelegate::paint_mood_cell(const QRect &adjusted, QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &proxy_idx, int skill_id, bool dirty, Dwarf *d) const { if(!m_proxy){ //skill legend won't have a proxy paint_grid(adjusted, false, p, opt, proxy_idx); return; } if(color_mood_cells && !dirty){ //dirty is always drawn over mood QList<Skill> skills = d->get_moodable_skills().values(); if((d->had_mood() || skills.count() > 1 || skills.at(0).capped_level() > -1) && d->get_moodable_skills().contains(skill_id)){ QColor mood = color_mood; if(d->had_mood()) mood = color_had_mood; paint_border(adjusted,p,mood); paint_grid(adjusted, dirty, p, opt, proxy_idx, false); //draw dirty border and guides }else{ paint_grid(adjusted, dirty, p, opt, proxy_idx); } }else{ paint_grid(adjusted, dirty, p, opt, proxy_idx); } } void UberDelegate::paint_border(const QRect &adjusted, QPainter *p, const QColor &color) const{ QRect thick_border = adjusted; thick_border.adjust(1,1,0,0); p->setPen(QPen(color,2)); QPoint topRight = QPoint(thick_border.topRight().x(),thick_border.topRight().y()+2); QPoint bottomRight = QPoint(thick_border.bottomRight().x(),thick_border.bottomRight().y()-2); QPoint topLeft = QPoint(thick_border.topLeft().x(),thick_border.topLeft().y()+2); QPoint bottomLeft = QPoint(thick_border.bottomLeft().x(),thick_border.bottomLeft().y()-2); p->drawLine(topRight,bottomRight); p->drawLine(topLeft,bottomLeft); p->drawLine(thick_border.topRight(),thick_border.topLeft()); p->drawLine(thick_border.bottomLeft(),thick_border.bottomRight()); } void UberDelegate::paint_labor_aggregate(const QRect &adjusted, QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &proxy_idx) const { if (!proxy_idx.isValid()) { return; } QModelIndex first_col = m_proxy->index(proxy_idx.row(), 0, proxy_idx.parent()); if (!first_col.isValid()) { return; } int labor_id = proxy_idx.data(DwarfModel::DR_LABOR_ID).toInt(); int dirty_count = 0; int enabled_count = 0; for (int i = 0; i < m_proxy->rowCount(first_col); ++i) { int dwarf_id = m_proxy->data(m_proxy->index(i, 0, first_col), DwarfModel::DR_ID).toInt(); Dwarf *d = m_model->get_dwarf_by_id(dwarf_id); if (!d) continue; if (d->labor_enabled(labor_id)) enabled_count++; if (d->is_labor_state_dirty(labor_id)) dirty_count++; } QStyledItemDelegate::paint(p, opt, proxy_idx); // slap on the main bg //paint_bg(adjusted,p,opt,proxy_idx,false,QColor(Qt::magenta)); p->save(); if (m_proxy->rowCount(first_col) > 0 && enabled_count == m_proxy->rowCount(first_col)) { p->fillRect(adjusted, QBrush(color_active_group)); } else if (enabled_count > 0) { p->fillRect(adjusted, QBrush(color_partial_group)); if(auto_contrast){ p->setPen(complement(color_partial_group)); }else{ p->setPen(Qt::black); } QFont tmp = m_fnt; //tmp.setBold(true); p->setFont(tmp); p->drawText(opt.rect, Qt::AlignCenter, QString::number(enabled_count)); } else { p->fillRect(adjusted, QBrush(color_inactive_group)); } p->restore(); paint_grid(adjusted, dirty_count > 0, p, opt, proxy_idx); } void UberDelegate::paint_grid(const QRect &adjusted, bool dirty, QPainter *p, const QStyleOptionViewItem &opt, const QModelIndex &, bool draw_border) const { Q_UNUSED(opt); p->save(); p->setBrush(Qt::NoBrush); QRect rec_border = adjusted; //dirty labor if(dirty){ p->setPen(QPen(color_dirty_border,2)); rec_border.adjust(1,1,0,0); //offset for thicker border }else{ //normal white border p->setPen(color_border); } //draw border (dirty or otherwise), may have already been drawn for some cells (moodable skill/labor) if(draw_border || dirty){ p->drawLine(rec_border.topRight(),rec_border.bottomRight()); p->drawLine(rec_border.topLeft(),rec_border.bottomLeft()); p->drawLine(rec_border.topRight(),rec_border.topLeft()); p->drawLine(rec_border.bottomLeft(),rec_border.bottomRight()); } p->restore(); } void UberDelegate::paint_guide_borders(const QStyleOptionViewItem &opt, QPainter *p) const { //draw either the guide along the top/bottom or the aggregate border if(opt.state.testFlag(QStyle::State_Selected) || opt.state.testFlag(QStyle::State_MouseOver)) { p->save(); p->setPen(color_guides); p->drawLine(opt.rect.topLeft(), opt.rect.topRight()); p->drawLine(opt.rect.bottomLeft(), opt.rect.bottomRight()); p->restore(); } } QSize UberDelegate::sizeHint(const QStyleOptionViewItem &opt, const QModelIndex &idx) const { if (idx.column() == 0) return QStyledItemDelegate::sizeHint(opt, idx); return QSize(cell_size, cell_size); }
{ "content_hash": "7b43a1159bd70563c5bf37aeaed1db10", "timestamp": "", "source": "github", "line_count": 894, "max_line_length": 208, "avg_line_length": 39.580536912751676, "alnum_prop": 0.5387028401865197, "repo_name": "splintermind/Dwarf-Therapist", "id": "0084f37b8956d91d22534f78d14ce56128514e7f", "size": "36489", "binary": false, "copies": "1", "ref": "refs/heads/DF2016", "path": "src/uberdelegate.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "3101" }, { "name": "C++", "bytes": "1665057" }, { "name": "Lua", "bytes": "22211" }, { "name": "Objective-C++", "bytes": "10435" }, { "name": "Perl", "bytes": "26088" }, { "name": "QMake", "bytes": "12236" }, { "name": "Shell", "bytes": "6645" } ], "symlink_target": "" }
namespace at { class Tensor; } // namespace at namespace torch { using at::Tensor; namespace jit { namespace script { struct Module; } // namespace script } // namespace jit } // namespace torch namespace torch { namespace serialize { class TORCH_API OutputArchive final { public: /// Default-constructs the `OutputArchive`. OutputArchive(); // Move is allowed. OutputArchive(OutputArchive&&) = default; OutputArchive& operator=(OutputArchive&&) = default; // Copy is disallowed. OutputArchive(OutputArchive&) = delete; OutputArchive& operator=(OutputArchive&) = delete; /// Writes a `(key, tensor)` pair to the `OutputArchive`, and marks it as /// being or not being a buffer (non-differentiable tensor). void write( const std::string& key, const Tensor& tensor, bool is_buffer = false); /// Writes a nested `OutputArchive` under the given `key` to this /// `OutputArchive`. void write(const std::string& key, OutputArchive& nested_archive); /// Saves the `OutputArchive` into a serialized representation in a file at /// `filename`. void save_to(const std::string& filename); /// Saves the `OutputArchive` into a serialized representation into the given /// `stream`. void save_to(std::ostream& stream); /// Forwards all arguments to `write()`. /// Useful for generic code that can be re-used for both `OutputArchive` and /// `InputArchive` (where `operator()` forwards to `read()`). template <typename... Ts> void operator()(Ts&&... ts) { write(std::forward<Ts>(ts)...); } private: std::shared_ptr<jit::script::Module> module_; }; } // namespace serialize } // namespace torch
{ "content_hash": "1500e5088f67fdd68ed2389b47073800", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 79, "avg_line_length": 27.8, "alnum_prop": 0.6834532374100719, "repo_name": "ryfeus/lambda-packs", "id": "55ba70aeb10d00555faa078d4ce5689416df0ecf", "size": "1802", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "pytorch/source/torch/lib/include/torch/csrc/api/include/torch/serialize/output-archive.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "9768343" }, { "name": "C++", "bytes": "76566960" }, { "name": "CMake", "bytes": "191097" }, { "name": "CSS", "bytes": "153538" }, { "name": "Cuda", "bytes": "61768" }, { "name": "Cython", "bytes": "3110222" }, { "name": "Fortran", "bytes": "110284" }, { "name": "HTML", "bytes": "248658" }, { "name": "JavaScript", "bytes": "62920" }, { "name": "MATLAB", "bytes": "17384" }, { "name": "Makefile", "bytes": "152150" }, { "name": "Python", "bytes": "549307737" }, { "name": "Roff", "bytes": "26398" }, { "name": "SWIG", "bytes": "142" }, { "name": "Shell", "bytes": "7790" }, { "name": "Smarty", "bytes": "4090" }, { "name": "TeX", "bytes": "152062" }, { "name": "XSLT", "bytes": "305540" } ], "symlink_target": "" }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ class Dec_vases_flowersview extends CI_Controller{ public function __construct(){ parent::__construct(); $this->load->model("classifed_model"); $this->load->model("hotdealsearch_model"); $this->load->model("postad_kitchen_model"); $this->load->library('pagination'); } public function index(){ $this->session->set_userdata('kitchen_search',array()); $this->session->set_userdata('seller_deals',array()); $this->session->set_userdata('dealurgent',array()); $this->session->set_userdata('dealtitle',''); $this->session->set_userdata('dealprice',''); $this->session->set_userdata('recentdays',''); $this->session->set_userdata('search_bustype','all'); $this->session->set_userdata('location'); $this->session->set_userdata('latt',''); $this->session->set_userdata('longg',''); $config = array(); $config['base_url'] = base_url().'dec_vases_flowersview/index'; $config['total_rows'] = count($this->postad_kitchen_model->count_dvases_view()); $config['per_page'] = 30; $config['next_link'] = 'Next'; $config['prev_link'] = 'Previous'; $config['full_tag_open'] ='<div id="pagination" style="color:red;border:2px solid:blue">'; $config['full_tag_close'] ='</div>'; $this->pagination->initialize($config); $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0; $search_option = array( 'limit' =>$config['per_page'], 'start' =>$page ); if ($this->session->userdata('login_id') == '') { $login_status = 'no'; $login = ''; $favourite_list = array(); } else{ $login_status = 'yes'; $login = $this->session->userdata('login_id'); $favourite_list = $this->classifed_model->favourite_list(); } $kitchenhome_view = $this->postad_kitchen_model->dvases_view($search_option); foreach ($kitchenhome_view as $kview) { $loginid = $kview->login_id; } $log_name = @mysql_result(mysql_query("SELECT first_name FROM signup WHERE sid = (SELECT signupid FROM `login` WHERE `login_id` = '$loginid') "), 0, 'first_name'); $public_adview = $this->classifed_model->publicads_homekitchen(); $kitchen_view = $this->hotdealsearch_model->kitchen_sub_search(); $home_view = $this->hotdealsearch_model->home_sub_search(); $decor_view = $this->hotdealsearch_model->decor_sub_search(); $brands = $this->hotdealsearch_model->brand_kitchen(); $data = array( "title" => "Classifieds", "content" => "dec_vases_flowersview", "kitchen_result" => $kitchenhome_view, 'paging_links' =>$this->pagination->create_links(), 'log_name' => $log_name, 'kitchen_view' => $kitchen_view, 'home_view' => $home_view, 'decor_view' => $decor_view, 'brands'=>$brands ); /*business and consumer count for kitchen*/ $data['busconcount'] = $this->postad_kitchen_model->busconcount_dvases(); /*seller and needed count for kitchen*/ $data['sellerneededcount'] = $this->postad_kitchen_model->sellerneeded_dvases(); /*packages count*/ $data['deals_pck'] = $this->postad_kitchen_model->deals_pck_dvases(); $data['public_adview'] = $public_adview; $data['login_status'] =$login_status; $data['login'] = $login; $data['favourite_list']=$favourite_list; $this->load->view("classified_layout/inner_template",$data); } public function search_filters(){ if($this->input->post()){ $this->session->set_userdata('kitchen_search',array()); $this->session->set_userdata('seller_deals',array()); $this->session->set_userdata('dealurgent',array()); $this->session->set_userdata('dealtitle',''); $this->session->set_userdata('dealprice',''); $this->session->set_userdata('recentdays',''); $this->session->set_userdata('search_bustype','all'); $this->session->set_userdata('location'); $this->session->set_userdata('latt',''); $this->session->set_userdata('longg',''); if($this->input->post('kitchen_search')){ $this->session->set_userdata('kitchen_search',$this->input->post('kitchen_search')); }else{ $this->session->set_userdata('kitchen_search',array()); } if($this->input->post('seller_deals')){ // $data['seller_deals'] = $this->input->post('seller_deals'); $this->session->set_userdata('seller_deals',$this->input->post('seller_deals')); }else{ $this->session->set_userdata('seller_deals',array()); } if($this->input->post('dealurgent')){ //$data['dealurgent'] = $this->input->post('dealurgent'); $this->session->set_userdata('dealurgent' ,$this->input->post('dealurgent')); }else{ $this->session->set_userdata('dealurgent',array()); } if($this->input->post('search_bustype')){ //$data['search_bustype'] = $this->input->post('search_bustype'); $this->session->set_userdata('search_bustype',$this->input->post('search_bustype')); }else{ $this->session->set_userdata('search_bustype','all'); } if($this->input->post('dealtitle_sort')){ $this->session->set_userdata('dealtitle',$this->input->post('dealtitle_sort')); }else{ $this->session->set_userdata('dealtitle','Any'); } if($this->input->post('price_sort')){ $this->session->set_userdata('dealprice',$this->input->post('price_sort')); }else{ $this->session->set_userdata('dealprice','Any'); } if($this->input->post('recentdays_sort')){ $this->session->set_userdata('recentdays',$this->input->post('recentdays_sort')); }else{ $this->session->set_userdata('recentdays','Any'); } if($this->input->post('find_loc')){ $this->session->set_userdata('location',$this->input->post('find_loc')); }else{ $this->session->set_userdata('location',''); } } $config = array(); $config['base_url'] = base_url().'dec_vases_flowersview/search_filters'; $config['total_rows'] = count($this->postad_kitchen_model->count_dvases_search()); $config['per_page'] = 30; $config['next_link'] = 'Next'; $config['prev_link'] = 'Previous'; $config['full_tag_open'] ='<div id="pagination" style="color:red;border:2px solid:blue">'; $config['full_tag_close'] ='</div>'; $this->pagination->initialize($config); $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0; $search_option = array( 'limit' =>$config['per_page'], 'start' =>$page ); if ($this->session->userdata('login_id') == '') { $login_status = 'no'; $login = ''; $favourite_list = array(); } else{ $login_status = 'yes'; $login = $this->session->userdata('login_id'); $favourite_list = $this->classifed_model->favourite_list(); } /*location list*/ $loc_list = $this->hotdealsearch_model->loc_list(); $rs = $this->postad_kitchen_model->dvases_search($search_option); if (!empty($rs)) { foreach ($rs as $sview) { $loginid = $sview->login_id; } } $kitchen_view = $this->hotdealsearch_model->kitchen_sub_search(); $home_view = $this->hotdealsearch_model->home_sub_search(); $decor_view = $this->hotdealsearch_model->decor_sub_search(); $brands = $this->hotdealsearch_model->brand_kitchen(); $result = array( "title" => "Classifieds", "content" => "dec_vases_flowersview", 'paging_links' =>$this->pagination->create_links(), 'kitchen_view' => $kitchen_view, 'home_view' => $home_view, 'decor_view' => $decor_view, 'brands'=>$brands ); $result['kitchen_result'] = $rs; $result['paging_links'] = $this->pagination->create_links(); $public_adview = $this->classifed_model->publicads_homekitchen(); $log_name = @mysql_result(mysql_query("SELECT first_name FROM signup WHERE sid = (SELECT signupid FROM `login` WHERE `login_id` = '$loginid') "), 0, 'first_name'); $result['log_name'] = $log_name; $result['public_adview'] = $public_adview; $result['loc_list'] = $loc_list; $result['login_status'] =$login_status; $result['login'] = $login; $result['favourite_list']=$favourite_list; /*business and consumer count for kitchen*/ $result['busconcount'] = $this->postad_kitchen_model->busconcount_dvases(); /*seller and needed count for kitchen*/ $result['sellerneededcount'] = $this->postad_kitchen_model->sellerneeded_dvases(); /*packages count*/ $result['deals_pck'] = $this->postad_kitchen_model->deals_pck_dvases(); $this->load->view("classified_layout/inner_template",$result); } }
{ "content_hash": "7621433c38d2fae2d696c1cd8eb64362", "timestamp": "", "source": "github", "line_count": 210, "max_line_length": 180, "avg_line_length": 54.34285714285714, "alnum_prop": 0.4702067998597967, "repo_name": "Anuragigts/igts_classified", "id": "bbd3f4db3953e8fb8cf88bd30c983c514ead3b01", "size": "11412", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "application/controllers/dec_vases_flowersview.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ApacheConf", "bytes": "392" }, { "name": "CSS", "bytes": "699481" }, { "name": "HTML", "bytes": "1176475" }, { "name": "JavaScript", "bytes": "793275" }, { "name": "PHP", "bytes": "29183432" } ], "symlink_target": "" }
class CreateComments < ActiveRecord::Migration[5.0] def change create_table :comments do |t| t.string :content t.integer :article_id t.timestamps end end end
{ "content_hash": "1ba94719aefe4bbf1a3e4ea0a2c9fb9a", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 51, "avg_line_length": 18.9, "alnum_prop": 0.656084656084656, "repo_name": "thebravoman/software_engineering_2016", "id": "c6c528964cbe4fdc32fa7f86d484c27765d4f83c", "size": "189", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "h28_rails_articles_sorting/A_11_Ivan_Milev/db/migrate/20170218181609_create_comments.rb", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "3852" }, { "name": "C++", "bytes": "2303" }, { "name": "CSS", "bytes": "72949" }, { "name": "CoffeeScript", "bytes": "20467" }, { "name": "HTML", "bytes": "464471" }, { "name": "JavaScript", "bytes": "1300267" }, { "name": "Python", "bytes": "25249" }, { "name": "Ruby", "bytes": "1747072" }, { "name": "Shell", "bytes": "3144" }, { "name": "TypeScript", "bytes": "30735" } ], "symlink_target": "" }
namespace Caliburn.Micro.HelloWindowManager { using System; using System.Collections.Generic; using System.ComponentModel.Composition; using System.ComponentModel.Composition.Hosting; using System.Linq; using System.Windows; public class MefBootstrapper : BootstrapperBase { private CompositionContainer container; public MefBootstrapper() { Start(); } protected override void Configure() { container = new CompositionContainer( new AggregateCatalog(AssemblySource.Instance.Select(x => new AssemblyCatalog(x))) ); var batch = new CompositionBatch(); batch.AddExportedValue<IWindowManager>(new WindowManager()); batch.AddExportedValue<IEventAggregator>(new EventAggregator()); batch.AddExportedValue(container); container.Compose(batch); } protected override object GetInstance(Type serviceType, string key) { var contract = string.IsNullOrEmpty(key) ? AttributedModelServices.GetContractName(serviceType) : key; var exports = container.GetExportedValues<object>(contract); if (exports.Any()) return exports.First(); throw new Exception(string.Format("Could not locate any instances of contract {0}.", contract)); } protected override IEnumerable<object> GetAllInstances(Type serviceType) { return container.GetExportedValues<object>(AttributedModelServices.GetContractName(serviceType)); } protected override void BuildUp(object instance) { container.SatisfyImportsOnce(instance); } protected override void OnStartup(object sender, StartupEventArgs e) { DisplayRootViewFor<IShell>(); } } }
{ "content_hash": "54b3957cb4402da8832d7376ac15ecf4", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 114, "avg_line_length": 33.24561403508772, "alnum_prop": 0.6422163588390501, "repo_name": "ryanJohn33/CMicro", "id": "feebe152f4073efcdad004d05473e60aab44446f", "size": "1897", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "samples/Caliburn.Micro.HelloWindowManager/Caliburn.Micro.HelloWindowManager/MefBootstrapper.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "600361" }, { "name": "Pascal", "bytes": "3542" }, { "name": "PowerShell", "bytes": "147" }, { "name": "Puppet", "bytes": "3267" }, { "name": "Shell", "bytes": "156" } ], "symlink_target": "" }
var util = require('util'); var Readable = require('stream').Readable; var through = require('through'); var fs = require('fs'); var LogicFilter = require('../index'); var redis = require('redis'); var rc = redis.createClient(); var lf = new LogicFilter(); lf.add('testRule', { and: { 'checkType': 'remote.http' /*'monitoringZoneId': 'mzdfw', 'metrics': { 'duration': { 'valueI32': 70 } }*/ } }); var RedisRead = function() { Readable.call(this, {objectMode: true}); var self = this; this.rc = redis.createClient(); rc.on('pmessage', function(pattern, channel, msg) { total++; self.push(JSON.parse(msg)); }); }; util.inherits(RedisRead, Readable); RedisRead.prototype._read = function() { rc.psubscribe('*.remote.http.*'); }; var rr = new RedisRead(); var count = 0; var total = 0; var start = Date.now(); rr.pipe(lf) .pipe(through(function(obj) { //console.log(JSON.stringify(obj, null, 4)); count++; })); setInterval(function() { var duration = (Date.now() - start) / 1000; console.log(total / duration, count / duration); }, 10000);
{ "content_hash": "c950a981ea2be5994752a3f9483225b0", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 53, "avg_line_length": 20.053571428571427, "alnum_prop": 0.6108637577916296, "repo_name": "phoebesimon/node-logic-filter", "id": "2d22717c105d6bc3ab5589b4b2d113b5e744df9c", "size": "1123", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "examples/example.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "JavaScript", "bytes": "30467" } ], "symlink_target": "" }
import Ember from 'ember'; /** * Allows an object to be measured in 'grades' of quality. * * @class Gradeable * @namespace Items * @extends {Ember.Mixin} */ export default Ember.Mixin.create({ /** * Determines if the mixin is active. * * @property isGradeable * @type {boolean} * @default true */ isGradeable: Ember.computed(function() { return true; }), /** * Sets the grade of the object. * * @property grade * @type {number} */ grade: null, /** * Sets the minimum grade available for the object. * * @property minimumGrade * @type {number} * @default 0 */ minimumGrade: 0, /** * Triggers when the minimum grade is changed. * * @event minimumGradeChanged */ minimumGradeChanged: Ember.observer('minimumGrade', function() { Ember.assert(!isNaN(this.get('minimumGrade')), 'gradeable.minimumGrade must be a number'); }), /** * Sets the maximum grade available for the object. * * @property maximumGrade * @type {number} * @default Infinity */ maximumGrade: Infinity, /** * Triggers when the maximum grade is changed. * * @event maximumGradeChanged */ maximumGradeChanged: Ember.observer('maximumGrade', function() { Ember.assert(!isNaN(this.get('maximumGrade')), 'gradeable.maximumGrade must be a number'); }), /** * Triggers when the grade is changed. * * @event gradeChanged */ gradeChanged: Ember.observer('grade', function() { Ember.assert(!isNaN(this.get('grade')), 'gradeable.grade must be a number'); Ember.assert(this.get('grade') >= 0, 'gradeable.grade must be zero or a positive number'); Ember.assert(this.get('minimumGrade') <= this.get('grade') && this.get('grade') <= this.get('maximumGrade'), 'gradeable.grade must be between gradeable.minimumGrade and gradeable.maximumGrade'); }) });
{ "content_hash": "d29179bc5782949071c6b5ab2792ba13", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 91, "avg_line_length": 23.85, "alnum_prop": 0.6341719077568134, "repo_name": "joelalejandro/xethya-rpg-engine", "id": "4406c375e2f3cca578295deaa806d3c44984c5c3", "size": "1908", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "addon/items/gradeable.js", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "1574" }, { "name": "Handlebars", "bytes": "73" }, { "name": "JavaScript", "bytes": "155170" } ], "symlink_target": "" }
package org.apache.camel.component.sjms.producer; import org.apache.camel.CamelContext; import org.apache.camel.FailedToStartRouteException; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * A unit test to ensure getting a meaningful error message * when neither of ConnectionResource nor ConnectionFactory is configured. */ public class NoConnectionFactoryTest { private static final Logger LOG = LoggerFactory.getLogger(NoConnectionFactoryTest.class); @Test public void testConsumerInOnly() throws Exception { CamelContext context = new DefaultCamelContext(); context.addRoutes(createConsumerInOnlyRouteBuilder()); try { context.start(); } catch (Throwable t) { Assert.assertEquals(IllegalArgumentException.class, t.getClass()); LOG.info("Expected exception was thrown", t); return; } Assert.fail("No exception was thrown"); } @Test public void testConsumerInOut() throws Exception { CamelContext context = new DefaultCamelContext(); context.addRoutes(createConsumerInOutRouteBuilder()); try { context.start(); } catch (Throwable t) { Assert.assertEquals(IllegalArgumentException.class, t.getClass()); LOG.info("Expected exception was thrown", t); return; } Assert.fail("No exception was thrown"); } @Test public void testProducerInOnly() throws Exception { CamelContext context = new DefaultCamelContext(); context.addRoutes(createProducerInOnlyRouteBuilder()); try { context.start(); } catch (Throwable t) { Assert.assertEquals(FailedToStartRouteException.class, t.getClass()); Assert.assertEquals(IllegalArgumentException.class, t.getCause().getCause().getClass()); LOG.info("Expected exception was thrown", t); return; } Assert.fail("No exception was thrown"); } @Test public void testProducerInOut() throws Exception { CamelContext context = new DefaultCamelContext(); context.addRoutes(createProducerInOutRouteBuilder()); try { context.start(); } catch (Throwable t) { Assert.assertEquals(FailedToStartRouteException.class, t.getClass()); Assert.assertEquals(IllegalArgumentException.class, t.getCause().getCause().getClass()); LOG.info("Expected exception was thrown", t); return; } Assert.fail("No exception was thrown"); } protected RouteBuilder createConsumerInOnlyRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { from("sjms:queue:test-in?exchangePattern=InOnly") .to("mock:result"); } }; } protected RouteBuilder createConsumerInOutRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { from("sjms:queue:test-in?exchangePattern=InOut") .to("mock:result"); } }; } protected RouteBuilder createProducerInOnlyRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { from("direct:inonly") .to("sjms:queue:test-out?exchangePattern=InOnly") .to("mock:result"); } }; } protected RouteBuilder createProducerInOutRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() throws Exception { from("direct:inout") .to("sjms:queue:test-out?exchangePattern=InOut") .to("mock:result"); } }; } }
{ "content_hash": "5b12fbd38d22e1f9e80b32c270c43c21", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 100, "avg_line_length": 34.75833333333333, "alnum_prop": 0.6185567010309279, "repo_name": "ullgren/camel", "id": "ce291ac9fcda9cb1fc12596c6570ca7254959063", "size": "4973", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "components/camel-sjms/src/test/java/org/apache/camel/component/sjms/producer/NoConnectionFactoryTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Apex", "bytes": "6519" }, { "name": "Batchfile", "bytes": "1518" }, { "name": "CSS", "bytes": "16394" }, { "name": "Elm", "bytes": "10852" }, { "name": "FreeMarker", "bytes": "11410" }, { "name": "Groovy", "bytes": "14490" }, { "name": "HTML", "bytes": "896075" }, { "name": "Java", "bytes": "69929414" }, { "name": "JavaScript", "bytes": "90399" }, { "name": "Makefile", "bytes": "513" }, { "name": "Shell", "bytes": "17108" }, { "name": "Tcl", "bytes": "4974" }, { "name": "Thrift", "bytes": "6979" }, { "name": "XQuery", "bytes": "546" }, { "name": "XSLT", "bytes": "270186" } ], "symlink_target": "" }
#import <Foundation/Foundation.h> #import "S3TransferOperation.h" @class AmazonServiceRequest; @protocol AmazonCredentialsProvider; @interface S3PutObjectOperation_Internal : S3TransferOperation { } @property (nonatomic, retain) AmazonServiceResponse *response; @end
{ "content_hash": "676ea9831344b73b21beab93e11f3385", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 62, "avg_line_length": 18.2, "alnum_prop": 0.8131868131868132, "repo_name": "morizotter/AWSCloudWatchSample", "id": "523f2d1a2d89728c4fa2af451e350bc604e7b00a", "size": "857", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "aws-ios-sdk-1.7.1/src/include/S3/S3PutObjectOperation_Internal.h", "mode": "33188", "license": "mit", "language": [ { "name": "C++", "bytes": "708" }, { "name": "CSS", "bytes": "18960" }, { "name": "Objective-C", "bytes": "10544838" }, { "name": "Shell", "bytes": "3903" }, { "name": "TeX", "bytes": "276926" } ], "symlink_target": "" }
class GameWindow; class SelectionController : public EntityVisitor{ private: GameWindow& owner; std::vector<std::shared_ptr<Entity>> selection; bool isUnit; protected: public: SelectionController(GameWindow& owner); ~SelectionController(); virtual void visit(Entity& e); virtual void visit(Unit& e); void setSelection(rectangle r); void setSelection(std::shared_ptr<Entity>); std::vector<std::shared_ptr<Entity>> getSelection(); void update(); void clear(); }; #endif // __GFX_SELECTION_CONTROLLER_H__
{ "content_hash": "b4c33b256652c79540ccc8004c63dc28", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 53, "avg_line_length": 25.7, "alnum_prop": 0.7470817120622568, "repo_name": "fchurca/fiuba-7542-20152", "id": "dfe03cb1d456144663b05dac36824b465225ebe1", "size": "639", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/gfx/selection_controller.h", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "7176" }, { "name": "C++", "bytes": "241561" }, { "name": "Makefile", "bytes": "4084" }, { "name": "Shell", "bytes": "321" } ], "symlink_target": "" }
<div id="search-component"> <h4>Hero search</h4> <input #searchBox id="search-box" (keyup)="search(searchBox.value)" /> <div> <div *ngFor="let hero of heroes | async" (click)="goToDetail(hero)" class="search-result"> {{hero.name}} </div> </div> </div>
{ "content_hash": "88ceb5c2ac7e64434907b92cf4f1293a", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 72, "avg_line_length": 27.8, "alnum_prop": 0.60431654676259, "repo_name": "rob212/heroes", "id": "ede00ff5405284514c847cc966d0bc0a6710112e", "size": "278", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/hero-search.component.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "3423" }, { "name": "HTML", "bytes": "2132" }, { "name": "JavaScript", "bytes": "13489" }, { "name": "TypeScript", "bytes": "11880" } ], "symlink_target": "" }
#include "TrajectoryLibrary.hpp" #include "Trajectory.hpp" #include "gtest/gtest.h" #include "../../utils/utils/RealtimeUtils.hpp" #include <ctime> #include <stack> #define TOLERANCE 0.0001 #define TOLERANCE2 0.001 class TrajectoryLibraryTest : public testing::Test { protected: virtual void SetUp() { // start up lcm lcm_ = lcm_create ("udpm://239.255.76.67:7667?ttl=0"); param_ = bot_param_new_from_server(lcm_, 0); bot_frames_ = bot_frames_new(lcm_, param_); bot_frames_get_trans(bot_frames_, "local", "opencvFrame", &global_to_camera_trans_); bot_frames_get_trans(bot_frames_, "opencvFrame", "local", &camera_to_global_trans_); lcmgl_ = bot_lcmgl_init(lcm_, "TrajectoryLibraryTest"); } virtual void TearDown() { bot_lcmgl_destroy(lcmgl_); lcm_destroy(lcm_); // todo: delete param_; } lcm_t *lcm_; BotParam *param_; BotFrames *bot_frames_; BotTrans global_to_camera_trans_, camera_to_global_trans_; bot_lcmgl_t *lcmgl_; std::stack<double> tictoc_wall_stack; // these are some random points to use for some of the tests float x_points_[30] = {10.6599, 22.2863, 17.7719, 25.3705, 11.2680, 8.5819, 18.7618, 15.5065, 30.2579, 23.4038, 31.0982, 8.5764, 19.3839, 24.4193, 20.6749, 8.1739, 17.1374, 27.9051, 32.9856, 9.1662, 20.7621, 19.5456, 27.2377, 9.4999, 6.3336, 18.2721, 27.0902, 26.1214, 14.9257, 10.9116}; float y_points_[30] = {-6.3751, 5.5009, 4.3333, 4.0736, 6.2785, 3.2191, 4.8583, 4.8603, 9.9875, 2.4675, -7.0566, 13.1949, 4.1795, 1.3166, 14.8111, -11.7091, -1.5488, 3.8369, 14.1822, 5.8880, 0.9103, -3.1963, 0.6016, 2.5828, 7.6480, 5.6339, -3.1588, -1.7308, -2.2707, 9.6516}; float z_points_[30] = {-12.2666, 1.3978, 4.4285, 13.3552, -7.9131, -1.4959, 8.1086, -2.5152, -7.3068, 1.2222, -5.4578, 4.3666, 1.3415, 6.6314, -8.4397, -13.0923, -4.0255, 8.1594, -9.2391, -12.1854, 10.8342, 5.1429, -4.5686, -7.1356, -7.7164, -4.2232, 5.5025, -14.4127, -6.8919, -2.1024}; int number_of_reference_points_ = 30; void tic() { tictoc_wall_stack.push(GetTimestampNow() / 1000000.0); } double toc() { double outval = GetTimestampNow() / 1000000.0 - tictoc_wall_stack.top(); tictoc_wall_stack.pop(); return outval; } void GlobalToCameraFrame(double point_in[], double point_out[]) { // figure out what this point (which is currently expressed in global coordinates // will be in local opencv coordinates bot_trans_apply_vec(&global_to_camera_trans_, point_in, point_out); } void CameraToGlobalFrame(double point_in[], double point_out[]) { bot_trans_apply_vec(&camera_to_global_trans_, point_in, point_out); } void AddPointToOctree(StereoOctomap *octomap, double point[], double altitude_offset) { float x[1], y[1], z[1]; x[0] = point[0]; y[0] = point[1]; z[0] = point[2]; AddManyPointsToOctree(octomap, x, y, z, 1, altitude_offset); } void AddManyPointsToOctree(StereoOctomap *octomap, float x_in[], float y_in[], float z_in[], int number_of_points, double altitude_offset) { lcmt::stereo msg; msg.timestamp = GetTimestampNow(); vector<float> x, y, z; for (int i = 0; i < number_of_points; i++) { double this_point[3]; this_point[0] = x_in[i]; this_point[1] = y_in[i]; this_point[2] = z_in[i] + altitude_offset; double point_transformed[3]; GlobalToCameraFrame(this_point, point_transformed); //std::cout << "Point: (" << point_transformed[0] << ", " << point_transformed[1] << ", " << point_transformed[2] << ")" << std::endl; x.push_back(point_transformed[0]); y.push_back(point_transformed[1]); z.push_back(point_transformed[2]); } msg.x = x; msg.y = y; msg.z = z; msg.number_of_points = number_of_points; msg.video_number = 0; msg.frame_number = 0; octomap->ProcessStereoMessage(&msg); } }; /** * Loads a trajectory with two points and does basic manipulation of it. */ TEST_F(TrajectoryLibraryTest, LoadTrajectory) { // load a test trajectory Trajectory traj("trajtest/simple/two-point-00000", true); // ensure that we can access the right bits EXPECT_EQ_ARM(traj.GetDimension(), 12); EXPECT_EQ_ARM(traj.GetUDimension(), 3); Eigen::VectorXd output = traj.GetState(0); Eigen::VectorXd origin(12); origin << 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0; EXPECT_APPROX_MAT( origin, output, TOLERANCE); Eigen::VectorXd point(12); point << 1, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0; output = traj.GetState(0.01); EXPECT_APPROX_MAT(output, point, TOLERANCE); Eigen::VectorXd upoint(3); upoint << 0, 0, 0; EXPECT_APPROX_MAT(upoint, traj.GetUCommand(0), TOLERANCE); Eigen::VectorXd upoint2(3); upoint2 << 1, 2, 3; EXPECT_APPROX_MAT(upoint2, traj.GetUCommand(0.01), TOLERANCE); EXPECT_EQ_ARM(traj.GetTimeAtIndex(0), 0); EXPECT_EQ_ARM(traj.GetTimeAtIndex(1), 0.01); EXPECT_EQ_ARM(traj.GetNumberOfPoints(), 2); } TEST_F(TrajectoryLibraryTest, MinimumAltitude) { Trajectory traj("trajtest/simple/two-point-00000", true); EXPECT_EQ_ARM(traj.GetMinimumAltitude(), 0); Trajectory traj2("trajtest/full/unit-testing-super-aggressive-dive-open-loop-00009", true); EXPECT_EQ_ARM(traj2.GetMinimumAltitude(), -7.9945); Trajectory traj3("trajtest/full/unit-testing-knife-edge-open-loop-00010", true); EXPECT_EQ_ARM(traj3.GetMinimumAltitude(), -1.2897); } /** * Tests point transformation with a simple two-point trajectory */ TEST_F(TrajectoryLibraryTest, GetTransformedPoint) { Trajectory traj("trajtest/simple/two-point-00000", true); BotTrans trans; bot_trans_set_identity(&trans); trans.trans_vec[0] = 1; double point[3] = {1, 0, 0}; double output[3]; traj.GetXyzYawTransformedPoint(0, trans, output); //std::cout << "point = (" << point[0] << ", " << point[1] << ", " << point[2] << ")" << std::endl; //std::cout << "output = (" << output[0] << ", " << output[1] << ", " << output[2] << ")" << std::endl; for (int i = 0; i < 3; i++) { EXPECT_NEAR(point[i], output[i], TOLERANCE); } trans.trans_vec[0] = 0; traj.GetXyzYawTransformedPoint(1, trans, output); for (int i = 0; i < 3; i++) { EXPECT_NEAR(point[i], output[i], TOLERANCE); } // transform with rotation trans.rot_quat[0] = 0.707106781186547; trans.rot_quat[1] = 0; trans.rot_quat[2] = 0; trans.rot_quat[3] = 0.707106781186547; traj.GetXyzYawTransformedPoint(1, trans, output); point[0] = 0; point[1] = 1; point[2] = 0; //std::cout << "point = (" << point[0] << ", " << point[1] << ", " << point[2] << ")" << std::endl; //std::cout << "output = (" << output[0] << ", " << output[1] << ", " << output[2] << ")" << std::endl; for (int i = 0; i < 3; i++) { EXPECT_NEAR(point[i], output[i], TOLERANCE); } } TEST_F(TrajectoryLibraryTest, CheckBounds) { Trajectory traj("trajtest/simple/two-point-00000", true); BotTrans trans; bot_trans_set_identity(&trans); double output[3]; traj.GetXyzYawTransformedPoint(0, trans, output); EXPECT_EQ_ARM(output[0], 0); traj.GetXyzYawTransformedPoint(0.01, trans, output); EXPECT_EQ_ARM(output[0], 1); traj.GetXyzYawTransformedPoint(10, trans, output); EXPECT_EQ_ARM(output[0], 1); } TEST_F(TrajectoryLibraryTest, TestTiRollout) { Trajectory traj("trajtest/ti/TI-test-TI-straight-pd-no-yaw-00000", true); Eigen::VectorXd expected(12); expected << 0,0,0,0,-0.19141,0,12.046,0,-2.3342,0,0,0; Eigen::VectorXd output = traj.GetState(0); EXPECT_APPROX_MAT(expected, output, TOLERANCE); Eigen::VectorXd expected2(12); expected2 << 26.135,0,9.2492e-09,0,-0.19141,0,12.046,0,-2.3342,0,7.8801e-13,0; output = traj.GetState(2.13); EXPECT_APPROX_MAT( expected2, output, TOLERANCE); } TEST_F(TrajectoryLibraryTest, LoadLibrary) { TrajectoryLibrary lib(0); ASSERT_TRUE(lib.LoadLibrary("trajtest/simple", true)); EXPECT_EQ_ARM(lib.GetNumberTrajectories(), 2); EXPECT_EQ_ARM(lib.GetTrajectoryByNumber(0)->GetTrajectoryNumber(), 0); } /** * Test FindFarthestTrajectory on: * - no obstacles * - one obstacle * - two obstacles */ TEST_F(TrajectoryLibraryTest, FindFarthestTrajectory) { StereoOctomap octomap(bot_frames_); TrajectoryLibrary lib(0); lib.LoadLibrary("trajtest/simple", true); EXPECT_EQ_ARM(lib.GetNumberTrajectories(), 2); BotTrans trans; bot_trans_set_identity(&trans); double altitude = 30; trans.trans_vec[2] = altitude; // flying high up // check that things work with no obstacles (should return first trajectory) double dist; const Trajectory *best_traj; std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 2.0); ASSERT_TRUE(best_traj != nullptr); EXPECT_TRUE(best_traj->GetTrajectoryNumber() == 0); // check for preferred trajectory std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 2.0, nullptr, 1); ASSERT_TRUE(best_traj != nullptr); EXPECT_TRUE(best_traj->GetTrajectoryNumber() == 1); // preferred trajectory error std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 2.0, nullptr, 2); ASSERT_TRUE(best_traj != nullptr); EXPECT_TRUE(best_traj->GetTrajectoryNumber() == 0); // add an obstacle close to the first trajectory double point[3] = { 1.05, 0, 0 }; AddPointToOctree(&octomap, point, altitude); // now we expect to get the second trajectory std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 2.0); ASSERT_TRUE(best_traj != nullptr); EXPECT_TRUE(best_traj->GetTrajectoryNumber() == 1); EXPECT_NEAR(dist, 2.0 - 1.05, TOLERANCE); // add another point close to the second trajectory point[0] = 2.01; point[1] = 0.01; point[2] = -0.015; AddPointToOctree(&octomap, point, altitude); // now we expect to get the first trajectory std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 2.0); ASSERT_TRUE(best_traj != nullptr); EXPECT_TRUE(best_traj->GetTrajectoryNumber() == 0); EXPECT_NEAR(dist, 0.05, TOLERANCE); } TEST_F(TrajectoryLibraryTest, TwoTrajectoriesOnePointWithTransform) { StereoOctomap octomap(bot_frames_); TrajectoryLibrary lib(0); lib.LoadLibrary("trajtest/simple", true); double altitude = 30; double point[3] = { 1.05, 0, 0 }; AddPointToOctree(&octomap, point, altitude); BotTrans trans; bot_trans_set_identity(&trans); trans.trans_vec[2] = altitude; double dist; const Trajectory *best_traj; std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 2.0); EXPECT_TRUE(best_traj->GetTrajectoryNumber() == 1); trans.rot_quat[0] = 0.8349; trans.rot_quat[1] = 0.3300; trans.rot_quat[2] = 0.4236; trans.rot_quat[3] = -0.1206; // rotation shouldn't matter // TODO: this will fail when I introduce aircraft rotation into the check std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 2.0); EXPECT_TRUE(best_traj->GetTrajectoryNumber() == 1); // with a translation, we expect a different result trans.trans_vec[0] = 1; std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 2.0); EXPECT_TRUE(best_traj->GetTrajectoryNumber() == 0); } TEST_F(TrajectoryLibraryTest, Altitude) { StereoOctomap octomap(bot_frames_); TrajectoryLibrary lib(0); lib.LoadLibrary("trajtest/simple", true); double altitude = 0.5; double point[3] = { 1.05, 0, 0 }; AddPointToOctree(&octomap, point, altitude); BotTrans trans; bot_trans_set_identity(&trans); trans.trans_vec[2] = altitude; double dist; const Trajectory *best_traj; std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 2.0); EXPECT_TRUE(best_traj->GetTrajectoryNumber() == 1); } TEST_F(TrajectoryLibraryTest, ManyTrajectoriesWithTransform) { StereoOctomap octomap(bot_frames_); TrajectoryLibrary lib(0); lib.LoadLibrary("trajtest/full", true); double altitude = 30; double point[3] = {18, 12, 0}; AddPointToOctree(&octomap, point, altitude); BotTrans trans; bot_trans_set_identity(&trans); trans.trans_vec[0] = 17; trans.trans_vec[1] = 11; trans.trans_vec[2] = altitude; // send th double dist; const Trajectory *best_traj; std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 5.0); DrawOriginLcmGl(lcm_); bot_lcmgl_color3f(lcmgl_, 0, 0, 1); best_traj->Draw(lcmgl_, &trans); EXPECT_EQ_ARM(best_traj->GetTrajectoryNumber(), 3); EXPECT_NEAR(dist, 1.025243, TOLERANCE); // now add a yaw trans.rot_quat[0] = 0.642787609686539; trans.rot_quat[1] = 0; trans.rot_quat[2] = 0; trans.rot_quat[3] = 0.766044443118978; bot_lcmgl_color3f(lcmgl_, 1, 0, 0); best_traj->Draw(lcmgl_, &trans); bot_lcmgl_switch_buffer(lcmgl_); std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 5.0); //lib.Draw(lcm_, &trans); EXPECT_EQ_ARM(best_traj->GetTrajectoryNumber(), 2); EXPECT_NEAR(dist, 1.174604, TOLERANCE); // now have a transform with roll, pitch, and yaw trans.rot_quat[0] = 0.863589399067779; trans.rot_quat[1] = -0.004581450790098; trans.rot_quat[2] = 0.298930259006064; trans.rot_quat[3] = 0.405996379758463; std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 5.0); EXPECT_EQ_ARM(best_traj->GetTrajectoryNumber(), 4); EXPECT_NEAR(dist, 0.327772, TOLERANCE); } TEST_F(TrajectoryLibraryTest, ManyPointsAgainstMatlab) { StereoOctomap octomap(bot_frames_); double altitude = 30; // load points AddManyPointsToOctree(&octomap, x_points_, y_points_, z_points_, number_of_reference_points_, altitude); TrajectoryLibrary lib(0); lib.LoadLibrary("trajtest/many", true); BotTrans trans; bot_trans_set_identity(&trans); trans.trans_vec[2] = altitude; double dist; const Trajectory *best_traj; std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 50.0); ASSERT_TRUE(best_traj != nullptr); EXPECT_EQ_ARM(best_traj->GetTrajectoryNumber(), 1); EXPECT_NEAR(dist, 4.2911, 0.001); } TEST_F(TrajectoryLibraryTest, TimingTest) { StereoOctomap octomap(bot_frames_); double altitude = 30; // create a random point cloud int num_points = 10000; int num_lookups = 1000; std::uniform_real_distribution<double> uniform_dist(-1000, 1000); std::random_device rd; std::default_random_engine rand_engine(rd()); float x[num_points], y[num_points], z[num_points]; for (int i = 0; i < num_points; i++) { // generate a random point x[i] = uniform_dist(rand_engine); y[i] = uniform_dist(rand_engine); z[i] = uniform_dist(rand_engine); //std::cout << "Point: (" << this_point[0] << ", " << this_point[1] << ", " << this_point[2] << ")" << std::endl; } AddManyPointsToOctree(&octomap, x, y, z, num_points, altitude); TrajectoryLibrary lib(0); lib.LoadLibrary("trajtest/many", true); BotTrans trans; bot_trans_set_identity(&trans); trans.trans_vec[2] = altitude; tic(); for (int i = 0; i < num_lookups; i++) { double dist; const Trajectory *best_traj; std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 50.0); } double num_sec = toc(); std::cout << num_lookups << " lookups with " << lib.GetNumberTrajectories() << " trajectories on a cloud (" << num_points << ") took: " << num_sec << " sec (" << num_sec / (double)num_lookups*1000.0 << " ms / lookup)" << std::endl; } TEST_F(TrajectoryLibraryTest, RemainderTrajectorySimple) { StereoOctomap octomap(bot_frames_); // get a trajectory TrajectoryLibrary lib(0); lib.LoadLibrary("trajtest/simple", true); double altitude = 100; BotTrans trans; bot_trans_set_identity(&trans); trans.trans_vec[2] = altitude; const Trajectory *traj = lib.GetTrajectoryByNumber(0); double dist = traj->ClosestObstacleInRemainderOfTrajectory(octomap, trans, 0, 0); // add an obstacle double point[3] = { 0, 0, 0}; AddPointToOctree(&octomap, point, altitude); // now we expect zero distance since the obstacle and the trajectory start at the origin dist = traj->ClosestObstacleInRemainderOfTrajectory(octomap, trans, 0, 0); EXPECT_NEAR(dist, 0, TOLERANCE); // at t = 0.01, we expect a distance of 1 since the point is already behind us dist = traj->ClosestObstacleInRemainderOfTrajectory(octomap, trans, 0.01, 0); EXPECT_EQ_ARM(dist, 1); // add a transform trans.trans_vec[2] += 42; dist = traj->ClosestObstacleInRemainderOfTrajectory(octomap, trans, 0, 0); EXPECT_EQ_ARM(dist, 42); dist = traj->ClosestObstacleInRemainderOfTrajectory(octomap, trans, 0.01, 0); EXPECT_NEAR(dist, sqrt( 42*42 + 1*1 ), TOLERANCE); } TEST_F(TrajectoryLibraryTest, RemainderTrajectorySimpleAltitude) { StereoOctomap octomap(bot_frames_); // get a trajectory TrajectoryLibrary lib(0); lib.LoadLibrary("trajtest/simple", true); double altitude = 5; BotTrans trans; bot_trans_set_identity(&trans); trans.trans_vec[2] = altitude; const Trajectory *traj = lib.GetTrajectoryByNumber(0); double dist = traj->ClosestObstacleInRemainderOfTrajectory(octomap, trans, 0, 0); EXPECT_EQ_ARM(dist, -1); // add an obstacle double point[3] = { 0, 0, 6}; AddPointToOctree(&octomap, point, 0); dist = traj->ClosestObstacleInRemainderOfTrajectory(octomap, trans, 0, 0); EXPECT_EQ_ARM(dist, 6 - altitude); } TEST_F(TrajectoryLibraryTest, RemainderTrajectory) { StereoOctomap octomap(bot_frames_); // Load a complicated trajectory TrajectoryLibrary lib(0); lib.LoadLibrary("trajtest/many", true); double altitude = 30; BotTrans trans; bot_trans_set_identity(&trans); trans.trans_vec[2] = altitude; const Trajectory *traj = lib.GetTrajectoryByNumber(1); double dist; double point[3] = { 6.65, -7.23, 9.10 }; AddPointToOctree(&octomap, point, altitude); dist = traj->ClosestObstacleInRemainderOfTrajectory(octomap, trans, 0, 0); EXPECT_NEAR(dist, 11.748141101535500, TOLERANCE2); // from matlab dist = traj->ClosestObstacleInRemainderOfTrajectory(octomap, trans, 0.95, 0); EXPECT_NEAR(dist, 11.8831, TOLERANCE2); dist = traj->ClosestObstacleInRemainderOfTrajectory(octomap, trans, 1.5, 0); // t after trajectory EXPECT_NEAR(dist, 12.3832, TOLERANCE2); // from matlab } TEST_F(TrajectoryLibraryTest, RemainderTrajectoryTi) { StereoOctomap octomap(bot_frames_); double altitude = 30; BotTrans trans; bot_trans_set_identity(&trans); trans.trans_vec[2] = altitude; Trajectory traj("trajtest/ti/TI-test-TI-straight-pd-no-yaw-00000", true); double dist = traj.ClosestObstacleInRemainderOfTrajectory(octomap, trans, 0, 0); EXPECT_EQ_ARM(dist, -1); double point[3] = { 1.5, -0.5, 3 }; AddPointToOctree(&octomap, point, altitude); dist = traj.ClosestObstacleInRemainderOfTrajectory(octomap, trans, 0, 0); EXPECT_NEAR(dist, 3.041506, TOLERANCE2); // from matlab dist = traj.ClosestObstacleInRemainderOfTrajectory(octomap, trans, 1.21, 0); EXPECT_NEAR(dist, 13.6886, TOLERANCE2); } TEST_F(TrajectoryLibraryTest, FindFarthestWithTI) { StereoOctomap octomap(bot_frames_); TrajectoryLibrary lib(0); lib.LoadLibrary("trajtest/full", true); double altitude = 30; BotTrans trans; bot_trans_set_identity(&trans); trans.trans_vec[2] = altitude; double dist; const Trajectory *best_traj; std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 50.0); ASSERT_TRUE(best_traj != nullptr); // with no obstacles, we should always get the first trajectory EXPECT_EQ_ARM(best_traj->GetTrajectoryNumber(), 0); // put an obstacle along the path of the TI trajectory double point[3] = { 1.10, -0.1, 0 }; AddPointToOctree(&octomap, point, altitude); std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap, trans, 50.0); EXPECT_EQ_ARM(best_traj->GetTrajectoryNumber(), 4); // from matlab EXPECT_NEAR(dist, 0.2032, TOLERANCE2); // from matlab // create a new octre StereoOctomap octomap2(bot_frames_); AddManyPointsToOctree(&octomap2, x_points_, y_points_, z_points_, number_of_reference_points_, altitude); std::tie(dist, best_traj) = lib.FindFarthestTrajectory(octomap2, trans, 50.0); EXPECT_EQ_ARM(best_traj->GetTrajectoryNumber(), 3); EXPECT_NEAR(dist, 5.0060, TOLERANCE); } int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
{ "content_hash": "a1a5518e741340f41cc953a092c05ed7", "timestamp": "", "source": "github", "line_count": 734, "max_line_length": 295, "avg_line_length": 29.377384196185286, "alnum_prop": 0.6342345684737746, "repo_name": "andybarry/flight", "id": "f1234fae589f7568662718f9fe8000d5f6cff566", "size": "21563", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "controllers/TrajectoryLibrary/tests.cpp", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "3000255" }, { "name": "C++", "bytes": "2939345" }, { "name": "CMake", "bytes": "53882" }, { "name": "JavaScript", "bytes": "4603" }, { "name": "Lua", "bytes": "5045" }, { "name": "M4", "bytes": "19093" }, { "name": "Makefile", "bytes": "74202" }, { "name": "Matlab", "bytes": "88253" }, { "name": "Objective-C", "bytes": "68493" }, { "name": "PHP", "bytes": "7855" }, { "name": "Perl", "bytes": "7665" }, { "name": "Perl6", "bytes": "493" }, { "name": "Protocol Buffer", "bytes": "3624" }, { "name": "Python", "bytes": "274882" }, { "name": "Ruby", "bytes": "4978" }, { "name": "Shell", "bytes": "44283" }, { "name": "Tcl", "bytes": "7000" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>libvalidsdp: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.14.1 / libvalidsdp - 0.6.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> libvalidsdp <small> 0.6.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-05-02 02:27:03 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-05-02 02:27:03 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 4 Virtual package relying on a GMP lib system installation coq 8.14.1 Formal proof management system dune 3.1.1 Fast, portable, and opinionated build system ocaml 4.11.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.11.2 Official release 4.11.2 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: [ &quot;Pierre Roux &lt;pierre.roux@onera.fr&gt;&quot; &quot;Érik Martin-Dorel &lt;erik.martin-dorel@irit.fr&gt;&quot; ] homepage: &quot;https://sourcesup.renater.fr/validsdp/&quot; dev-repo: &quot;git+https://github.com/validsdp/validsdp.git&quot; bug-reports: &quot;https://github.com/validsdp/validsdp/issues&quot; license: &quot;LGPL-2.1-or-later&quot; build: [ [&quot;sh&quot; &quot;-c&quot; &quot;./configure&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [make &quot;install&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.7&quot; &amp; &lt; &quot;8.11~&quot;} &quot;coq-bignums&quot; &quot;coq-flocq&quot; {&gt;= &quot;3.1.0&quot;} &quot;coq-coquelicot&quot; {&gt;= &quot;3.0&quot;} &quot;coq-interval&quot; {&gt;= &quot;3.4.0&quot; &amp; &lt; &quot;4~&quot;} &quot;coq-mathcomp-field&quot; {&gt;= &quot;1.8&quot; &amp; &lt; &quot;1.10~&quot;} &quot;ocamlfind&quot; {build} &quot;conf-autoconf&quot; {build &amp; dev} ] synopsis: &quot;LibValidSDP&quot; description: &quot;&quot;&quot; LibValidSDP is a library for the Coq formal proof assistant. It provides results mostly about rounding errors in the Cholesky decomposition algorithm used in the ValidSDP library which itself implements Coq tactics to prove multivariate inequalities using SDP solvers. Once installed, the following modules can be imported : From libValidSDP Require Import Rstruct.v misc.v real_matrix.v bounded.v float_spec.v fsum.v fcmsum.v binary64.v cholesky.v float_infnan_spec.v binary64_infnan.v cholesky_infnan.v flx64.v zulp.v coqinterval_infnan.v. &quot;&quot;&quot; tags: [ &quot;keyword:libValidSDP&quot; &quot;keyword:ValidSDP&quot; &quot;keyword:floating-point arithmetic&quot; &quot;keyword:Cholesky decomposition&quot; &quot;category:Miscellaneous/Coq Extensions&quot; &quot;logpath:libValidSDP&quot; ] authors: [ &quot;Pierre Roux &lt;pierre.roux@onera.fr&gt;&quot; &quot;Érik Martin-Dorel &lt;erik.martin-dorel@irit.fr&gt;&quot; ] url { src: &quot;https://github.com/validsdp/validsdp/releases/download/v0.6.0/libvalidsdp-0.6.0.tar.gz&quot; checksum: &quot;sha256=2cb2401c5fdf53adae3a93c020f358aca72bed0a7d1b3d0cda94bf50123b0e34&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-libvalidsdp.0.6.0 coq.8.14.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.14.1). The following dependencies couldn&#39;t be met: - coq-libvalidsdp -&gt; coq &lt; 8.11~ -&gt; ocaml &lt; 4.10 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-libvalidsdp.0.6.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
{ "content_hash": "1307ad6553d58f4a65182a6ee1d077d3", "timestamp": "", "source": "github", "line_count": 190, "max_line_length": 216, "avg_line_length": 41.863157894736844, "alnum_prop": 0.566884586371637, "repo_name": "coq-bench/coq-bench.github.io", "id": "cd1714a656d717559f0ec3d44e9be72e08cd382f", "size": "7981", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "clean/Linux-x86_64-4.11.2-2.0.7/released/8.14.1/libvalidsdp/0.6.0.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
<?php namespace Faker\Test\Provider\fr_FR; use Faker\Test\TestCase; final class TextTest extends TestCase { private $textClass; protected function setUp(): void { $this->textClass = new \ReflectionClass('Faker\Provider\fr_FR\Text'); } protected function getMethod($name) { $method = $this->textClass->getMethod($name); $method->setAccessible(true); return $method; } function testItShouldAppendEndPunctToTheEndOfString() { $this->assertSame( 'Que faisaient-elles maintenant? À.', $this->getMethod('appendEnd')->invokeArgs(null, array('Que faisaient-elles maintenant? À ')) ); $this->assertSame( 'Que faisaient-elles maintenant? À.', $this->getMethod('appendEnd')->invokeArgs(null, array('Que faisaient-elles maintenant? À— ')) ); $this->assertSame( 'Que faisaient-elles maintenant? À.', $this->getMethod('appendEnd')->invokeArgs(null, array('Que faisaient-elles maintenant? À,')) ); $this->assertSame( 'Que faisaient-elles maintenant? À!.', $this->getMethod('appendEnd')->invokeArgs(null, array('Que faisaient-elles maintenant? À! ')) ); $this->assertSame( 'Que faisaient-elles maintenant? À.', $this->getMethod('appendEnd')->invokeArgs(null, array('Que faisaient-elles maintenant? À: ')) ); $this->assertSame( 'Que faisaient-elles maintenant? À.', $this->getMethod('appendEnd')->invokeArgs(null, array('Que faisaient-elles maintenant? À; ')) ); } }
{ "content_hash": "52f3d4970249b0c24233cef885e1cced", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 107, "avg_line_length": 29.875, "alnum_prop": 0.5935445307830245, "repo_name": "localheinz/Faker", "id": "70e904f87b804342294021b6f36c8a3499d5636a", "size": "1687", "binary": false, "copies": "1", "ref": "refs/heads/1.10", "path": "test/Faker/Provider/fr_FR/TextTest.php", "mode": "33188", "license": "mit", "language": [ { "name": "Makefile", "bytes": "582" }, { "name": "PHP", "bytes": "10083708" } ], "symlink_target": "" }
This is the Rails codebase which powers [What Now?](http://whatnow.io), a collection of ideas about how to fight back against bigotry, hate, injustice and harmful policies in Trump's America. I am happy to work with you...Issues and PRs are most welcome!
{ "content_hash": "758605991f023ea7d0ee481bb662cf0c", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 191, "avg_line_length": 85.33333333333333, "alnum_prop": 0.76953125, "repo_name": "monitron/whatnow", "id": "ced0d15ba67efce03ea977d9396f58ff285fbd09", "size": "268", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "9884" }, { "name": "CoffeeScript", "bytes": "1176" }, { "name": "HTML", "bytes": "15853" }, { "name": "JavaScript", "bytes": "1178" }, { "name": "Ruby", "bytes": "29840" } ], "symlink_target": "" }
package org.sagebionetworks.repo.manager.file.scanner; import org.springframework.jdbc.core.RowMapper; /** * Functional interface that provides a row mapper and provides access to the name of the object and * file handle ids columns */ @FunctionalInterface public interface RowMapperSupplier { /** * @param objectIdColumnName The name of the object id column * @param fileHandleIdColumnName The name of the column where the file handle id(s) are stored * @return A row mapper for a {@link ScannedFileHandleAssociation} */ RowMapper<ScannedFileHandleAssociation> getRowMapper(String objectIdColumnName, String fileHandleIdColumnName); }
{ "content_hash": "bef22ffd1d69fd4892db29858f132a4b", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 112, "avg_line_length": 34.36842105263158, "alnum_prop": 0.7917304747320061, "repo_name": "zimingd/Synapse-Repository-Services", "id": "e001d8f0a30bead9b60195e6fd80ef621573cadf", "size": "653", "binary": false, "copies": "2", "ref": "refs/heads/develop", "path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/file/scanner/RowMapperSupplier.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "40802" }, { "name": "Java", "bytes": "13565082" }, { "name": "Python", "bytes": "2379" }, { "name": "Rich Text Format", "bytes": "31728" }, { "name": "Roff", "bytes": "54" }, { "name": "Shell", "bytes": "33011" }, { "name": "TSQL", "bytes": "37170" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.payneteasy.logging-extensions</groupId> <artifactId>logging-extensions</artifactId> <version>1.0-5-SNAPSHOT</version> <name>Logging framework extensions</name> <description>Appenders for log4j and logback logging frameworks</description> <parent> <groupId>org.sonatype.oss</groupId> <artifactId>oss-parent</artifactId> <version>4</version> </parent> <url>https://github.com/rpuch/logging-extensions</url> <scm> <connection>scm:git:git@github.com:rpuch/logging-extensions.git</connection> <developerConnection>scm:git:git@github.com:rpuch/logging-extensions.git</developerConnection> <url>git@github.com:rpuch/logging-extensions.git</url> </scm> <licenses> <license> <name>The Apache Software License, Version 2.0</name> <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> <distribution>repo</distribution> </license> </licenses> <developers> <developer> <id>roman.puchkovskiy</id> <email>roman.puchkovskiy@gmail.com</email> <name>Roman Puchkovskiy</name> <roles> <role>developer</role> </roles> </developer> </developers> <!-- - Distributions --> <distributionManagement> <repository> <id>sonatype-nexus-staging</id> <name>sonatype oss RELEASE repository</name> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url> </repository> <snapshotRepository> <id>sonatype-nexus-snapshots</id> <name>sonatype oss SNAPSHOT repository</name> <url>https://oss.sonatype.org/content/repositories/snapshots/</url> <uniqueVersion>false</uniqueVersion> </snapshotRepository> </distributionManagement> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.13.1</version> <scope>test</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.2.0</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.5</source> <target>1.5</target> <encoding>utf-8</encoding> <showDeprecation>true</showDeprecation> <showWarnings>true</showWarnings> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-idea-plugin</artifactId> <version>2.2</version> <configuration> <downloadSources>true</downloadSources> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <version>2.8</version> <configuration> <downloadSources>true</downloadSources> </configuration> </plugin> <!-- Specifying version as otherwise 2.0-beta-8 is resolved and we don't have update-versions goal --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.1</version> </plugin> </plugins> </build> <profiles> <profile> <id>deploy</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-gpg-plugin</artifactId> <executions> <execution> <id>sign-artifacts</id> <phase>verify</phase> <goals> <goal>sign</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>
{ "content_hash": "215383c7e59b8986984ebc77c456cc52", "timestamp": "", "source": "github", "line_count": 143, "max_line_length": 204, "avg_line_length": 34.92307692307692, "alnum_prop": 0.5218261914297156, "repo_name": "rpuch/logging-extensions", "id": "6e5dc1641ff274498ee2e685e0b0b97b9fe23ca1", "size": "4994", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "pom.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "28492" } ], "symlink_target": "" }
Code Samples for Chapter 4 ========================== This file contains instructions for running the sample project associated with Chapter 4 of RESTful Java Web Services. General instructions -------------------- The examples used in this book are built using the following: - Java SE Development Kit 8 - NetBeans IDE 8.0.2 - Glassfish Server 4.1 or newer(installed along with NetBeans IDE) - Maven 3.2.3. - Oracle Database 11.2 Express Edition or higher (Example uses HR Schema) Detailed instructions for setting up all the required tools for running the examples used in this book are discussed in Appendix section of this book Before you begin ---------------- - If you are not familiar with NetBeans IDE and GlassFish, move back and refer to the section 'Building your first RESTful web service with JAX-RS' in Chapter 3 of this book. Please follow the detailed steps that you will find in this section and complete the sample application before trying out any other examples. This will make sure your IDE and GlassFish Server is configured properly to run all the examples given in this book. How to run this example ? ------------------------- - Extract the zip file to your local file system. You may see **rest-chapter4-jaxrs** folder in the extracted location. - This is a maven project and it two sub projects - rest-chapter4-service : This project contains REST service implementation - rest-chapter4-client : This is the REST client implementation - Open the rest-chapter4-jaxrs project in NetBeans IDE 8.0.2 or higher - In main tool bar,choose File > Open Project > rest-chapter4-jaxrs - In the project pane, expand 'Modules' element in rest-chapter4-jaxrs project and double click rest-chapter4-service project to open in the IDE - Note that this example uses HR schema that usually comes with Oracle as sample schema. So we need to change the connection details to reflect your local settings as explained in next step. - In rest-chapter4-service project, - Go to src/main/resources folder and open META-INF/persistence.xml. Modify the jta-data-source entry to match with Oracle data base that you have. You can either choose a an already existing data source(which connects to HR schema in Oracle DB) in GlassFish server or define a new JNDI data source in GlassFish and set it as 'jta-data-source' in persistence.xml. To know how to define data source in GlassFish, see this page: http://www.jobinesh.com/2015/09/configuring-jndi-data-source-for-oralce.html. - In the project pane, expand rest-chapter4-jaxrs project and double click on rest-chapter4-service and rest-chapter4-client project to open them in the IDE. - Go to the project rest-chapter4-service, Right click and choose Run. Thia action deploys the REST services. - To test REST APIs, open rest-chapter4-client project, and then select either HRServiceJAXRSClient.java or HRServiceAsynchJAXRSClient. Later is used for asynch invocation. - Change the BASE_URI string in java to reflect the server URL where you have deployed the application - Right click DepartmentServiceJAXRSClient.java and choose Run to test client APIs. Core classes used in this example --------------------------------- - <rest-chapter4-service> - com.packtpub.rest.ch4.model - Department : JPA entity mapped to DEPARTMENTS table - Employee : JPA entity mapped to EMPLOYEES table - com.packtpub.rest.ch4.ext - CSVMessageBodyReader : Demonstrates custom entity body reader - CSVMessageBodyWriter : Demonstrates custom entity body writer - DynamicFeatureRegister: DynamicFeature implementation - com.packtpub.rest.ch4.validation - ValidDepartmentValidator: Custom bean validation constraint - DepartmentNotFoundExceptionMapper : Exception mapper which maps DeprtmentNotFoundBusinessException exceptions to HTTP Response. - com.packtpub.rest.ch4.service - HRAsynchService : REST resource class which demonstrates asynch JAX-RS rest service - HRService : REST resource class which demonstrates the use of bean validation, custom entity providers and dynamic feature - HRServiceCache : REST resource class which demonstrates caching APIS in JAX-RS - AppConfig : Application configuration class, sub classed form javax.ws.rs.core.Application - <rest-chapter4-client> - com.packtpub.rest.ch4.client - HRServiceJAXRSClient: Demonstrates javax.ws.rs.core.Form API for creating Department resource - HRServiceAsynchJAXRSClient: Demonstrates asynch APIs for invoking APIs Sample input for testing some of the core features ----------------------------------------------------- - Testing CSVMessageBodyWriter - Resource Class: com.packtpub.rest.ch4.service.HRService - URI : http://localhost:28080/rest-chapter4-service/webresources/hr/departments/batch - HTTP Method : POST - Content-Type: application/csv - Payload : departmentId,departmentName,locationId,managerId 1001,"HR 1001",1700,101 1002,"IT 1001",1500,205 - See the image input_application_csv.png in this folder to get a feel of this test case - Testing CSVMessageBodyReader - Resource Class: com.packtpub.rest.ch4.service.HRService - URI : http://localhost:28080/rest-chapter4-service/webresources/hr/departments/batch - HTTP Method : GET - Content-Type: application/csv - Testing @ValidDepartment validator - Resource Class: com.packtpub.rest.ch4.service.HRService - URI : http://localhost:28080/rest-chapter4-service/webresources/hr/departments/ - HTTP Method : POST - Content-Type: application/json - Payload : {"departmentId":300,"departmentName":"Administration","locationId":1700,"managerId":101} - Testing JAX-RS Caching ( Cache-Control ) - Resource Class: com.packtpub.rest.ch4.service.HRServiceCache - Use any REST API testing tool such as Postman REST Client or REST Console to test caching feature - URI: http://localhost:28080/rest-chapter4-service/webresources/hr/cache/departments/10 - HTTP Method: GET - Content-Type: application/json - Set request Header: if-modified-since:<Last-Modified header value from last response> - Testing JAX-RS Caching ( ETag ) - Resource Class: com.packtpub.rest.ch4.service.HRServiceCache - Use any REST API testing tool such as Postman REST Client or REST Console to test caching feature - URI: http://localhost:28080/rest-chapter4-service/webresources/hr/cache/etag/departments/10 - HTTP Method: GET - Content-Type: application/json - Set request Header: If-None-Match :<ETag from last response> What next? ---------------------------- This project contains advanced JAX-RS features that you may learn in chapter 4. You can explore things based on your interest. Also try adding more more fractures of your choice
{ "content_hash": "4b7118298e94a2d225c5576816860e7e", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 514, "avg_line_length": 62.26605504587156, "alnum_prop": 0.7517312509208781, "repo_name": "jobinesh/restful-java-web-services-edition2", "id": "cb253533a625b63b318069a0c4725e59f6bec961", "size": "6787", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "rest-chapter4-jaxrs/README.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "86535" }, { "name": "HTML", "bytes": "14629" }, { "name": "Java", "bytes": "353015" }, { "name": "JavaScript", "bytes": "1582948" }, { "name": "RAML", "bytes": "824" } ], "symlink_target": "" }
Demonstrates how to use the sensors_plus plugin.
{ "content_hash": "9189b3496634ad634fd84c58afc156f3", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 48, "avg_line_length": 49, "alnum_prop": 0.8163265306122449, "repo_name": "fluttercommunity/plus_plugins", "id": "a0ddab647d5e170660e1547621f7c82dfc779841", "size": "73", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "packages/sensors_plus/sensors_plus/example/README.md", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "32096" }, { "name": "C++", "bytes": "184641" }, { "name": "CMake", "bytes": "89947" }, { "name": "Dart", "bytes": "411749" }, { "name": "HTML", "bytes": "8643" }, { "name": "Java", "bytes": "82518" }, { "name": "JavaScript", "bytes": "11239" }, { "name": "Kotlin", "bytes": "51019" }, { "name": "Objective-C", "bytes": "56287" }, { "name": "Ruby", "bytes": "15894" }, { "name": "SCSS", "bytes": "5308" }, { "name": "Shell", "bytes": "74" }, { "name": "Swift", "bytes": "42431" }, { "name": "TypeScript", "bytes": "13102" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> <solid android:color="@color/md_lime_500"/> </shape>
{ "content_hash": "e4ae39e6969fca28f58bb60176d97684", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 65, "avg_line_length": 37.4, "alnum_prop": 0.679144385026738, "repo_name": "danie555costa/Quitanda", "id": "720efd9806af117ed426aca9925bff708d2ee3f2", "size": "187", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/res/drawable/shap_oval_lime.xml", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "247156" } ], "symlink_target": "" }
var _ = require('lodash'); var appFilters = require('./_octane.js').filters; var utils = require('./utils.js'); var _octane = require('./_octane.js'); var Compiler = require('./Compiler.js'); var Factory = require('./Factory.js'); var Template = Factory({ //Proto Methods initialize: function(elem){ if(!elem) return; this.name = elem.getAttribute('name') || elem.octane_id || this.guid(elem); this.raw = elem.innerHTML; this.content = ''; }, set: function(data){ _.isObject(data) || (data = {}); this.content = Template.interpolate(this.raw,data); return this; }, render: function(dest){ return Template._render(this,null,'mountable'); }, prependTo: function(dest){ Template._render(this,dest,'prepend'); }, appendTo: function(dest){ Template._render(this,dest,'append'); }, save: function(){ if(!_octane.templates[this.name]){ _octane.templates[this.name] = this; }else{ this.log('Could not create template '+this.name+'. Already exists'); } } },{ //Static Methods get: function(name){ if(_octane.templates[name]){ return _octane.templates[name]; } else { this.log('Template '+name+' does not exist'); } }, create: function(elem){ return new Template(elem); }, fromString: function(name,markup){ if(!markup) { markup = name; name = undefined; } var div = document.createElement('div'); div.name = name; div.innerHTML = markup; return new Template(div); }, compile: function(scope){ scope || (scope = document); var tmpls = scope.querySelectorAll('script[type="text/octane-template"],o-template'); var t = tmpls.length; while(t--){ this._cache(tmpls[t]); } }, _cache: function(elem){ if(elem){ // compile nested templates this.compile(elem); var tmp = this.create(elem); tmp.save(); elem.parentElement.removeChild(elem); } }, interpolate: function(markup,data){ var pattern = /\{\{([^{^}]+)\}\}/g; var matches = markup.match(pattern); var n; if(_.isArray(matches)){ n = matches.length; while(n--){ markup = this._interpolate(markup,matches[n],data); } } return markup; }, _interpolate: function (markup,match,data){ // begin: {{postedBy.firstName @filter:myFilter(param) @default(value)}} var stripped = match.replace(/[{}]+/g,''); // ^result: postedBy.firstName @filter:myFilter(param) @default(value) var split = stripped.split(/\s/); // ^result: ["postedBy.firstName","@filter:myFilter","@default(value)"] var key = split.shift(); // ^result: "postedBy.firstName" var modifiers = split.join(' '); // ^result: "@filter:myFilter(param) @default(value)" var filterString = (modifiers.match( /@filter:(?=([^\s]+))/ ) || ['',''])[1]; // ^result: "myFilter(param)" var filter = (filterString.match( /^([^(]+)/ ) || ['',''])[1]; // ^result: "myFilter" var filterParams = (filterString.match( /\((.*)\)/ ) || ['',''])[1]; // ^result: "param" var defaultValue = (modifiers.match( /@default\((?:(.*))\)/ ) || ['',''])[1]; // ^result: "value" var nested = key.split('.'); // result: ["postedBy","firstName"] var n = nested.length; var value = nested.reduce(function (prev,curr,index){ if(index === (n-1) && _.isObject(prev)){ // last iteration, return value return prev[curr]; } if(_.isObject(prev)){ // go one level deeper return prev[curr]; } else { // no further nesting, value defined in key does not exist return null; } // start with data object passed to template },data); if(value === undefined || value === null){ if(defaultValue.length >0) value = defaultValue; else value = '' } // apply filter if present // filter is applied to this arg with val and model properties set if(filter.length > 0){ var paramsArray = filterParams.split(','); try{ if(appFilters[filter]){ value = appFilters[filter].apply({val:value,model:data},paramsArray).val; } else if(_.isFunction(''[filter])){ value = ''[filter].apply(value,paramsArray); } else if(_.isFunction(utils[filter])){ value = utils[filter](value,params); } } catch (err){ this.log('Could not filter data '+value,err); } } // replace all occurences of {{postedBy.firstName @filter:myFilter @param:myParam}} // in template with filtered value of data.postedBy.firstName, // or data.postedBy.firstName if "myFilter" didn't exist return markup.replace(match,value); }, _render: function (template,dest,method){ if(template.content == '') template.content = template.raw; // a surrogate var span = document.createElement('span'); var nodes,returnNode; // turn surrogate html into nodes span.innerHTML = template.content; span.normalize(); nodes = span.childNodes; if(method === 'prepend'){ var i=0; var n=nodes.length,node; var firstChild = dest.firstChild; for(;i<n;i++){ node = nodes[i]; if(node && node.nodeType == (Node.ELEMENT_NODE || Node.TEXT_NODE)){ dest.insertBefore(node,firstChild); } } } else if(method === 'append'){ var i=0,n=nodes.length,node; for(;i<n;i++){ node = nodes[i]; if(node && node.nodeType == (Node.ELEMENT_NODE || Node.TEXT_NODE)){ dest.appendChild(nodes[i]); } } } else if(method === 'mountable'){ if(nodes.length === 1){ returnNode = span.firstElementChild; } else { returnNode = span; } } else { dest.innerHTML = template.content; } template.content = ''; if(_octane.initialized) Compiler.complileAll(dest); return returnNode; }, }); module.exports = Template;
{ "content_hash": "1d569e3bc11d976d63bedd3aef9809ba", "timestamp": "", "source": "github", "line_count": 228, "max_line_length": 88, "avg_line_length": 25.67543859649123, "alnum_prop": 0.5958319098052614, "repo_name": "epferrari/octane", "id": "55cb32633a5bfb1e461f1ba11bca63bc6c6bc964", "size": "6455", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/lib/Template.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "19756" }, { "name": "HTML", "bytes": "7768" }, { "name": "JavaScript", "bytes": "1230554" } ], "symlink_target": "" }
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary { display:block } audio,canvas,video { display:inline-block } audio:not([controls]) { display:none; height:0 } [hidden],template { display:none } html { font-family:sans-serif; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100% } body { margin:0 } a { background:transparent } a:focus { outline:thin dotted } a:active,a:hover { outline:0 } h1 { margin:.67em 0; font-size:2em } abbr[title] { border-bottom:1px dotted } b,strong { font-weight:bold } dfn { font-style:italic } hr { height:0; -moz-box-sizing:content-box; box-sizing:content-box } mark { color:#000; background:#ff0 } code,kbd,pre,samp { font-family:monospace,serif; font-size:1em } pre { white-space:pre-wrap } q { quotes:"\201C" "\201D" "\2018" "\2019" } small { font-size:80% } sub,sup { position:relative; font-size:75%; line-height:0; vertical-align:baseline } sup { top:-0.5em } sub { bottom:-0.25em } img { border:0 } svg:not(:root) { overflow:hidden } figure { margin:0 } fieldset { padding:.35em .625em .75em; margin:0 2px; border:1px solid #c0c0c0 } legend { padding:0; border:0 } button,input,select,textarea { margin:0; font-family:inherit; font-size:100% } button,input { line-height:normal } button,select { text-transform:none } button,html input[type="button"],input[type="reset"],input[type="submit"] { cursor:pointer; -webkit-appearance:button } button[disabled],html input[disabled] { cursor:default } input[type="checkbox"],input[type="radio"] { padding:0; box-sizing:border-box } input[type="search"] { -webkit-box-sizing:content-box; -moz-box-sizing:content-box; box-sizing:content-box; -webkit-appearance:textfield } input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration { -webkit-appearance:none } button::-moz-focus-inner,input::-moz-focus-inner { padding:0; border:0 } textarea { overflow:auto; vertical-align:top } table { border-collapse:collapse; border-spacing:0 } @media print { * { color:#000!important; text-shadow:none!important; background:transparent!important; box-shadow:none!important } a,a:visited { text-decoration:underline } a[href]:after { content:" (" attr(href) ")" } abbr[title]:after { content:" (" attr(title) ")" } a[href^="javascript:"]:after,a[href^="#"]:after { content:"" } pre,blockquote { border:1px solid #999; page-break-inside:avoid } thead { display:table-header-group } tr,img { page-break-inside:avoid } img { max-width:100%!important } @page { margin:2cm .5cm } p,h2,h3 { orphans:3; widows:3 } h2,h3 { page-break-after:avoid } select { background:#fff!important } .navbar { display:none } .table td,.table th { background-color:#fff!important } .btn>.caret,.dropup>.btn>.caret { border-top-color:#000!important } .label { border:1px solid #000 } .table { border-collapse:collapse!important } .table-bordered th,.table-bordered td { border:1px solid #ddd!important } } *,*:before,*:after { -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box } html { font-size:62.5%; -webkit-tap-highlight-color:rgba(0,0,0,0) } body { font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; font-size:14px; line-height:1.428571429; color:#000; background-color:#fff } input,button,select,textarea { font-family:inherit; font-size:inherit; line-height:inherit } a { color:#428bca; text-decoration:none } a:hover,a:focus { color:#2a6496; text-decoration:underline } a:focus { outline:thin dotted; outline:5px auto -webkit-focus-ring-color; outline-offset:-2px } img { vertical-align:middle } .img-responsive { display:block; height:auto; max-width:100% } .img-rounded { border-radius:6px } .img-thumbnail { display:inline-block; height:auto; max-width:100%; padding:4px; line-height:1.428571429; background-color:#fff; border:1px solid #ddd; border-radius:4px; -webkit-transition:all .2s ease-in-out; transition:all .2s ease-in-out } .img-circle { border-radius:50% } hr { margin-top:20px; margin-bottom:20px; border:0; border-top:1px solid #eee } .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0 } h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 { font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; font-weight:500; line-height:1.1; color:inherit } h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small { font-weight:normal; line-height:1; color:#999 } h1,h2,h3 { margin-top:20px; margin-bottom:10px } h1 small,h2 small,h3 small,h1 .small,h2 .small,h3 .small { font-size:65% } h4,h5,h6 { margin-top:10px; margin-bottom:10px } h4 small,h5 small,h6 small,h4 .small,h5 .small,h6 .small { font-size:75% } h1,.h1 { font-size:36px } h2,.h2 { font-size:30px } h3,.h3 { font-size:24px } h4,.h4 { font-size:18px } h5,.h5 { font-size:14px } h6,.h6 { font-size:12px } p { margin:0 0 10px } .lead { margin-bottom:20px; font-size:16px; font-weight:200; line-height:1.4 } @media(min-width:768px) { .lead { font-size:21px } } small,.small { font-size:85% } cite { font-style:normal } .text-muted { color:#999 } .text-primary { color:#428bca } .text-primary:hover { color:#3071a9 } .text-warning { color:#8a6d3b } .text-warning:hover { color:#66512c } .text-danger { color:#a94442 } .text-danger:hover { color:#843534 } .text-success { color:#3c763d } .text-success:hover { color:#2b542c } .text-info { color:#31708f } .text-info:hover { color:#245269 } .text-left { text-align:left } .text-right { text-align:right } .text-center { text-align:center } .page-header { padding-bottom:9px; margin:40px 0 20px; border-bottom:1px solid #eee } ul,ol { margin-top:0; margin-bottom:10px } ul ul,ol ul,ul ol,ol ol { margin-bottom:0 } .list-unstyled { padding-left:0; list-style:none } .list-inline { padding-left:0; list-style:none } .list-inline>li { display:inline-block; padding-right:5px; padding-left:5px } .list-inline>li:first-child { padding-left:0 } dl { margin-top:0; margin-bottom:20px } dt,dd { line-height:1.428571429 } dt { font-weight:bold } dd { margin-left:0 } @media(min-width:768px) { .dl-horizontal dt { float:left; width:160px; overflow:hidden; clear:left; text-align:right; text-overflow:ellipsis; white-space:nowrap } .dl-horizontal dd { margin-left:180px } .dl-horizontal dd:before,.dl-horizontal dd:after { display:table; content:" " } .dl-horizontal dd:after { clear:both } .dl-horizontal dd:before,.dl-horizontal dd:after { display:table; content:" " } .dl-horizontal dd:after { clear:both } } abbr[title],abbr[data-original-title] { cursor:help; border-bottom:1px dotted #999 } .initialism { font-size:90%; text-transform:uppercase } blockquote { padding:10px 20px; margin:0 0 20px; border-left:5px solid #eee } blockquote p { font-size:17.5px; font-weight:300; line-height:1.25 } blockquote p:last-child { margin-bottom:0 } blockquote small,blockquote .small { display:block; line-height:1.428571429; color:#999 } blockquote small:before,blockquote .small:before { content:'\2014 \00A0' } blockquote.pull-right { padding-right:15px; padding-left:0; border-right:5px solid #eee; border-left:0 } blockquote.pull-right p,blockquote.pull-right small,blockquote.pull-right .small { text-align:right } blockquote.pull-right small:before,blockquote.pull-right .small:before { content:'' } blockquote.pull-right small:after,blockquote.pull-right .small:after { content:'\00A0 \2014' } blockquote:before,blockquote:after { content:"" } address { margin-bottom:20px; font-style:normal; line-height:1.428571429 } code,kbd,pre,samp { font-family:Menlo,Monaco,Consolas,"Courier New",monospace } code { padding:2px 4px; font-size:90%; color:#c7254e; white-space:nowrap; background-color:#f9f2f4; border-radius:4px } pre { display:block; padding:9.5px; margin:0 0 10px; font-size:13px; line-height:1.428571429; color:#333; word-break:break-all; word-wrap:break-word; background-color:#f5f5f5; border:1px solid #ccc; border-radius:4px } pre code { padding:0; font-size:inherit; color:inherit; white-space:pre-wrap; background-color:transparent; border-radius:0 } .pre-scrollable { max-height:340px; overflow-y:scroll } .container { padding-right:15px; padding-left:15px; margin-right:auto; margin-left:auto } .container:before,.container:after { display:table; content:" " } .container:after { clear:both } .container:before,.container:after { display:table; content:" " } .container:after { clear:both } @media(min-width:768px) { .container { width:750px } } @media(min-width:992px) { .container { width:970px } } @media(min-width:1200px) { .container { width:1170px } } .row { margin-right:-15px; margin-left:-15px } .row:before,.row:after { display:table; content:" " } .row:after { clear:both } .row:before,.row:after { display:table; content:" " } .row:after { clear:both } .col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12 { position:relative; min-height:1px; } .col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12 { float:left } .col-xs-12 { width:100% } .col-xs-11 { width:91.66666666666666% } .col-xs-10 { width:83.33333333333334% } .col-xs-9 { width:75% } .col-xs-8 { width:66.66666666666666% } .col-xs-7 { width:58.333333333333336% } .col-xs-6 { width:50% } .col-xs-5 { width:41.66666666666667% } .col-xs-4 { width:33.33333333333333% } .col-xs-3 { width:25% } .col-xs-2 { width:16.666666666666664% } .col-xs-1 { width:8.333333333333332% } .col-xs-pull-12 { right:100% } .col-xs-pull-11 { right:91.66666666666666% } .col-xs-pull-10 { right:83.33333333333334% } .col-xs-pull-9 { right:75% } .col-xs-pull-8 { right:66.66666666666666% } .col-xs-pull-7 { right:58.333333333333336% } .col-xs-pull-6 { right:50% } .col-xs-pull-5 { right:41.66666666666667% } .col-xs-pull-4 { right:33.33333333333333% } .col-xs-pull-3 { right:25% } .col-xs-pull-2 { right:16.666666666666664% } .col-xs-pull-1 { right:8.333333333333332% } .col-xs-pull-0 { right:0 } .col-xs-push-12 { left:100% } .col-xs-push-11 { left:91.66666666666666% } .col-xs-push-10 { left:83.33333333333334% } .col-xs-push-9 { left:75% } .col-xs-push-8 { left:66.66666666666666% } .col-xs-push-7 { left:58.333333333333336% } .col-xs-push-6 { left:50% } .col-xs-push-5 { left:41.66666666666667% } .col-xs-push-4 { left:33.33333333333333% } .col-xs-push-3 { left:25% } .col-xs-push-2 { left:16.666666666666664% } .col-xs-push-1 { left:8.333333333333332% } .col-xs-push-0 { left:0 } .col-xs-offset-12 { margin-left:100% } .col-xs-offset-11 { margin-left:91.66666666666666% } .col-xs-offset-10 { margin-left:83.33333333333334% } .col-xs-offset-9 { margin-left:75% } .col-xs-offset-8 { margin-left:66.66666666666666% } .col-xs-offset-7 { margin-left:58.333333333333336% } .col-xs-offset-6 { margin-left:50% } .col-xs-offset-5 { margin-left:41.66666666666667% } .col-xs-offset-4 { margin-left:33.33333333333333% } .col-xs-offset-3 { margin-left:25% } .col-xs-offset-2 { margin-left:16.666666666666664% } .col-xs-offset-1 { margin-left:8.333333333333332% } .col-xs-offset-0 { margin-left:0 } @media(min-width:768px) { .col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12 { float:left } .col-sm-12 { width:100% } .col-sm-11 { width:91.66666666666666% } .col-sm-10 { width:83.33333333333334% } .col-sm-9 { width:75% } .col-sm-8 { width:66.66666666666666% } .col-sm-7 { width:58.333333333333336% } .col-sm-6 { width:50% } .col-sm-5 { width:41.66666666666667% } .col-sm-4 { width:30%; } .col-sm-3 { width:25% } .col-sm-2 { width:30%; } .col-sm-1 { width:8.333333333333332% } .col-sm-pull-12 { right:100% } .col-sm-pull-11 { right:91.66666666666666% } .col-sm-pull-10 { right:83.33333333333334% } .col-sm-pull-9 { right:75% } .col-sm-pull-8 { right:66.66666666666666% } .col-sm-pull-7 { right:58.333333333333336% } .col-sm-pull-6 { right:50% } .col-sm-pull-5 { right:41.66666666666667% } .col-sm-pull-4 { right:33.33333333333333% } .col-sm-pull-3 { right:25% } .col-sm-pull-2 { right:16.666666666666664% } .col-sm-pull-1 { right:8.333333333333332% } .col-sm-pull-0 { right:0 } .col-sm-push-12 { left:100% } .col-sm-push-11 { left:91.66666666666666% } .col-sm-push-10 { left:83.33333333333334% } .col-sm-push-9 { left:75% } .col-sm-push-8 { left:66.66666666666666% } .col-sm-push-7 { left:58.333333333333336% } .col-sm-push-6 { left:50% } .col-sm-push-5 { left:41.66666666666667% } .col-sm-push-4 { left:33.33333333333333% } .col-sm-push-3 { left:25% } .col-sm-push-2 { left:16.666666666666664% } .col-sm-push-1 { left:8.333333333333332% } .col-sm-push-0 { left:0 } .col-sm-offset-12 { margin-left:100% } .col-sm-offset-11 { margin-left:91.66666666666666% } .col-sm-offset-10 { margin-left:83.33333333333334% } .col-sm-offset-9 { margin-left:75% } .col-sm-offset-8 { margin-left:66.66666666666666% } .col-sm-offset-7 { margin-left:58.333333333333336% } .col-sm-offset-6 { margin-left:50% } .col-sm-offset-5 { margin-left:41.66666666666667% } .col-sm-offset-4 { margin-left:33.33333333333333% } .col-sm-offset-3 { margin-left:25% } .col-sm-offset-2 { margin-left:16.666666666666664% } .col-sm-offset-1 { margin-left:8.333333333333332% } .col-sm-offset-0 { margin-left:0 } } @media(min-width:992px) { .col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12 { float:left } .col-md-12 { width:100% } .col-md-11 { width:91.66666666666666% } .col-md-10 { width:83.33333333333334% } .col-md-9 { width:75% } .col-md-8 { width:66.66666666666666% } .col-md-7 { width:58.333333333333336% } .col-md-6 { width:50% } .col-md-5 { width:41.66666666666667% } .col-md-4 { width:33.33333333333333% } .col-md-3 { width:25% } .col-md-2 { width:16.666666666666664% } .col-md-1 { width:8.333333333333332% } .col-md-pull-12 { right:100% } .col-md-pull-11 { right:91.66666666666666% } .col-md-pull-10 { right:83.33333333333334% } .col-md-pull-9 { right:75% } .col-md-pull-8 { right:66.66666666666666% } .col-md-pull-7 { right:58.333333333333336% } .col-md-pull-6 { right:50% } .col-md-pull-5 { right:41.66666666666667% } .col-md-pull-4 { right:33.33333333333333% } .col-md-pull-3 { right:25% } .col-md-pull-2 { right:16.666666666666664% } .col-md-pull-1 { right:8.333333333333332% } .col-md-pull-0 { right:0 } .col-md-push-12 { left:100% } .col-md-push-11 { left:91.66666666666666% } .col-md-push-10 { left:83.33333333333334% } .col-md-push-9 { left:75% } .col-md-push-8 { left:66.66666666666666% } .col-md-push-7 { left:58.333333333333336% } .col-md-push-6 { left:50% } .col-md-push-5 { left:41.66666666666667% } .col-md-push-4 { left:33.33333333333333% } .col-md-push-3 { left:25% } .col-md-push-2 { left:16.666666666666664% } .col-md-push-1 { left:8.333333333333332% } .col-md-push-0 { left:0 } .col-md-offset-12 { margin-left:100% } .col-md-offset-11 { margin-left:91.66666666666666% } .col-md-offset-10 { margin-left:83.33333333333334% } .col-md-offset-9 { margin-left:75% } .col-md-offset-8 { margin-left:66.66666666666666% } .col-md-offset-7 { margin-left:58.333333333333336% } .col-md-offset-6 { margin-left:50% } .col-md-offset-5 { margin-left:41.66666666666667% } .col-md-offset-4 { margin-left:33.33333333333333% } .col-md-offset-3 { margin-left:25% } .col-md-offset-2 { margin-left:16.666666666666664% } .col-md-offset-1 { margin-left:8.333333333333332% } .col-md-offset-0 { margin-left:0 } } @media(min-width:1200px) { .col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12 { float:left } .col-lg-12 { width:100% } .col-lg-11 { width:91.66666666666666% } .col-lg-10 { width:83.33333333333334% } .col-lg-9 { width:75% } .col-lg-8 { width:66.66666666666666% } .col-lg-7 { width:58.333333333333336% } .col-lg-6 { width:50% } .col-lg-5 { width:41.66666666666667% } .col-lg-4 { width:33.33333333333333% } .col-lg-3 { width:25% } .col-lg-2 { width:16.666666666666664% } .col-lg-1 { width:8.333333333333332% } .col-lg-pull-12 { right:100% } .col-lg-pull-11 { right:91.66666666666666% } .col-lg-pull-10 { right:83.33333333333334% } .col-lg-pull-9 { right:75% } .col-lg-pull-8 { right:66.66666666666666% } .col-lg-pull-7 { right:58.333333333333336% } .col-lg-pull-6 { right:50% } .col-lg-pull-5 { right:41.66666666666667% } .col-lg-pull-4 { right:33.33333333333333% } .col-lg-pull-3 { right:25% } .col-lg-pull-2 { right:16.666666666666664% } .col-lg-pull-1 { right:8.333333333333332% } .col-lg-pull-0 { right:0 } .col-lg-push-12 { left:100% } .col-lg-push-11 { left:91.66666666666666% } .col-lg-push-10 { left:83.33333333333334% } .col-lg-push-9 { left:75% } .col-lg-push-8 { left:66.66666666666666% } .col-lg-push-7 { left:58.333333333333336% } .col-lg-push-6 { left:50% } .col-lg-push-5 { left:41.66666666666667% } .col-lg-push-4 { left:33.33333333333333% } .col-lg-push-3 { left:25% } .col-lg-push-2 { left:16.666666666666664% } .col-lg-push-1 { left:8.333333333333332% } .col-lg-push-0 { left:0 } .col-lg-offset-12 { margin-left:100% } .col-lg-offset-11 { margin-left:91.66666666666666% } .col-lg-offset-10 { margin-left:83.33333333333334% } .col-lg-offset-9 { margin-left:75% } .col-lg-offset-8 { margin-left:66.66666666666666% } .col-lg-offset-7 { margin-left:58.333333333333336% } .col-lg-offset-6 { margin-left:50% } .col-lg-offset-5 { margin-left:41.66666666666667% } .col-lg-offset-4 { margin-left:33.33333333333333% } .col-lg-offset-3 { margin-left:25% } .col-lg-offset-2 { margin-left:16.666666666666664% } .col-lg-offset-1 { margin-left:8.333333333333332% } .col-lg-offset-0 { margin-left:0 } } table { max-width:100%; background-color:transparent } th { text-align:left } .table { width:100%; margin-bottom:20px } .table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td { padding:8px; line-height:1.428571429; vertical-align:top; border-top:1px solid #ddd } .table>thead>tr>th { vertical-align:bottom; border-bottom:2px solid #ddd } .table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td { border-top:0 } .table>tbody+tbody { border-top:2px solid #ddd } .table .table { background-color:#fff } .table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td { padding:5px } .table-bordered { border:1px solid #ddd } .table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td { border:1px solid #ddd } .table-bordered>thead>tr>th,.table-bordered>thead>tr>td { border-bottom-width:2px } .table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th { background-color:#f9f9f9 } .table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th { background-color:#f5f5f5 } table col[class*="col-"] { position:static; display:table-column; float:none } table td[class*="col-"],table th[class*="col-"] { display:table-cell; float:none } .table>thead>tr>.active,.table>tbody>tr>.active,.table>tfoot>tr>.active,.table>thead>.active>td,.table>tbody>.active>td,.table>tfoot>.active>td,.table>thead>.active>th,.table>tbody>.active>th,.table>tfoot>.active>th { background-color:#f5f5f5 } .table-hover>tbody>tr>.active:hover,.table-hover>tbody>.active:hover>td,.table-hover>tbody>.active:hover>th { background-color:#e8e8e8 } .table>thead>tr>.success,.table>tbody>tr>.success,.table>tfoot>tr>.success,.table>thead>.success>td,.table>tbody>.success>td,.table>tfoot>.success>td,.table>thead>.success>th,.table>tbody>.success>th,.table>tfoot>.success>th { background-color:#dff0d8 } .table-hover>tbody>tr>.success:hover,.table-hover>tbody>.success:hover>td,.table-hover>tbody>.success:hover>th { background-color:#d0e9c6 } .table>thead>tr>.danger,.table>tbody>tr>.danger,.table>tfoot>tr>.danger,.table>thead>.danger>td,.table>tbody>.danger>td,.table>tfoot>.danger>td,.table>thead>.danger>th,.table>tbody>.danger>th,.table>tfoot>.danger>th { background-color:#f2dede } .table-hover>tbody>tr>.danger:hover,.table-hover>tbody>.danger:hover>td,.table-hover>tbody>.danger:hover>th { background-color:#ebcccc } .table>thead>tr>.warning,.table>tbody>tr>.warning,.table>tfoot>tr>.warning,.table>thead>.warning>td,.table>tbody>.warning>td,.table>tfoot>.warning>td,.table>thead>.warning>th,.table>tbody>.warning>th,.table>tfoot>.warning>th { background-color:#fcf8e3 } .table-hover>tbody>tr>.warning:hover,.table-hover>tbody>.warning:hover>td,.table-hover>tbody>.warning:hover>th { background-color:#faf2cc } @media(max-width:767px) { .table-responsive { width:100%; margin-bottom:15px; overflow-x:scroll; overflow-y:hidden; border:1px solid #ddd; -ms-overflow-style:-ms-autohiding-scrollbar; -webkit-overflow-scrolling:touch } .table-responsive>.table { margin-bottom:0 } .table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td { white-space:nowrap } .table-responsive>.table-bordered { border:0 } .table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child { border-left:0 } .table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child { border-right:0 } .table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td { border-bottom:0 } } fieldset { padding:0; margin:0; border:0 } legend { display:block; width:100%; padding:0; margin-bottom:20px; font-size:21px; line-height:inherit; color:#333; border:0; border-bottom:1px solid #e5e5e5 } label { display:inline-block; font-weight:bold; } input[type="search"] { -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box } input[type="radio"],input[type="checkbox"] { margin:4px 0 0; margin-top:1px \9; line-height:normal } input[type="file"] { display:block } select[multiple],select[size] { height:auto } select optgroup { font-family:inherit; font-size:inherit; font-style:inherit } input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus { outline:thin dotted; outline:5px auto -webkit-focus-ring-color; outline-offset:-2px } input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button { height:auto } output { display:block; padding-top:7px; font-size:14px; line-height:1.428571429; color:#555; vertical-align:middle } .form-control { display:block; width:100%; height:35px; padding:10px 12px; font-size:14px; line-height:1.428571429; color:#555; vertical-align:middle; background-color:#EBEBEB; background-image:none; border:1px solid #ccc; border-radius:1px; -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075); box-shadow:inset 0 1px 1px rgba(0,0,0,0.075); -webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s; transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s } .form-control:focus { border-color:#66afe9; outline:0; -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6); box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6) } .form-control:-moz-placeholder { color:#999 } .form-control::-moz-placeholder { color:#999; opacity:1 } .form-control:-ms-input-placeholder { color:#999 } .form-control::-webkit-input-placeholder { color:#999 } .form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control { cursor:not-allowed; background-color:#eee } textarea.form-control { height:auto } .form-group { margin-bottom:15px } .radio,.checkbox { display:block; min-height:20px; padding-left:20px; margin-top:10px; margin-bottom:10px; vertical-align:middle } .radio label,.checkbox label { display:inline; margin-bottom:0; font-weight:normal; cursor:pointer } .radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"] { float:left; margin-left:-20px } .radio+.radio,.checkbox+.checkbox { margin-top:-5px } .radio-inline,.checkbox-inline { display:inline-block; padding-left:20px; margin-bottom:0; font-weight:normal; vertical-align:middle; cursor:pointer } .radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline { margin-top:0; margin-left:10px } input[type="radio"][disabled],input[type="checkbox"][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline { cursor:not-allowed } .input-sm { height:30px; padding:5px 10px; font-size:12px; line-height:1.5; border-radius:3px } select.input-sm { height:30px; line-height:30px } textarea.input-sm { height:auto } .input-lg { height:46px; padding:10px 16px; font-size:18px; line-height:1.33; border-radius:6px } select.input-lg { height:46px; line-height:46px } textarea.input-lg { height:auto } .has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline { color:#8a6d3b } .has-warning .form-control { border-color:#8a6d3b; -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075); box-shadow:inset 0 1px 1px rgba(0,0,0,0.075) } .has-warning .form-control:focus { border-color:#66512c; -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b; box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b } .has-warning .input-group-addon { color:#8a6d3b; background-color:#fcf8e3; border-color:#8a6d3b } .has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline { color:#a94442 } .has-error .form-control { border-color:#a94442; -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075); box-shadow:inset 0 1px 1px rgba(0,0,0,0.075) } .has-error .form-control:focus { border-color:#843534; -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483; box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483 } .has-error .input-group-addon { color:#a94442; background-color:#f2dede; border-color:#a94442 } .has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline { color:#3c763d } .has-success .form-control { border-color:#3c763d; -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075); box-shadow:inset 0 1px 1px rgba(0,0,0,0.075) } .has-success .form-control:focus { border-color:#2b542c; -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168; box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168 } .has-success .input-group-addon { color:#3c763d; background-color:#dff0d8; border-color:#3c763d } .form-control-static { margin-bottom:0 } .help-block { display:block; margin-top:5px; margin-bottom:10px; color:#737373 } @media(min-width:768px) { .form-inline .form-group { display:inline-block; margin-bottom:0; vertical-align:middle } .form-inline .form-control { display:inline-block } .form-inline select.form-control { width:auto } .form-inline .radio,.form-inline .checkbox { display:inline-block; padding-left:0; margin-top:0; margin-bottom:0 } .form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"] { float:none; margin-left:0 } } .form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline { } .form-horizontal .radio,.form-horizontal .checkbox { min-height:27px } .form-horizontal .form-group { margin-right:-15px; margin-left:-15px } .form-horizontal .form-group:before,.form-horizontal .form-group:after { display:table; content:" " } .form-horizontal .form-group:after { clear:both } .form-horizontal .form-group:before,.form-horizontal .form-group:after { display:table; content:" " } .form-horizontal .form-group:after { clear:both } .form-horizontal .form-control-static { padding-top:7px } @media(min-width:768px) { .form-horizontal .control-label { text-align:center; border: 1px black solid; background-color: #49C958; padding-top: 10px; padding-bottom: 10px; margin-bottom: 22px; } } .btn { display:inline-block; padding:6px 12px; margin-bottom:0; font-size:14px; font-weight:normal; line-height:1.428571429; text-align:center; white-space:nowrap; vertical-align:middle; cursor:pointer; background-image:none; border:1px solid transparent; border-radius:4px; -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; -o-user-select:none; user-select:none } .btn:focus { outline:thin dotted; outline:5px auto -webkit-focus-ring-color; outline-offset:-2px } .btn:hover,.btn:focus { color:#333; text-decoration:none } .btn:active,.btn.active { background-image:none; outline:0; -webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125); box-shadow:inset 0 3px 5px rgba(0,0,0,0.125) } .btn.disabled,.btn[disabled],fieldset[disabled] .btn { pointer-events:none; cursor:not-allowed; opacity:.65; filter:alpha(opacity=65); -webkit-box-shadow:none; box-shadow:none } .btn-default { color:#333; background-color:#fff; border-color:#ccc } .btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default { color:#333; background-color:#ebebeb; border-color:#adadad } .btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default { background-image:none } .btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active { background-color:#fff; border-color:#ccc } .btn-default .badge { color:#fff; background-color:#fff } .btn-primary { color:#fff; background-color:#428bca; border-color:#357ebd } .btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary { color:#fff; background-color:#3276b1; border-color:#285e8e } .btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary { background-image:none } .btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active { background-color:#428bca; border-color:#357ebd } .btn-primary .badge { color:#428bca; background-color:#fff } .btn-warning { color:#fff; background-color:#f0ad4e; border-color:#eea236 } .btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning { color:#fff; background-color:#ed9c28; border-color:#d58512 } .btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning { background-image:none } .btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active { background-color:#f0ad4e; border-color:#eea236 } .btn-warning .badge { color:#f0ad4e; background-color:#fff } .btn-danger { color:#fff; background-color:#d9534f; border-color:#d43f3a } .btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger { color:#fff; background-color:#d2322d; border-color:#ac2925 } .btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger { background-image:none } .btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active { background-color:#d9534f; border-color:#d43f3a } .btn-danger .badge { color:#d9534f; background-color:#fff } .btn-success { color:#fff; background-color:#5cb85c; border-color:#4cae4c } .btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success { color:#fff; background-color:#47a447; border-color:#398439 } .btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success { background-image:none } .btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active { background-color:#5cb85c; border-color:#4cae4c } .btn-success .badge { color:#5cb85c; background-color:#fff } .btn-info { color:#fff; background-color:#5bc0de; border-color:#46b8da } .btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info { color:#fff; background-color:#39b3d7; border-color:#269abc } .btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info { background-image:none } .btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active { background-color:#5bc0de; border-color:#46b8da } .btn-info .badge { color:#5bc0de; background-color:#fff } .btn-link { font-weight:normal; color:#428bca; cursor:pointer; border-radius:0 } .btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link { background-color:transparent; -webkit-box-shadow:none; box-shadow:none } .btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active { border-color:transparent } .btn-link:hover,.btn-link:focus { color:#2a6496; text-decoration:underline; background-color:transparent } .btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus { color:#999; text-decoration:none } .btn-lg { padding:10px 16px; font-size:18px; line-height:1.33; border-radius:6px } .btn-sm { padding:5px 10px; font-size:12px; line-height:1.5; border-radius:3px } .btn-xs { padding:1px 5px; font-size:12px; line-height:1.5; border-radius:3px } .btn-block { display:block; width:100%; padding-right:0; padding-left:0 } .btn-block+.btn-block { margin-top:5px } input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block { width:100% } .fade { opacity:0; -webkit-transition:opacity .15s linear; transition:opacity .15s linear } .fade.in { opacity:1 } .collapse { display:none } .collapse.in { display:block } .collapsing { position:relative; height:0; overflow:hidden; -webkit-transition:height .35s ease; transition:height .35s ease } @font-face { font-family:'Glyphicons Halflings'; src:url('../fonts/glyphicons-halflings-regular.eot'); src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg') } .glyphicon { position:relative; top:1px; display:inline-block; font-family:'Glyphicons Halflings'; -webkit-font-smoothing:antialiased; font-style:normal; font-weight:normal; line-height:1; -moz-osx-font-smoothing:grayscale } .glyphicon:empty { width:1em } .glyphicon-asterisk:before { content:"\2a" } .glyphicon-plus:before { content:"\2b" } .glyphicon-euro:before { content:"\20ac" } .glyphicon-minus:before { content:"\2212" } .glyphicon-cloud:before { content:"\2601" } .glyphicon-envelope:before { content:"\2709" } .glyphicon-pencil:before { content:"\270f" } .glyphicon-glass:before { content:"\e001" } .glyphicon-music:before { content:"\e002" } .glyphicon-search:before { content:"\e003" } .glyphicon-heart:before { content:"\e005" } .glyphicon-star:before { content:"\e006" } .glyphicon-star-empty:before { content:"\e007" } .glyphicon-user:before { content:"\e008" } .glyphicon-film:before { content:"\e009" } .glyphicon-th-large:before { content:"\e010" } .glyphicon-th:before { content:"\e011" } .glyphicon-th-list:before { content:"\e012" } .glyphicon-ok:before { content:"\e013" } .glyphicon-remove:before { content:"\e014" } .glyphicon-zoom-in:before { content:"\e015" } .glyphicon-zoom-out:before { content:"\e016" } .glyphicon-off:before { content:"\e017" } .glyphicon-signal:before { content:"\e018" } .glyphicon-cog:before { content:"\e019" } .glyphicon-trash:before { content:"\e020" } .glyphicon-home:before { content:"\e021" } .glyphicon-file:before { content:"\e022" } .glyphicon-time:before { content:"\e023" } .glyphicon-road:before { content:"\e024" } .glyphicon-download-alt:before { content:"\e025" } .glyphicon-download:before { content:"\e026" } .glyphicon-upload:before { content:"\e027" } .glyphicon-inbox:before { content:"\e028" } .glyphicon-play-circle:before { content:"\e029" } .glyphicon-repeat:before { content:"\e030" } .glyphicon-refresh:before { content:"\e031" } .glyphicon-list-alt:before { content:"\e032" } .glyphicon-lock:before { content:"\e033" } .glyphicon-flag:before { content:"\e034" } .glyphicon-headphones:before { content:"\e035" } .glyphicon-volume-off:before { content:"\e036" } .glyphicon-volume-down:before { content:"\e037" } .glyphicon-volume-up:before { content:"\e038" } .glyphicon-qrcode:before { content:"\e039" } .glyphicon-barcode:before { content:"\e040" } .glyphicon-tag:before { content:"\e041" } .glyphicon-tags:before { content:"\e042" } .glyphicon-book:before { content:"\e043" } .glyphicon-bookmark:before { content:"\e044" } .glyphicon-print:before { content:"\e045" } .glyphicon-camera:before { content:"\e046" } .glyphicon-font:before { content:"\e047" } .glyphicon-bold:before { content:"\e048" } .glyphicon-italic:before { content:"\e049" } .glyphicon-text-height:before { content:"\e050" } .glyphicon-text-width:before { content:"\e051" } .glyphicon-align-left:before { content:"\e052" } .glyphicon-align-center:before { content:"\e053" } .glyphicon-align-right:before { content:"\e054" } .glyphicon-align-justify:before { content:"\e055" } .glyphicon-list:before { content:"\e056" } .glyphicon-indent-left:before { content:"\e057" } .glyphicon-indent-right:before { content:"\e058" } .glyphicon-facetime-video:before { content:"\e059" } .glyphicon-picture:before { content:"\e060" } .glyphicon-map-marker:before { content:"\e062" } .glyphicon-adjust:before { content:"\e063" } .glyphicon-tint:before { content:"\e064" } .glyphicon-edit:before { content:"\e065" } .glyphicon-share:before { content:"\e066" } .glyphicon-check:before { content:"\e067" } .glyphicon-move:before { content:"\e068" } .glyphicon-step-backward:before { content:"\e069" } .glyphicon-fast-backward:before { content:"\e070" } .glyphicon-backward:before { content:"\e071" } .glyphicon-play:before { content:"\e072" } .glyphicon-pause:before { content:"\e073" } .glyphicon-stop:before { content:"\e074" } .glyphicon-forward:before { content:"\e075" } .glyphicon-fast-forward:before { content:"\e076" } .glyphicon-step-forward:before { content:"\e077" } .glyphicon-eject:before { content:"\e078" } .glyphicon-chevron-left:before { content:"\e079" } .glyphicon-chevron-right:before { content:"\e080" } .glyphicon-plus-sign:before { content:"\e081" } .glyphicon-minus-sign:before { content:"\e082" } .glyphicon-remove-sign:before { content:"\e083" } .glyphicon-ok-sign:before { content:"\e084" } .glyphicon-question-sign:before { content:"\e085" } .glyphicon-info-sign:before { content:"\e086" } .glyphicon-screenshot:before { content:"\e087" } .glyphicon-remove-circle:before { content:"\e088" } .glyphicon-ok-circle:before { content:"\e089" } .glyphicon-ban-circle:before { content:"\e090" } .glyphicon-arrow-left:before { content:"\e091" } .glyphicon-arrow-right:before { content:"\e092" } .glyphicon-arrow-up:before { content:"\e093" } .glyphicon-arrow-down:before { content:"\e094" } .glyphicon-share-alt:before { content:"\e095" } .glyphicon-resize-full:before { content:"\e096" } .glyphicon-resize-small:before { content:"\e097" } .glyphicon-exclamation-sign:before { content:"\e101" } .glyphicon-gift:before { content:"\e102" } .glyphicon-leaf:before { content:"\e103" } .glyphicon-fire:before { content:"\e104" } .glyphicon-eye-open:before { content:"\e105" } .glyphicon-eye-close:before { content:"\e106" } .glyphicon-warning-sign:before { content:"\e107" } .glyphicon-plane:before { content:"\e108" } .glyphicon-calendar:before { content:"\e109" } .glyphicon-random:before { content:"\e110" } .glyphicon-comment:before { content:"\e111" } .glyphicon-magnet:before { content:"\e112" } .glyphicon-chevron-up:before { content:"\e113" } .glyphicon-chevron-down:before { content:"\e114" } .glyphicon-retweet:before { content:"\e115" } .glyphicon-shopping-cart:before { content:"\e116" } .glyphicon-folder-close:before { content:"\e117" } .glyphicon-folder-open:before { content:"\e118" } .glyphicon-resize-vertical:before { content:"\e119" } .glyphicon-resize-horizontal:before { content:"\e120" } .glyphicon-hdd:before { content:"\e121" } .glyphicon-bullhorn:before { content:"\e122" } .glyphicon-bell:before { content:"\e123" } .glyphicon-certificate:before { content:"\e124" } .glyphicon-thumbs-up:before { content:"\e125" } .glyphicon-thumbs-down:before { content:"\e126" } .glyphicon-hand-right:before { content:"\e127" } .glyphicon-hand-left:before { content:"\e128" } .glyphicon-hand-up:before { content:"\e129" } .glyphicon-hand-down:before { content:"\e130" } .glyphicon-circle-arrow-right:before { content:"\e131" } .glyphicon-circle-arrow-left:before { content:"\e132" } .glyphicon-circle-arrow-up:before { content:"\e133" } .glyphicon-circle-arrow-down:before { content:"\e134" } .glyphicon-globe:before { content:"\e135" } .glyphicon-wrench:before { content:"\e136" } .glyphicon-tasks:before { content:"\e137" } .glyphicon-filter:before { content:"\e138" } .glyphicon-briefcase:before { content:"\e139" } .glyphicon-fullscreen:before { content:"\e140" } .glyphicon-dashboard:before { content:"\e141" } .glyphicon-paperclip:before { content:"\e142" } .glyphicon-heart-empty:before { content:"\e143" } .glyphicon-link:before { content:"\e144" } .glyphicon-phone:before { content:"\e145" } .glyphicon-pushpin:before { content:"\e146" } .glyphicon-usd:before { content:"\e148" } .glyphicon-gbp:before { content:"\e149" } .glyphicon-sort:before { content:"\e150" } .glyphicon-sort-by-alphabet:before { content:"\e151" } .glyphicon-sort-by-alphabet-alt:before { content:"\e152" } .glyphicon-sort-by-order:before { content:"\e153" } .glyphicon-sort-by-order-alt:before { content:"\e154" } .glyphicon-sort-by-attributes:before { content:"\e155" } .glyphicon-sort-by-attributes-alt:before { content:"\e156" } .glyphicon-unchecked:before { content:"\e157" } .glyphicon-expand:before { content:"\e158" } .glyphicon-collapse-down:before { content:"\e159" } .glyphicon-collapse-up:before { content:"\e160" } .glyphicon-log-in:before { content:"\e161" } .glyphicon-flash:before { content:"\e162" } .glyphicon-log-out:before { content:"\e163" } .glyphicon-new-window:before { content:"\e164" } .glyphicon-record:before { content:"\e165" } .glyphicon-save:before { content:"\e166" } .glyphicon-open:before { content:"\e167" } .glyphicon-saved:before { content:"\e168" } .glyphicon-import:before { content:"\e169" } .glyphicon-export:before { content:"\e170" } .glyphicon-send:before { content:"\e171" } .glyphicon-floppy-disk:before { content:"\e172" } .glyphicon-floppy-saved:before { content:"\e173" } .glyphicon-floppy-remove:before { content:"\e174" } .glyphicon-floppy-save:before { content:"\e175" } .glyphicon-floppy-open:before { content:"\e176" } .glyphicon-credit-card:before { content:"\e177" } .glyphicon-transfer:before { content:"\e178" } .glyphicon-cutlery:before { content:"\e179" } .glyphicon-header:before { content:"\e180" } .glyphicon-compressed:before { content:"\e181" } .glyphicon-earphone:before { content:"\e182" } .glyphicon-phone-alt:before { content:"\e183" } .glyphicon-tower:before { content:"\e184" } .glyphicon-stats:before { content:"\e185" } .glyphicon-sd-video:before { content:"\e186" } .glyphicon-hd-video:before { content:"\e187" } .glyphicon-subtitles:before { content:"\e188" } .glyphicon-sound-stereo:before { content:"\e189" } .glyphicon-sound-dolby:before { content:"\e190" } .glyphicon-sound-5-1:before { content:"\e191" } .glyphicon-sound-6-1:before { content:"\e192" } .glyphicon-sound-7-1:before { content:"\e193" } .glyphicon-copyright-mark:before { content:"\e194" } .glyphicon-registration-mark:before { content:"\e195" } .glyphicon-cloud-download:before { content:"\e197" } .glyphicon-cloud-upload:before { content:"\e198" } .glyphicon-tree-conifer:before { content:"\e199" } .glyphicon-tree-deciduous:before { content:"\e200" } .caret { display:inline-block; width:0; height:0; margin-left:2px; vertical-align:middle; border-top:4px solid; border-right:4px solid transparent; border-left:4px solid transparent } .dropdown { position:relative } .dropdown-toggle:focus { outline:0 } .dropdown-menu { position:absolute; top:100%; left:0; z-index:1000; display:none; float:left; min-width:160px; padding:5px 0; margin:2px 0 0; font-size:14px; list-style:none; background-color:#fff; border:1px solid #ccc; border:1px solid rgba(0,0,0,0.15); border-radius:4px; -webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175); box-shadow:0 6px 12px rgba(0,0,0,0.175); background-clip:padding-box } .dropdown-menu.pull-right { right:0; left:auto } .dropdown-menu .divider { height:1px; margin:9px 0; overflow:hidden; background-color:#e5e5e5 } .dropdown-menu>li>a { display:block; padding:3px 20px; clear:both; font-weight:normal; line-height:1.428571429; color:#333; white-space:nowrap } .dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus { color:#262626; text-decoration:none; background-color:#f5f5f5 } .dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus { color:#fff; text-decoration:none; background-color:#428bca; outline:0 } .dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus { color:#999 } .dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus { text-decoration:none; cursor:not-allowed; background-color:transparent; background-image:none; filter:progid:DXImageTransform.Microsoft.gradient(enabled=false) } .open>.dropdown-menu { display:block } .open>a { outline:0 } .dropdown-header { display:block; padding:3px 20px; font-size:12px; line-height:1.428571429; color:#999 } .dropdown-backdrop { position:fixed; top:0; right:0; bottom:0; left:0; z-index:990 } .pull-right>.dropdown-menu { right:0; left:auto } .dropup .caret,.navbar-fixed-bottom .dropdown .caret { border-top:0; border-bottom:4px solid; content:"" } .dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu { top:auto; bottom:100%; margin-bottom:1px } @media(min-width:768px) { .navbar-right .dropdown-menu { right:0; left:auto } } .btn-group,.btn-group-vertical { position:relative; display:inline-block; vertical-align:middle } .btn-group>.btn,.btn-group-vertical>.btn { position:relative; float:left } .btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active { z-index:2 } .btn-group>.btn:focus,.btn-group-vertical>.btn:focus { outline:0 } .btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group { margin-left:-1px } .btn-toolbar:before,.btn-toolbar:after { display:table; content:" " } .btn-toolbar:after { clear:both } .btn-toolbar:before,.btn-toolbar:after { display:table; content:" " } .btn-toolbar:after { clear:both } .btn-toolbar .btn-group { float:left } .btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn-group { margin-left:5px } .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { border-radius:0 } .btn-group>.btn:first-child { margin-left:0 } .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle) { border-top-right-radius:0; border-bottom-right-radius:0 } .btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child) { border-bottom-left-radius:0; border-top-left-radius:0 } .btn-group>.btn-group { float:left } .btn-group>.btn-group:not(:first-child):not(:last-child)>.btn { border-radius:0 } .btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle { border-top-right-radius:0; border-bottom-right-radius:0 } .btn-group>.btn-group:last-child>.btn:first-child { border-bottom-left-radius:0; border-top-left-radius:0 } .btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle { outline:0 } .btn-group-xs>.btn { padding:1px 5px; font-size:12px; line-height:1.5; border-radius:3px } .btn-group-sm>.btn { padding:5px 10px; font-size:12px; line-height:1.5; border-radius:3px } .btn-group-lg>.btn { padding:10px 16px; font-size:18px; line-height:1.33; border-radius:6px } .btn-group>.btn+.dropdown-toggle { padding-right:8px; padding-left:8px } .btn-group>.btn-lg+.dropdown-toggle { padding-right:12px; padding-left:12px } .btn-group.open .dropdown-toggle { -webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125); box-shadow:inset 0 3px 5px rgba(0,0,0,0.125) } .btn-group.open .dropdown-toggle.btn-link { -webkit-box-shadow:none; box-shadow:none } .btn .caret { margin-left:0 } .btn-lg .caret { border-width:5px 5px 0; border-bottom-width:0 } .dropup .btn-lg .caret { border-width:0 5px 5px } .btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn { display:block; float:none; width:100%; max-width:100% } .btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after { display:table; content:" " } .btn-group-vertical>.btn-group:after { clear:both } .btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after { display:table; content:" " } .btn-group-vertical>.btn-group:after { clear:both } .btn-group-vertical>.btn-group>.btn { float:none } .btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group { margin-top:-1px; margin-left:0 } .btn-group-vertical>.btn:not(:first-child):not(:last-child) { border-radius:0 } .btn-group-vertical>.btn:first-child:not(:last-child) { border-top-right-radius:4px; border-bottom-right-radius:0; border-bottom-left-radius:0 } .btn-group-vertical>.btn:last-child:not(:first-child) { border-top-right-radius:0; border-bottom-left-radius:4px; border-top-left-radius:0 } .btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn { border-radius:0 } .btn-group-vertical>.btn-group:first-child>.btn:last-child,.btn-group-vertical>.btn-group:first-child>.dropdown-toggle { border-bottom-right-radius:0; border-bottom-left-radius:0 } .btn-group-vertical>.btn-group:last-child>.btn:first-child { border-top-right-radius:0; border-top-left-radius:0 } .btn-group-justified { display:table; width:100%; border-collapse:separate; table-layout:fixed } .btn-group-justified>.btn,.btn-group-justified>.btn-group { display:table-cell; float:none; width:1% } .btn-group-justified>.btn-group .btn { width:100% } [data-toggle="buttons"]>.btn>input[type="radio"],[data-toggle="buttons"]>.btn>input[type="checkbox"] { display:none } .input-group { position:relative; display:table; border-collapse:separate } .input-group[class*="col-"] { float:none; padding-right:0; padding-left:0 } .input-group .form-control { width:100%; margin-bottom:0 } .input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn { height:46px; padding:10px 16px; font-size:18px; line-height:1.33; border-radius:6px } select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn { height:46px; line-height:46px } textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn { height:auto } .input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn { height:30px; padding:5px 10px; font-size:12px; line-height:1.5; border-radius:3px } select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn { height:30px; line-height:30px } textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn { height:auto } .input-group-addon,.input-group-btn,.input-group .form-control { display:table-cell } .input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child) { border-radius:0 } .input-group-addon,.input-group-btn { width:1%; white-space:nowrap; vertical-align:middle } .input-group-addon { padding:6px 12px; font-size:14px; font-weight:normal; line-height:1; color:#555; text-align:center; background-color:#eee; border:1px solid #ccc; border-radius:4px } .input-group-addon.input-sm { padding:5px 10px; font-size:12px; border-radius:3px } .input-group-addon.input-lg { padding:10px 16px; font-size:18px; border-radius:6px } .input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"] { margin-top:0 } .input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle) { border-top-right-radius:0; border-bottom-right-radius:0 } .input-group-addon:first-child { border-right:0 } .input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child) { border-bottom-left-radius:0; border-top-left-radius:0 } .input-group-addon:last-child { border-left:0 } .input-group-btn { position:relative; white-space:nowrap } .input-group-btn:first-child>.btn { margin-right:-1px } .input-group-btn:last-child>.btn { margin-left:-1px } .input-group-btn>.btn { position:relative } .input-group-btn>.btn+.btn { margin-left:-4px } .input-group-btn>.btn:hover,.input-group-btn>.btn:active { z-index:2 } .nav { padding-left:0; margin-bottom:0; list-style:none } .nav:before,.nav:after { display:table; content:" " } .nav:after { clear:both } .nav:before,.nav:after { display:table; content:" " } .nav:after { clear:both } .nav>li { position:relative; display:block } .nav>li>a { position:relative; display:block; padding:10px 15px } .nav>li>a:hover,.nav>li>a:focus { text-decoration:none; background-color:#eee } .nav>li.disabled>a { color:#999 } .nav>li.disabled>a:hover,.nav>li.disabled>a:focus { color:#999; text-decoration:none; cursor:not-allowed; background-color:transparent } .nav .open>a,.nav .open>a:hover,.nav .open>a:focus { background-color:#eee; border-color:#428bca } .nav .nav-divider { height:1px; margin:9px 0; overflow:hidden; background-color:#e5e5e5 } .nav>li>a>img { max-width:none } .nav-tabs { border-bottom:1px solid #ddd } .nav-tabs>li { float:left; margin-bottom:-1px } .nav-tabs>li>a { margin-right:2px; line-height:1.428571429; border:1px solid transparent; border-radius:4px 4px 0 0 } .nav-tabs>li>a:hover { border-color:#eee #eee #ddd } .nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus { color:#555; cursor:default; background-color:#fff; border:1px solid #ddd; border-bottom-color:transparent } .nav-tabs.nav-justified { width:100%; border-bottom:0 } .nav-tabs.nav-justified>li { float:none } .nav-tabs.nav-justified>li>a { margin-bottom:5px; text-align:center } .nav-tabs.nav-justified>.dropdown .dropdown-menu { top:auto; left:auto } @media(min-width:768px) { .nav-tabs.nav-justified>li { display:table-cell; width:1% } .nav-tabs.nav-justified>li>a { margin-bottom:0 } } .nav-tabs.nav-justified>li>a { margin-right:0; border-radius:4px } .nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus { border:1px solid #ddd } @media(min-width:768px) { .nav-tabs.nav-justified>li>a { border-bottom:1px solid #ddd; border-radius:4px 4px 0 0 } .nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus { border-bottom-color:#fff } } .nav-pills>li { float:left } .nav-pills>li>a { border-radius:4px } .nav-pills>li+li { margin-left:2px } .nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus { color:#fff; background-color:#428bca } .nav-stacked>li { float:none } .nav-stacked>li+li { margin-top:2px; margin-left:0 } .nav-justified { width:100% } .nav-justified>li { float:none } .nav-justified>li>a { margin-bottom:5px; text-align:center } .nav-justified>.dropdown .dropdown-menu { top:auto; left:auto } @media(min-width:768px) { .nav-justified>li { display:table-cell; width:1% } .nav-justified>li>a { margin-bottom:0 } } .nav-tabs-justified { border-bottom:0 } .nav-tabs-justified>li>a { margin-right:0; border-radius:4px } .nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus { border:1px solid #ddd } @media(min-width:768px) { .nav-tabs-justified>li>a { border-bottom:1px solid #ddd; border-radius:4px 4px 0 0 } .nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus { border-bottom-color:#fff } } .tab-content>.tab-pane { display:none } .tab-content>.active { display:block } .nav-tabs .dropdown-menu { margin-top:-1px; border-top-right-radius:0; border-top-left-radius:0 } .navbar { position:relative; min-height:50px; margin-bottom:20px; border:1px solid transparent } .navbar:before,.navbar:after { display:table; content:" " } .navbar:after { clear:both } .navbar:before,.navbar:after { display:table; content:" " } .navbar:after { clear:both } @media(min-width:768px) { .navbar { border-radius:4px } } .navbar-header:before,.navbar-header:after { display:table; content:" " } .navbar-header:after { clear:both } .navbar-header:before,.navbar-header:after { display:table; content:" " } .navbar-header:after { clear:both } @media(min-width:768px) { .navbar-header { float:left } } .navbar-collapse { max-height:340px; padding-right:15px; padding-left:15px; overflow-x:visible; border-top:1px solid transparent; box-shadow:inset 0 1px 0 rgba(255,255,255,0.1); -webkit-overflow-scrolling:touch } .navbar-collapse:before,.navbar-collapse:after { display:table; content:" " } .navbar-collapse:after { clear:both } .navbar-collapse:before,.navbar-collapse:after { display:table; content:" " } .navbar-collapse:after { clear:both } .navbar-collapse.in { overflow-y:auto } @media(min-width:768px) { .navbar-collapse { width:auto; border-top:0; box-shadow:none } .navbar-collapse.collapse { display:block!important; height:auto!important; padding-bottom:0; overflow:visible!important } .navbar-collapse.in { overflow-y:visible } .navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse { padding-right:0; padding-left:0 } } .container>.navbar-header,.container>.navbar-collapse { margin-right:-15px; margin-left:-15px } @media(min-width:768px) { .container>.navbar-header,.container>.navbar-collapse { margin-right:0; margin-left:0 } } .navbar-static-top { z-index:1000; border-width:0 0 1px } @media(min-width:768px) { .navbar-static-top { border-radius:0 } } .navbar-fixed-top,.navbar-fixed-bottom { position:fixed; right:0; left:0; z-index:1030 } @media(min-width:768px) { .navbar-fixed-top,.navbar-fixed-bottom { border-radius:0 } } .navbar-fixed-top { top:0; border-width:0 0 1px } .navbar-fixed-bottom { bottom:0; margin-bottom:0; border-width:1px 0 0 } .navbar-brand { float:left; padding:15px 15px; font-size:18px; line-height:20px } .navbar-brand:hover,.navbar-brand:focus { text-decoration:none } @media(min-width:768px) { .navbar>.container .navbar-brand { margin-left:-15px } } .navbar-toggle { position:relative; float:right; padding:9px 10px; margin-top:8px; margin-right:15px; margin-bottom:8px; background-color:transparent; background-image:none; border:1px solid transparent; border-radius:4px } .navbar-toggle .icon-bar { display:block; width:22px; height:2px; border-radius:1px } .navbar-toggle .icon-bar+.icon-bar { margin-top:4px } @media(min-width:768px) { .navbar-toggle { display:none } } .navbar-nav { margin:7.5px -15px } .navbar-nav>li>a { padding-top:10px; padding-bottom:10px; line-height:20px } @media(max-width:767px) { .navbar-nav .open .dropdown-menu { position:static; float:none; width:auto; margin-top:0; background-color:transparent; border:0; box-shadow:none } .navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header { padding:5px 15px 5px 25px } .navbar-nav .open .dropdown-menu>li>a { line-height:20px } .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus { background-image:none } } @media(min-width:768px) { .navbar-nav { float:left; margin:0 } .navbar-nav>li { float:left } .navbar-nav>li>a { padding-top:15px; padding-bottom:15px } .navbar-nav.navbar-right:last-child { margin-right:-15px } } @media(min-width:768px) { .navbar-left { float:left!important } .navbar-right { float:right!important } } .navbar-form { padding:10px 15px; margin-top:8px; margin-right:-15px; margin-bottom:8px; margin-left:-15px; border-top:1px solid transparent; border-bottom:1px solid transparent; -webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1); box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1) } @media(min-width:768px) { .navbar-form .form-group { display:inline-block; margin-bottom:0; vertical-align:middle } .navbar-form .form-control { display:inline-block } .navbar-form select.form-control { width:auto } .navbar-form .radio,.navbar-form .checkbox { display:inline-block; padding-left:0; margin-top:0; margin-bottom:0 } .navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"] { float:none; margin-left:0 } } @media(max-width:767px) { .navbar-form .form-group { margin-bottom:5px } } @media(min-width:768px) { .navbar-form { width:auto; padding-top:0; padding-bottom:0; margin-right:0; margin-left:0; border:0; -webkit-box-shadow:none; box-shadow:none } .navbar-form.navbar-right:last-child { margin-right:-15px } } .navbar-nav>li>.dropdown-menu { margin-top:0; border-top-right-radius:0; border-top-left-radius:0 } .navbar-fixed-bottom .navbar-nav>li>.dropdown-menu { border-bottom-right-radius:0; border-bottom-left-radius:0 } .navbar-nav.pull-right>li>.dropdown-menu,.navbar-nav>li>.dropdown-menu.pull-right { right:0; left:auto } .navbar-btn { margin-top:8px; margin-bottom:8px } .navbar-btn.btn-sm { margin-top:10px; margin-bottom:10px } .navbar-btn.btn-xs { margin-top:14px; margin-bottom:14px } .navbar-text { margin-top:15px; margin-bottom:15px } @media(min-width:768px) { .navbar-text { float:left; margin-right:15px; margin-left:15px } .navbar-text.navbar-right:last-child { margin-right:0 } } .navbar-default { background-color:#f8f8f8; border-color:#e7e7e7 } .navbar-default .navbar-brand { color:#777 } .navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus { color:#5e5e5e; background-color:transparent } .navbar-default .navbar-text { color:#777 } .navbar-default .navbar-nav>li>a { color:#777 } .navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus { color:#333; background-color:transparent } .navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus { color:#555; background-color:#e7e7e7 } .navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus { color:#ccc; background-color:transparent } .navbar-default .navbar-toggle { border-color:#ddd } .navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus { background-color:#ddd } .navbar-default .navbar-toggle .icon-bar { background-color:#ccc } .navbar-default .navbar-collapse,.navbar-default .navbar-form { border-color:#e7e7e7 } .navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus { color:#555; background-color:#e7e7e7 } @media(max-width:767px) { .navbar-default .navbar-nav .open .dropdown-menu>li>a { color:#777 } .navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus { color:#333; background-color:transparent } .navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus { color:#555; background-color:#e7e7e7 } .navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus { color:#ccc; background-color:transparent } } .navbar-default .navbar-link { color:#777 } .navbar-default .navbar-link:hover { color:#333 } .navbar-inverse { background-color:#222; border-color:#080808 } .navbar-inverse .navbar-brand { color:#999 } .navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus { color:#fff; background-color:transparent } .navbar-inverse .navbar-text { color:#999 } .navbar-inverse .navbar-nav>li>a { color:#999 } .navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus { color:#fff; background-color:transparent } .navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus { color:#fff; background-color:#080808 } .navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus { color:#444; background-color:transparent } .navbar-inverse .navbar-toggle { border-color:#333 } .navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus { background-color:#333 } .navbar-inverse .navbar-toggle .icon-bar { background-color:#fff } .navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form { border-color:#101010 } .navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus { color:#fff; background-color:#080808 } @media(max-width:767px) { .navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header { border-color:#080808 } .navbar-inverse .navbar-nav .open .dropdown-menu .divider { background-color:#080808 } .navbar-inverse .navbar-nav .open .dropdown-menu>li>a { color:#999 } .navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus { color:#fff; background-color:transparent } .navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus { color:#fff; background-color:#080808 } .navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus { color:#444; background-color:transparent } } .navbar-inverse .navbar-link { color:#999 } .navbar-inverse .navbar-link:hover { color:#fff } .breadcrumb { padding:8px 15px; margin-bottom:20px; list-style:none; background-color:#f5f5f5; border-radius:4px } .breadcrumb>li { display:inline-block } .breadcrumb>li+li:before { padding:0 5px; color:#ccc; content:"/\00a0" } .breadcrumb>.active { color:#999 } .pagination { display:inline-block; padding-left:0; margin:20px 0; border-radius:4px } .pagination>li { display:inline } .pagination>li>a,.pagination>li>span { position:relative; float:left; padding:6px 12px; margin-left:-1px; line-height:1.428571429; text-decoration:none; background-color:#fff; border:1px solid #ddd } .pagination>li:first-child>a,.pagination>li:first-child>span { margin-left:0; border-bottom-left-radius:4px; border-top-left-radius:4px } .pagination>li:last-child>a,.pagination>li:last-child>span { border-top-right-radius:4px; border-bottom-right-radius:4px } .pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus { background-color:#eee } .pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus { z-index:2; color:#fff; cursor:default; background-color:#428bca; border-color:#428bca } .pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus { color:#999; cursor:not-allowed; background-color:#fff; border-color:#ddd } .pagination-lg>li>a,.pagination-lg>li>span { padding:10px 16px; font-size:18px } .pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span { border-bottom-left-radius:6px; border-top-left-radius:6px } .pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span { border-top-right-radius:6px; border-bottom-right-radius:6px } .pagination-sm>li>a,.pagination-sm>li>span { padding:5px 10px; font-size:12px } .pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span { border-bottom-left-radius:3px; border-top-left-radius:3px } .pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span { border-top-right-radius:3px; border-bottom-right-radius:3px } .pager { padding-left:0; margin:20px 0; text-align:center; list-style:none } .pager:before,.pager:after { display:table; content:" " } .pager:after { clear:both } .pager:before,.pager:after { display:table; content:" " } .pager:after { clear:both } .pager li { display:inline } .pager li>a,.pager li>span { display:inline-block; padding:5px 14px; background-color:#fff; border:1px solid #ddd; border-radius:15px } .pager li>a:hover,.pager li>a:focus { text-decoration:none; background-color:#eee } .pager .next>a,.pager .next>span { float:right } .pager .previous>a,.pager .previous>span { float:left } .pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span { color:#999; cursor:not-allowed; background-color:#fff } .label { display:inline; padding:.2em .6em .3em; font-size:75%; font-weight:bold; line-height:1; color:#fff; text-align:center; white-space:nowrap; vertical-align:baseline; border-radius:.25em } .label[href]:hover,.label[href]:focus { color:#fff; text-decoration:none; cursor:pointer } .label:empty { display:none } .btn .label { position:relative; top:-1px } .label-default { background-color:#999 } .label-default[href]:hover,.label-default[href]:focus { background-color:#808080 } .label-primary { background-color:#428bca } .label-primary[href]:hover,.label-primary[href]:focus { background-color:#3071a9 } .label-success { background-color:#5cb85c } .label-success[href]:hover,.label-success[href]:focus { background-color:#449d44 } .label-info { background-color:#5bc0de } .label-info[href]:hover,.label-info[href]:focus { background-color:#31b0d5 } .label-warning { background-color:#f0ad4e } .label-warning[href]:hover,.label-warning[href]:focus { background-color:#ec971f } .label-danger { background-color:#d9534f } .label-danger[href]:hover,.label-danger[href]:focus { background-color:#c9302c } .badge { display:inline-block; min-width:10px; padding:3px 7px; font-size:12px; font-weight:bold; line-height:1; color:#fff; text-align:center; white-space:nowrap; vertical-align:baseline; background-color:#999; border-radius:10px } .badge:empty { display:none } .btn .badge { position:relative; top:-1px } a.badge:hover,a.badge:focus { color:#fff; text-decoration:none; cursor:pointer } a.list-group-item.active>.badge,.nav-pills>.active>a>.badge { color:#428bca; background-color:#fff } .nav-pills>li>a>.badge { margin-left:3px } .jumbotron { padding:30px; margin-bottom:30px; font-size:21px; font-weight:200; line-height:2.1428571435; color:inherit; background-color:#eee } .jumbotron h1,.jumbotron .h1 { line-height:1; color:inherit } .jumbotron p { line-height:1.4 } .container .jumbotron { border-radius:6px } .jumbotron .container { max-width:100% } @media screen and (min-width:768px) { .jumbotron { padding-top:48px; padding-bottom:48px } .container .jumbotron { padding-right:60px; padding-left:60px } .jumbotron h1,.jumbotron .h1 { font-size:63px } } .thumbnail { display:block; padding:4px; margin-bottom:20px; line-height:1.428571429; background-color:#fff; border:1px solid #ddd; border-radius:4px; -webkit-transition:all .2s ease-in-out; transition:all .2s ease-in-out } .thumbnail>img,.thumbnail a>img { display:block; height:auto; max-width:100%; margin-right:auto; margin-left:auto } a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active { border-color:#428bca } .thumbnail .caption { padding:9px; color:#333 } .alert { padding:15px; margin-bottom:20px; border:1px solid transparent; border-radius:4px } .alert h4 { margin-top:0; color:inherit } .alert .alert-link { font-weight:bold } .alert>p,.alert>ul { margin-bottom:0 } .alert>p+p { margin-top:5px } .alert-dismissable { padding-right:35px } .alert-dismissable .close { position:relative; top:-2px; right:-21px; color:inherit } .alert-success { color:#3c763d; background-color:#dff0d8; border-color:#d6e9c6 } .alert-success hr { border-top-color:#c9e2b3 } .alert-success .alert-link { color:#2b542c } .alert-info { color:#31708f; background-color:#d9edf7; border-color:#bce8f1 } .alert-info hr { border-top-color:#a6e1ec } .alert-info .alert-link { color:#245269 } .alert-warning { color:#8a6d3b; background-color:#fcf8e3; border-color:#faebcc } .alert-warning hr { border-top-color:#f7e1b5 } .alert-warning .alert-link { color:#66512c } .alert-danger { color:#a94442; background-color:#f2dede; border-color:#ebccd1 } .alert-danger hr { border-top-color:#e4b9c0 } .alert-danger .alert-link { color:#843534 } @-webkit-keyframes progress-bar-stripes { from { background-position:40px 0 } to { background-position:0 0 } } @keyframes progress-bar-stripes { from { background-position:40px 0 } to { background-position:0 0 } } .progress { height:20px; margin-bottom:20px; overflow:hidden; background-color:#f5f5f5; border-radius:4px; -webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1); box-shadow:inset 0 1px 2px rgba(0,0,0,0.1) } .progress-bar { float:left; width:0; height:100%; font-size:12px; line-height:20px; color:#fff; text-align:center; background-color:#428bca; -webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15); box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15); -webkit-transition:width .6s ease; transition:width .6s ease } .progress-striped .progress-bar { background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent); background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent); background-size:40px 40px } .progress.active .progress-bar { -webkit-animation:progress-bar-stripes 2s linear infinite; animation:progress-bar-stripes 2s linear infinite } .progress-bar-success { background-color:#5cb85c } .progress-striped .progress-bar-success { background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent); background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent) } .progress-bar-info { background-color:#5bc0de } .progress-striped .progress-bar-info { background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent); background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent) } .progress-bar-warning { background-color:#f0ad4e } .progress-striped .progress-bar-warning { background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent); background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent) } .progress-bar-danger { background-color:#d9534f } .progress-striped .progress-bar-danger { background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent); background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent) } .media,.media-body { overflow:hidden; zoom:1 } .media,.media .media { margin-top:15px } .media:first-child { margin-top:0 } .media-object { display:block } .media-heading { margin:0 0 5px } .media>.pull-left { margin-right:10px } .media>.pull-right { margin-left:10px } .media-list { padding-left:0; list-style:none } .list-group { padding-left:0; margin-bottom:20px } .list-group-item { position:relative; display:block; padding:10px 15px; margin-bottom:-1px; background-color:#fff; border:1px solid #ddd } .list-group-item:first-child { border-top-right-radius:4px; border-top-left-radius:4px } .list-group-item:last-child { margin-bottom:0; border-bottom-right-radius:4px; border-bottom-left-radius:4px } .list-group-item>.badge { float:right } .list-group-item>.badge+.badge { margin-right:5px } a.list-group-item { color:#555 } a.list-group-item .list-group-item-heading { color:#333 } a.list-group-item:hover,a.list-group-item:focus { text-decoration:none; background-color:#f5f5f5 } a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus { z-index:2; color:#fff; background-color:#428bca; border-color:#428bca } a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading { color:inherit } a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text { color:#e1edf7 } .list-group-item-heading { margin-top:0; margin-bottom:5px } .list-group-item-text { margin-bottom:0; line-height:1.3 } .panel { margin-bottom:20px; background-color:#fff; border:1px solid transparent; border-radius:4px; -webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05); box-shadow:0 1px 1px rgba(0,0,0,0.05) } .panel-body { padding:15px } .panel-body:before,.panel-body:after { display:table; content:" " } .panel-body:after { clear:both } .panel-body:before,.panel-body:after { display:table; content:" " } .panel-body:after { clear:both } .panel>.list-group { margin-bottom:0 } .panel>.list-group .list-group-item { border-width:1px 0 } .panel>.list-group .list-group-item:first-child { border-top-right-radius:0; border-top-left-radius:0 } .panel>.list-group .list-group-item:last-child { border-bottom:0 } .panel-heading+.list-group .list-group-item:first-child { border-top-width:0 } .panel>.table,.panel>.table-responsive>.table { margin-bottom:0 } .panel>.panel-body+.table,.panel>.panel-body+.table-responsive { border-top:1px solid #ddd } .panel>.table>tbody:first-child th,.panel>.table>tbody:first-child td { border-top:0 } .panel>.table-bordered,.panel>.table-responsive>.table-bordered { border:0 } .panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child { border-left:0 } .panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child { border-right:0 } .panel>.table-bordered>thead>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:last-child>th,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:last-child>td,.panel>.table-responsive>.table-bordered>thead>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td { border-bottom:0 } .panel>.table-responsive { margin-bottom:0; border:0 } .panel-heading { padding:10px 15px; border-bottom:1px solid transparent; border-top-right-radius:3px; border-top-left-radius:3px } .panel-heading>.dropdown .dropdown-toggle { color:inherit } .panel-title { margin-top:0; margin-bottom:0; font-size:16px; color:inherit } .panel-title>a { color:inherit } .panel-footer { padding:10px 15px; background-color:#f5f5f5; border-top:1px solid #ddd; border-bottom-right-radius:3px; border-bottom-left-radius:3px } .panel-group .panel { margin-bottom:0; overflow:hidden; border-radius:4px } .panel-group .panel+.panel { margin-top:5px } .panel-group .panel-heading { border-bottom:0 } .panel-group .panel-heading+.panel-collapse .panel-body { border-top:1px solid #ddd } .panel-group .panel-footer { border-top:0 } .panel-group .panel-footer+.panel-collapse .panel-body { border-bottom:1px solid #ddd } .panel-default { border-color:#ddd } .panel-default>.panel-heading { color:#333; background-color:#f5f5f5; border-color:#ddd } .panel-default>.panel-heading+.panel-collapse .panel-body { border-top-color:#ddd } .panel-default>.panel-footer+.panel-collapse .panel-body { border-bottom-color:#ddd } .panel-primary { border-color:#428bca } .panel-primary>.panel-heading { color:#fff; background-color:#428bca; border-color:#428bca } .panel-primary>.panel-heading+.panel-collapse .panel-body { border-top-color:#428bca } .panel-primary>.panel-footer+.panel-collapse .panel-body { border-bottom-color:#428bca } .panel-success { border-color:#d6e9c6 } .panel-success>.panel-heading { color:#3c763d; background-color:#dff0d8; border-color:#d6e9c6 } .panel-success>.panel-heading+.panel-collapse .panel-body { border-top-color:#d6e9c6 } .panel-success>.panel-footer+.panel-collapse .panel-body { border-bottom-color:#d6e9c6 } .panel-warning { border-color:#faebcc } .panel-warning>.panel-heading { color:#8a6d3b; background-color:#fcf8e3; border-color:#faebcc } .panel-warning>.panel-heading+.panel-collapse .panel-body { border-top-color:#faebcc } .panel-warning>.panel-footer+.panel-collapse .panel-body { border-bottom-color:#faebcc } .panel-danger { border-color:#ebccd1 } .panel-danger>.panel-heading { color:#a94442; background-color:#f2dede; border-color:#ebccd1 } .panel-danger>.panel-heading+.panel-collapse .panel-body { border-top-color:#ebccd1 } .panel-danger>.panel-footer+.panel-collapse .panel-body { border-bottom-color:#ebccd1 } .panel-info { border-color:#bce8f1 } .panel-info>.panel-heading { color:#31708f; background-color:#d9edf7; border-color:#bce8f1 } .panel-info>.panel-heading+.panel-collapse .panel-body { border-top-color:#bce8f1 } .panel-info>.panel-footer+.panel-collapse .panel-body { border-bottom-color:#bce8f1 } .well { min-height:20px; padding:19px; margin-bottom:20px; background-color:#f5f5f5; border:1px solid #e3e3e3; border-radius:4px; -webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05); box-shadow:inset 0 1px 1px rgba(0,0,0,0.05) } .well blockquote { border-color:#ddd; border-color:rgba(0,0,0,0.15) } .well-lg { padding:24px; border-radius:6px } .well-sm { padding:9px; border-radius:3px } .close { float:right; font-size:21px; font-weight:bold; line-height:1; color:#000; text-shadow:0 1px 0 #fff; opacity:.2; filter:alpha(opacity=20) } .close:hover,.close:focus { color:#000; text-decoration:none; cursor:pointer; opacity:.5; filter:alpha(opacity=50) } button.close { padding:0; cursor:pointer; background:transparent; border:0; -webkit-appearance:none } .modal-open { overflow:hidden } .modal { position:fixed; top:0; right:0; bottom:0; left:0; z-index:1040; display:none; overflow:auto; overflow-y:scroll } .modal.fade .modal-dialog { -webkit-transform:translate(0,-25%); -ms-transform:translate(0,-25%); transform:translate(0,-25%); -webkit-transition:-webkit-transform .3s ease-out; -moz-transition:-moz-transform .3s ease-out; -o-transition:-o-transform .3s ease-out; transition:transform .3s ease-out } .modal.in .modal-dialog { -webkit-transform:translate(0,0); -ms-transform:translate(0,0); transform:translate(0,0) } .modal-dialog { position:relative; z-index:1050; width:auto; margin:10px } .modal-content { position:relative; background-color:#fff; border:1px solid #999; border:1px solid rgba(0,0,0,0.2); border-radius:6px; outline:0; -webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5); box-shadow:0 3px 9px rgba(0,0,0,0.5); background-clip:padding-box } .modal-backdrop { position:fixed; top:0; right:0; bottom:0; left:0; z-index:1030; background-color:#000 } .modal-backdrop.fade { opacity:0; filter:alpha(opacity=0) } .modal-backdrop.in { opacity:.5; filter:alpha(opacity=50) } .modal-header { min-height:16.428571429px; padding:15px; border-bottom:1px solid #e5e5e5 } .modal-header .close { margin-top:-2px } .modal-title { margin:0; line-height:1.428571429 } .modal-body { position:relative; padding:20px } .modal-footer { padding:19px 20px 20px; margin-top:15px; text-align:right; border-top:1px solid #e5e5e5 } .modal-footer:before,.modal-footer:after { display:table; content:" " } .modal-footer:after { clear:both } .modal-footer:before,.modal-footer:after { display:table; content:" " } .modal-footer:after { clear:both } .modal-footer .btn+.btn { margin-bottom:0; margin-left:5px } .modal-footer .btn-group .btn+.btn { margin-left:-1px } .modal-footer .btn-block+.btn-block { margin-left:0 } @media screen and (min-width:768px) { .modal-dialog { width:600px; margin:30px auto } .modal-content { -webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5); box-shadow:0 5px 15px rgba(0,0,0,0.5) } } .tooltip { position:absolute; z-index:1030; display:block; font-size:12px; line-height:1.4; opacity:0; filter:alpha(opacity=0); visibility:visible } .tooltip.in { opacity:.9; filter:alpha(opacity=90) } .tooltip.top { padding:5px 0; margin-top:-3px } .tooltip.right { padding:0 5px; margin-left:3px } .tooltip.bottom { padding:5px 0; margin-top:3px } .tooltip.left { padding:0 5px; margin-left:-3px } .tooltip-inner { max-width:200px; padding:3px 8px; color:#fff; text-align:center; text-decoration:none; background-color:#000; border-radius:4px } .tooltip-arrow { position:absolute; width:0; height:0; border-color:transparent; border-style:solid } .tooltip.top .tooltip-arrow { bottom:0; left:50%; margin-left:-5px; border-top-color:#000; border-width:5px 5px 0 } .tooltip.top-left .tooltip-arrow { bottom:0; left:5px; border-top-color:#000; border-width:5px 5px 0 } .tooltip.top-right .tooltip-arrow { right:5px; bottom:0; border-top-color:#000; border-width:5px 5px 0 } .tooltip.right .tooltip-arrow { top:50%; left:0; margin-top:-5px; border-right-color:#000; border-width:5px 5px 5px 0 } .tooltip.left .tooltip-arrow { top:50%; right:0; margin-top:-5px; border-left-color:#000; border-width:5px 0 5px 5px } .tooltip.bottom .tooltip-arrow { top:0; left:50%; margin-left:-5px; border-bottom-color:#000; border-width:0 5px 5px } .tooltip.bottom-left .tooltip-arrow { top:0; left:5px; border-bottom-color:#000; border-width:0 5px 5px } .tooltip.bottom-right .tooltip-arrow { top:0; right:5px; border-bottom-color:#000; border-width:0 5px 5px } .popover { position:absolute; top:0; left:0; z-index:1010; display:none; max-width:276px; padding:1px; text-align:left; white-space:normal; background-color:#fff; border:1px solid #ccc; border:1px solid rgba(0,0,0,0.2); border-radius:6px; -webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2); box-shadow:0 5px 10px rgba(0,0,0,0.2); background-clip:padding-box } .popover.top { margin-top:-10px } .popover.right { margin-left:10px } .popover.bottom { margin-top:10px } .popover.left { margin-left:-10px } .popover-title { padding:8px 14px; margin:0; font-size:14px; font-weight:normal; line-height:18px; background-color:#f7f7f7; border-bottom:1px solid #ebebeb; border-radius:5px 5px 0 0 } .popover-content { padding:9px 14px } .popover .arrow,.popover .arrow:after { position:absolute; display:block; width:0; height:0; border-color:transparent; border-style:solid } .popover .arrow { border-width:11px } .popover .arrow:after { border-width:10px; content:"" } .popover.top .arrow { bottom:-11px; left:50%; margin-left:-11px; border-top-color:#999; border-top-color:rgba(0,0,0,0.25); border-bottom-width:0 } .popover.top .arrow:after { bottom:1px; margin-left:-10px; border-top-color:#fff; border-bottom-width:0; content:" " } .popover.right .arrow { top:50%; left:-11px; margin-top:-11px; border-right-color:#999; border-right-color:rgba(0,0,0,0.25); border-left-width:0 } .popover.right .arrow:after { bottom:-10px; left:1px; border-right-color:#fff; border-left-width:0; content:" " } .popover.bottom .arrow { top:-11px; left:50%; margin-left:-11px; border-bottom-color:#999; border-bottom-color:rgba(0,0,0,0.25); border-top-width:0 } .popover.bottom .arrow:after { top:1px; margin-left:-10px; border-bottom-color:#fff; border-top-width:0; content:" " } .popover.left .arrow { top:50%; right:-11px; margin-top:-11px; border-left-color:#999; border-left-color:rgba(0,0,0,0.25); border-right-width:0 } .popover.left .arrow:after { right:1px; bottom:-10px; border-left-color:#fff; border-right-width:0; content:" " } .carousel { position:relative } .carousel-inner { position:relative; width:100%; overflow:hidden } .carousel-inner>.item { position:relative; display:none; -webkit-transition:.6s ease-in-out left; transition:.6s ease-in-out left } .carousel-inner>.item>img,.carousel-inner>.item>a>img { display:block; height:auto; max-width:100%; line-height:1 } .carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev { display:block } .carousel-inner>.active { left:0 } .carousel-inner>.next,.carousel-inner>.prev { position:absolute; top:0; width:100% } .carousel-inner>.next { left:100% } .carousel-inner>.prev { left:-100% } .carousel-inner>.next.left,.carousel-inner>.prev.right { left:0 } .carousel-inner>.active.left { left:-100% } .carousel-inner>.active.right { left:100% } .carousel-control { position:absolute; top:0; bottom:0; left:0; width:15%; font-size:20px; color:#fff; text-align:center; text-shadow:0 1px 2px rgba(0,0,0,0.6); opacity:.5; filter:alpha(opacity=50) } .carousel-control.left { background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.5) 0),color-stop(rgba(0,0,0,0.0001) 100%)); background-image:linear-gradient(to right,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%); background-repeat:repeat-x; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000',endColorstr='#00000000',GradientType=1) } .carousel-control.right { right:0; left:auto; background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.0001) 0),color-stop(rgba(0,0,0,0.5) 100%)); background-image:linear-gradient(to right,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%); background-repeat:repeat-x; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000',endColorstr='#80000000',GradientType=1) } .carousel-control:hover,.carousel-control:focus { color:#fff; text-decoration:none; outline:0; opacity:.9; filter:alpha(opacity=90) } .carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right { position:absolute; top:50%; z-index:5; display:inline-block } .carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left { left:50% } .carousel-control .icon-next,.carousel-control .glyphicon-chevron-right { right:50% } .carousel-control .icon-prev,.carousel-control .icon-next { width:20px; height:20px; margin-top:-10px; margin-left:-10px; font-family:serif } .carousel-control .icon-prev:before { content:'\2039' } .carousel-control .icon-next:before { content:'\203a' } .carousel-indicators { position:absolute; bottom:10px; left:50%; z-index:15; width:60%; padding-left:0; margin-left:-30%; text-align:center; list-style:none } .carousel-indicators li { display:inline-block; width:10px; height:10px; margin:1px; text-indent:-999px; cursor:pointer; background-color:#000 \9; background-color:rgba(0,0,0,0); border:1px solid #fff; border-radius:10px } .carousel-indicators .active { width:12px; height:12px; margin:0; background-color:#fff } .carousel-caption { position:absolute; right:15%; bottom:20px; left:15%; z-index:10; padding-top:20px; padding-bottom:20px; color:#fff; text-align:center; text-shadow:0 1px 2px rgba(0,0,0,0.6) } .carousel-caption .btn { text-shadow:none } @media screen and (min-width:768px) { .carousel-control .glyphicons-chevron-left,.carousel-control .glyphicons-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next { width:30px; height:30px; margin-top:-15px; margin-left:-15px; font-size:30px } .carousel-caption { right:20%; left:20%; padding-bottom:30px } .carousel-indicators { bottom:20px } } .clearfix:before,.clearfix:after { display:table; content:" " } .clearfix:after { clear:both } .center-block { display:block; margin-right:auto; margin-left:auto } .pull-right { float:right!important } .pull-left { float:left!important } .hide { display:none!important } .show { display:block!important } .invisible { visibility:hidden } .text-hide { font:0/0 a; color:transparent; text-shadow:none; background-color:transparent; border:0 } .hidden { display:none!important; visibility:hidden!important } .affix { position:fixed } @-ms-viewport { width:device-width } .visible-xs,tr.visible-xs,th.visible-xs,td.visible-xs { display:none!important } @media(max-width:767px) { .visible-xs { display:block!important } table.visible-xs { display:table } tr.visible-xs { display:table-row!important } th.visible-xs,td.visible-xs { display:table-cell!important } } @media(min-width:768px) and (max-width:991px) { .visible-xs.visible-sm { display:block!important } table.visible-xs.visible-sm { display:table } tr.visible-xs.visible-sm { display:table-row!important } th.visible-xs.visible-sm,td.visible-xs.visible-sm { display:table-cell!important } } @media(min-width:992px) and (max-width:1199px) { .visible-xs.visible-md { display:block!important } table.visible-xs.visible-md { display:table } tr.visible-xs.visible-md { display:table-row!important } th.visible-xs.visible-md,td.visible-xs.visible-md { display:table-cell!important } } @media(min-width:1200px) { .visible-xs.visible-lg { display:block!important } table.visible-xs.visible-lg { display:table } tr.visible-xs.visible-lg { display:table-row!important } th.visible-xs.visible-lg,td.visible-xs.visible-lg { display:table-cell!important } } .visible-sm,tr.visible-sm,th.visible-sm,td.visible-sm { display:none!important } @media(max-width:767px) { .visible-sm.visible-xs { display:block!important } table.visible-sm.visible-xs { display:table } tr.visible-sm.visible-xs { display:table-row!important } th.visible-sm.visible-xs,td.visible-sm.visible-xs { display:table-cell!important } } @media(min-width:768px) and (max-width:991px) { .visible-sm { display:block!important } table.visible-sm { display:table } tr.visible-sm { display:table-row!important } th.visible-sm,td.visible-sm { display:table-cell!important } } @media(min-width:992px) and (max-width:1199px) { .visible-sm.visible-md { display:block!important } table.visible-sm.visible-md { display:table } tr.visible-sm.visible-md { display:table-row!important } th.visible-sm.visible-md,td.visible-sm.visible-md { display:table-cell!important } } @media(min-width:1200px) { .visible-sm.visible-lg { display:block!important } table.visible-sm.visible-lg { display:table } tr.visible-sm.visible-lg { display:table-row!important } th.visible-sm.visible-lg,td.visible-sm.visible-lg { display:table-cell!important } } .visible-md,tr.visible-md,th.visible-md,td.visible-md { display:none!important } @media(max-width:767px) { .visible-md.visible-xs { display:block!important } table.visible-md.visible-xs { display:table } tr.visible-md.visible-xs { display:table-row!important } th.visible-md.visible-xs,td.visible-md.visible-xs { display:table-cell!important } } @media(min-width:768px) and (max-width:991px) { .visible-md.visible-sm { display:block!important } table.visible-md.visible-sm { display:table } tr.visible-md.visible-sm { display:table-row!important } th.visible-md.visible-sm,td.visible-md.visible-sm { display:table-cell!important } } @media(min-width:992px) and (max-width:1199px) { .visible-md { display:block!important } table.visible-md { display:table } tr.visible-md { display:table-row!important } th.visible-md,td.visible-md { display:table-cell!important } } @media(min-width:1200px) { .visible-md.visible-lg { display:block!important } table.visible-md.visible-lg { display:table } tr.visible-md.visible-lg { display:table-row!important } th.visible-md.visible-lg,td.visible-md.visible-lg { display:table-cell!important } } .visible-lg,tr.visible-lg,th.visible-lg,td.visible-lg { display:none!important } @media(max-width:767px) { .visible-lg.visible-xs { display:block!important } table.visible-lg.visible-xs { display:table } tr.visible-lg.visible-xs { display:table-row!important } th.visible-lg.visible-xs,td.visible-lg.visible-xs { display:table-cell!important } } @media(min-width:768px) and (max-width:991px) { .visible-lg.visible-sm { display:block!important } table.visible-lg.visible-sm { display:table } tr.visible-lg.visible-sm { display:table-row!important } th.visible-lg.visible-sm,td.visible-lg.visible-sm { display:table-cell!important } } @media(min-width:992px) and (max-width:1199px) { .visible-lg.visible-md { display:block!important } table.visible-lg.visible-md { display:table } tr.visible-lg.visible-md { display:table-row!important } th.visible-lg.visible-md,td.visible-lg.visible-md { display:table-cell!important } } @media(min-width:1200px) { .visible-lg { display:block!important } table.visible-lg { display:table } tr.visible-lg { display:table-row!important } th.visible-lg,td.visible-lg { display:table-cell!important } } .hidden-xs { display:block!important } table.hidden-xs { display:table } tr.hidden-xs { display:table-row!important } th.hidden-xs,td.hidden-xs { display:table-cell!important } @media(max-width:767px) { .hidden-xs,tr.hidden-xs,th.hidden-xs,td.hidden-xs { display:none!important } } @media(min-width:768px) and (max-width:991px) { .hidden-xs.hidden-sm,tr.hidden-xs.hidden-sm,th.hidden-xs.hidden-sm,td.hidden-xs.hidden-sm { display:none!important } } @media(min-width:992px) and (max-width:1199px) { .hidden-xs.hidden-md,tr.hidden-xs.hidden-md,th.hidden-xs.hidden-md,td.hidden-xs.hidden-md { display:none!important } } @media(min-width:1200px) { .hidden-xs.hidden-lg,tr.hidden-xs.hidden-lg,th.hidden-xs.hidden-lg,td.hidden-xs.hidden-lg { display:none!important } } .hidden-sm { display:block!important } table.hidden-sm { display:table } tr.hidden-sm { display:table-row!important } th.hidden-sm,td.hidden-sm { display:table-cell!important } @media(max-width:767px) { .hidden-sm.hidden-xs,tr.hidden-sm.hidden-xs,th.hidden-sm.hidden-xs,td.hidden-sm.hidden-xs { display:none!important } } @media(min-width:768px) and (max-width:991px) { .hidden-sm,tr.hidden-sm,th.hidden-sm,td.hidden-sm { display:none!important } } @media(min-width:992px) and (max-width:1199px) { .hidden-sm.hidden-md,tr.hidden-sm.hidden-md,th.hidden-sm.hidden-md,td.hidden-sm.hidden-md { display:none!important } } @media(min-width:1200px) { .hidden-sm.hidden-lg,tr.hidden-sm.hidden-lg,th.hidden-sm.hidden-lg,td.hidden-sm.hidden-lg { display:none!important } } .hidden-md { display:block!important } table.hidden-md { display:table } tr.hidden-md { display:table-row!important } th.hidden-md,td.hidden-md { display:table-cell!important } @media(max-width:767px) { .hidden-md.hidden-xs,tr.hidden-md.hidden-xs,th.hidden-md.hidden-xs,td.hidden-md.hidden-xs { display:none!important } } @media(min-width:768px) and (max-width:991px) { .hidden-md.hidden-sm,tr.hidden-md.hidden-sm,th.hidden-md.hidden-sm,td.hidden-md.hidden-sm { display:none!important } } @media(min-width:992px) and (max-width:1199px) { .hidden-md,tr.hidden-md,th.hidden-md,td.hidden-md { display:none!important } } @media(min-width:1200px) { .hidden-md.hidden-lg,tr.hidden-md.hidden-lg,th.hidden-md.hidden-lg,td.hidden-md.hidden-lg { display:none!important } } .hidden-lg { display:block!important } table.hidden-lg { display:table } tr.hidden-lg { display:table-row!important } th.hidden-lg,td.hidden-lg { display:table-cell!important } @media(max-width:767px) { .hidden-lg.hidden-xs,tr.hidden-lg.hidden-xs,th.hidden-lg.hidden-xs,td.hidden-lg.hidden-xs { display:none!important } } @media(min-width:768px) and (max-width:991px) { .hidden-lg.hidden-sm,tr.hidden-lg.hidden-sm,th.hidden-lg.hidden-sm,td.hidden-lg.hidden-sm { display:none!important } } @media(min-width:992px) and (max-width:1199px) { .hidden-lg.hidden-md,tr.hidden-lg.hidden-md,th.hidden-lg.hidden-md,td.hidden-lg.hidden-md { display:none!important } } @media(min-width:1200px) { .hidden-lg,tr.hidden-lg,th.hidden-lg,td.hidden-lg { display:none!important } } .visible-print,tr.visible-print,th.visible-print,td.visible-print { display:none!important } @media print { .visible-print { display:block!important } table.visible-print { display:table } tr.visible-print { display:table-row!important } th.visible-print,td.visible-print { display:table-cell!important } .hidden-print,tr.hidden-print,th.hidden-print,td.hidden-print { display:none!important } }
{ "content_hash": "cd7630cae86b1ba6fa2e76462a522a4c", "timestamp": "", "source": "github", "line_count": 5229, "max_line_length": 673, "avg_line_length": 20.951042264295275, "alnum_prop": 0.7125318339068761, "repo_name": "Isaac-Dev/PPE", "id": "93e9dd65b23c0570c763c22a8da1671f226837bc", "size": "109699", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "bootstrap/css/bootstrap.min.css", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "15030" }, { "name": "HTML", "bytes": "179507" }, { "name": "JavaScript", "bytes": "6289" }, { "name": "PHP", "bytes": "80711" } ], "symlink_target": "" }
/*! * forte-accounting v3.2.1: WordPress theme for Forte Accounting * (c) 2016 Chris Ferdinandi * MIT License * http://github.com/cferdinandi/forte-accounting */ /** * @section Normalize.css * Normalize.css base with custom code. * Additional normalize styles incorporated throughout components. * @link http://necolas.github.io/normalize.css/ */ /** * Mobile screen resizing * @link http://dev.w3.org/csswg/css-device-adapt/ */ @-webkit-viewport { width: device-width; zoom: 1.0; } @-moz-viewport { width: device-width; zoom: 1.0; } @-ms-viewport { width: device-width; zoom: 1.0; } @-o-viewport { width: device-width; zoom: 1.0; } @viewport { width: device-width; zoom: 1.0; } /** * Add box sizing to everything * @link http://www.paulirish.com/2012/box-sizing-border-box-ftw/ */ /* line 22, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_normalize.scss */ *, *:before, *:after { box-sizing: border-box; } /** * 1. Set default font family to default. * 2. Force scrollbar display to prevent jumping on pages. * 3. Prevent iOS text size adjust after orientation change, without disabling * user zoom. */ /* line 35, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_normalize.scss */ html { font-family: "Noto Serif", Georgia, Times, serif; /* 1 */ overflow-y: scroll; /* 2 */ -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; text-size-adjust: 100%; /* 3 */ } /** * Remove default margin. */ /* line 44, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_normalize.scss */ body { margin: 0; } /** * Correct `block` display not defined for any HTML5 element in IE 8/9. * Correct `block` display not defined for `details` or `summary` in IE 10/11 * and Firefox. * Correct `block` display not defined for `main` in IE 11. */ /* line 54, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_normalize.scss */ article, aside, cite, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } /** * 1. Correct `inline-block` display not defined in IE 8/9. * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. */ /* line 75, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_normalize.scss */ audio, canvas, progress, video { display: inline-block; /* 1 */ vertical-align: baseline; /* 2 */ } /** * Prevent modern browsers from displaying `audio` without controls. * Remove excess height in iOS 5 devices. */ /* line 87, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_normalize.scss */ audio:not([controls]) { display: none; height: 0; } /** * Prevent img and video elements from spilling outside of the page on smaller screens. */ /* line 95, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_normalize.scss */ img, video { max-width: 100%; height: auto; } /** * Prevent iframe, object, and embed elements from spilling outside of the page on smaller screens. * height: auto causes iframes to smush, so it's omitted here. */ /* line 105, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_normalize.scss */ iframe, object, embed { max-width: 100%; } /** * Hide the template element in IE, Safari, and Firefox < 22. */ /** * 1. Remove border when inside `a` element in IE 8/9/10. * 2. Prevents IE from making scaled images look like crap */ /* line 122, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_normalize.scss */ img { border: 0; /* 1 */ -ms-interpolation-mode: bicubic; /* 2 */ } /** * Correct overflow not hidden in IE 9/10/11. */ /* line 130, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_normalize.scss */ svg:not(:root) { overflow: hidden; } /** * Address inconsistent margin. */ /* line 137, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_normalize.scss */ figure { margin: 0; } /** * @section Grid * Structure and layout */ /** * Base grid styles: single column */ /* line 9, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .container { margin-left: auto; margin-right: auto; max-width: 40em; width: 88%; } /* line 16, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .container-large { max-width: 60em; } /* line 24, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row { margin-left: -1.4%; margin-right: -1.4%; } /* line 29, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .grid-fourth, .grid-third, .grid-half, .grid-two-thirds, .grid-three-fourths, .grid-full, .grid-dynamic { float: left; padding-left: 1.4%; padding-right: 1.4%; width: 100%; } /** * Reverses order of grid for content choreography */ /* line 46, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .grid-flip { float: right; } /** * Add columns to grid on bigger screens */ @media (min-width: 20em) { /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-xsmall .grid-fourth { width: 25%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-xsmall .grid-third { width: 33.33333%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-xsmall .grid-half { width: 50%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-xsmall .grid-two-thirds { width: 66.66667%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-xsmall .grid-three-fourths { width: 75%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-xsmall .grid-full { width: 100%; } } @media (min-width: 30em) { /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-small .grid-fourth { width: 25%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-small .grid-third { width: 33.33333%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-small .grid-half { width: 50%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-small .grid-two-thirds { width: 66.66667%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-small .grid-three-fourths { width: 75%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .row-start-small .grid-full { width: 100%; } } @media (min-width: 40em) { /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .grid-fourth { width: 25%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .grid-third { width: 33.33333%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .grid-half { width: 50%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .grid-two-thirds { width: 66.66667%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .grid-three-fourths { width: 75%; } /* line 57, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .grid-full { width: 100%; } } /** * Dynamic grid */ @media (min-width: 20em) { /* line 79, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .grid-dynamic { width: 50%; } } @media (min-width: 30em) { /* line 79, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .grid-dynamic { width: 33.33333%; } } @media (min-width: 40em) { /* line 79, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_grid.scss */ .grid-dynamic { width: 25%; } } /** * @section Typography * Sets font styles for entire site */ /* line 6, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ body { background: #ffffff; color: #272727; font-family: "Noto Serif", Georgia, Times, serif; font-size: 100%; line-height: 1.5; } @media (min-width: 40em) { /* line 6, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ body { line-height: 1.5625; } } /* line 18, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ p { margin: 0 0 1.5625em; } /** * Hyperlink styling */ /* line 27, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ a, .link-plain:hover, .link-block-styled { background-color: transparent; color: #0088cc; text-decoration: none; word-wrap: break-word; } /** * Improve readability when focused and also mouse hovered in all browsers. */ /* line 37, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ a:active, .link-plain:active:hover, .link-block-styled:active, a:hover, .link-plain:hover, .link-block-styled:hover, .link-block:hover .link-block-styled { outline: 0; } /* line 42, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ a:hover, .link-plain:hover, .link-block-styled:hover, .link-block:hover .link-block-styled, a:focus, .link-plain:focus:hover, .link-block-styled:focus, a:active, .link-plain:active:hover, .link-block-styled:active { color: #005580; text-decoration: underline; } /* line 49, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ a img, .link-plain:hover img, .link-block-styled img { border: none; background: none; } /** * Creates plain links */ /* line 59, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ .link-plain { color: #272727; } /** * Creates block-level links */ /* line 72, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ a.link-block, .link-block.link-plain:hover, .link-block.link-block-styled { color: #272727; display: block; text-decoration: none; } /** * List styling */ /* line 91, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ ul, ol { margin: 0 0 1.5625em 2em; padding: 0; } /* line 97, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ ul ul, ul ol, ol ol, ol ul { margin-bottom: 0; } /* line 104, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ dl, dd { margin: 0; padding: 0; } /* line 110, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ dd { margin-bottom: 1.5625em; } /* line 114, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ dt { font-weight: bold; } /** * Removes list styling. * For semantic reasons, should only be used on unordered lists. */ /* line 122, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ .list-unstyled { margin-left: 0; list-style: none; } /** * Display lists on a single line. */ /* line 131, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ .list-inline { list-style: none; margin-left: -0.5em; margin-right: -0.5em; padding: 0; } /* line 138, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ .list-inline > li { display: inline; margin-left: 0.5em; margin-right: 0.5em; } /** * Heading styling for h1 through h6 elements. * Heading class lets you use one heading type for semantics, but style it as another heading type. */ /* line 150, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ h1, h2, h3, h4, h5, h6 { font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif; font-weight: bold; line-height: 1.2; margin: 0 0 1em; padding: 1em 0 0; word-wrap: break-word; } /* line 159, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ h1, .h1 { font-size: 1.5em; padding-top: .5em; } @media (min-width: 40em) { /* line 159, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ h1, .h1 { font-size: 1.75em; } } /* line 169, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ h2, .h2 { font-size: 1.3125em; } /* line 174, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ h3, .h3 { color: #0088cc; font-size: 1.1875em; padding-top: 0; } /* line 181, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ h4, h5, h6, .h4, .h5, .h6 { font-size: 1em; } /* line 186, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ h4, .h4 { text-transform: uppercase; } /** * Lines, Quotes and Emphasis */ /* line 196, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ hr { margin: 2em auto; border: 0; border-top: 1px solid #e5e5e5; border-bottom: 0 solid #ffffff; } /* line 203, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ b, strong { font-weight: bold; } /* line 208, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ i, em { font-style: italic; } /** * Address styling not present in IE 8/9/10/11, Safari, and Chrome. */ /* line 216, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ abbr[title] { border-bottom: 1px dotted; } /** * Address styling not present in Safari and Chrome. */ /* line 223, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ dfn { font-style: italic; } /** * Address styling not present in IE 8/9. */ /* line 230, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ mark { background: #ff0; } /** * Address inconsistent and variable font size in all browsers. */ /* line 237, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ small { font-size: 80%; } /** * Prevent `sub` and `sup` affecting `line-height` in all browsers. */ /* line 244, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } /* line 252, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ sup { top: -0.5em; } /* line 256, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ sub { bottom: -0.25em; } /** * Blockquotes */ /* line 265, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ blockquote { font-size: 1.1875em; font-style: italic; margin: 0 0 1.5625em; padding-left: 0.84211em; padding-right: 0.84211em; } /* line 272, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ blockquote cite { color: #808080; font-size: 0.84211em; padding-top: 1em; } /* line 279, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ blockquote, q { quotes: none; } /* line 284, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_typography.scss */ blockquote:before, blockquote:after, q:before, q:after { content: ''; } /** * @section Code * Styling for code and preformatted text. */ /* line 6, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_code.scss */ code, kbd, pre, samp { font-family: Menlo, Monaco, "Courier New", monospace; font-size: 0.875em; border-radius: 1px; } /* line 15, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_code.scss */ code { color: #dd1144; background-color: #f7f7f7; padding: 0.25em; } /* line 21, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_code.scss */ pre { display: block; background-color: #f4f4f4; line-height: 1.5; margin-bottom: 1.5625em; overflow: auto; padding: 0.8125em; -moz-tab-size: 4; -o-tab-size: 4; tab-size: 4; white-space: pre-wrap; word-break: break-all; } /* line 33, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_code.scss */ pre code { background-color: transparent; border: 0; color: inherit; font-size: 1em; padding: 0; } /** * @section Buttons * Styling for CSS buttons. */ /* line 6, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_buttons.scss */ .btn, #submit { background-color: #0088cc; background-image: -webkit-linear-gradient(top, #0088cc 0%, #005580 100%); background-image: linear-gradient(to bottom, #0088cc 0%, #005580 100%); border: 1px solid #005580; border-radius: 0.25em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 0.125em rgba(0, 0, 0, 0.05); display: inline-block; font-size: 0.9375em; font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif; font-weight: bold; line-height: 1.2; margin-right: 0.3125em; margin-bottom: 0.3125em; padding: 0.5em 0.6875em; } /* line 22, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_buttons.scss */ .btn, #submit, .btn:hover, #submit:hover, a .btn:hover, .link-plain:hover .btn:hover, .link-block-styled .btn:hover, a #submit:hover, .link-plain:hover #submit:hover, .link-block-styled #submit:hover, .btn:focus, #submit:focus, a .btn:focus, .link-plain:hover .btn:focus, .link-block-styled .btn:focus, a #submit:focus, .link-plain:hover #submit:focus, .link-block-styled #submit:focus, .btn:active, #submit:active, a .btn:active, .link-plain:hover .btn:active, .link-block-styled .btn:active, a #submit:active, .link-plain:hover #submit:active, .link-block-styled #submit:active, .btn.active, .active#submit { color: #ffffff; } /* line 33, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_buttons.scss */ .btn:hover, #submit:hover, a .btn:hover, .link-plain:hover .btn:hover, .link-block-styled .btn:hover, a #submit:hover, .link-plain:hover #submit:hover, .link-block-styled #submit:hover, .btn:focus, #submit:focus, a .btn:focus, .link-plain:hover .btn:focus, .link-block-styled .btn:focus, a #submit:focus, .link-plain:hover #submit:focus, .link-block-styled #submit:focus, .btn:active, #submit:active, a .btn:active, .link-plain:hover .btn:active, .link-block-styled .btn:active, a #submit:active, .link-plain:hover #submit:active, .link-block-styled #submit:active, .btn.active, .active#submit { background-color: #005580; background-image: none; border-color: #003a57; text-decoration: none; } /* line 62, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_buttons.scss */ .btn:active, #submit:active, .btn.active, .active#submit { box-shadow: inset 0 0.15625em 0.25em rgba(0, 0, 0, 0.15), 0 1px 0.15625em rgba(0, 0, 0, 0.05); outline: 0; } /* line 77, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_buttons.scss */ .btn-large { border-radius: 0.5em; font-size: 1em; line-height: normal; padding: 0.9375em 2em; } /* line 95, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_buttons.scss */ .btn, #submit, button, html input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; text-align: center; vertical-align: middle; /** * @workaround Override default button styling * @affected Webkit/Firefox */ -webkit-appearance: none; } /* line 112, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_buttons.scss */ .btn:last-child, #submit:last-child, input.btn, input#submit { margin-right: 0; } /** * @section Forms * Styling for form elements. */ /* line 6, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ form, fieldset { margin-bottom: 1.5625em; } /* line 11, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ fieldset { border: 0; padding: 0; } /* line 16, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ legend, label { display: block; font-weight: normal; margin: 0 0 0.3125em; padding: 0; } /** * 1. Correct color not being inherited. * Known issue: affects color of disabled elements. * 2. Correct font properties not being inherited. * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. */ /* line 30, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ button, input, optgroup, select, textarea { color: #555555; /* 1 */ font: inherit; /* 2 */ margin: 0; /* 3 */ padding: 0.3125em; } /** * Address `overflow` set to `hidden` in IE 8/9/10/11. */ /* line 44, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ button { overflow: visible; } /** * Address inconsistent `text-transform` inheritance for `button` and `select`. * All other form control elements do not inherit `text-transform` values. * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. * Correct `select` style inheritance in Firefox. */ /* line 54, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ button, select { text-transform: none; } /* line 59, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ input, textarea, select { border: 1px solid #b8b8b8; border-radius: 1px; display: block; line-height: 1.5; margin-bottom: 1.1875em; width: 100%; } @media (min-width: 40em) { /* line 59, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ input, textarea, select { line-height: 1.5625; } } /** * Don't inherit the `font-weight` (applied by a rule above). * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. */ /* line 78, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ optgroup { font-weight: bold; } /* line 82, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ form button, form .button { margin-bottom: 1.1875em; } /* line 87, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ textarea { height: 12em; overflow: auto; } /* line 92, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ input[type="image"], input[type="checkbox"], input[type="radio"] { cursor: pointer; display: inline-block; height: auto; margin-bottom: 0.3125em; padding: 0; width: auto; } /** * Fix the cursor style for Chrome's increment/decrement buttons. For certain * `font-size` values of the `input`, it causes the cursor style of the * decrement button to change from `default` to `text`. */ /* line 108, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { height: auto; } /* line 113, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ input:focus, textarea:focus { border-color: rgba(82, 168, 236, 0.8); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0.5em rgba(82, 168, 236, 0.6); outline: 0; outline: thin dotted \9; } /* line 121, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ input[type="file"]:focus, input[type="checkbox"]:focus, select:focus { outline: thin dotted; outline: 0.3125em auto -webkit-focus-ring-color; outline-offset: -0.125em; } /** * Inline inputs */ /* line 133, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ .input-inline, #submit { display: inline-block; vertical-align: middle; width: auto; } /** * Condensed inputs */ /* line 143, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ .input-condensed { padding: 1px 0.3125em; font-size: 0.9375em; } /** * Search */ /** * Remove inner padding and search cancel button in Safari and Chrome on OS X. * Safari (but not Chrome) clips the cancel button when the search input has * padding (and `textfield` appearance). */ /* line 158, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } /* line 163, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ .input-search { width: 85%; padding-left: 0.9375em; padding-right: 2.5em; border-radius: 1.3125em; -webkit-transition: width 300ms ease-in; transition: width 300ms ease-in; } @media (min-width: 40em) { /* line 163, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ .input-search { width: 65%; } } /* line 175, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ .btn-search { display: inline; color: #808080; border: none; background: none; margin-left: -2.5em; margin-bottom: 0; } /* line 184, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ .btn-search:hover { color: #5a5a5a; } /* line 188, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ .btn-search .icon { fill: #808080; } /* line 192, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_forms.scss */ .btn-search:hover .icon { fill: #5a5a5a; } /** * @section WordPress Forms * WordPress-specific form style overrides. */ /** * Styling for for WP subscribe to comment checkbox label */ /* line 10, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_wordpress-forms.scss */ #subscribe-label { display: inline; } /** * @section SVGs * SVG icon sprite styling. * @link http://css-tricks.com/svg-sprites-use-better-icon-fonts/ * @link http://css-tricks.com/svg-use-external-source/ */ /** * Hide icons by default to prevent blank spaces in unsupported browsers */ /* line 11, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .icon { display: inline-block; fill: currentColor; height: 0; width: 0; } /** * Display icons when browser supports SVG. * Inherit height, width, and color. */ /* line 22, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .svg .icon { height: 1em; width: 1em; } /* line 27, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .svg .icon-large { height: 2em; width: 2em; } /* line 32, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .svg .icon-xlarge { height: 3em; width: 3em; } /** * Colors */ /* line 41, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .icon-linkedin, .icon-facebook, .icon-google { background-color: #ffffff; border-radius: 0.125em; } /* line 45, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .icon-large.icon-linkedin, .icon-large.icon-facebook, .icon-large.icon-google { border-radius: 0.25em; } /* line 49, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .icon-xlarge.icon-linkedin, .icon-xlarge.icon-facebook, .icon-xlarge.icon-google { border-radius: 0.5em; } /* line 54, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .icon-linkedin { fill: #0073b2; } /* line 55, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .icon-facebook { fill: #3b5997; } /* line 56, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .icon-google { fill: #d64937; } /** * Landing page icons */ /* line 62, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .svg .icon-landing { border: 0.25em solid #808080; border-radius: 50%; height: 6em; padding: 1em; text-align: center; width: 6em; } /* line 71, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_svg.scss */ .svg .icon-landing .icon { fill: #808080; } /** * Hide fallback text if browser supports SVG */ /* Adds a border */ /* line 2, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_snapshot.scss */ .img-border, .img-photo { border: 1px solid #cccccc; } /* Adds padding and a white border */ /* line 7, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_snapshot.scss */ .img-photo { padding: 0.25em; background-color: #ffffff; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); } /** * @section WordPress Image Classes * Styling for the classes WordPress automatically applies to images. */ /** * Comment Avatar Styling * Class automatically applied to comment avatars. */ /* line 10, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_wordpress-images.scss */ .avatar { float: left; margin-right: 0.5em; /* Set $size to 2x desired size in comments.php * for crisp images on retina screens. */ height: 3.75em; width: 3.75em; } /** * Image alignment */ /* line 23, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_wordpress-images.scss */ .aligncenter, .alignleft, .alignright, .alignnone { display: block; text-align: center; margin-left: auto; margin-right: auto; } @media (min-width: 30em) { /* line 30, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_wordpress-images.scss */ .alignleft { float: left; margin-right: 0.5em; } } @media (min-width: 30em) { /* line 39, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_wordpress-images.scss */ .alignright { float: right; margin-left: 0.5em; } } @media (min-width: 30em) { /* line 48, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_wordpress-images.scss */ .alignnone { margin-left: 0; margin-right: 0; } } /** * Image Caption Styling */ /* line 60, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_wordpress-images.scss */ .wp-caption-text { font-size: 0.9375em; font-style: italic; color: #808080; padding-top: 0.5em; text-align: center; } /* Removes default browser settings * and evens out inconsistencies. */ /* line 3, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ table { border-collapse: collapse; border-spacing: 0; margin-bottom: 1.5625em; max-width: 100%; width: 100%; } /* line 11, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ th, td { text-align: left; padding: 0.5em; } /* line 17, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ th { background-color: #f2f2f2; font-weight: bold; vertical-align: bottom; } /* line 23, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ td { border-top: 1px solid #ededed; vertical-align: top; } /* line 28, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ tbody tr:nth-child(even) { background-color: #f7f7f7; } /** * Pure CSS responsive tables * Adds label to each cell using the [data-label] attribute * @link https://techblog.livingsocial.com/blog/2015/04/06/responsive-tables-in-pure-css/ */ @media (max-width: 40em) { /* line 43, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ .table-responsive { border: 0; } /* line 46, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ .table-responsive thead { display: none; visibility: hidden; } /* line 51, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ .table-responsive tr { border-top: 1px solid #ededed; display: block; padding: 0.5em; } /* line 56, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ .table-responsive tr:nth-child(even) { background-color: transparent; } /* line 60, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ .table-responsive tr:nth-child(odd) { background-color: #f7f7f7; } /* line 65, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ .table-responsive td { border: 0; display: block; padding: 0.25em; } /* line 71, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tables.scss */ .table-responsive td:before { content: attr(data-label); display: block; font-weight: bold; } } /** * Hide tab navigation by default */ /* line 4, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tabby.scss */ .tabs { display: none; visibility: hidden; } /** * Display tab navigation if javascript enabled. * This requires on the included js-accessibility.js-tabby script. */ /* line 13, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tabby.scss */ .js-tabby .tabs { display: block; visibility: visible; } /** * Force browser to show a pointer on tab navigation. */ /* line 21, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tabby.scss */ .tabs a, .tabs .link-plain:hover, .tabs .link-block-styled, .tabs button { cursor: pointer; } /** * Active link styling */ /* line 29, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tabby.scss */ .tabs a.active, .tabs .active.link-plain:hover, .tabs .active.link-block-styled { color: #272727; cursor: not-allowed; pointer-events: none; } /** * Hide tab content if javascript is enabled. */ /* line 38, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tabby.scss */ .js-tabby .tabs-pane { display: none; visibility: hidden; } /** * Show tab content when JS file downloads. */ /* line 46, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_tabby.scss */ .tabs-pane.active { display: block; visibility: visible; } /** * Clearfix */ /** * Center all navigation elements */ /* line 4, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .nav-wrap-navbar { text-align: center; text-shadow: none; } /** * For text-based logo, override default link styling. */ /* line 12, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .logo-navbar { color: #272727; display: inline-block; font-size: 1.2em; font-weight: bold; line-height: 1.2; margin-bottom: 0.5em; text-decoration: none; } /* line 22, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .logo-navbar:hover { color: #272727; text-decoration: none; } /** * Remove default list styling for navigation list */ /* line 31, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .nav-navbar { font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif; list-style: none; margin: 0 -0.5em; margin-bottom: 0.5em; padding: 0; } /* line 38, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .svg .nav-navbar .icon { height: 1.2em; width: 1.2em; } /** * Display navigation items as inline-block elements. * Add slight margin between each navigation item. */ /* line 48, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .nav-navbar > li { display: inline-block; float: none; margin-left: 0.5em; margin-right: 0.5em; } /* line 54, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .nav-navbar > li:nth-last-child(-n+3) { vertical-align: middle; } /** * Active link styling */ /* line 62, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .nav-navbar > li.current-menu-item > a, .nav-navbar > li.current-menu-item > .link-plain:hover, .nav-navbar > li.current-menu-item > .link-block-styled, .nav-navbar > li.current_page_parent > a, .nav-navbar > li.current_page_parent > .link-plain:hover, .nav-navbar > li.current_page_parent > .link-block-styled, .nav-navbar > li.current-page-ancestor > a, .nav-navbar > li.current-page-ancestor > .link-plain:hover, .nav-navbar > li.current-page-ancestor > .link-block-styled { color: #808080; } /** * Hide the navigation toggle menu button by default. * Only needed for expand-and-collapse option. * */ /* line 72, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .nav-toggle-navbar { display: none; font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif; visibility: hidden; } /** * Expand-and-Collapse styling for smaller screens. * .js-astro prefix ensure content is only hidden when JavaScript is supported. */ @media (max-width: 60em) { /** * Align text to the left when javascript is supported */ /* line 87, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-wrap-navbar.nav-collapse { text-align: left; } /** * Float logo to the left and remove margin-bottom */ /* line 94, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-collapse .logo-navbar { float: left; } /** * Display navigation toggle button if javascript is supported */ /* line 101, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-collapse .nav-toggle-navbar { display: block; visibility: visible; float: right; } /** * Hide navigation items if javascript is supported. * Show with `.active` class. */ /* line 111, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-collapse .nav-menu-navbar { box-sizing: border-box; clear: left; display: none; width: 100%; } /* line 117, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-collapse .nav-menu-navbar.active { display: block; } /* line 122, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-collapse .nav-navbar { text-align: left; } /** * Active link styling */ /* line 129, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-navbar > li.current-menu-item > a, .js-astro .nav-navbar > li.current-menu-item > .link-plain:hover, .js-astro .nav-navbar > li.current-menu-item > .link-block-styled, .js-astro .nav-navbar > li.current_page_parent > a, .js-astro .nav-navbar > li.current_page_parent > .link-plain:hover, .js-astro .nav-navbar > li.current_page_parent > .link-block-styled, .js-astro .nav-navbar > li.current-page-ancestor > a, .js-astro .nav-navbar > li.current-page-ancestor > .link-plain:hover, .js-astro .nav-navbar > li.current-page-ancestor > .link-block-styled { background-color: #0088cc; color: #ffffff; } /** * Display navigation items as full-width, stacked blocks when javascript supported */ /* line 139, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-collapse .nav-menu-navbar li { box-sizing: border-box; border-top: 1px solid #0088cc; display: block; width: 100%; } /* line 145, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-collapse .nav-menu-navbar li:nth-last-child(4) { border-bottom: 1px solid #0088cc; } /* line 149, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-collapse .nav-menu-navbar li:nth-last-child(-n+3) { border-top: 0; display: inline-block; margin-left: 0; margin-right: 0; width: auto; } /* line 157, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-collapse .nav-menu-navbar li:nth-last-child(3) { margin-left: 0.5em; } /* line 162, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-collapse .nav-menu-navbar a, .js-astro .nav-collapse .nav-menu-navbar .link-plain:hover, .js-astro .nav-collapse .nav-menu-navbar .link-block-styled { display: block; padding: 0.25em 0.5em; } /* line 168, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .js-astro .nav-collapse .nav-menu-navbar a:hover, .js-astro .nav-collapse .nav-menu-navbar .link-plain:hover, .js-astro .nav-collapse .nav-menu-navbar .link-block-styled:hover, .js-astro .nav-collapse .nav-menu-navbar .link-block:hover .link-block-styled, .link-block:hover .js-astro .nav-collapse .nav-menu-navbar .link-block-styled { background-color: #0088cc; color: #ffffff; text-decoration: none; } } /** * Styling for bigger screens. */ @media (min-width: 60em) { /** * Align text to the left */ /* line 186, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .nav-wrap-navbar { text-align: left; } /** * Float logo to the left */ /* line 193, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .logo-navbar { float: left; } /** * Align navigation elements to the right */ /* line 200, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .nav-navbar { text-align: right; margin-bottom: 0; } } /** * Clearfix */ /* line 210, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .nav-wrap-navbar:before, .nav-wrap-navbar:after { display: table; content: ""; } /* line 216, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_astro-navbar.scss */ .nav-wrap-navbar:after { clear: both; } /** * @section Backgrounds * Background styling. */ /* line 7, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_bg.scss */ .bg-muted { background-color: #e5e5e5; } /* line 11, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_bg.scss */ .bg-primary { background-color: #0088cc; color: #ffffff; } /* line 16, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_bg.scss */ .bg-secondary { background-color: #dfeff7; } /** * @section Background Hero * Background hero styling. */ /* line 6, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_bg-hero.scss */ .bg-hero { background-image: url("../img/hero-medium.jpg"); background-position: bottom center; background-size: cover; text-shadow: 1px 1px 1px #272727; } @media (min-width: 60em), (min-device-pixel-ratio: 2), (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { /* line 6, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_bg-hero.scss */ .bg-hero { background-image: url("../img/hero-large.jpg"); } } @media (min-width: 80em), (min-width: 60em) and (min-device-pixel-ratio: 2), (min-width: 60em) and (-webkit-min-device-pixel-ratio: 2), (min-width: 60em) and (min-resolution: 192dpi) { /* line 6, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_bg-hero.scss */ .bg-hero { background-image: url("../img/hero-xlarge.jpg"); } } /** * @section Overrides * Nudge and tweak alignment, spacing, and visibility. */ /** * Borders */ /* line 11, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .border-top { border-top: 1px solid #808080; } /* line 15, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .border-bottom { border-bottom: 1px solid #808080; } /** * Text sizes */ /* line 24, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .text-small { font-size: 0.9375em; } /* line 28, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .text-medium { font-size: 1em; line-height: 1.4; } @media (min-width: 40em) { /* line 28, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .text-medium { font-size: 1.1875em; } } /* line 37, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .text-large { font-size: 1.1875em; line-height: 1.4; } @media (min-width: 40em) { /* line 37, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .text-large { font-size: 1.3125em; } } /* line 46, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .text-hero { font-size: 1.5em; line-height: 1.2; } @media (min-width: 40em) { /* line 46, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .text-hero { font-size: 2em; } } /** * Text colors */ /* line 60, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .text-muted { color: #808080; } /** * Text Typefaces */ /* line 69, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .font-secondary { font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif; } /** * Text alignment */ /* line 78, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .text-center { text-align: center; } /* line 82, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .text-right { text-align: right; } /* line 86, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .text-left { text-align: left; } /** * Floats */ /* line 101, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .float-left { float: left; } /* line 105, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .float-center, .svg .icon-landing { float: none; margin-left: auto; margin-right: auto; } /* line 111, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .float-right { float: right; } /** * Margins */ /* line 120, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .no-margin { margin: 0; } /* line 124, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .no-margin-top { margin-top: 0; } /* line 128, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .no-margin-bottom { margin-bottom: 0; } /* line 132, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .margin-top { margin-top: 1.5625em; } /* line 136, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .margin-bottom { margin-bottom: 1.5625em; } /* line 140, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .margin-bottom-small { margin-bottom: 0.5em; } /* line 144, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .margin-bottom-large { margin-bottom: 2em; } /** * Padding */ /* line 153, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .no-padding { padding: 0; } /* line 157, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .no-padding-top { padding-top: 0; } /* line 161, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .no-padding-bottom { padding-bottom: 0; } /* line 165, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .padding-top { padding-top: 1.5625em; } /* line 169, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .padding-top-small { padding-top: 0.5em; } /* line 173, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .padding-top-large { padding-top: 2em; } /* line 181, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .padding-bottom { padding-bottom: 1.5625em; } /* line 185, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .padding-bottom-small { padding-bottom: 0.5em; } /* line 189, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .padding-bottom-large { padding-bottom: 2em; } /** * Visibility */ /** * Visually hide an element, but leave it available for screen readers * @link https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css * @link http://snook.ca/archives/html_and_css/hiding-content-for-accessibility */ /* line 207, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .screen-reader, .svg .icon-fallback-text { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; } /** * Extends the .screen-reader class to allow the element to be focusable when navigated to via the keyboard * @link https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css * @link https://www.drupal.org/node/897638 */ /* line 224, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .screen-reader-focusable:active, .screen-reader-focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; white-space: normal; width: auto; } /** * @workaround * @affected IE 8/9/10 * @link http://juicystudio.com/article/screen-readers-display-none.php */ /* line 240, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ [hidden], template, .tarpit { display: none; visibility: hidden; } /** * Contain floats * The space content is one way to avoid an Opera bug when the `contenteditable` attribute is included anywhere else in the document. * @link https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css */ /* line 252, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .clearfix:before, .container:before, .row:before, .tabs:before, .clearfix:after, .container:after, .row:after, .tabs:after { display: table; content: " "; } /* line 258, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_overrides.scss */ .clearfix:after, .container:after, .row:after, .tabs:after { clear: both; } /** * @section Print * Styling for printed content. Adapted from HTML5BP. * @link http://html5boilerplate.com */ @media print { /** * Universal selector. * Reset all content to transparent background, black color, and remove box and text shadows. */ /* line 13, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_print.scss */ * { background: transparent !important; color: #000 !important; box-shadow: none !important; text-shadow: none !important; } /** * Specifies page margin */ @page { margin: 0.5cm; } /** * Underline all links */ /* line 30, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_print.scss */ a, .link-plain:hover, .link-block-styled, a:visited, .link-plain:visited:hover, .link-block-styled:visited { text-decoration: underline; } /** * Show URL after links */ /* line 38, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_print.scss */ a[href]:after, [href].link-plain:hover:after, [href].link-block-styled:after { content: " (" attr(href) ")"; } /** * Don't show URL for internal links */ /* line 45, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_print.scss */ a[href^="#"]:after, [href^="#"].link-plain:hover:after, [href^="#"].link-block-styled:after { content: ""; } /** * Specifies the minimum number of lines to print at the top and bottom of a page. */ /* line 52, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_print.scss */ p, h1, h2, h3 { orphans: 3; widows: 3; } /** * Avoid inserting a page break after headers */ /* line 61, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_print.scss */ h1, h2, h3 { page-break-after: avoid; } /** * Change border color on blockquotes and preformatted text. * Avoid page breaks inside the content */ /* line 69, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_print.scss */ pre, blockquote { border-color: #999; page-break-inside: avoid; } /** * Displayed as a table header row group */ /* line 78, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_print.scss */ thead { display: table-header-group; } /** * Avoid inserting a page break inside table rows and images */ /* line 85, /Users/cferdinandi/Sites/forte-accounting/wordpress/wp-content/themes/forte-accounting/src/sass/components/_print.scss */ tr, img { page-break-inside: avoid; } }
{ "content_hash": "6804c10815f8b402c7587d0cb10cfcbc", "timestamp": "", "source": "github", "line_count": 1976, "max_line_length": 337, "avg_line_length": 31.86234817813765, "alnum_prop": 0.7226175349428209, "repo_name": "cferdinandi/forte-accounting", "id": "520279aad98b200ad5c26493b8176c2a9b3dcc3f", "size": "62960", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "dist/css/main.css", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "35133" }, { "name": "HTML", "bytes": "52" }, { "name": "JavaScript", "bytes": "42781" }, { "name": "PHP", "bytes": "65819" } ], "symlink_target": "" }
/* $OpenBSD: log.c,v 1.42 2011/06/17 21:44:30 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * All rights reserved * * As far as I am concerned, the code I have written for this software * can be used freely for any purpose. Any derived versions of this * software must be clearly marked as such, and if the derived work is * incompatible with the protocol description in the RFC file, it must be * called by a name other than "ssh" or "Secure Shell". */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. 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. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 "includes.h" #include <sys/types.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <syslog.h> #include <unistd.h> #include <errno.h> #if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) # include <vis.h> #endif #include "xmalloc.h" #include "log.h" static LogLevel log_level = SYSLOG_LEVEL_INFO; static int log_on_stderr = 1; static int log_facility = LOG_AUTH; static char *argv0; static log_handler_fn *log_handler; static void *log_handler_ctx; extern char *__progname; #define LOG_SYSLOG_VIS (VIS_CSTYLE|VIS_NL|VIS_TAB|VIS_OCTAL) #define LOG_STDERR_VIS (VIS_SAFE|VIS_OCTAL) /* textual representation of log-facilities/levels */ static struct { const char *name; SyslogFacility val; } log_facilities[] = { { "DAEMON", SYSLOG_FACILITY_DAEMON }, { "USER", SYSLOG_FACILITY_USER }, { "AUTH", SYSLOG_FACILITY_AUTH }, #ifdef LOG_AUTHPRIV { "AUTHPRIV", SYSLOG_FACILITY_AUTHPRIV }, #endif { "LOCAL0", SYSLOG_FACILITY_LOCAL0 }, { "LOCAL1", SYSLOG_FACILITY_LOCAL1 }, { "LOCAL2", SYSLOG_FACILITY_LOCAL2 }, { "LOCAL3", SYSLOG_FACILITY_LOCAL3 }, { "LOCAL4", SYSLOG_FACILITY_LOCAL4 }, { "LOCAL5", SYSLOG_FACILITY_LOCAL5 }, { "LOCAL6", SYSLOG_FACILITY_LOCAL6 }, { "LOCAL7", SYSLOG_FACILITY_LOCAL7 }, { NULL, SYSLOG_FACILITY_NOT_SET } }; static struct { const char *name; LogLevel val; } log_levels[] = { { "QUIET", SYSLOG_LEVEL_QUIET }, { "FATAL", SYSLOG_LEVEL_FATAL }, { "ERROR", SYSLOG_LEVEL_ERROR }, { "INFO", SYSLOG_LEVEL_INFO }, { "VERBOSE", SYSLOG_LEVEL_VERBOSE }, { "DEBUG", SYSLOG_LEVEL_DEBUG1 }, { "DEBUG1", SYSLOG_LEVEL_DEBUG1 }, { "DEBUG2", SYSLOG_LEVEL_DEBUG2 }, { "DEBUG3", SYSLOG_LEVEL_DEBUG3 }, { NULL, SYSLOG_LEVEL_NOT_SET } }; SyslogFacility log_facility_number(char *name) { int i; if (name != NULL) for (i = 0; log_facilities[i].name; i++) if (strcasecmp(log_facilities[i].name, name) == 0) return log_facilities[i].val; return SYSLOG_FACILITY_NOT_SET; } const char * log_facility_name(SyslogFacility facility) { u_int i; for (i = 0; log_facilities[i].name; i++) if (log_facilities[i].val == facility) return log_facilities[i].name; return NULL; } LogLevel log_level_number(char *name) { int i; if (name != NULL) for (i = 0; log_levels[i].name; i++) if (strcasecmp(log_levels[i].name, name) == 0) return log_levels[i].val; return SYSLOG_LEVEL_NOT_SET; } const char * log_level_name(LogLevel level) { u_int i; for (i = 0; log_levels[i].name != NULL; i++) if (log_levels[i].val == level) return log_levels[i].name; return NULL; } /* Error messages that should be logged. */ void error(const char *fmt,...) { va_list args; va_start(args, fmt); do_log(SYSLOG_LEVEL_ERROR, fmt, args); va_end(args); } void sigdie(const char *fmt,...) { #ifdef DO_LOG_SAFE_IN_SIGHAND va_list args; va_start(args, fmt); do_log(SYSLOG_LEVEL_FATAL, fmt, args); va_end(args); #endif _exit(1); } /* Log this message (information that usually should go to the log). */ void logit(const char *fmt,...) { va_list args; va_start(args, fmt); do_log(SYSLOG_LEVEL_INFO, fmt, args); va_end(args); } /* More detailed messages (information that does not need to go to the log). */ void verbose(const char *fmt,...) { va_list args; va_start(args, fmt); do_log(SYSLOG_LEVEL_VERBOSE, fmt, args); va_end(args); } /* Debugging messages that should not be logged during normal operation. */ void debug(const char *fmt,...) { va_list args; va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG1, fmt, args); va_end(args); } void debug2(const char *fmt,...) { va_list args; va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG2, fmt, args); va_end(args); } void debug3(const char *fmt,...) { va_list args; va_start(args, fmt); do_log(SYSLOG_LEVEL_DEBUG3, fmt, args); va_end(args); } /* * Initialize the log. */ void log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr) { #if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) struct syslog_data sdata = SYSLOG_DATA_INIT; #endif argv0 = av0; switch (level) { case SYSLOG_LEVEL_QUIET: case SYSLOG_LEVEL_FATAL: case SYSLOG_LEVEL_ERROR: case SYSLOG_LEVEL_INFO: case SYSLOG_LEVEL_VERBOSE: case SYSLOG_LEVEL_DEBUG1: case SYSLOG_LEVEL_DEBUG2: case SYSLOG_LEVEL_DEBUG3: log_level = level; break; default: fprintf(stderr, "Unrecognized internal syslog level code %d\n", (int) level); exit(1); } log_handler = NULL; log_handler_ctx = NULL; log_on_stderr = on_stderr; if (on_stderr) return; switch (facility) { case SYSLOG_FACILITY_DAEMON: log_facility = LOG_DAEMON; break; case SYSLOG_FACILITY_USER: log_facility = LOG_USER; break; case SYSLOG_FACILITY_AUTH: log_facility = LOG_AUTH; break; #ifdef LOG_AUTHPRIV case SYSLOG_FACILITY_AUTHPRIV: log_facility = LOG_AUTHPRIV; break; #endif case SYSLOG_FACILITY_LOCAL0: log_facility = LOG_LOCAL0; break; case SYSLOG_FACILITY_LOCAL1: log_facility = LOG_LOCAL1; break; case SYSLOG_FACILITY_LOCAL2: log_facility = LOG_LOCAL2; break; case SYSLOG_FACILITY_LOCAL3: log_facility = LOG_LOCAL3; break; case SYSLOG_FACILITY_LOCAL4: log_facility = LOG_LOCAL4; break; case SYSLOG_FACILITY_LOCAL5: log_facility = LOG_LOCAL5; break; case SYSLOG_FACILITY_LOCAL6: log_facility = LOG_LOCAL6; break; case SYSLOG_FACILITY_LOCAL7: log_facility = LOG_LOCAL7; break; default: fprintf(stderr, "Unrecognized internal syslog facility code %d\n", (int) facility); exit(1); } /* * If an external library (eg libwrap) attempts to use syslog * immediately after reexec, syslog may be pointing to the wrong * facility, so we force an open/close of syslog here. */ #if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) openlog_r(argv0 ? argv0 : __progname, LOG_PID, log_facility, &sdata); closelog_r(&sdata); #else openlog(argv0 ? argv0 : __progname, LOG_PID, log_facility); closelog(); #endif } #define MSGBUFSIZ 1024 void set_log_handler(log_handler_fn *handler, void *ctx) { log_handler = handler; log_handler_ctx = ctx; } void do_log2(LogLevel level, const char *fmt,...) { va_list args; va_start(args, fmt); do_log(level, fmt, args); va_end(args); } void do_log(LogLevel level, const char *fmt, va_list args) { #if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) struct syslog_data sdata = SYSLOG_DATA_INIT; #endif char msgbuf[MSGBUFSIZ]; char fmtbuf[MSGBUFSIZ]; char *txt = NULL; int pri = LOG_INFO; int saved_errno = errno; log_handler_fn *tmp_handler; if (level > log_level) return; switch (level) { case SYSLOG_LEVEL_FATAL: if (!log_on_stderr) txt = "fatal"; pri = LOG_CRIT; break; case SYSLOG_LEVEL_ERROR: if (!log_on_stderr) txt = "error"; pri = LOG_ERR; break; case SYSLOG_LEVEL_INFO: pri = LOG_INFO; break; case SYSLOG_LEVEL_VERBOSE: pri = LOG_INFO; break; case SYSLOG_LEVEL_DEBUG1: txt = "debug1"; pri = LOG_DEBUG; break; case SYSLOG_LEVEL_DEBUG2: txt = "debug2"; pri = LOG_DEBUG; break; case SYSLOG_LEVEL_DEBUG3: txt = "debug3"; pri = LOG_DEBUG; break; default: txt = "internal error"; pri = LOG_ERR; break; } if (txt != NULL && log_handler == NULL) { snprintf(fmtbuf, sizeof(fmtbuf), "%s: %s", txt, fmt); vsnprintf(msgbuf, sizeof(msgbuf), fmtbuf, args); } else { vsnprintf(msgbuf, sizeof(msgbuf), fmt, args); } strnvis(fmtbuf, msgbuf, sizeof(fmtbuf), log_on_stderr ? LOG_STDERR_VIS : LOG_SYSLOG_VIS); if (log_handler != NULL) { /* Avoid recursion */ tmp_handler = log_handler; log_handler = NULL; tmp_handler(level, fmtbuf, log_handler_ctx); log_handler = tmp_handler; } else if (log_on_stderr) { snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf); write(STDERR_FILENO, msgbuf, strlen(msgbuf)); } else { #if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) openlog_r(argv0 ? argv0 : __progname, LOG_PID, log_facility, &sdata); syslog_r(pri, &sdata, "%.500s", fmtbuf); closelog_r(&sdata); #else openlog(argv0 ? argv0 : __progname, LOG_PID, log_facility); syslog(pri, "%.500s", fmtbuf); closelog(); #endif } errno = saved_errno; }
{ "content_hash": "319c883bd4089f7e3643248e57c9af6e", "timestamp": "", "source": "github", "line_count": 430, "max_line_length": 79, "avg_line_length": 23.25813953488372, "alnum_prop": 0.6836316368363163, "repo_name": "indashnet/InDashNet.Open.UN2000", "id": "ad5a10b4785ded01d74d9354ec26e92fd6a3a073", "size": "10001", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "android/external/openssh/log.c", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace LandsSystem.Controllers { public class HomeController : Controller { public ActionResult Index() { return View(); } public ActionResult About() { ViewBag.Message = "Your application description page."; return View(); } public ActionResult Contact() { ViewBag.Message = "Your contact page."; return View(); } } }
{ "content_hash": "b9d8214d1cb744527e2a24deb4f98b1f", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 67, "avg_line_length": 19.266666666666666, "alnum_prop": 0.5640138408304498, "repo_name": "Filirien/Soft-Tech-Course-Project", "id": "2a5ef673dfa747f008657c4391042652cbdb08f5", "size": "580", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "LandsSystem/LandsSystem/Controllers/HomeController.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "102" }, { "name": "C#", "bytes": "194357" }, { "name": "CSS", "bytes": "260" }, { "name": "JavaScript", "bytes": "10318" } ], "symlink_target": "" }
if [ -z "${1}" ]; then echo "usage: ${0} NAME" exit 1 fi # The name of the environment to clean up. NAME="${1}" # Marking this as a dry run results in an actions that *would* occur # simply being echoed to stdout. if [ "${VSPHERE_DESTROY_FORCE}" = "dryrun" ]; then DRYRUN=true fi ################################################################################ ## DNS Resources ## ################################################################################ URI_ROOT=http://147.75.69.23:2379/v2/keys/skydns URI_PREFIX="${URI_ROOT}/local/vsphere/${NAME}/${NAME}" URI_PREFIX_MASTER="${URI_PREFIX}-master" URI_PREFIX_WORKER="${URI_PREFIX}-worker" COUNT_MASTER=${COUNT_MASTER:-3} COUNT_WORKER=${COUNT_WORKER:-1} delete_dns_entries() { for i in $(seq 1 "${2}"); do if curl -sSLI "${1}-${i}" | grep '200 OK' >/dev/null 2>&1; then if [ "${DRYRUN}" = "true" ]; then echo curl -XDELETE "${1}-${i}" else echo " - ${NAME}-master-${i}.${NAME}.vsphere.local" curl -XDELETE "${1}-${i}" fi fi done } # Delete the DNS entries for the master nodes. echo '# deleting DNS entries for master node(s)' delete_dns_entries "${URI_PREFIX_MASTER}" "${COUNT_MASTER}" # Delete the DNS entries for the worker nodes. echo echo '# deleting DNS entries for worker node(s)' delete_dns_entries "${URI_PREFIX_WORKER}" "${COUNT_WORKER}" ################################################################################ ## AWS Load Balancer Resources ## ################################################################################ # Make sure the AWS environment variables are set. export AWS_ACCESS_KEY_ID=${VSPHERE_AWS_ACCESS_KEY_ID} export AWS_SECRET_ACCESS_KEY=${VSPHERE_AWS_SECRET_ACCESS_KEY} export AWS_DEFAULT_REGION=${VSPHERE_AWS_REGION} # Parses the ARNs of resources as a result of describing the tags for # one or more ARNs. get_arns_from_tag_descriptions() { if [ -z "$*" ]; then return; fi aws elbv2 describe-tags --resource-arns "$@" | \ jq ".TagDescriptions | \ map(select(any(.Tags[]; .Key == \"Environment\" and \ .Value == \"${NAME}\" )))" | \ jq ".[] | .ResourceArn" | \ tr -d '"' } # Get the AWS load balancers. get_lb_arns() { # shellcheck disable=SC2046 get_arns_from_tag_descriptions \ $(aws elbv2 describe-load-balancers | jq ".LoadBalancers | \ map(select(any(.;.LoadBalancerName | \ startswith(\"xapi\")))) | \ .[] | \ .LoadBalancerArn" | tr -d '"') } # Get the AWS load balancer target groups. get_lb_target_group_arns() { # shellcheck disable=SC2046 get_arns_from_tag_descriptions \ $(aws elbv2 describe-target-groups | jq ".TargetGroups | \ map(select(any(.;.TargetGroupName | \ startswith(\"xapi\")))) | \ .[] | \ .TargetGroupArn" | tr -d '"') } # Get the allocation IDs for the AWS elastic IPs, get_elastic_ip_allocation_ids() { aws ec2 describe-addresses | \ jq ".Addresses | \ map(select(any(.Tags[]; .Key == \"Environment\" and \ .Value == \"${NAME}\" )))" | \ jq ".[] | .AllocationId" | \ tr -d '"' } # Get the load balancer ARNs. echo echo '# deleting AWS load balancer(s)' if arns=$(get_lb_arns) && [ -n "${arns}" ]; then # Delete the load balancers. for arn in ${arns}; do if [ "${DRYRUN}" = "true" ]; then echo aws elbv2 delete-load-balancer --load-balancer-arn "${arn}" else echo " - ${arn}" aws elbv2 delete-load-balancer --load-balancer-arn "${arn}" fi done # Wait until the load balancers are deleted. echo echo '# waiting for deletion of AWS load balancer(s)' if [ "${DRYRUN}" = "true" ]; then # shellcheck disable=SC2086 echo aws elbv2 wait load-balancers-deleted --load-balancer-arns ${arns} else # shellcheck disable=SC2086 aws elbv2 wait load-balancers-deleted --load-balancer-arns ${arns} fi fi # Delete the target groups. echo echo '# deleting AWS load balancer target group(s)' if arns=$(get_lb_target_group_arns) && [ -n "${arns}" ]; then for arn in ${arns}; do if [ "${DRYRUN}" = "true" ]; then echo aws elbv2 delete-target-group --target-group-arn "${arn}" else echo " - ${arn}" aws elbv2 delete-target-group --target-group-arn "${arn}" fi done fi # Release the elastic IPs. echo echo '# deleting AWS elastic IP address(es)' if ids=$(get_elastic_ip_allocation_ids) && [ -n "${ids}" ]; then for id in ${ids}; do if [ "${DRYRUN}" = "true" ]; then echo aws ec2 release-address --allocation-id "${id}" else printf " - ${id}" # It can take a while for AWS to allow the release of the address, # even if the wait command is used above to ensure the load-balancer # is deleted prior to this call. Try 30 times, with a sleep after # each failed attempt to wait 3 second between attempts. for i in $(seq 1 100); do if ! aws ec2 release-address --allocation-id "${id}" 2> /dev/null; then sleep 3 printf " ..." else break fi done echo fi done fi ################################################################################ ## vSphere Resources ## ################################################################################ # Define the information used to access the vSphere server. export GOVC_USERNAME=${GOVC_USERNAME:-${VSPHERE_USER}} export GOVC_PASSWORD=${GOVC_PASSWORD:-${VSPHERE_PASSWORD}} export GOVC_URL=${GOVC_URL:-${VSPHERE_SERVER}} export GOVC_DEBUG=${GOVC_DEBUG:-false} # Define the parent datacenter to limit the scope of the govc commands. export GOVC_DATACENTER=${GOVC_DATACENTER:-SDDC-Datacenter} # Define the parent folder to limit scope of the govc command. GOVC_ROOT_FOLDER=${GOVC_ROOT_FOLDER:-"/${GOVC_DATACENTER}/vm/Workloads/CNCF Cross-Cloud"} # Define the folder that contains the VMs. GOVC_VM_FOLDER=${GOVC_VM_FOLDER:-"${GOVC_ROOT_FOLDER}/${NAME}"} # Define the parent resource pool to limit scope of the govc command. GOVC_ROOT_RESOURCE_POOL=${GOVC_ROOT_RESOURCE_POOL:-"/${GOVC_DATACENTER}/host/Cluster-1/Resources/Compute-ResourcePool/CNCF Cross-Cloud"} # Define the parent resource pool to limit scope of the govc command # when querying resource pools that match a name. export GOVC_RESOURCE_POOL=${GOVC_RESOURCE_POOL:-${GOVC_ROOT_RESOURCE_POOL}} # Define the resource pool that contains the VMs. GOVC_VM_RESOURCE_POOL=${GOVC_VM_RESOURCE_POOL:-${GOVC_ROOT_RESOURCE_POOL}/${NAME}} # Destroy the VMs. echo echo '# deleting vSphere VM(s)' if vms=$(govc ls "${GOVC_VM_FOLDER}") && [ -n "${vms}" ]; then IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}" && \ for vm in ${vms}; do if [ "${DRYRUN}" = "true" ]; then echo govc vm.destroy "'${vm}'" else echo " - ${vm}" govc vm.destroy "${vm}" fi done fi # Destroy the folder. echo echo '# deleting vSphere folder(s)' if govc object.collect "${GOVC_VM_FOLDER}" >/dev/null 2>&1; then if [ "${DRYRUN}" = "true" ]; then echo govc object.destroy "'${GOVC_VM_FOLDER}'" else echo " - ${GOVC_VM_FOLDER}" STDOUT=$(govc object.destroy "${GOVC_VM_FOLDER}" 2>&1) echo "${STDOUT}" | grep '... OK$' >/dev/null 2>&1; MATCH_1=$? echo "${STDOUT}" | grep 'not found$' >/dev/null 2>&1; MATCH_2=$? if [ "${MATCH_1}" -ne "0" ] && [ "${MATCH_2}" -ne "0" ]; then echo "${STDOUT}" fi fi fi # Destroy the resource pool. echo echo '# deleting vSphere resource pool(s)' if govc object.collect "${GOVC_VM_RESOURCE_POOL}" >/dev/null 2>&1; then if [ "${DRYRUN}" = "true" ]; then echo govc pool.destroy "'${GOVC_VM_RESOURCE_POOL}'" else echo " - ${GOVC_VM_RESOURCE_POOL}" govc pool.destroy "${GOVC_VM_RESOURCE_POOL}" fi fi # If the environment variable VSPHERE_TFSTATE_PATH is set then # check to see if it is a valid file path, and if so, treat it # as the Terraform file/directory to be removed. echo echo '# deleting Terraform state' if [ -e "${VSPHERE_TFSTATE_PATH}" ]; then if [ "${DRYRUN}" = "true" ]; then echo rm -fr "${VSPHERE_TFSTATE_PATH}" else echo " - ${VSPHERE_TFSTATE_PATH}" rm -fr "${VSPHERE_TFSTATE_PATH}" fi fi
{ "content_hash": "83537e1596596fcf45fabc04bf67e99d", "timestamp": "", "source": "github", "line_count": 255, "max_line_length": 136, "avg_line_length": 32.50588235294118, "alnum_prop": 0.5807696947762094, "repo_name": "cncf/cross-cloud", "id": "928561723ad2d00cbc24dfac18dd0e60c99901a5", "size": "9258", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "vsphere/destroy-force.sh", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "HCL", "bytes": "149987" }, { "name": "Shell", "bytes": "20960" } ], "symlink_target": "" }
'use strict'; var assert = require('assertive'); var testServer = require('./test-server'); describe('Gofer.defaults', function() { var myApi = testServer.api().client; it('global defaults can be overridden per service', function() { var instance = new myApi.constructor({ globalDefaults: { a: 'global a', b: 'global b', }, myApi: { a: 'specific a', c: 'specific c', }, }); assert.equal('service specific settings win', instance.defaults.a, 'specific a'); assert.equal('global defaults apply when no specific value is available', instance.defaults.b, 'global b'); assert.equal('when no global value exists, the specific value is taken', instance.defaults.c, 'specific c'); }); it('can create a copy with overrides', function() { var copy = myApi.with({ qs: { x: 'foo' }, appName: 'newApp' }); assert.equal('Overrides original config in copy', copy.defaults.appName, 'newApp'); assert.equal('Does not affect original instance', myApi.defaults.appName, 'myApp'); assert.equal('Adds additional settings', copy.defaults.qs.x, 'foo'); }); describe('endpointDefaults', function() { var overrides = { endpointDefaults: { zapp: { headers: { 'X-Zapp-Only': 'special' } }, }, }; it('apply to calls to the endpoint', function() { return myApi.with(overrides).zapp().json().then(function(reqMirror) { assert.equal('special', reqMirror.headers['x-zapp-only']); }); }); it('is ignored for other endpoints', function() { return myApi.with(overrides).query().json().then(function(reqMirror) { assert.equal(undefined, reqMirror.headers['x-zapp-only']); }); }); }); });
{ "content_hash": "e043c8677b123b9d98f119ec7cbd58e7", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 77, "avg_line_length": 30.28813559322034, "alnum_prop": 0.6099608282036934, "repo_name": "jkrems/srv-gofer", "id": "5060bd3850c432c27910c638b86dfce2cfefc813", "size": "3337", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/defaults.js", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "JavaScript", "bytes": "92336" } ], "symlink_target": "" }
<div class="commune_descr limited"> <p> Appeville-Annebault est un village situé dans le département de l'Eure en Haute-Normandie. Elle totalisait 867 habitants en 2008.</p> <p>La commune propose quelques aménagements, elle propose entre autres un terrain de tennis et une boucle de randonnée.</p> <p>À Appeville-Annebault, le prix moyen à la vente d'un appartement s'évalue à zero &euro; du m² en vente. La valeur moyenne d'une maison à l'achat se situe à 1&nbsp;795 &euro; du m². À la location le prix moyen se situe à 7,94 &euro; du m² mensuel.</p> <p>Si vous envisagez de emmenager à Appeville-Annebault, vous pourrez aisément trouver une maison à acheter. </p> <p>Le nombre de logements, à Appeville-Annebault, se décomposait en 2011 en neuf appartements et 423 maisons soit un marché relativement équilibré.</p> <p>À proximité de Appeville-Annebault sont positionnées géographiquement les communes de <a href="{{VLROOT}}/immobilier/valletot_27669/">Valletot</a> à 5&nbsp;km, 301 habitants, <a href="{{VLROOT}}/immobilier/cauverville-en-roumois_27134/">Cauverville-en-Roumois</a> à 4&nbsp;km, 185 habitants, <a href="{{VLROOT}}/immobilier/saint-christophe-sur-conde_27522/">Saint-Christophe-sur-Condé</a> située à 4&nbsp;km, 366 habitants, <a href="{{VLROOT}}/immobilier/corneville-sur-risle_27174/">Corneville-sur-Risle</a> localisée à 5&nbsp;km, 1&nbsp;193 habitants, <a href="{{VLROOT}}/immobilier/montfort-sur-risle_27413/">Montfort-sur-Risle</a> à 2&nbsp;km, 845 habitants, <a href="{{VLROOT}}/immobilier/saint-philbert-sur-risle_27587/">Saint-Philbert-sur-Risle</a> à 2&nbsp;km, 792 habitants, entre autres. De plus, Appeville-Annebault est située à seulement 27&nbsp;km de <a href="{{VLROOT}}/immobilier/saint-pierre_97416/">Saint-Pierre</a>.</p> </div>
{ "content_hash": "9d8a215d3fdd0c9cf8848bc07753b6ec", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 253, "avg_line_length": 93.94736842105263, "alnum_prop": 0.750140056022409, "repo_name": "donaldinou/frontend", "id": "c329043062c7f8273f8f0a2e0f907080380f6319", "size": "1823", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Viteloge/CoreBundle/Resources/descriptions/27018.html", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "3073" }, { "name": "CSS", "bytes": "111338" }, { "name": "HTML", "bytes": "58634405" }, { "name": "JavaScript", "bytes": "88564" }, { "name": "PHP", "bytes": "841919" } ], "symlink_target": "" }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Transmitting and Receiving Data using Warplab (2x2 MIMO configuration) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % To run this code the boards must be programmed with the % warplab_mimo_v02.bit bitstream % The specific steps implemented in this script are the following % 0. Initializaton and definition of parameters % 1. Generate a vector of samples to transmit and send the samples to the % Warp board (Sample Frequency is 40MHz) % 2. Prepare boards for transmission and reception and send trigger to % start transmission and reception (trigger is the SYNC packet) % 3. Read the received samples from the Warp board % 4. Reset and disable the boards % 5. Plot the transmitted and received data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 0. Initializaton and definition of parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Load some global definitions (packet types, etc.) warplab_defines % Create Socket handles and intialize nodes [socketHandles, packetNum] = warplab_initialize; %Separate the socket handles for easier access % The first socket handle is always the magic SYNC % The rest can be arranged in any combination of Tx and Rx udp_Sync = socketHandles(1); udp_Tx = socketHandles(2); udp_RxA = socketHandles(3); % Define the warplab options (parameters) CaptOffset = 1000; %Number of noise samples per Rx capture; in [0:2^14] TxLength = 2^14-1000; %Length of transmission; in [0:2^14-CaptOffset] TransMode = 0; %Transmission mode; in [0:1] % 0: Single Transmission % 1: Continuous Transmission. Tx board will continue % transmitting the vector of samples until the user manually % disables the transmitter. CarrierChannel = 8; % Channel in the 2.4 GHz band. In [1:14] Tx2GainBB = 3; %Tx Baseband Gain in [0:3] Tx2GainRF = 40; %Tx RF Gain in [0:63] Rx2GainBB = 15; %Rx Baseband Gain in [0:31] Rx2GainRF = 1; %Rx RF Gain in [1:3] Tx3GainBB = 3; %Tx Baseband Gain in [0:3] Tx3GainRF = 40; %Tx RF Gain in [0:63] Rx3GainBB = 15; %Rx Baseband Gain in [0:31] Rx3GainRF = 1; %Rx RF Gain in [1:3] TxSelect = 2; % Select transmitter radio [0:2] 0:Radio2, 1:Radio3, 2: Both RxSelect = 2; % Select transmitter radio [0:2] 0:Radio2, 1:Radio3, 2: Both % Define the options vector; the order of options is set by the FPGA's code % (C code) optionsVector = [CaptOffset TxLength-1 TransMode CarrierChannel (Rx2GainBB + Rx2GainRF*2^16) (Tx2GainRF + Tx2GainBB*2^16) (Rx3GainBB + Rx3GainRF*2^16) (Tx3GainRF + Tx3GainBB*2^16) TxSelect RxSelect]; % Send options vector to the nodes warplab_setOptions(socketHandles,optionsVector); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 1. Generate a vector of samples to transmit and send the samples to the % Warp board (Sample Frequency is 40MHz) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Prepare some data to be transmitted t = 0:(1/40e6):TxLength/40e6 - 1/40e6; % Create time vector % Create a signal to transmit from radio 2 TxData_2 = exp(t*j*2*pi*1e6); %Signal must be a row vector. The signal can % be real or complex, the only constraint is that the amplitude of the real % part must be in [-1:1] and the amplitude of the imaginary part must be % in [-1:1] % Download the samples to be transmitted warplab_writeSMWO(udp_Tx, TxData_2, RADIO2_TXDATA); % Download samples to % radio 2 Tx Buffer % Create a signal to transmit from radio 3 TxData_3 = linspace(0,1,TxLength).*exp(t*j*2*pi*5e6); % Signal must be a row vector. The signal can be real or complex, % the only constraint is that the amplitude of the real part must be in % [-1:1] and the amplitude of the imaginary part must be in [-1:1] warplab_writeSMWO(udp_Tx, TxData_3, RADIO3_TXDATA); % Download samples to % radio 3 Tx Buffer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 2. Prepare boards for transmission and reception and send trigger to % start transmission and reception (trigger is the SYNC packet) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Enable transmitter radio path in transmitter node (enable radio 2 and % radio 3 in transmitter node as transmitters) warplab_sendCmd(udp_Tx, [RADIO2_TXEN RADIO3_TXEN], packetNum); % Enable receiver radio path in receiver node (enable radio 2 and % radio 3 in receiver node as receivers) warplab_sendCmd(udp_RxA, [RADIO2_RXEN RADIO3_RXEN], packetNum); % Prime transmitter state machine in transmitter node. Transmitter will be % waiting for the SYNC packet. Transmission will be triggered when the % transmitter node receives the SYNC packet. warplab_sendCmd(udp_Tx, TX_START, packetNum); % Prime receiver state machine in receiver node. Receiver will be waiting % for the SYNC packet. Capture will be triggered when the receiver % node receives the SYNC packet. warplab_sendCmd(udp_RxA, RX_START, packetNum); % Send the SYNC packet warplab_sendSync(udp_Sync); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 3. Read the received samples from the Warp board %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Read back the received samples from radio 2 [RawRxData_2] = warplab_readSMRO(udp_RxA, RADIO2_RXDATA, TxLength+CaptOffset); % Read back the received samples from radio 3 [RawRxData_3] = warplab_readSMRO(udp_RxA, RADIO3_RXDATA, TxLength+CaptOffset); % Process the received samples to obtain meaningful data [RxData_2,RxOTR_2] = warplab_processRawRxData(RawRxData_2); [RxData_3,RxOTR_3] = warplab_processRawRxData(RawRxData_3); % Read stored RSSI data from radio 2 [RawRSSIData_2] = warplab_readSMRO(udp_RxA, RADIO2_RSSIDATA, (TxLength+CaptOffset)/8); % Read stored RSSI data from radio 3 [RawRSSIData_3] = warplab_readSMRO(udp_RxA, RADIO3_RSSIDATA, (TxLength+CaptOffset)/8); % Procecss Raw RSSI data to obtain meningful RSSI values [RxRSSI_2] = warplab_processRawRSSIData(RawRSSIData_2); [RxRSSI_3] = warplab_processRawRSSIData(RawRSSIData_3); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 4. Reset and disable the boards %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Reset the receiver warplab_sendCmd(udp_RxA, RX_DONEREADING, packetNum); % Disable the receiver radio 2 radio 3 warplab_sendCmd(udp_RxA, [RADIO2_RXDIS RADIO3_RXDIS], packetNum); % Disable the transmitter radio 2 and radio 3 warplab_sendCmd(udp_Tx, [RADIO2_TXDIS RADIO3_TXDIS], packetNum); % Close sockets pnet('closeall'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 5. Plot the transmitted and received data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% figure; subplot(4,2,1); plot(real(TxData_2)); title('Tx Radio 2 I'); xlabel('n (samples)'); ylabel('Amplitude'); axis([0 2^14 -1 1]); % Set axis ranges. subplot(4,2,2); plot(imag(TxData_2)); title('Tx Radio 2 Q'); xlabel('n (samples)'); ylabel('Amplitude'); axis([0 2^14 -1 1]); % Set axis ranges. subplot(4,2,3); plot(real(TxData_3)); title('Tx Radio 3 I'); xlabel('n (samples)'); ylabel('Amplitude'); axis([0 2^14 -1 1]); % Set axis ranges. subplot(4,2,4); plot(imag(TxData_3)); title('Tx Radio 3 Q'); xlabel('n (samples)'); ylabel('Amplitude'); axis([0 2^14 -1 1]); % Set axis ranges. subplot(4,2,5); plot(real(RxData_2)); title('Rx Radio 2 I'); xlabel('n (samples)'); ylabel('Amplitude'); axis([0 2^14 -1 1]); % Set axis ranges. subplot(4,2,6); plot(imag(RxData_2)); title('Rx Radio 2 Q'); xlabel('n (samples)'); ylabel('Amplitude'); axis([0 2^14 -1 1]); % Set axis ranges. subplot(4,2,7); plot(real(RxData_3)); title('Rx Radio 3 I'); xlabel('n (samples)'); ylabel('Amplitude'); axis([0 2^14 -1 1]); % Set axis ranges. subplot(4,2,8); plot(imag(RxData_3)); title('Rx Radio 3 Q'); xlabel('n (samples)'); ylabel('Amplitude'); axis([0 2^14 -1 1]); % Set axis ranges.
{ "content_hash": "47f00d29b6259be7054febe936d28d70", "timestamp": "", "source": "github", "line_count": 187, "max_line_length": 200, "avg_line_length": 43.0855614973262, "alnum_prop": 0.6310040958173018, "repo_name": "shailcoolboy/Warp-Trinity", "id": "11deda6f01a10cf41e4a09c3d07336aa87f29b46", "size": "8057", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "ResearchApps/PHY/WARPLAB/Deprecated/WARPLab_SISO_MIMO2x2/M_Code/warplab_mimo_example_TxRx.m", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "C", "bytes": "3381683" }, { "name": "C++", "bytes": "99963" }, { "name": "Matlab", "bytes": "5676014" }, { "name": "Objective-C", "bytes": "808722" }, { "name": "Python", "bytes": "97084" }, { "name": "Shell", "bytes": "391" }, { "name": "Tcl", "bytes": "98070" }, { "name": "VHDL", "bytes": "3812312" }, { "name": "Verilog", "bytes": "2289824" } ], "symlink_target": "" }
package org.dol.biz.nogenerator; import org.dol.redis.Redis; import org.springframework.data.redis.core.BoundHashOperations; public class RedisNoGenerator implements NoGenerator { private final String key; private final Redis redis; private BoundHashOperations<String, String, String> ops; public RedisNoGenerator(Redis redis, String key) { this.key = key; this.redis = redis; this.ops = redis.boundHashOps(key); } @Override public String getName() { return GeneratorDefine.REDIS_GENERATOR; } @Override public String generateNO(String key, GeneratorDefine generatorDefine) { Long val = ops.increment(key, 1); while (val < generatorDefine.getMinValue()) { if (redis.hashCompareAndSwap(this.key, key, String.valueOf(generatorDefine.getMinValue()), String.valueOf(val))) { val = generatorDefine.getMinValue(); } else { val = redis.boundHashOps(this.key).increment(key, 1); } } return padIfNeed(generatorDefine, String.valueOf(val)); } }
{ "content_hash": "b3e7ff1ba18d15ae3a98654950a125ec", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 126, "avg_line_length": 32.4054054054054, "alnum_prop": 0.6105087572977481, "repo_name": "dolphinzhang/framework", "id": "76fdd85e6d86f75dfa349b9827b53bef38842695", "size": "1199", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "common/src/main/java/org/dol/biz/nogenerator/RedisNoGenerator.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "4647711" } ], "symlink_target": "" }
package com.unifonic.sdk.model.call; import com.google.gson.annotations.SerializedName; import com.unifonic.sdk.model.ResponseModel; import java.util.Date; import java.util.List; /** * * @author Eri Setiawan */ public class CallsDetailsResponse extends ResponseModel<CallsDetailsResponse> { @SerializedName("calls") private List<CallsDetails> calls; @SerializedName("CurrencyCode") private String currencyCode; @SerializedName("TotalVoiceMessages") private Integer totalVoiceMessages; @SerializedName("Page") private Integer page; public List<CallsDetails> getCalls() { return calls; } public void setCalls(List<CallsDetails> calls) { this.calls = calls; } public String getCurrencyCode() { return currencyCode; } public void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } public Integer getTotalVoiceMessages() { return totalVoiceMessages; } public void setTotalVoiceMessages(Integer totalVoiceMessages) { this.totalVoiceMessages = totalVoiceMessages; } public Integer getPage() { return page; } public void setPage(Integer page) { this.page = page; } public class CallsDetails { @SerializedName("CallID") private String callID; @SerializedName("AudioURL") private String audioURL; @SerializedName("RecipientNumber") private String recipientNumber; @SerializedName("Country") private String country; @SerializedName("CallStatus") private String callStatus; @SerializedName("TimeCreated") private Date timeCreated; @SerializedName("TimeSent") private Date timeSent; @SerializedName("TimeAnswered") private Date timeAnswered; @SerializedName("TimeEnded") private Date timeEnded; @SerializedName("CallDuration") private Integer callDuration; @SerializedName("Cost") private Double cost; public String getCallID() { return callID; } public void setCallID(String callID) { this.callID = callID; } public String getAudioURL() { return audioURL; } public void setAudioURL(String audioURL) { this.audioURL = audioURL; } public String getRecipientNumber() { return recipientNumber; } public void setRecipientNumber(String recipientNumber) { this.recipientNumber = recipientNumber; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getCallStatus() { return callStatus; } public void setCallStatus(String callStatus) { this.callStatus = callStatus; } public Date getTimeCreated() { return timeCreated; } public void setTimeCreated(Date timeCreated) { this.timeCreated = timeCreated; } public Date getTimeSent() { return timeSent; } public void setTimeSent(Date timeSent) { this.timeSent = timeSent; } public Date getTimeAnswered() { return timeAnswered; } public void setTimeAnswered(Date timeAnswered) { this.timeAnswered = timeAnswered; } public Date getTimeEnded() { return timeEnded; } public void setTimeEnded(Date timeEnded) { this.timeEnded = timeEnded; } public Integer getCallDuration() { return callDuration; } public void setCallDuration(Integer callDuration) { this.callDuration = callDuration; } public Double getCost() { return cost; } public void setCost(Double cost) { this.cost = cost; } @Override public String toString() { return "CallsDetails{" + "callID=" + callID + ", audioURL=" + audioURL + ", recipientNumber=" + recipientNumber + ", country=" + country + ", callStatus=" + callStatus + ", timeCreated=" + timeCreated + ", timeSent=" + timeSent + ", timeAnswered=" + timeAnswered + ", timeEnded=" + timeEnded + ", callDuration=" + callDuration + ", cost=" + cost + '}'; } } @Override public String toString() { return "CallsDetailsResponse{" + "calls=" + calls + ", currencyCode=" + currencyCode + ", totalVoiceMessages=" + totalVoiceMessages + ", page=" + page + '}'; } }
{ "content_hash": "7b0be87d9a728f7504c94f7b32414798", "timestamp": "", "source": "github", "line_count": 182, "max_line_length": 364, "avg_line_length": 26.13186813186813, "alnum_prop": 0.5990328006728343, "repo_name": "otsdc/SMS-Voice-JavaSDK", "id": "f597c7777a7e1922394b976390c542d1c2e89478", "size": "5891", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/main/java/com/unifonic/sdk/model/call/CallsDetailsResponse.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "207428" } ], "symlink_target": "" }
/* jshint node: true */ 'use strict'; var mergeTrees = require('broccoli-merge-trees'); var patchEmberApp = require('./lib/ext/patch-ember-app'); var fastbootAppModule = require('./lib/utilities/fastboot-app-module'); var filterInitializers = require('fastboot-filter-initializers'); var FastBootBuild = require('./lib/broccoli/fastboot-build'); /* * Main entrypoint for the Ember CLI addon. */ module.exports = { name: 'ember-cli-fastboot', includedCommands: function() { return { 'fastboot': require('./lib/commands/fastboot'), /* fastboot:build is deprecated and will be removed in a future version */ 'fastboot:build': require('./lib/commands/fastboot-build') }; }, /** * Called at the start of the build process to let the addon know it will be * used. At this point, we can rely on the EMBER_CLI_FASTBOOT environment * variable being set. * * Once we've determined which mode we're in (browser build or FastBoot build), * we mixin additional Ember addon hooks appropriate to the current build target. */ included: function(app) { patchEmberApp(app); }, config: function() { if (this.app && this.app.options.__is_building_fastboot__) { return { APP: { autoboot: false } }; } }, /** * Inserts placeholders into index.html that are used by the FastBoot server * to insert the rendered content into the right spot. Also injects a module * for FastBoot application boot. */ contentFor: function(type, config, contents) { if (type === 'body') { return "<!-- EMBER_CLI_FASTBOOT_BODY -->"; } if (type === 'head') { return "<!-- EMBER_CLI_FASTBOOT_TITLE --><!-- EMBER_CLI_FASTBOOT_HEAD -->"; } if (type === 'app-boot') { return fastbootAppModule(config.modulePrefix); } if (type === 'config-module' && this.app.options.__is_building_fastboot__) { var linesToRemove = contents.length; while(linesToRemove) { // Clear out the default config from ember-cli contents.pop(); linesToRemove--; } return 'return FastBoot.config();'; } }, /** * Filters out initializers and instance initializers that should only run in * browser mode. */ preconcatTree: function(tree) { return filterInitializers(tree, this.app.name); }, /** * After the entire Broccoli tree has been built for the `dist` directory, * adds the `fastboot-config.json` file to the root. */ postprocessTree: function(type, tree) { if (type === 'all') { var fastbootTree = this.buildFastBootTree(); // Merge the package.json with the existing tree return mergeTrees([tree, fastbootTree], {overwrite: true}); } return tree; }, buildFastBootTree: function() { var fastbootBuild = new FastBootBuild({ ui: this.ui, assetMapPath: this.assetMapPath, project: this.project, app: this.app, parent: this.parent }); return fastbootBuild.toTree(); } };
{ "content_hash": "9948b03ee2aff02c0ba152ff862290bd", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 83, "avg_line_length": 27.36936936936937, "alnum_prop": 0.6382488479262672, "repo_name": "habdelra/ember-cli-fastboot", "id": "9cb5b2aa1c14c63cdccd961144dd5a9c0a317949", "size": "3038", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "index.js", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "2153" }, { "name": "JavaScript", "bytes": "52495" } ], "symlink_target": "" }
<?xml version="1.0"?> <iati-activities version="xx"> <iati-activity> <iati-identifier></iati-identifier> <reporting-org type="xx" ref="xx"><narrative>Organisation name</narrative></reporting-org> <title> <narrative>Xxxxxxx</narrative> </title> <description> <narrative>Xxxxxxx</narrative> </description> <participating-org role="xx"></participating-org> <activity-status code="xx"/> <activity-date type="xx" iso-date="2013-11-27"/> <activity-date type="xx" iso-date="2013-11-27"> <narrative>Some stuff ere</narrative> </activity-date> <default-aid-type code="xx"/><!-- PASS: Optional element present with only required attributes --> </iati-activity> </iati-activities>
{ "content_hash": "3ba5ddef31da89985388736a7c3b95f0", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 102, "avg_line_length": 35.285714285714285, "alnum_prop": 0.6612685560053981, "repo_name": "IATI/iati.core", "id": "b7779f3f9f1b0e9b8c49bfbac2d255bc1bef5a2e", "size": "741", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "iati/resources/test_data/2-03/ssot-activity-xml-pass/iati-activities/iati-activity/default-aid-type/element-exists-with-required-subelements-only.xml", "mode": "33188", "license": "mit", "language": [ { "name": "Makefile", "bytes": "861" }, { "name": "Python", "bytes": "126390" }, { "name": "Shell", "bytes": "538" } ], "symlink_target": "" }
@interface ViewController : UIViewController <UITabBarDelegate> @property (weak, nonatomic) IBOutlet UIButton *switchBtn; @property (weak, nonatomic) IBOutlet UITabBar *tabBar; - (IBAction)switchData:(id)sender; @end
{ "content_hash": "b331029d1be57e801b3ce582e43b6e07", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 63, "avg_line_length": 31.285714285714285, "alnum_prop": 0.7899543378995434, "repo_name": "Farteen/WSChart", "id": "78a0840a908e57e49744b7bee583f9b75821c435", "size": "387", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "WSChartsDemo/WSChartsDemo/ViewController.h", "mode": "33188", "license": "mit", "language": [ { "name": "Objective-C", "bytes": "160204" } ], "symlink_target": "" }
require 'json' require_relative './file_exporter' class JSONExporter < FileExporter attr_accessor :output_file, :data def initialize(output_file:) @output_file = File.expand_path(output_file) end def export(data) File.open(self.output_file, 'w') do |f| f.write(data.to_json) end end end
{ "content_hash": "8bc39a858451bc23038229d76848bc33", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 48, "avg_line_length": 19.875, "alnum_prop": 0.6823899371069182, "repo_name": "fuzicast/import_export", "id": "264a5a7941943115f7bbf7019081db7f7be94de6", "size": "318", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/json_exporter.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "11385" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="{{ app()->getLocale() }}"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- CSRF Token --> <meta name="csrf-token" content="{{ csrf_token() }}"> <title>Error | Kingdomhire - Car & Van Rental Agency</title> <!-- Styles --> <link href="{{ mix('css/app.css') }}" rel="stylesheet"> <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=sxQYcq"> <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png?v=sxQYcq"> <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png?v=sxQYcq"> <link rel="manifest" href="/site.webmanifest?v=sxQYcq"> <link rel="mask-icon" href="/safari-pinned-tab.svg?v=sxQYcq" color="#339966"> <link rel="shortcut icon" href="/favicon.ico?v=sxQYcq"> <meta name="msapplication-TileColor" content="#339966"> <meta name="theme-color" content="#2c885a"> </head> <body> <main class="login"> @yield('content') </main> <footer class="jumbotron jumbotron-footer"> <div class="container"> <p>&copy; {{ date('Y') }} kingdomhire.com</p> </div> </footer> <!-- Scripts --> <script src="{{ mix('js/app.js') }}"></script> <script src="{{ mix('js/modal-gallery.js') }}"></script> </body> </html>
{ "content_hash": "7f89f27909d87066cf9caabb65c64ae8", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 85, "avg_line_length": 34.76923076923077, "alnum_prop": 0.6290560471976401, "repo_name": "danielcrblack/Kingdomhire", "id": "3b371cb4dea3283b40f61f999c0635aa61326c4e", "size": "1356", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "resources/views/layouts/error.blade.php", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "17610" }, { "name": "PHP", "bytes": "78755" }, { "name": "Vue", "bytes": "563" } ], "symlink_target": "" }
FN="IlluminaHumanMethylation450kprobe_2.0.6.tar.gz" URLS=( "https://bioconductor.org/packages/3.12/data/annotation/src/contrib/IlluminaHumanMethylation450kprobe_2.0.6.tar.gz" "https://bioarchive.galaxyproject.org/IlluminaHumanMethylation450kprobe_2.0.6.tar.gz" "https://depot.galaxyproject.org/software/bioconductor-illuminahumanmethylation450kprobe/bioconductor-illuminahumanmethylation450kprobe_2.0.6_src_all.tar.gz" "https://depot.galaxyproject.org/software/bioconductor-illuminahumanmethylation450kprobe/bioconductor-illuminahumanmethylation450kprobe_2.0.6_src_all.tar.gz" ) MD5="84c31861fcbaddbf2a9c500b8d8d767d" # Use a staging area in the conda dir rather than temp dirs, both to avoid # permission issues as well as to have things downloaded in a predictable # manner. STAGING=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM mkdir -p $STAGING TARBALL=$STAGING/$FN SUCCESS=0 for URL in ${URLS[@]}; do curl $URL > $TARBALL [[ $? == 0 ]] || continue # Platform-specific md5sum checks. if [[ $(uname -s) == "Linux" ]]; then if md5sum -c <<<"$MD5 $TARBALL"; then SUCCESS=1 break fi else if [[ $(uname -s) == "Darwin" ]]; then if [[ $(md5 $TARBALL | cut -f4 -d " ") == "$MD5" ]]; then SUCCESS=1 break fi fi fi done if [[ $SUCCESS != 1 ]]; then echo "ERROR: post-link.sh was unable to download any of the following URLs with the md5sum $MD5:" printf '%s\n' "${URLS[@]}" exit 1 fi # Install and clean up R CMD INSTALL --library=$PREFIX/lib/R/library $TARBALL rm $TARBALL rmdir $STAGING
{ "content_hash": "e744ec0db6802598c39befef727566ec", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 159, "avg_line_length": 33.93478260869565, "alnum_prop": 0.7110826393337604, "repo_name": "ostrokach/bioconda-recipes", "id": "90948ad0816f6e47f4319517a1b9319f6552560d", "size": "1573", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "recipes/bioconductor-illuminahumanmethylation450kprobe/post-link.sh", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "1805" }, { "name": "C", "bytes": "102655" }, { "name": "C++", "bytes": "486" }, { "name": "Fortran", "bytes": "1040" }, { "name": "Perl", "bytes": "88310" }, { "name": "Perl6", "bytes": "16" }, { "name": "Python", "bytes": "124959" }, { "name": "Shell", "bytes": "765144" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class co.aikar.taskchain.TaskChainDataWrappers.Data3 (TaskChain (Core) 3.7.2 API)</title> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class co.aikar.taskchain.TaskChainDataWrappers.Data3 (TaskChain (Core) 3.7.2 API)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../co/aikar/taskchain/package-summary.html">Package</a></li> <li><a href="../../../../co/aikar/taskchain/TaskChainDataWrappers.Data3.html" title="class in co.aikar.taskchain">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?co/aikar/taskchain/class-use/TaskChainDataWrappers.Data3.html" target="_top">Frames</a></li> <li><a href="TaskChainDataWrappers.Data3.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class co.aikar.taskchain.TaskChainDataWrappers.Data3" class="title">Uses of Class<br>co.aikar.taskchain.TaskChainDataWrappers.Data3</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="co.aikar.taskchain"> <!-- --> </a> <h3>Uses of <a href="../../../../co/aikar/taskchain/TaskChainDataWrappers.Data3.html" title="class in co.aikar.taskchain">TaskChainDataWrappers.Data3</a> in <a href="../../../../co/aikar/taskchain/package-summary.html">co.aikar.taskchain</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation"> <caption><span>Subclasses of <a href="../../../../co/aikar/taskchain/TaskChainDataWrappers.Data3.html" title="class in co.aikar.taskchain">TaskChainDataWrappers.Data3</a> in <a href="../../../../co/aikar/taskchain/package-summary.html">co.aikar.taskchain</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>static class&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChainDataWrappers.Data4.html" title="class in co.aikar.taskchain">TaskChainDataWrappers.Data4</a>&lt;D1,D2,D3,D4&gt;</span></code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static class&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChainDataWrappers.Data5.html" title="class in co.aikar.taskchain">TaskChainDataWrappers.Data5</a>&lt;D1,D2,D3,D4,D5&gt;</span></code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>static class&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChainDataWrappers.Data6.html" title="class in co.aikar.taskchain">TaskChainDataWrappers.Data6</a>&lt;D1,D2,D3,D4,D5,D6&gt;</span></code>&nbsp;</td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../co/aikar/taskchain/package-summary.html">co.aikar.taskchain</a> that return <a href="../../../../co/aikar/taskchain/TaskChainDataWrappers.Data3.html" title="class in co.aikar.taskchain">TaskChainDataWrappers.Data3</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>static &lt;D1,D2,D3&gt;&nbsp;<a href="../../../../co/aikar/taskchain/TaskChainDataWrappers.Data3.html" title="class in co.aikar.taskchain">TaskChainDataWrappers.Data3</a>&lt;D1,D2,D3&gt;</code></td> <td class="colLast"><span class="typeNameLabel">TaskChain.</span><code><span class="memberNameLink"><a href="../../../../co/aikar/taskchain/TaskChain.html#multi-D1-D2-D3-">multi</a></span>(D1&nbsp;var1, D2&nbsp;var2, D3&nbsp;var3)</code> <div class="block">Creates a data wrapper to return multiple objects from a task</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../co/aikar/taskchain/package-summary.html">Package</a></li> <li><a href="../../../../co/aikar/taskchain/TaskChainDataWrappers.Data3.html" title="class in co.aikar.taskchain">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?co/aikar/taskchain/class-use/TaskChainDataWrappers.Data3.html" target="_top">Frames</a></li> <li><a href="TaskChainDataWrappers.Data3.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2018. All rights reserved.</small></p> </body> </html>
{ "content_hash": "d910e5e5cfe77f3bbbda62c5cb4e5c26", "timestamp": "", "source": "github", "line_count": 173, "max_line_length": 315, "avg_line_length": 43.89017341040462, "alnum_prop": 0.6563940471486895, "repo_name": "aikar/TaskChain", "id": "f962b2b3c873d31e93ffc6798247f215d5ee2a9c", "size": "7593", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/co/aikar/taskchain/class-use/TaskChainDataWrappers.Data3.html", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "98320" }, { "name": "Shell", "bytes": "950" } ], "symlink_target": "" }
package com.alipay.hulu.actions; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.graphics.Rect; import android.os.Build; import android.util.DisplayMetrics; import android.view.LayoutInflater; import android.view.WindowManager; import android.widget.LinearLayout; import com.alipay.hulu.R; import com.alipay.hulu.common.annotation.Enable; import com.alipay.hulu.common.application.LauncherApplication; import com.alipay.hulu.common.service.SPService; import com.alipay.hulu.common.service.ScreenCaptureService; import com.alipay.hulu.common.tools.BackgroundExecutor; import com.alipay.hulu.common.tools.CmdTools; import com.alipay.hulu.common.utils.ClassUtil; import com.alipay.hulu.common.utils.FileUtils; import com.alipay.hulu.common.utils.LogUtil; import com.alipay.hulu.common.utils.MiscUtil; import com.alipay.hulu.common.utils.StringUtil; import com.alipay.hulu.common.utils.patch.PatchLoadResult; import com.alipay.hulu.shared.node.action.OperationContext; import com.alipay.hulu.shared.node.action.OperationMethod; import com.alipay.hulu.shared.node.action.provider.ActionProvider; import com.alipay.hulu.shared.node.action.provider.ViewLoadCallback; import com.alipay.hulu.shared.node.tree.AbstractNodeTree; import com.alipay.hulu.shared.node.utils.AssetsManager; import com.alipay.hulu.tools.HighLightService; import com.alipay.hulu.shared.node.utils.BitmapUtil; import com.theartofdev.edmodo.cropper.CropImageView; import java.io.File; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; /** * Created by qiaoruikai on 2019/1/25 3:47 PM. */ @Enable public class ImageCompareActionProvider implements ActionProvider { private static final String TAG = "ImgCompareActionPvd"; public static final String ACTION_CLICK_BY_SCREENSHOT = "clickByScreenshot"; public static final String ACTION_ASSERT_SCREENSHOT = "assertScreenshot"; public static final String IMAGE_COMPARE_PATCH = "hulu_imageCompare"; private HighLightService highLight; private ScreenCaptureService captureService; public static final String KEY_TARGET_IMAGE = "targetImage"; private static final String KEY_ORIGIN_SCREEN = "originSize"; private static final String KEY_ORIGIN_POS = "originPos"; @Override public void onCreate(Context context) { highLight = LauncherApplication.getInstance().findServiceByName(HighLightService.class.getName()); captureService = LauncherApplication.getInstance().findServiceByName(ScreenCaptureService.class.getName()); } @Override public void onDestroy(Context context) { } @Override public boolean canProcess(String action) { return StringUtil.equals(action, ACTION_CLICK_BY_SCREENSHOT) || StringUtil.equals(action, ACTION_ASSERT_SCREENSHOT); } @Override public boolean processAction(final String targetAction, AbstractNodeTree node, OperationMethod method, final OperationContext context) { // 同步执行,没点到就中断 if (StringUtil.equals(targetAction, ACTION_CLICK_BY_SCREENSHOT)) { String base64 = method.getParam(KEY_TARGET_IMAGE); String screenInfo = method.getParam(KEY_ORIGIN_SCREEN); String[] widthAndHeight = StringUtil.split(screenInfo, ","); int defaultWidth; if (context.screenWidth < context.screenHeight) { defaultWidth = SPService.getInt(SPService.KEY_SCREENSHOT_RESOLUTION, 720); } else { defaultWidth = (int) (SPService.getInt(SPService.KEY_SCREENSHOT_RESOLUTION, 720) / (float) context.screenWidth * context.screenHeight); } // 以配置的宽度为准 if (widthAndHeight != null && widthAndHeight.length == 2) { defaultWidth = Integer.parseInt(widthAndHeight[0]); } if (StringUtil.isEmpty(base64)) { LogUtil.e(TAG, "image content is empty"); return false; } final Bitmap query; try { query = BitmapUtil.base64ToBitmap(base64); if (query == null) { LogUtil.e(TAG, "Convert base64 to bitmap failed"); return false; } } catch (Exception e) { LogUtil.e(TAG, "处理查找抛出异常:" + e.getMessage(), e); return false; } PatchLoadResult rs = ClassUtil.getPatchInfo(IMAGE_COMPARE_PATCH); if (rs == null) { // 加载 rs = AssetsManager.loadPatchFromServer(IMAGE_COMPARE_PATCH); // 还没有,GG if (rs == null) { return false; } } try { // 开始查找 Rect target = findTargetRect(rs, query, context.screenWidth, context.screenHeight, defaultWidth); if (target == null) { LogUtil.e(TAG, "Can't find target Image"); return false; } else { // 高亮控件 highLight.highLight(target, null); BackgroundExecutor.execute(new Runnable() { @Override public void run() { highLight.removeHighLight(); } }, 1000); // 执行adb命令 context.executor.executeClick(target.centerX(), target.centerY()); // 等500ms MiscUtil.sleep(500); } } catch (Exception e) { LogUtil.e(TAG, "Catch Exception: " + e.getMessage(), e); return false; } context.notifyOperationFinish(); return true; } else if (StringUtil.equals(targetAction, ACTION_ASSERT_SCREENSHOT)) { String base64 = method.getParam(KEY_TARGET_IMAGE); if (StringUtil.isEmpty(base64)) { LogUtil.e(TAG, "image content is empty"); return false; } // 默认宽度 int defaultWidth; if (context.screenWidth < context.screenHeight) { defaultWidth = SPService.getInt(SPService.KEY_SCREENSHOT_RESOLUTION, 720); } else { defaultWidth = (int) (SPService.getInt(SPService.KEY_SCREENSHOT_RESOLUTION, 720) / (float) context.screenHeight * context.screenWidth); } String screenInfo = method.getParam(KEY_ORIGIN_SCREEN); String[] heightAndWidth = StringUtil.split(screenInfo, ","); // 以配置的宽度为准 if (heightAndWidth != null && heightAndWidth.length == 2) { defaultWidth = Integer.parseInt(heightAndWidth[0]); } Bitmap query; try { query = BitmapUtil.base64ToBitmap(base64); if (query == null) { LogUtil.e(TAG, "Convert base64 to bitmap failed"); return false; } } catch (Exception e) { LogUtil.e(TAG, "处理查找抛出异常:" + e.getMessage(), e); return false; } PatchLoadResult rs = ClassUtil.getPatchInfo(IMAGE_COMPARE_PATCH); if (rs == null) { // 加载 rs = AssetsManager.loadPatchFromServer(IMAGE_COMPARE_PATCH); // 还没有,无法执行 if (rs == null) { LauncherApplication.getInstance().showToast(StringUtil.getString(R.string.image_compare__assert_failed)); return false; } } try { // 开始查找 Rect target = findTargetRect(rs, query, context.screenWidth, context.screenHeight, defaultWidth); if (target == null) { LogUtil.e(TAG, "Can't find target Image"); LauncherApplication.getInstance().showToast(StringUtil.getString(R.string.image_compare__assert_failed)); return false; } else { // 高亮控件 highLight.highLight(target, null); BackgroundExecutor.execute(new Runnable() { @Override public void run() { highLight.removeHighLight(); } }, 1500); // 执行adb命令 context.notifyOperationFinish(); LauncherApplication.getInstance().showToast(StringUtil.getString(R.string.image_compare__assert_success)); return true; } } catch (Exception e) { LogUtil.e(TAG, "Catch Exception: " + e.getMessage(), e); context.notifyOperationFinish(); } LauncherApplication.getInstance().showToast(StringUtil.getString(R.string.image_compare__assert_failed)); return false; } return false; } @Override public Map<String, String> provideActions(AbstractNodeTree node) { Map<String, String> actionMap = new HashMap<>(2); // 配置功能项 actionMap.put(ACTION_ASSERT_SCREENSHOT, StringUtil.getString(R.string.image_compare__screenshot_assert)); actionMap.put(ACTION_CLICK_BY_SCREENSHOT, StringUtil.getString(R.string.image_compare__screenshot_click)); return actionMap; } @Override public void provideView(final Context context, String action, final OperationMethod method, final AbstractNodeTree node, final ViewLoadCallback callback) { if (!StringUtil.equals(action, ACTION_CLICK_BY_SCREENSHOT) && !StringUtil.equals(action, ACTION_ASSERT_SCREENSHOT)) { LogUtil.e(TAG, "Can't process Action %s", action); callback.onViewLoaded(null); return; } LogUtil.d(TAG, "开始提供图像对比界面"); highLight.removeHighLight(); // 等2秒,高亮、Dialog消失 BackgroundExecutor.execute(new Runnable() { @Override public void run() { final File target = new File(FileUtils.getSubDir("tmp"), "screenshot_" + System.currentTimeMillis() + ".png"); // 在后台再去加载 BackgroundExecutor.execute(new Runnable() { @Override public void run() { if (ClassUtil.getPatchInfo(IMAGE_COMPARE_PATCH) == null) { AssetsManager.loadPatchFromServer(IMAGE_COMPARE_PATCH); } } }); int defaultMinEdge = SPService.getInt(SPService.KEY_SCREENSHOT_RESOLUTION, 720); // 屏幕尺寸信息 DisplayMetrics dm = new DisplayMetrics(); ((WindowManager) LauncherApplication.getInstance().getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRealMetrics(dm); final int height = dm.heightPixels; int width = dm.widthPixels; int minEdge = Math.min(height, width); float radio = defaultMinEdge / (float) minEdge; if (radio > 1) { radio = 1; } Bitmap newBM = null; long startTime = System.currentTimeMillis(); if (captureService != null) { newBM = captureService.captureScreen(target, width, height, (int) (radio * width), (int) (radio * height)); LogUtil.d(TAG, "Minicap 截图耗时: " + (System.currentTimeMillis() - startTime)); } if (newBM == null) { String path = FileUtils.getPathInShell(target); CmdTools.execHighPrivilegeCmd("screencap -p \"" + path + "\"", 2000); // 截图文件存在 if (target.exists()) { Bitmap bitmap = BitmapFactory.decodeFile(target.getPath()); // 缩放到默认缩放尺寸 Matrix matrix = new Matrix(); matrix.postScale(radio, radio);// 使用后乘 newBM = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, false); // 回收下 if (!bitmap.isRecycled()) { bitmap.recycle(); } // 加载完毕后,截图文件删除 if (target.exists()) { target.delete(); } } } // 设置默认框选区域 final Rect defaultBound; if (node != null) { Rect tmp = node.getNodeBound(); defaultBound = new Rect((int) (tmp.left * radio), (int) (tmp.top * radio), (int) (tmp.right * radio), (int) (tmp.bottom * radio)); } else { defaultBound = new Rect(newBM.getWidth() / 3, newBM.getHeight() / 3, newBM.getWidth() / 3 * 2, newBM.getHeight() / 3 * 2); } // 配置默认尺寸 method.putParam(KEY_ORIGIN_SCREEN, newBM.getWidth() + "," + newBM.getHeight()); final Bitmap finalNewBM = newBM; LauncherApplication.getInstance().runOnUiThread(new Runnable() { @Override public void run() { LinearLayout root = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.dialog_action_crop_image, null); final CropImageView crop = (CropImageView) root.findViewById(R.id.dialog_action_crop_view); crop.setImageBitmap(finalNewBM); crop.setCropRect(defaultBound); root.setMinimumHeight(height * 2 / 3); callback.onViewLoaded(root, new Runnable() { @Override public void run() { Bitmap result = crop.getCroppedImage(); // Base64存储 method.putParam(KEY_TARGET_IMAGE, BitmapUtil.bitmapToBase64(result)); method.putParam(KEY_ORIGIN_POS, flatRectToString(crop.getCropRect())); } }); } }); } }, 200); return; } /** * 根据query图像查找目标Rect * @param rs 插件 * @param query query图像 * @return */ private Rect findTargetRect(PatchLoadResult rs, Bitmap query, int screenWidth, int screenHeight, int scaleWidth) { // 截图查找 final File target = new File(FileUtils.getSubDir("tmp"), "screenshot_" + System.currentTimeMillis() + ".png"); Bitmap screenShot = null; // 缩放比率 float radio = scaleWidth / (float) screenWidth; // 传来的图片尺寸更大,先缩小query图片 if (scaleWidth > screenWidth) { float scale = screenWidth / (float) scaleWidth; LogUtil.w(TAG, "缩放目标图片: %f", scale); // 缩放下原始图片 query = Bitmap.createScaledBitmap(query, (int) (scale * query.getWidth()), (int) (scale * query.getHeight()), false); radio = 1; scaleWidth = screenWidth; } // 如果有minicap截图服务,走minicap if (captureService != null) { long startTime = System.currentTimeMillis(); screenShot = captureService.captureScreen(target, screenWidth, screenHeight, scaleWidth, (int) (screenHeight * radio)); LogUtil.d(TAG, "截图耗时 " + (System.currentTimeMillis() - startTime)); } if (screenShot == null) { String path = FileUtils.getPathInShell(target); CmdTools.execHighPrivilegeCmd("screencap -p \"" + path + "\"", 2000); Bitmap bitmap = BitmapFactory.decodeFile(target.getPath()); // 缩放到目标宽度 Matrix matrix = new Matrix(); matrix.postScale(radio, radio);// 使用后乘 screenShot = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, false); // 回收下 if (!bitmap.isRecycled()) { bitmap.recycle(); } } try { Class<?> targetClass = ClassUtil.getClassByName(rs.entryClass); if (targetClass == null) { LogUtil.e(TAG, "插件类不存在"); return null; } Method targetMethod = targetClass.getMethod(rs.entryMethod, Bitmap.class, Bitmap.class); if (targetMethod == null) { LogUtil.e(TAG, "插件目标方法不存在"); return null; } float[] result = (float[]) targetMethod.invoke(null, query, screenShot); // 未能找到目标框 if (result == null || result.length != 8) { LogUtil.e(TAG, "未能找到目标控件"); return null; } int left = Integer.MAX_VALUE; int top = Integer.MAX_VALUE; int right = -1; int bottom = -1; // 可能存在目标点不是标准矩形,找上下左右最值点 for (int i = 0; i < 8; i++) { if (i % 2 == 0) { if (result[i] < left) { left = (int) result[i]; } if (result[i] > right) { right = (int) result[i]; } } else { if (result[i] < top) { top = (int) result[i]; } if (result[i] > bottom) { bottom = (int) result[i]; } } } float targetWidth = right - left; float targetHeight = bottom - top; float widthRadio = targetWidth / query.getWidth(); float heightRadio = targetHeight / query.getHeight(); LogUtil.d(TAG, "原尺寸: %s, 查找尺寸: %s" , query.getWidth() + "x" + query.getHeight(), targetWidth + "x" + targetHeight); // 差别过大,说明找错了,当做没找到 if (widthRadio < 0.4 || widthRadio > 2 || heightRadio < 0.4 || heightRadio > 2) { LogUtil.w(TAG, "查找结果与原图尺寸差别过大,不可信"); return null; } return new Rect((int) (left / radio), (int) (top / radio), (int) (right / radio), (int) (bottom / radio)); } catch (Exception e) { LogUtil.e(TAG, "Catch Exception: " + e.getMessage(), e); return null; } finally { if (target.exists()) { FileUtils.deleteFile(target); } } } private static String flatRectToString(Rect r) { return r.top + "," + r.left + "," + r.bottom + "," + r.right; } private static Rect readRectFromString(String content) { String[] poses = StringUtil.split(content, ","); if (poses == null || poses.length != 4) { return null; } try { return new Rect(Integer.parseInt(poses[0]), Integer.parseInt(poses[1]), Integer.parseInt(poses[2]), Integer.parseInt(poses[3])); } catch (NumberFormatException e) { LogUtil.e(TAG, "Can't read rect from String %s", content); return null; } } }
{ "content_hash": "fb6c6b79ae09633f4e088fc32a4e3ffa", "timestamp": "", "source": "github", "line_count": 510, "max_line_length": 151, "avg_line_length": 38.747058823529414, "alnum_prop": 0.5337786549263701, "repo_name": "alipay/SoloPi", "id": "b701f0a2acf2ef01914ab8ff5ba1dee4b77d2179", "size": "21078", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/app/src/main/java/com/alipay/hulu/actions/ImageCompareActionProvider.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "12453" }, { "name": "CMake", "bytes": "850" }, { "name": "CSS", "bytes": "11139" }, { "name": "HTML", "bytes": "280135" }, { "name": "Java", "bytes": "2518949" }, { "name": "Roff", "bytes": "26526" } ], "symlink_target": "" }
// ---------------------------------------------------------------------------- // Copyright 2007-2013, GeoTelematic Solutions, Inc. // All rights reserved // ---------------------------------------------------------------------------- // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // ---------------------------------------------------------------------------- // References: // http://www.collegeathome.com/blog/2008/06/05/50-cool-things-you-can-do-with-google-charts-api/ // http://psychopyko.com/tutorial/how-to-use-google-charts/ // ---------------------------------------------------------------------------- // Temperature Examples: // http://chart.apis.google.com/chart?cht=lc&chs=708x200&chxt=y,x,x&chts=000000,15&chco=008000,FFA500,FF0000&chdl=Dew+Point+(F)|Apparent+Temperature+(F)|Temperature+(F)&chd=e:oaoaeUeUa8XlXlQ2NeNeNeNeNeKHKHDYAA,....ryhra8XlXlry8n8nhrXlUNQ2Nehryh,....ryhra8XlXlry8n8nhrXlUNQ2Nehryh&chxl=0:|47F|49F|52F|54F|57F|59F|61F|64F|66F|1:|2PM|5PM|8PM|11PM|2AM|4AM|7AM|10AM|1PM|4PM|7PM|10PM|1AM|4AM|7AM|10AM|1PM|2:|Sat|+|+|+|Sun|+|+|+|+|+|+|+|Mon|+|+|+|+&chtt=Temperature,+Dew+Point+and+Apparent+Temperature // http://chart.apis.google.com/chart?chxt=y%2Cr%2Cx&chs=250x100&cht=lc&chxp=0%2C10%2C32%2C50%2C70|1%2C49%2C25|2%2C0%2C3%2C6%2C9&chxl=0%3A|10|32|50|70|1%3A|Sunnyvale|Chicago|2%3A|Jan|Apr|Jul|Sep&chxr=0%2C0%2C80|1%2C0%2C80|2%2C0%2C12&chd=s%3Aloqsvy00yvpll%2CTYemu154yqgXT&chls=1%2C1%2C0|1%2C8%2C4&chco=0000ff%2Cff0000&wiki=foo.png // ---------------------------------------------------------------------------- // Change History: // 2008/12/01 Martin D. Flynn // -Initial release // 2009/04/02 Martin D. Flynn // -Repackaged // ---------------------------------------------------------------------------- package org.opengts.google; import java.util.*; import java.io.*; import java.awt.*; import org.opengts.util.*; /** *** Tools for obtaining Temperature charts via Google Chart API **/ public class GoogleChartTemperature extends GoogleChart { // ------------------------------------------------------------------------ protected static final long MIN_DATE = 1L; // ------------------------------------------------------------------------ public static final int TEMP_F = 0; public static final int TEMP_C = 1; private static double F2C(double F) { return (F - 32.0) * 5 / 9; } private static double C2F(double C) { return (C * 9 / 5) + 32.0; } // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ public static class Data { private long timestamp = 0L; private double tempC = -999.0; private String stringVal = null; public Data(long ts, double C) { this.timestamp = ts; this.tempC = C; } public double getTempC() { return this.tempC; } public long getTimestamp() { return this.timestamp; } public String toString() { if (this.stringVal == null) { this.stringVal = String.valueOf(this.getTimestamp()) + "," + this.getTempC(); } return this.stringVal; } } // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ private int dispUnits = TEMP_F; // 0 == F, 1 == C private double minTempC = -17.77777; // == 0.00000F private double maxTempC = 54.44444; // == 130.00000F private int yTickCount = 10; private long minDateTS = 0L; private long maxDateTS = 0L; private TimeZone timeZone = null; private String dateFormat = null; private String timeFormat = null; private int xTickCount = 10; private boolean didInitChart = false; public GoogleChartTemperature() { this.setType("lxy"); } // ------------------------------------------------------------------------ public void setDateFormat(String dateFormat) { this.dateFormat = dateFormat; } public String getDateFormat() { return StringTools.isBlank(this.dateFormat)? this.dateFormat : "MM/dd"; } // ------------------------------------------------------------------------ public void setTimeFormat(String timeFormat) { this.timeFormat = timeFormat; } public String getTimeFormat() { return StringTools.isBlank(this.timeFormat)? this.timeFormat : "HH:mm:ss"; } // ------------------------------------------------------------------------ public void setDateRange( DateTime minDate, DateTime maxDate, int tickCount) throws Exception { /* validate dates */ long minDateTS = (minDate != null)? minDate.getTimeSec() : 0L; long maxDateTS = (maxDate != null)? maxDate.getTimeSec() : 0L; if ((minDate == null) || (minDateTS < MIN_DATE) || (maxDate == null) || (maxDateTS < MIN_DATE) || (minDateTS >= maxDateTS) || ((maxDateTS - minDateTS) <= 60L) ) { throw new Exception("Invalid Date range specification"); } /* adjust 'maxDateTS' to make sure (maxDateTS - minDateTS) is a multiple of 'tickCount' */ maxDateTS += (maxDateTS - minDateTS) % tickCount; /* vars */ this.minDateTS = minDateTS; this.maxDateTS = maxDateTS; this.timeZone = minDate.getTimeZone(); this.xTickCount = (tickCount > 0)? tickCount : 6; } public int getDateTickCount() { return this.xTickCount; } // ------------------------------------------------------------------------ public void setTemperatureRange(int units, double minTempC, double maxTempC, int tickCount) throws Exception { /* validate temperature range */ if ((minTempC < -40.0) || (minTempC > 125.0) || (maxTempC < -40.0) || (maxTempC > 125.0) || (minTempC > maxTempC) ) { throw new Exception("Invalid Temperature range specification"); } else if (minTempC == maxTempC) { minTempC -= 1.0; maxTempC += 1.0; } /* vars */ this.dispUnits = (units == TEMP_C)? TEMP_C : TEMP_F; this.minTempC = minTempC; this.maxTempC = maxTempC; this.yTickCount = (tickCount > 0)? tickCount : 10; /* suplement chart title */ this.appendTitle((this.dispUnits == TEMP_C)? " (C)" : " (F)"); } public int getTemperatureTickCount() { return this.yTickCount; } // ------------------------------------------------------------------------ protected void _initChart() throws Exception { /* already initialized? */ if (this.didInitChart) { return; } /* axis tick counts */ int yTickCnt = this.getTemperatureTickCount(); int xTickCnt = this.getDateTickCount(); /* horizontal grid */ this.setGrid(0, yTickCnt); /* Y-axis labels */ StringBuffer ya = new StringBuffer(); double deltaC = this.maxTempC - this.minTempC; for (int y = 0; y <= yTickCnt; y++) { double C = this.minTempC + (deltaC * ((double)y / (double)yTickCnt)); double v = (this.dispUnits == TEMP_C)? C : C2F(C); ya.append("|").append(StringTools.format(v,"0.0")); } if ((this.maxTempC > 0.0) && (this.minTempC < 0.0)) { double sep = Math.abs(this.minTempC) / (this.maxTempC - this.minTempC); this.addShapeMarker("r,AA4444,0," + StringTools.format(sep,"0.000") + "," + StringTools.format(sep+0.002,"0.000")); } /* X-axis labels */ StringBuffer xat = new StringBuffer(); StringBuffer xad = new StringBuffer(); double deltaTS = (double)(this.maxDateTS - this.minDateTS); long lastDN = 0L; for (int x = 0; x <= xTickCnt; x++) { long ts = this.minDateTS + Math.round(deltaTS * ((double)x / (double)xTickCnt)); DateTime dt = new DateTime(ts, this.timeZone); long dn = DateTime.getDayNumberFromDate(dt); xat.append("|").append(dt.format(this.getTimeFormat())); xad.append("|").append(dt.format(this.getDateFormat())); if (dn != lastDN) { long ds = dt.getDayStart(); if (ds > this.minDateTS) { double sep = (double)(ds - this.minDateTS) / deltaTS; this.addShapeMarker("R,444444,0," + StringTools.format(sep,"0.000") + "," + StringTools.format(sep+0.001,"0.000")); } lastDN = dn; } } /* axis labels */ this.setAxisLabels("y,x,x", "0:"+ya.toString()+"|1:"+xad.toString()+"|2:"+xat.toString()); /* did init */ this.didInitChart = true; } // ------------------------------------------------------------------------ public void addDataSet(Color color, String legend, Data data[]) throws Exception { /* init */ this._initChart(); /* dataset color/legend/markers */ String hexColor = ColorTools.toHexString(color,false); this.addDatasetColor(hexColor); this.addDatasetLegend(legend); this.addShapeMarker("d," + hexColor + "," + this.dataSetCount + ",-1,7,1"); /* data */ StringBuffer xv = new StringBuffer(); StringBuffer yv = new StringBuffer(); for (int i = 0; i < data.length; i++) { GetScaledExtendedEncodedValue(yv,data[i].getTempC(),this.minTempC,this.maxTempC); GetScaledExtendedEncodedValue(xv,data[i].getTimestamp(),this.minDateTS,this.maxDateTS); } if (StringTools.isBlank(this.chd)) { this.chd = "e:"; } else { this.chd += ","; } this.chd += xv.toString() + "," + yv.toString(); /* count data set */ this.dataSetCount++; } // ------------------------------------------------------------------------ private static Color TEMP_COLOR[] = new Color[] { Color.red, Color.green, Color.blue, Color.cyan, Color.gray }; @SuppressWarnings("unchecked") public void _addRandomSampleData(int setCount, int tempCount) throws Exception { long sts = this.minDateTS; long ets = this.maxDateTS; Random ran = new Random(sts); /* init datasets */ if (setCount <= 0) { setCount = 1; } java.util.List<Data> dataSet[] = new java.util.List[setCount]; for (int d = 0; d < dataSet.length; d++) { dataSet[d] = new Vector<Data>(); } /* populate random temperature data */ double rangeC = this.maxTempC - this.minTempC; long deltaSize = (ets - sts) / (long)tempCount; long deltaRangeTS = DateTime.HourSeconds(3); long ts = sts + (deltaSize / 2L); double Cs = (ran.nextDouble() * rangeC * 0.10) + (rangeC * 0.05); for (int t = 0; t < tempCount; t++) { double C[] = new double[dataSet.length]; for (int d = 0; d < dataSet.length; d++) { C[d] = (ran.nextDouble() * 7.0) + ((d==0)?Cs:C[d-1]) - 2.5; if (C[d] < this.minTempC) { C[d] = this.minTempC; } if (C[d] > this.maxTempC) { C[d] = this.maxTempC; } dataSet[d].add(new Data(ts,C[d])); } ts = sts + ((long)(t+1) * deltaSize) + (long)ran.nextInt((int)deltaRangeTS) + (deltaRangeTS / 2L); if (ts > ets) { ts = ets - 1L; } //ts = sts + ((t==0)?DateTime.HourSeconds(1):(long)ran.nextInt((int)(ets - sts))); Cs = C[0]; } /* add datasets */ for (int d = 0; d < dataSet.length; d++) { ListTools.sort(dataSet[d],null); Color color = TEMP_COLOR[d % TEMP_COLOR.length]; this.addDataSet(color, "Temp " + (d+1), dataSet[d].toArray(new Data[dataSet[d].size()])); } } // ------------------------------------------------------------------------ public String toString() { StringBuffer sb = new StringBuffer(); sb.append(CHART_API_URL); sb.append("uniq=").append(DateTime.getCurrentTimeSec()).append("&"); sb.append("cht=" ).append(this.cht ).append("&"); sb.append("chs=" ).append(this.chs ).append("&"); sb.append("chxt=").append(this.chxt).append("&"); sb.append("chg=" ).append(this.chg ).append("&"); sb.append("chxl=").append(this.chxl).append("&"); sb.append("chts=").append(this.chts).append("&"); sb.append("chtt=").append(this.chtt).append("&"); sb.append("chco=").append(this.chco).append("&"); sb.append("chdl=").append(this.chdl).append("&"); sb.append("chd=" ).append(this.chd ).append("&"); sb.append("chm=" ).append(this.chm ); return sb.toString(); } // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ public static void main(String argv[]) { RTConfig.setCommandLineArgs(argv); long now = DateTime.getCurrentTimeSec(); long sts = now - DateTime.DaySeconds(3); long ets = now; GoogleChartTemperature gct = new GoogleChartTemperature(); try { gct.setSize(700, 400); gct.setTitle(Color.black, 16, "Temperature"); gct.setTemperatureRange(1, F2C(0.0), F2C(130.0), 10); gct.setDateRange(new DateTime(sts), new DateTime(ets), 8); gct.setDateFormat("MM/dd"); gct.setTimeFormat("HH:mm:ss"); int setCount = 3; int tempCount = 15; gct._addRandomSampleData(setCount,tempCount); System.out.println(gct.toString()); } catch (Throwable th) { Print.logException("Error", th); System.exit(1); } } }
{ "content_hash": "439a660f3a6da821fc157ca4a625af41", "timestamp": "", "source": "github", "line_count": 405, "max_line_length": 494, "avg_line_length": 37.78024691358025, "alnum_prop": 0.48558917717796224, "repo_name": "vimukthi-git/OpenGTS_2.4.9", "id": "67da021bdd7a19abce118ebf07b6d987a8ed138b", "size": "15301", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/org/opengts/google/GoogleChartTemperature.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "9911230" }, { "name": "JavaScript", "bytes": "713652" }, { "name": "Perl", "bytes": "45989" }, { "name": "Shell", "bytes": "83010" } ], "symlink_target": "" }
package org.apache.reef.runtime.common.evaluator.context.defaults; import org.apache.reef.annotations.audience.EvaluatorSide; import org.apache.reef.evaluator.context.ContextMessageHandler; import org.apache.reef.evaluator.context.parameters.ContextIdentifier; import org.apache.reef.tang.annotations.Parameter; import javax.inject.Inject; /** * Default handler for messages sent by the driver: Crash the context. */ @EvaluatorSide public final class DefaultContextMessageHandler implements ContextMessageHandler { private final String contextID; @Inject DefaultContextMessageHandler(final @Parameter(ContextIdentifier.class) String contextID) { this.contextID = contextID; } @Override public void onNext(final byte[] message) { throw new IllegalStateException("No message handlers given for context " + this.contextID); } }
{ "content_hash": "03fa0220f2bf7f97beac8b6a06159b97", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 95, "avg_line_length": 30.571428571428573, "alnum_prop": 0.7978971962616822, "repo_name": "bgchun/incubator-reef", "id": "0007c004681a2929fdda65255d7472f4aebce61e", "size": "1664", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/evaluator/context/defaults/DefaultContextMessageHandler.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "986" }, { "name": "C#", "bytes": "4273" }, { "name": "C++", "bytes": "117855" }, { "name": "Java", "bytes": "3605906" }, { "name": "PowerShell", "bytes": "6426" }, { "name": "Shell", "bytes": "3753" } ], "symlink_target": "" }
cmake .. \ -DCMAKE_TOOLCHAIN_FILE=//Users/mbp/Github/emsdk_portable1/emscripten/tag-1.34.6/cmake/Modules/Platform/Emscripten.cmake \ -DRDKIT_INCLUDE_DIR=/Users/mbp/Github/Toolchain/rdkit_15_03_1/Code \ -DBoost_INCLUDE_DIR=/usr/local/Cellar/boost/1.58.0/include/ \ -DRDKIT_LIB_DIR=/Users/mbp/Github/Toolchain/rdkit_15_03_1/lib \ -DEMSCRIPTEN_BIN=/Users/mbp/Github/emsdk_portable1/emscripten/tag-1.34.6 rm src/rdkit.js make cp src/rdkit.js ../build/src/rdkit.js npm run build-test #cat ../javascript/pre.js ../build/src/rdkit.js ../javascript/post.js > ../dist/rdkit.js # already include in the build-test method cp ../test/rdkit.js ../../node_modules/rdkit/dist/rdkit.js cp ../test/rdkit.js ../../../Sites/rdkitjs/rdkit.js
{ "content_hash": "3b576794ca45e63462524c754a84211a", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 121, "avg_line_length": 33.22727272727273, "alnum_prop": 0.7305061559507524, "repo_name": "cheminfo/RDKitjs", "id": "2a6b97403e7a787cf7502262838e46643fa7329d", "size": "743", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "old/src/compilerTGG.sh", "mode": "33261", "license": "bsd-3-clause", "language": [ { "name": "C++", "bytes": "94682" }, { "name": "CMake", "bytes": "17857" }, { "name": "CSS", "bytes": "32420" }, { "name": "HTML", "bytes": "447375" }, { "name": "JavaScript", "bytes": "339934" }, { "name": "Makefile", "bytes": "13267" }, { "name": "Python", "bytes": "4463" }, { "name": "Shell", "bytes": "1450" }, { "name": "TeX", "bytes": "128156" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_102-google-v7) on Wed Jan 11 15:17:55 PST 2017 --> <title>ShadowJsPromptResult</title> <meta name="date" content="2017-01-11"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="ShadowJsPromptResult"; } } catch(err) { } //--> var methods = {"i0":9}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../org/robolectric/shadows/ShadowJobScheduler.ShadowJobSchedulerImpl.html" title="class in org.robolectric.shadows"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../org/robolectric/shadows/ShadowJsResult.html" title="class in org.robolectric.shadows"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?org/robolectric/shadows/ShadowJsPromptResult.html" target="_top">Frames</a></li> <li><a href="ShadowJsPromptResult.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">org.robolectric.shadows</div> <h2 title="Class ShadowJsPromptResult" class="title">Class ShadowJsPromptResult</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li><a href="../../../org/robolectric/shadows/ShadowJsResult.html" title="class in org.robolectric.shadows">org.robolectric.shadows.ShadowJsResult</a></li> <li> <ul class="inheritance"> <li>org.robolectric.shadows.ShadowJsPromptResult</li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre><a href="../../../org/robolectric/annotation/Implements.html" title="annotation in org.robolectric.annotation">@Implements</a>(<a href="../../../org/robolectric/annotation/Implements.html#value--">value</a>=android.webkit.JsPromptResult.class) public class <span class="typeNameLabel">ShadowJsPromptResult</span> extends <a href="../../../org/robolectric/shadows/ShadowJsResult.html" title="class in org.robolectric.shadows">ShadowJsResult</a></pre> <div class="block">Shadow for <code>JsPromptResult</code>.</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/robolectric/shadows/ShadowJsPromptResult.html#ShadowJsPromptResult--">ShadowJsPromptResult</a></span>()</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>static android.webkit.JsPromptResult</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/shadows/ShadowJsPromptResult.html#newInstance--">newInstance</a></span>()</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.org.robolectric.shadows.ShadowJsResult"> <!-- --> </a> <h3>Methods inherited from class&nbsp;org.robolectric.shadows.<a href="../../../org/robolectric/shadows/ShadowJsResult.html" title="class in org.robolectric.shadows">ShadowJsResult</a></h3> <code><a href="../../../org/robolectric/shadows/ShadowJsResult.html#cancel--">cancel</a>, <a href="../../../org/robolectric/shadows/ShadowJsResult.html#wasCancelled--">wasCancelled</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="ShadowJsPromptResult--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>ShadowJsPromptResult</h4> <pre>public&nbsp;ShadowJsPromptResult()</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="newInstance--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>newInstance</h4> <pre>public static&nbsp;android.webkit.JsPromptResult&nbsp;newInstance()</pre> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../org/robolectric/shadows/ShadowJobScheduler.ShadowJobSchedulerImpl.html" title="class in org.robolectric.shadows"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../org/robolectric/shadows/ShadowJsResult.html" title="class in org.robolectric.shadows"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?org/robolectric/shadows/ShadowJsPromptResult.html" target="_top">Frames</a></li> <li><a href="ShadowJsPromptResult.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
{ "content_hash": "f65994a351ec3004c8588089c5af8052", "timestamp": "", "source": "github", "line_count": 283, "max_line_length": 389, "avg_line_length": 36.50176678445229, "alnum_prop": 0.6528557599225556, "repo_name": "robolectric/robolectric.github.io", "id": "ce2f8bf176479347c7bc637392ba7ff683d37bcf", "size": "10330", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "javadoc/3.2/org/robolectric/shadows/ShadowJsPromptResult.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "132673" }, { "name": "HTML", "bytes": "277730" }, { "name": "JavaScript", "bytes": "24371" }, { "name": "Ruby", "bytes": "1051" }, { "name": "SCSS", "bytes": "64100" }, { "name": "Shell", "bytes": "481" } ], "symlink_target": "" }
package api.sc2geeks.entity; import java.util.List; /** * Created by IntelliJ IDEA. * User: robert * Date: 9/11/11 * Time: 5:07 PM * To change this template use File | Settings | File Templates. */ public class PlayerTeam { private List<Player> players; public List<Player> getPlayers() { return players; } public void setPlayers(List<Player> players) { this.players = players; } }
{ "content_hash": "b9dc1f8282f75c8e72b3c69efc3c4690", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 64, "avg_line_length": 16.12, "alnum_prop": 0.6898263027295285, "repo_name": "RobertTheNerd/sc2geeks", "id": "092eefcc7a7ff9205c0b79bab768ffebced7cfb7", "size": "403", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "web-api/website/service/src/main/java/api/sc2geeks/entity/PlayerTeam.java", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "576" }, { "name": "CSS", "bytes": "897134" }, { "name": "HTML", "bytes": "2799311" }, { "name": "Java", "bytes": "570929" }, { "name": "JavaScript", "bytes": "1098678" }, { "name": "PHP", "bytes": "204145" }, { "name": "Python", "bytes": "80027" }, { "name": "Shell", "bytes": "2379" }, { "name": "XSLT", "bytes": "44740" } ], "symlink_target": "" }
@interface TGNewestRedNetVC () @end @implementation TGNewestRedNetVC -(NSString *) requesturl :(NSString *) nextpage{ //http://s.budejie.com/topic/tag-topic/3096/new/bs0315-iphone-4.5.6/0-20.json return [NSString stringWithFormat:@"http://s.budejie.com/topic/tag-topic/3096/new/bs0315-iphone-4.5.6/%@-20.json",nextpage]; } @end
{ "content_hash": "a712c814caa75e42a2476ac7d7dfdac2", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 128, "avg_line_length": 28.333333333333332, "alnum_prop": 0.7235294117647059, "repo_name": "targetcloud/baisibudejie", "id": "1b2d1efa9ae86a2809684c949d30655b8c07e069", "size": "520", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "baisibudejie/baisibudejie/Classes/Essence/Essence_v2/C/Newest/TGNewestRedNetVC.m", "mode": "33188", "license": "mit", "language": [ { "name": "C++", "bytes": "54687" }, { "name": "Objective-C", "bytes": "1585663" }, { "name": "Objective-C++", "bytes": "124423" }, { "name": "Ruby", "bytes": "409" }, { "name": "Shell", "bytes": "8889" } ], "symlink_target": "" }
export DEBIAN_FRONTEND=noninteractive sudo apt-get update # Install packages as needed if [[ ! -e /usr/bin/curl ]]; then apt-get -yqq install curl fi if [[ ! -e /usr/bin/unzip ]]; then apt-get -yqq install unzip fi # Download and install Consul binary, if needed if [[ ! -e /usr/local/bin/consul ]];then # Download Consul curl -kLOs https://releases.hashicorp.com/consul/1.2.3/consul_1.2.3_linux_amd64.zip # Decompress and remove Consul download unzip consul_1.2.3_linux_amd64.zip rm consul_1.2.3_linux_amd64.zip # Move Consul binary to location in path sudo mv consul /usr/local/bin/ fi # Create consul user, if it doesn't already exist if [ -z "$(getent passwd consul)" ]; then useradd -M -d /var/consul -r -s /usr/bin/nologin consul else echo "Consul user already created." fi # Create and configure Consul working directory sudo mkdir -p /var/consul if [ -d /var/consul ]; then sudo chown -R consul:consul /var/consul fi # Create and configure Consul configuration directories sudo mkdir -p /etc/consul.d/server if [ -d /etc/consul.d ]; then sudo chown -R root:consul /etc/consul.d fi # Customize the systemd unit file sed -i s/BINDADDR/$(hostname -I | cut -f2 -d' ')/ /home/vagrant/consul.service # Move files into the correct locations sudo mv /home/vagrant/consul.service /etc/systemd/system/consul.service sudo chown root:root /etc/systemd/system/consul.service sudo mv /home/vagrant/config.json /etc/consul.d/server/config.json sudo chown root:consul /etc/consul.d/server/config.json # Reload systemd, then enable and start Consul sudo systemctl daemon-reload if systemctl is-enabled --quiet consul; then systemctl reenable consul else systemctl enable consul fi if systemctl is-active --quiet consul; then systemctl restart consul else systemctl start consul fi
{ "content_hash": "47fb61faec6ce9f24b7ab473896b6b5a", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 85, "avg_line_length": 27.19402985074627, "alnum_prop": 0.7376509330406147, "repo_name": "lowescott/learning-tools", "id": "661aeb66b9c99e49ac745974a128642b459c338b", "size": "1861", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "consul/consul/consul.sh", "mode": "33188", "license": "mit", "language": [ { "name": "HCL", "bytes": "46890" }, { "name": "HTML", "bytes": "2577" }, { "name": "Python", "bytes": "198566" }, { "name": "Ruby", "bytes": "145238" }, { "name": "Shell", "bytes": "19758" } ], "symlink_target": "" }
namespace NetMud.Utility { public static partial class RenderUtility { public enum SplitListType { AllComma, AllAnd, CommaWithAnd, OxfordComma } } }
{ "content_hash": "fcb198b2d17ada8be3623457062f5825", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 45, "avg_line_length": 18, "alnum_prop": 0.5085470085470085, "repo_name": "SwiftAusterity/NetMud", "id": "4e5c1b0a0bca7d0ccc743a289013edc6a7be613b", "size": "236", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "NetMud.Utility/SplitListType.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "202" }, { "name": "C", "bytes": "8930665" }, { "name": "C#", "bytes": "1968762" }, { "name": "C++", "bytes": "458" }, { "name": "CSS", "bytes": "152651" }, { "name": "HTML", "bytes": "5127" }, { "name": "JavaScript", "bytes": "1180842" }, { "name": "Makefile", "bytes": "2304" } ], "symlink_target": "" }
package com.hangon.map.util; /** * Created by Administrator on 2016/4/23. */ public class JudgeNet { /** * 状态判断 */ private static int states=0; /** * 传输经纬度---路线查询向地图主页 */ private static double lat=0.0; private static double lon=0.0; //判断选择个人信息返回参数值 private static int personalInformation=0; //判断是否是从预约加油页面传过去的数据 private static int appointOrderData=0; //判断从预约加油到线路规划 private static int appointRoute=0; public int getAppointRoute() { return appointRoute; } public void setAppointRoute(int appointOrderData) { JudgeNet.appointRoute= appointOrderData; } public int getAppointOrderData() { return appointOrderData; } public void setAppointOrderData(int appointOrderData) { JudgeNet.appointOrderData = appointOrderData; } public static int getStates() { return states; } public static void setStates(int states) { JudgeNet.states = states; } public static double getLat() { return lat; } public static void setLat(double lat) { JudgeNet.lat = lat; } public int getPersonalInformation() { return personalInformation; } public void setPersonalInformation(int personalInformation) { JudgeNet.personalInformation = personalInformation; } public static double getLon() { return lon; } public static void setLon(double lon) { JudgeNet.lon = lon; } }
{ "content_hash": "0fc7c178f6ab6621a1cf30c927fa9980", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 65, "avg_line_length": 22.205882352941178, "alnum_prop": 0.6390728476821192, "repo_name": "TangZuopeng/OurApplication", "id": "d97761ee1e9efe3dcf969a6b1a1e88b112afe1c4", "size": "1632", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/java/com/hangon/map/util/JudgeNet.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "1018419" } ], "symlink_target": "" }