hexsha
stringlengths
40
40
size
int64
7
1.05M
ext
stringclasses
13 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
269
max_stars_repo_name
stringlengths
5
108
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
9
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
269
max_issues_repo_name
stringlengths
5
116
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
9
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
269
max_forks_repo_name
stringlengths
5
116
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
9
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
7
1.05M
avg_line_length
float64
1.21
330k
max_line_length
int64
6
990k
alphanum_fraction
float64
0.01
0.99
author_id
stringlengths
2
40
99655b5fe5c2657b64d3c464da1a2b152235abdb
33
hh
C++
include/trick/compat/sim_services/Message/include/MessageLCout.hh
gilbertguoze/trick
f0537efb0fa3cb5c0c84e36b60f055c1d1c60d21
[ "NASA-1.3" ]
647
2015-05-07T16:08:16.000Z
2022-03-30T02:33:21.000Z
include/trick/compat/sim_services/Message/include/MessageLCout.hh
gilbertguoze/trick
f0537efb0fa3cb5c0c84e36b60f055c1d1c60d21
[ "NASA-1.3" ]
995
2015-04-30T19:44:31.000Z
2022-03-31T20:14:44.000Z
include/trick/compat/sim_services/Message/include/MessageLCout.hh
gilbertguoze/trick
f0537efb0fa3cb5c0c84e36b60f055c1d1c60d21
[ "NASA-1.3" ]
251
2015-05-15T09:24:34.000Z
2022-03-22T20:39:05.000Z
#include "trick/MessageLCout.hh"
16.5
32
0.787879
gilbertguoze
9967ae213a368f4d7eca16535649ff73f8cce3ab
9,045
cxx
C++
HLT/EMCAL/AliHLTEMCALDigitMakerComponent.cxx
AllaMaevskaya/AliRoot
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
[ "BSD-3-Clause" ]
52
2016-12-11T13:04:01.000Z
2022-03-11T11:49:35.000Z
HLT/EMCAL/AliHLTEMCALDigitMakerComponent.cxx
AllaMaevskaya/AliRoot
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
[ "BSD-3-Clause" ]
1,388
2016-11-01T10:27:36.000Z
2022-03-30T15:26:09.000Z
HLT/EMCAL/AliHLTEMCALDigitMakerComponent.cxx
AllaMaevskaya/AliRoot
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
[ "BSD-3-Clause" ]
275
2016-06-21T20:24:05.000Z
2022-03-31T13:06:19.000Z
// $Id$ /************************************************************************** * This file is property of and copyright by the ALICE HLT Project * * All rights reserved. * * * * Primary Authors: Oystein Djuvsland * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ #include "AliHLTEMCALDigitMakerComponent.h" #include "AliHLTCaloDigitMaker.h" #include "AliHLTCaloDigitDataStruct.h" #include "AliHLTCaloChannelDataHeaderStruct.h" #include "AliHLTCaloChannelDataStruct.h" #include "AliHLTEMCALMapper.h" #include "AliHLTEMCALDefinitions.h" #include "AliCaloCalibPedestal.h" #include "AliEMCALCalibData.h" #include "AliCDBEntry.h" #include "AliCDBPath.h" #include "AliCDBManager.h" #include "TFile.h" #include <sys/stat.h> #include <sys/types.h> //#include "AliHLTEMCALConstant.h" #include "AliHLTCaloConstants.h" using EMCAL::NZROWSMOD; using EMCAL::NXCOLUMNSMOD; using EMCAL::NMODULES; using CALO::HGLGFACTOR; /** * @file AliHLTEMCALDigitMakerComponent.cxx * @author Oystein Djuvsland * @date * @brief A digit maker component for EMCAL HLT */ // see below for class documentation // or // refer to README to build package // or // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt ClassImp(AliHLTEMCALDigitMakerComponent) AliHLTEMCALDigitMakerComponent gAliHLTEMCALDigitMakerComponent; AliHLTEMCALDigitMakerComponent::AliHLTEMCALDigitMakerComponent() : AliHLTCaloProcessor(), // AliHLTCaloConstantsHandler("EMCAL"), fDigitContainerPtr(0), fPedestalData(0), fCalibData(0) { //see header file for documentation for(int imod = 0; imod < NMODULES; imod++){ fDigitMakerPtr[imod] = NULL; fBCMInitialised[imod] = true; fGainsInitialised[imod] = true; } } AliHLTEMCALDigitMakerComponent::~AliHLTEMCALDigitMakerComponent() { //see header file for documentation } int AliHLTEMCALDigitMakerComponent::Deinit() { //see header file for documentation for(int imod = 0; imod < NMODULES; imod++){ if(fDigitMakerPtr[imod]) { delete fDigitMakerPtr[imod]; fDigitMakerPtr[imod] = 0; } } return 0; } const char* AliHLTEMCALDigitMakerComponent::GetComponentID() { //see header file for documentation return "EmcalDigitMaker"; } void AliHLTEMCALDigitMakerComponent::GetInputDataTypes(vector<AliHLTComponentDataType>& list) { //see header file for documentation list.clear(); list.push_back(AliHLTEMCALDefinitions::fgkChannelDataType); } AliHLTComponentDataType AliHLTEMCALDigitMakerComponent::GetOutputDataType() { //see header file for documentation // return AliHLTCaloDefinitions::fgkDigitDataType|kAliHLTDataOriginEMCAL; return AliHLTEMCALDefinitions::fgkDigitDataType; } void AliHLTEMCALDigitMakerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier) { //see header file for documentation constBase = 0; inputMultiplier = (float)sizeof(AliHLTCaloDigitDataStruct)/sizeof(AliHLTCaloChannelDataStruct) + 1; } int AliHLTEMCALDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& /* trigData */, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, std::vector<AliHLTComponentBlockData>& outputBlocks) { //patch in order to skip calib events if(! IsDataEvent()) return 0; //see header file for documentation UInt_t offset = 0; UInt_t mysize = 0; Int_t digitCount = 0; Int_t ret = 0; const AliHLTComponentBlockData* iter = 0; unsigned long ndx; UInt_t specification = 0; AliHLTCaloChannelDataHeaderStruct* tmpChannelData = 0; Int_t moduleID; for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) { iter = blocks+ndx; if(iter->fDataType != AliHLTEMCALDefinitions::fgkChannelDataType) continue; if(iter->fSpecification >= 40) continue; // Do not use inactive DDLs moduleID = int(iter->fSpecification/2); if(!fBCMInitialised[moduleID]){ if(moduleID > -1){ for(Int_t x = 0; x < NXCOLUMNSMOD ; x++) // PTH for(Int_t z = 0; z < NZROWSMOD ; z++) // PTH fDigitMakerPtr[moduleID]->SetBadChannel(x, z, fPedestalData->IsBadChannel(moduleID, z, x)); // FR //delete fBadChannelMap; fBCMInitialised[moduleID] = true; } else HLTError("Error setting pedestal with module value of %d", moduleID); } if(!fGainsInitialised[moduleID]){ if(moduleID > -1){ for(Int_t x = 0; x < NXCOLUMNSMOD; x++) //PTH for(Int_t z = 0; z < NZROWSMOD; z++) //PTH // FR setting gains fDigitMakerPtr[moduleID]->SetGain(x, z, HGLGFACTOR, fCalibData->GetADCchannel(moduleID, z, x)); fGainsInitialised[moduleID] = true; } else HLTError("Error setting gains with module value of %d", moduleID); } tmpChannelData = reinterpret_cast<AliHLTCaloChannelDataHeaderStruct*>(iter->fPtr); fDigitMakerPtr[moduleID]->SetDigitDataPtr(reinterpret_cast<AliHLTCaloDigitDataStruct*>(outputPtr)); ret = fDigitMakerPtr[moduleID]->MakeDigits(tmpChannelData, size-(digitCount*sizeof(AliHLTCaloDigitDataStruct))); HLTDebug("Found %d digits", ret); if(ret == -1) { HLTError("Trying to write over buffer size"); return -ENOBUFS; } digitCount += ret; outputPtr += sizeof(AliHLTCaloDigitDataStruct) * ret; // forward pointer } mysize += digitCount*sizeof(AliHLTCaloDigitDataStruct); HLTDebug("# of digits: %d, used memory size: %d, available size: %d", digitCount, mysize, size); if(mysize > 0) { AliHLTComponentBlockData bd; FillBlockData( bd ); bd.fOffset = offset; bd.fSize = mysize; bd.fDataType = AliHLTEMCALDefinitions::fgkDigitDataType; bd.fSpecification = 0; outputBlocks.push_back(bd); } for(Int_t imod = 0; imod < NMODULES; imod++) fDigitMakerPtr[imod]->Reset(); size = mysize; return 0; } int AliHLTEMCALDigitMakerComponent::DoInit(int argc, const char** argv ) { //see header file for documentation for(Int_t imod = 0; imod < NMODULES; imod++){ fDigitMakerPtr[imod] = new AliHLTCaloDigitMaker("EMCAL"); AliHLTCaloMapper *mapper = new AliHLTEMCALMapper(2); fDigitMakerPtr[imod]->SetMapper(mapper); for(int i = 0; i < argc; i++) { if(!strcmp("-lowgainfactor", argv[i])) { fDigitMakerPtr[imod]->SetGlobalLowGainFactor(atof(argv[i+1])); } if(!strcmp("-highgainfactor", argv[i])) { fDigitMakerPtr[imod]->SetGlobalHighGainFactor(atof(argv[i+1])); } } } if (GetBCMFromCDB()) return -1; if (GetGainsFromCDB()) return -1; //GetBCMFromCDB(); //fDigitMakerPtr->SetDigitThreshold(2); return 0; } int AliHLTEMCALDigitMakerComponent::GetBCMFromCDB() { // See header file for class documentation for(Int_t imod = 0; imod < 20; imod++) fBCMInitialised[imod] = false; // HLTInfo("Getting bad channel map..."); AliCDBPath path("EMCAL","Calib","Pedestals"); if(path.GetPath()) { // HLTInfo("configure from entry %s", path.GetPath()); AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/); if (pEntry) { fPedestalData = (AliCaloCalibPedestal*)pEntry->GetObject(); } else { // HLTError("can not fetch object \"%s\" from CDB", path); return -1; } } if(!fPedestalData) { return -1; } return 0; } int AliHLTEMCALDigitMakerComponent::GetGainsFromCDB() { // See header file for class documentation for(Int_t imod = 0; imod < 20; imod++) fGainsInitialised[imod] = false; // HLTInfo("Getting bad channel map..."); AliCDBPath path("EMCAL","Calib","Data"); if(path.GetPath()) { // HLTInfo("configure from entry %s", path.GetPath()); AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/); if (pEntry) { fCalibData = (AliEMCALCalibData*)pEntry->GetObject(); } else { // HLTError("can not fetch object \"%s\" from CDB", path); return -1; } } if(!fCalibData) return -1; return 0; } AliHLTComponent* AliHLTEMCALDigitMakerComponent::Spawn() { //see header file for documentation return new AliHLTEMCALDigitMakerComponent(); }
28.443396
120
0.656385
AllaMaevskaya
99687f987cf282449c724d0facef62ce19ca5f27
27,930
cpp
C++
pxr/imaging/lib/hd/quadrangulate.cpp
marsupial/USD
98d49911893d59be5a9904a29e15959affd530ec
[ "BSD-3-Clause" ]
9
2021-03-31T21:23:48.000Z
2022-03-05T09:29:27.000Z
pxr/imaging/lib/hd/quadrangulate.cpp
unity3d-jp/USD
0f146383613e1efe872ea7c85aa3536f170fcda2
[ "BSD-3-Clause" ]
null
null
null
pxr/imaging/lib/hd/quadrangulate.cpp
unity3d-jp/USD
0f146383613e1efe872ea7c85aa3536f170fcda2
[ "BSD-3-Clause" ]
2
2016-12-13T00:53:40.000Z
2020-05-04T07:32:53.000Z
// // Copyright 2016 Pixar // // Licensed under the Apache License, Version 2.0 (the "Apache License") // with the following modification; you may not use this file except in // compliance with the Apache License and the following modification to it: // Section 6. Trademarks. is deleted and replaced with: // // 6. Trademarks. This License does not grant permission to use the trade // names, trademarks, service marks, or product names of the Licensor // and its affiliates, except as required to comply with Section 4(c) of // the License and to reproduce the content of the NOTICE file. // // You may obtain a copy of the Apache License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the Apache License with the above modification is // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the Apache License for the specific // language governing permissions and limitations under the Apache License. // #include "pxr/imaging/glf/glew.h" #include "pxr/imaging/hd/quadrangulate.h" #include "pxr/imaging/hd/bufferArrayRange.h" #include "pxr/imaging/hd/glslProgram.h" #include "pxr/imaging/hd/meshTopology.h" #include "pxr/imaging/hd/perfLog.h" #include "pxr/imaging/hd/renderContextCaps.h" #include "pxr/imaging/hd/resourceRegistry.h" #include "pxr/imaging/hd/vtBufferSource.h" #include "pxr/imaging/glf/glslfx.h" #include "pxr/base/gf/vec4i.h" Hd_QuadInfoBuilderComputation::Hd_QuadInfoBuilderComputation( HdMeshTopology *topology, SdfPath const &id) : _id(id), _topology(topology) { } bool Hd_QuadInfoBuilderComputation::Resolve() { if (not _TryLock()) return false; HD_TRACE_FUNCTION(); int const * numVertsPtr = _topology->GetFaceVertexCounts().cdata(); int const * vertsPtr = _topology->GetFaceVertexIndices().cdata(); int const * holeFacesPtr = _topology->GetHoleIndices().cdata(); int numFaces = _topology->GetFaceVertexCounts().size(); int numVertIndices = _topology->GetFaceVertexIndices().size(); int numHoleFaces = _topology->GetHoleIndices().size(); // compute numPoints from topology indices int numPoints = HdMeshTopology::ComputeNumPoints( _topology->GetFaceVertexIndices()); Hd_QuadInfo *quadInfo = new Hd_QuadInfo(); quadInfo->numVerts.clear(); quadInfo->verts.clear(); quadInfo->pointsOffset = numPoints; int vertIndex = 0; int numAdditionalPoints = 0; int maxNumVert = 0; int holeIndex = 0; bool invalidTopology = false; for (int i = 0; i < numFaces; ++i) { int nv = numVertsPtr[i]; if (holeIndex < numHoleFaces and holeFacesPtr[holeIndex] == i) { // skip hole faces. vertIndex += nv; ++holeIndex; continue; } if (nv == 4) { vertIndex += nv; continue; } // if it isn't a quad, quadInfo->numVerts.push_back(nv); for (int j = 0; j < nv; ++j) { // store vertex indices into quadinfo int index = 0; if (vertIndex >= numVertIndices) { invalidTopology = true; } else { index = vertsPtr[vertIndex++]; } quadInfo->verts.push_back(index); } // nv + 1 (edge + center) additional vertices needed. numAdditionalPoints += (nv + 1); // remember max numvert for making gpu-friendly table maxNumVert = std::max(maxNumVert, nv); } quadInfo->numAdditionalPoints = numAdditionalPoints; quadInfo->maxNumVert = maxNumVert; if (invalidTopology) { TF_WARN("numVerts and verts are incosistent [%s]", _id.GetText()); } // set quadinfo to topology // topology takes the ownership of quadinfo so no need to free. _topology->SetQuadInfo(quadInfo); _SetResolved(); return true; } bool Hd_QuadInfoBuilderComputation::_CheckValid() const { return true; } // --------------------------------------------------------------------------- Hd_QuadIndexBuilderComputation::Hd_QuadIndexBuilderComputation( HdMeshTopology *topology, Hd_QuadInfoBuilderComputationSharedPtr const &quadInfoBuilder, SdfPath const &id) : _id(id), _topology(topology), _quadInfoBuilder(quadInfoBuilder) { } void Hd_QuadIndexBuilderComputation::AddBufferSpecs(HdBufferSpecVector *specs) const { specs->push_back(HdBufferSpec(HdTokens->indices, GL_INT, 4)); // coarse-quads uses int2 as primitive param. specs->push_back(HdBufferSpec(HdTokens->primitiveParam, GL_INT, 2)); } bool Hd_QuadIndexBuilderComputation::Resolve() { // quadInfoBuilder may or may not exists, depending on how we switched // the repr of the mesh. If it exists, we have to wait. if (_quadInfoBuilder and not _quadInfoBuilder->IsResolved()) return false; if (not _TryLock()) return false; // generate quad index buffer HD_TRACE_FUNCTION(); // TODO: create ptex id remapping buffer here. int const * numVertsPtr = _topology->GetFaceVertexCounts().cdata(); int const * vertsPtr = _topology->GetFaceVertexIndices().cdata(); int const * holeFacesPtr = _topology->GetHoleIndices().cdata(); int numFaces = _topology->GetFaceVertexCounts().size(); int numVertIndices = _topology->GetFaceVertexIndices().size(); int numHoleFaces = _topology->GetHoleIndices().size(); // count num quads bool invalidTopology = false; int numQuads = HdMeshTopology::ComputeNumQuads( _topology->GetFaceVertexCounts(), _topology->GetHoleIndices(), &invalidTopology); if (invalidTopology) { TF_WARN("degenerated face found [%s]", _id.GetText()); invalidTopology = false; } int holeIndex = 0; VtVec4iArray quadsFaceVertexIndices(numQuads); VtVec2iArray primitiveParam(numQuads); // quadrangulated verts is added to the end. bool flip = (_topology->GetOrientation() != HdTokens->rightHanded); int vertIndex = HdMeshTopology::ComputeNumPoints( _topology->GetFaceVertexIndices()); // TODO: We need to support ptex index in addition to coarse indices. //int ptexIndex = 0; for (int i = 0, qv = 0, v = 0; i<numFaces; ++i) { int nv = numVertsPtr[i]; if (nv < 3) { continue; // skip degenerated face } if (holeIndex < numHoleFaces and holeFacesPtr[holeIndex] == i) { // skip hole faces. ++holeIndex; continue; } if (v+nv > numVertIndices) { invalidTopology = true; if (nv == 4) { quadsFaceVertexIndices[qv++] = GfVec4i(0); } else { for (int j = 0; j < nv; ++j) { quadsFaceVertexIndices[qv++] = GfVec4i(0); } } v += nv; continue; } if (nv == 4) { if (flip) { quadsFaceVertexIndices[qv][0] = (vertsPtr[v+0]); quadsFaceVertexIndices[qv][1] = (vertsPtr[v+3]); quadsFaceVertexIndices[qv][2] = (vertsPtr[v+2]); quadsFaceVertexIndices[qv][3] = (vertsPtr[v+1]); } else { quadsFaceVertexIndices[qv][0] = (vertsPtr[v+0]); quadsFaceVertexIndices[qv][1] = (vertsPtr[v+1]); quadsFaceVertexIndices[qv][2] = (vertsPtr[v+2]); quadsFaceVertexIndices[qv][3] = (vertsPtr[v+3]); } primitiveParam[qv] = GfVec2i( HdMeshTopology::EncodeCoarseFaceParam(i, 0), qv); ++qv; } else { // quadrangulate non-quad faces // the additional points (edge and center) are stored at the end of // original points, as // last point, e0, e1, ..., en, center, e0, e1, ... // so each sub-quads become // *first non-quad // v0, e0, center, e(-1), // v1, e1, center, e0, //... // *second non-quad // ... for (int j = 0; j < nv; ++j) { // vertex quadsFaceVertexIndices[qv][0] = vertsPtr[v+j]; if (flip) { // edge prev quadsFaceVertexIndices[qv][1] = vertIndex + (j+nv-1)%nv; // center quadsFaceVertexIndices[qv][2] = vertIndex + nv; // edge next quadsFaceVertexIndices[qv][3] = vertIndex + j; } else { // edge next quadsFaceVertexIndices[qv][1] = vertIndex + j; // center quadsFaceVertexIndices[qv][2] = vertIndex + nv; // edge prev quadsFaceVertexIndices[qv][3] = vertIndex + (j+nv-1)%nv; } primitiveParam[qv] = GfVec2i( HdMeshTopology::EncodeCoarseFaceParam(i, 0), qv); ++qv; } vertIndex += nv + 1; } v += nv; } if (invalidTopology) { TF_WARN("numVerts and verts are incosistent [%s]", _id.GetText()); } _SetResult(HdBufferSourceSharedPtr(new HdVtBufferSource( HdTokens->indices, VtValue(quadsFaceVertexIndices)))); _primitiveParam.reset(new HdVtBufferSource(HdTokens->primitiveParam, VtValue(primitiveParam))); _SetResolved(); return true; } bool Hd_QuadIndexBuilderComputation::HasChainedBuffer() const { return true; } HdBufferSourceSharedPtr Hd_QuadIndexBuilderComputation::GetChainedBuffer() const { return _primitiveParam; } bool Hd_QuadIndexBuilderComputation::_CheckValid() const { return true; } // --------------------------------------------------------------------------- Hd_QuadrangulateTableComputation::Hd_QuadrangulateTableComputation( HdMeshTopology *topology, HdBufferSourceSharedPtr const &quadInfoBuilder) : _topology(topology), _quadInfoBuilder(quadInfoBuilder) { } bool Hd_QuadrangulateTableComputation::Resolve() { if (not TF_VERIFY(_quadInfoBuilder)) return false; if (not _quadInfoBuilder->IsResolved()) return false; if (not _TryLock()) return false; HD_TRACE_FUNCTION(); Hd_QuadInfo const *quadInfo = _topology->GetQuadInfo(); if (not quadInfo) { TF_CODING_ERROR("Hd_QuadInfo is null."); return true; } // transfer quadrangulation table to GPU // for the same reason as cpu quadrangulation, we need a check // of IsAllQuads here. // see the comment on HdMeshTopology::Quadrangulate() if (not quadInfo->IsAllQuads()) { int quadInfoStride = quadInfo->maxNumVert + 2; int numNonQuads = quadInfo->numVerts.size(); // create a buffer source for gpu quadinfo table VtIntArray array(quadInfoStride * numNonQuads); int index = 0, vertIndex = 0, dstOffset = quadInfo->pointsOffset; for (int i = 0; i < numNonQuads; ++i) { // GPU quadinfo table layout // // struct NonQuad { // int numVert; // int dstOffset; // int index[maxNumVert]; // } [numNonQuads] // int numVert = quadInfo->numVerts[i]; array[index] = numVert; array[index+1] = dstOffset; for (int j = 0; j < numVert; ++j) { array[index+j+2] = quadInfo->verts[vertIndex++]; } index += quadInfoStride; dstOffset += numVert + 1; // edge + center } // sanity check for number of points TF_VERIFY(dstOffset == quadInfo->pointsOffset + quadInfo->numAdditionalPoints); // GPU quadrangulate table HdBufferSourceSharedPtr table(new HdVtBufferSource(HdTokens->quadInfo, VtValue(array))); _SetResult(table); } else { _topology->ClearQuadrangulateTableRange(); } _SetResolved(); return true; } void Hd_QuadrangulateTableComputation::AddBufferSpecs( HdBufferSpecVector *specs) const { // quadinfo computation produces an index buffer for quads. specs->push_back(HdBufferSpec(HdTokens->quadInfo, GL_INT, 1)); } bool Hd_QuadrangulateTableComputation::_CheckValid() const { return true; } // --------------------------------------------------------------------------- template <typename T> HdBufferSourceSharedPtr _Quadrangulate(HdBufferSourceSharedPtr const &source, Hd_QuadInfo const *qi) { // CPU quadrangulation // original points + quadrangulated points VtArray<T> results(qi->pointsOffset + qi->numAdditionalPoints); // copy original primVars T const *srcPtr = reinterpret_cast<T const*>(source->GetData()); memcpy(results.data(), srcPtr, sizeof(T)*qi->pointsOffset); // compute quadrangulate primVars int index = 0; // store quadrangulated points at end int dstIndex = qi->pointsOffset; HD_PERF_COUNTER_ADD(HdPerfTokens->quadrangulatedVerts, qi->numAdditionalPoints); TF_FOR_ALL (numVertsIt, qi->numVerts) { int nv = *numVertsIt; T center(0); for (int i = 0; i < nv; ++i) { int i0 = qi->verts[index+i]; int i1 = qi->verts[index+(i+1)%nv]; // midpoint T edge = (srcPtr[i0] + srcPtr[i1]) * 0.5; results[dstIndex++] = edge; // accumulate center center += srcPtr[i0]; } // average center value center /= nv; results[dstIndex++] = center; index += nv; } return HdBufferSourceSharedPtr(new HdVtBufferSource( source->GetName(), VtValue(results))); } Hd_QuadrangulateComputation::Hd_QuadrangulateComputation( HdMeshTopology *topology, HdBufferSourceSharedPtr const &source, HdBufferSourceSharedPtr const &quadInfoBuilder, SdfPath const &id) : _id(id), _topology(topology), _source(source), _quadInfoBuilder(quadInfoBuilder) { } bool Hd_QuadrangulateComputation::Resolve() { if (not TF_VERIFY(_source)) return false; if (not _source->IsResolved()) return false; if (_quadInfoBuilder and not _quadInfoBuilder->IsResolved()) return false; if (not _TryLock()) return false; HD_TRACE_FUNCTION(); HD_PERF_COUNTER_INCR(HdPerfTokens->quadrangulateCPU); Hd_QuadInfo const *quadInfo = _topology->GetQuadInfo(); if (not TF_VERIFY(quadInfo)) return true; // If the topology is all quads, just return source. // This check is needed since if the topology changes, we don't know // whether the topology is all-quads or not until the quadinfo computation // is resolved. So we conservatively register primvar quadrangulations // on that case, it hits this condition. Once quadinfo resolved on the // topology, HdMeshTopology::GetQuadrangulateComputation returns null // and nobody calls this function for all-quads prims. if (quadInfo->IsAllQuads()) { _SetResult(_source); _SetResolved(); return true; } HdBufferSourceSharedPtr result; switch (_source->GetGLElementDataType()) { case GL_FLOAT: result = _Quadrangulate<float>(_source, quadInfo); break; case GL_FLOAT_VEC2: result = _Quadrangulate<GfVec2f>(_source, quadInfo); break; case GL_FLOAT_VEC3: result = _Quadrangulate<GfVec3f>(_source, quadInfo); break; case GL_FLOAT_VEC4: result = _Quadrangulate<GfVec4f>(_source, quadInfo); break; case GL_DOUBLE: result = _Quadrangulate<double>(_source, quadInfo); break; case GL_DOUBLE_VEC2: result = _Quadrangulate<GfVec2d>(_source, quadInfo); break; case GL_DOUBLE_VEC3: result = _Quadrangulate<GfVec3d>(_source, quadInfo); break; case GL_DOUBLE_VEC4: result = _Quadrangulate<GfVec4d>(_source, quadInfo); break; default: TF_CODING_ERROR("Unsupported points type for quadrangulation [%s]", _id.GetText()); result = _source; break; } _SetResult(result); _SetResolved(); return true; } void Hd_QuadrangulateComputation::AddBufferSpecs(HdBufferSpecVector *specs) const { // produces same spec buffer as source _source->AddBufferSpecs(specs); } int Hd_QuadrangulateComputation::GetGLComponentDataType() const { return _source->GetGLComponentDataType(); } bool Hd_QuadrangulateComputation::_CheckValid() const { return (_source->IsValid()); } // --------------------------------------------------------------------------- template <typename T> HdBufferSourceSharedPtr _QuadrangulateFaceVarying(HdBufferSourceSharedPtr const &source, VtIntArray const &faceVertexCounts, VtIntArray const &holeFaces, bool flip, SdfPath const &id) { T const *srcPtr = reinterpret_cast<T const *>(source->GetData()); int numElements = source->GetNumElements(); // CPU face-varying quadrangulation bool invalidTopology = false; int numFVarValues = 0; int holeIndex = 0; int numHoleFaces = holeFaces.size(); for (int i = 0; i < faceVertexCounts.size(); ++i) { int nVerts = faceVertexCounts[i]; if (nVerts < 3) { // skip degenerated face invalidTopology = true; } else if (holeIndex < numHoleFaces and holeFaces[holeIndex] == i) { // skip hole face ++holeIndex; } else if (nVerts == 4) { numFVarValues += 4; } else { numFVarValues += 4 * nVerts; } } if (invalidTopology) { TF_WARN("degenerated face found [%s]", id.GetText()); invalidTopology = false; } VtArray<T> results(numFVarValues); // reset holeIndex holeIndex = 0; int dstIndex = 0; for (int i = 0, v = 0; i < faceVertexCounts.size(); ++i) { int nVerts = faceVertexCounts[i]; if (nVerts < 3) { // skip degenerated faces. } else if (holeIndex < numHoleFaces and holeFaces[holeIndex] == i) { // skip hole faces. ++holeIndex; } else if (nVerts == 4) { // copy for (int j = 0; j < 4; ++j) { if (v+j >= numElements) { invalidTopology = true; results[dstIndex++] = T(0); } else { results[dstIndex++] = srcPtr[v+j]; } } } else { // quadrangulate // compute the center first // early out if overrunning if (v+nVerts > numElements) { invalidTopology = true; for (int j = 0; j < nVerts; ++j) { results[dstIndex++] = T(0); results[dstIndex++] = T(0); results[dstIndex++] = T(0); results[dstIndex++] = T(0); } continue; } T center(0); for (int j = 0; j < nVerts; ++j) { center += srcPtr[v+j]; } center /= nVerts; // for each quadrant for (int j = 0; j < nVerts; ++j) { results[dstIndex++] = srcPtr[v+j]; // mid edge results[dstIndex++] = (srcPtr[v+j] + srcPtr[v+(j+1)%nVerts]) * 0.5; // center results[dstIndex++] = center; // mid edge results[dstIndex++] = (srcPtr[v+j] + srcPtr[v+(j+nVerts-1)%nVerts]) * 0.5; } } v += nVerts; } if (invalidTopology) { TF_WARN("numVerts and verts are incosistent [%s]", id.GetText()); } return HdBufferSourceSharedPtr(new HdVtBufferSource( source->GetName(), VtValue(results))); } Hd_QuadrangulateFaceVaryingComputation::Hd_QuadrangulateFaceVaryingComputation( HdMeshTopology *topology, HdBufferSourceSharedPtr const &source, SdfPath const &id) : _id(id), _topology(topology), _source(source) { } bool Hd_QuadrangulateFaceVaryingComputation::Resolve() { if (not TF_VERIFY(_source)) return false; if (not _source->IsResolved()) return false; if (not _TryLock()) return false; HD_TRACE_FUNCTION(); HD_PERF_COUNTER_INCR(HdPerfTokens->quadrangulateFaceVarying); VtIntArray const &faceVertexCounts = _topology->GetFaceVertexCounts(); VtIntArray const &holeFaces = _topology->GetHoleIndices(); bool flip = (_topology->GetOrientation() != HdTokens->rightHanded); HdBufferSourceSharedPtr result; switch (_source->GetGLElementDataType()) { case GL_FLOAT: result = _QuadrangulateFaceVarying<float>( _source, faceVertexCounts, holeFaces, flip, _id); break; case GL_FLOAT_VEC2: result = _QuadrangulateFaceVarying<GfVec2f>( _source, faceVertexCounts, holeFaces, flip, _id); break; case GL_FLOAT_VEC3: result = _QuadrangulateFaceVarying<GfVec3f>( _source, faceVertexCounts, holeFaces, flip, _id); break; case GL_FLOAT_VEC4: result = _QuadrangulateFaceVarying<GfVec4f>( _source, faceVertexCounts, holeFaces, flip, _id); break; case GL_DOUBLE: result = _QuadrangulateFaceVarying<double>( _source, faceVertexCounts, holeFaces, flip, _id); break; case GL_DOUBLE_VEC2: result = _QuadrangulateFaceVarying<GfVec2d>( _source, faceVertexCounts, holeFaces, flip, _id); break; case GL_DOUBLE_VEC3: result = _QuadrangulateFaceVarying<GfVec3d>( _source, faceVertexCounts, holeFaces, flip, _id); break; case GL_DOUBLE_VEC4: result = _QuadrangulateFaceVarying<GfVec4d>( _source, faceVertexCounts, holeFaces, flip, _id); break; default: TF_CODING_ERROR("Unsupported primvar type for quadrangulation [%s]", _id.GetText()); result = _source; break; } _SetResult(result); _SetResolved(); return true; } void Hd_QuadrangulateFaceVaryingComputation::AddBufferSpecs(HdBufferSpecVector *specs) const { // produces same spec buffer as source _source->AddBufferSpecs(specs); } bool Hd_QuadrangulateFaceVaryingComputation::_CheckValid() const { return (_source->IsValid()); } // --------------------------------------------------------------------------- Hd_QuadrangulateComputationGPU::Hd_QuadrangulateComputationGPU( HdMeshTopology *topology, TfToken const &sourceName, GLenum dataType, SdfPath const &id) : _id(id), _topology(topology), _name(sourceName), _dataType(dataType) { if (dataType != GL_FLOAT and dataType != GL_DOUBLE) { TF_CODING_ERROR("Unsupported primvar type for quadrangulation [%s]", _id.GetText()); } } void Hd_QuadrangulateComputationGPU::Execute(HdBufferArrayRangeSharedPtr const &range) { if (not TF_VERIFY(_topology)) return; HD_TRACE_FUNCTION(); HD_PERF_COUNTER_INCR(HdPerfTokens->quadrangulateGPU); // if this topology doesn't contain non-quad faces, quadInfoRange is null. HdBufferArrayRangeSharedPtr const &quadrangulateTableRange = _topology->GetQuadrangulateTableRange(); if (not quadrangulateTableRange) return; HD_TRACE_FUNCTION(); HD_MALLOC_TAG_FUNCTION(); Hd_QuadInfo const *quadInfo = _topology->GetQuadInfo(); if (not quadInfo) { TF_CODING_ERROR("Hd_QuadInfo is null."); return; } if (not glDispatchCompute) return; // select shader by datatype TfToken shaderToken = (_dataType == GL_FLOAT ? HdGLSLProgramTokens->quadrangulateFloat : HdGLSLProgramTokens->quadrangulateDouble); HdGLSLProgramSharedPtr computeProgram = HdGLSLProgram::GetComputeProgram(shaderToken); if (not computeProgram) return; GLuint program = computeProgram->GetProgram().GetId(); // buffer resources for GPU computation HdBufferResourceSharedPtr primVar = range->GetResource(_name); HdBufferResourceSharedPtr quadrangulateTable = quadrangulateTableRange->GetResource(); // prepare uniform buffer for GPU computation struct Uniform { int vertexOffset; int quadInfoStride; int quadInfoOffset; int maxNumVert; int primVarOffset; int primVarStride; int numComponents; } uniform; int quadInfoStride = quadInfo->maxNumVert + 2; // coherent vertex offset in aggregated buffer array uniform.vertexOffset = range->GetOffset(); // quadinfo offset/stride in aggregated adjacency table uniform.quadInfoStride = quadInfoStride; uniform.quadInfoOffset = quadrangulateTable->GetOffset(); uniform.maxNumVert = quadInfo->maxNumVert; // interleaved offset/stride to points // note: this code (and the glsl smooth normal compute shader) assumes // components in interleaved vertex array are always same data type. // i.e. it can't handle an interleaved array which interleaves // float/double, float/int etc. uniform.primVarOffset = primVar->GetOffset() / primVar->GetComponentSize(); uniform.primVarStride = primVar->GetStride() / primVar->GetComponentSize(); uniform.numComponents = primVar->GetNumComponents(); // transfer uniform buffer GLuint ubo = computeProgram->GetGlobalUniformBuffer().GetId(); HdRenderContextCaps const &caps = HdRenderContextCaps::GetInstance(); // XXX: workaround for 319.xx driver bug of glNamedBufferDataEXT on UBO // XXX: move this workaround to renderContextCaps if (false and caps.directStateAccessEnabled) { glNamedBufferDataEXT(ubo, sizeof(uniform), &uniform, GL_STATIC_DRAW); } else { glBindBuffer(GL_UNIFORM_BUFFER, ubo); glBufferData(GL_UNIFORM_BUFFER, sizeof(uniform), &uniform, GL_STATIC_DRAW); glBindBuffer(GL_UNIFORM_BUFFER, 0); } glBindBufferBase(GL_UNIFORM_BUFFER, 0, ubo); glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, primVar->GetId()); glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, quadrangulateTable->GetId()); // dispatch compute kernel glUseProgram(program); int numNonQuads = (int)quadInfo->numVerts.size(); glDispatchCompute(numNonQuads, 1, 1); glUseProgram(0); glBindBufferBase(GL_UNIFORM_BUFFER, 0, 0); glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 0, 0); glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 1, 0); HD_PERF_COUNTER_ADD(HdPerfTokens->quadrangulatedVerts, quadInfo->numAdditionalPoints); } void Hd_QuadrangulateComputationGPU::AddBufferSpecs(HdBufferSpecVector *specs) const { // nothing // // GPU quadrangulation requires the source data on GPU in prior to // execution, so no need to populate bufferspec on registration. } int Hd_QuadrangulateComputationGPU::GetNumOutputElements() const { Hd_QuadInfo const *quadInfo = _topology->GetQuadInfo(); if (not quadInfo) { TF_CODING_ERROR("Hd_QuadInfo is null [%s]", _id.GetText()); return 0; } return quadInfo->pointsOffset + quadInfo->numAdditionalPoints; }
32.401392
87
0.608127
marsupial
99729080b278e38abd0603ace3e6b2327a716b4e
249
cpp
C++
Leetcode Problems/26.Remove_Duplicates_from_Sorted_Array.cpp
rishusingh022/My-Journey-of-Data-Structures-and-Algorithms
28a70fdf10366fc97ddb9f6a69852b3478b564e6
[ "MIT" ]
1
2021-01-13T07:20:57.000Z
2021-01-13T07:20:57.000Z
Leetcode Problems/26.Remove_Duplicates_from_Sorted_Array.cpp
rishusingh022/My-Journey-of-Data-Structures-and-Algorithms
28a70fdf10366fc97ddb9f6a69852b3478b564e6
[ "MIT" ]
1
2021-10-01T18:26:34.000Z
2021-10-01T18:26:34.000Z
Leetcode Problems/26.Remove_Duplicates_from_Sorted_Array.cpp
rishusingh022/My-Journey-of-Data-Structures-and-Algorithms
28a70fdf10366fc97ddb9f6a69852b3478b564e6
[ "MIT" ]
7
2021-10-01T16:07:29.000Z
2021-10-04T13:23:48.000Z
class Solution { public: int removeDuplicates(vector<int>& nums) { vector<int>::iterator ip; ip = std::unique(nums.begin(), nums.end()); nums.resize(std::distance(nums.begin(), ip)); return nums.size(); } };
27.666667
53
0.574297
rishusingh022
99753e1401a617d5b2566b133eedd37307d7b558
345
cpp
C++
sdk/src/frame_operations.cpp
andreeasandulescu/aditof_sdk
c554aacc610f9086636b2742266726123989c4fd
[ "BSD-3-Clause" ]
null
null
null
sdk/src/frame_operations.cpp
andreeasandulescu/aditof_sdk
c554aacc610f9086636b2742266726123989c4fd
[ "BSD-3-Clause" ]
null
null
null
sdk/src/frame_operations.cpp
andreeasandulescu/aditof_sdk
c554aacc610f9086636b2742266726123989c4fd
[ "BSD-3-Clause" ]
null
null
null
#include <aditof/frame_operations.h> namespace aditof { bool operator==(const FrameDetails &lhs, const FrameDetails &rhs) { return lhs.type == rhs.type && lhs.width == rhs.width && lhs.width && rhs.height; } bool operator!=(const FrameDetails &lhs, const FrameDetails &rhs) { return !(lhs == rhs); } } // namespace aditof
23
73
0.663768
andreeasandulescu
9978b390491df18d645dde376bb564e507571ed5
201
hpp
C++
engine/engine.hpp
davidscholberg/opengl-es-test
9792d6d6f4f01fb91a8ec59ecf0fd02cd019db79
[ "BSD-2-Clause" ]
null
null
null
engine/engine.hpp
davidscholberg/opengl-es-test
9792d6d6f4f01fb91a8ec59ecf0fd02cd019db79
[ "BSD-2-Clause" ]
null
null
null
engine/engine.hpp
davidscholberg/opengl-es-test
9792d6d6f4f01fb91a8ec59ecf0fd02cd019db79
[ "BSD-2-Clause" ]
null
null
null
#ifndef ENGINE_HPP_ #define ENGINE_HPP_ class engine { public: engine(); engine(engine const &) = delete; ~engine(); void operator=(engine const &) = delete; }; #endif // ENGINE_HPP_
15.461538
44
0.651741
davidscholberg
5f53ae65b626f3f81e712d5ccfec67ede8b34bb3
6,275
cpp
C++
ECS/Project/Project/Renderers/RendererModules/DPassLightingModule/DPassLightingModule.cpp
AshwinKumarVijay/SceneECS
2acc115d5e7738ef9bf087c025e5e5a10cac3443
[ "MIT" ]
2
2017-01-30T23:38:49.000Z
2017-09-08T09:34:37.000Z
ECS/Project/Project/Renderers/RendererModules/DPassLightingModule/DPassLightingModule.cpp
AshwinKumarVijay/SceneECS
2acc115d5e7738ef9bf087c025e5e5a10cac3443
[ "MIT" ]
null
null
null
ECS/Project/Project/Renderers/RendererModules/DPassLightingModule/DPassLightingModule.cpp
AshwinKumarVijay/SceneECS
2acc115d5e7738ef9bf087c025e5e5a10cac3443
[ "MIT" ]
null
null
null
#include "DPassLightingModule.h" #include "../Renderers/ModuleRenderer/ModuleRenderer.h" #include "../GBufferModule/GBufferModule.h" #include "../LightsModule/LightsModule.h" #include "../../../Camera/Camera.h" #include "../../RendererResourceManagers/RendererShaderManager/RendererShaderData/RendererShaderData.h" // Default DPassLightingModule Constructor. DPassLightingModule::DPassLightingModule(std::shared_ptr<Renderer> newRenderer, std::shared_ptr<const GBufferModule> newGBufferModule, std::shared_ptr<const LightsModule> newLightsModule) : RendererModule(newRenderer) { // Copy over the Screen Width and Screen Height Textures. screenWidth = newRenderer->getSceneQuality().screenWidth; screenHeight = newRenderer->getSceneQuality().screenHeight; // Copy over the G Buffer Module. gBufferModule = newGBufferModule; // Copy over the Lights Module. lightsModule = newLightsModule; // Create the Deferred Pass Lighting Shader. deferredPassLightingShader = std::make_shared<RendererShaderData>(); // Add the Property Value. deferredPassLightingShader->addPropertyValue("Shader Type", "Deferred Lighting Pass Shader"); deferredPassLightingShader->addPropertyValue("Shader Output Opacity", "False"); // Set the Vertex Shader G Buffer Source. std::string vsSource = "Assets/ModuleRendererShaders/DeferredLightingPassShaders/PhongLightingPassShaders/PhongLightingShader.vert.glsl"; deferredPassLightingShader->addPropertyValue("Vertex Shader Source", vsSource); // Set the Fragment Shader G Buffer Source. std::string fsSource = "Assets/ModuleRendererShaders/DeferredLightingPassShaders/PhongLightingPassShaders/PhongLightingShader.frag.glsl"; deferredPassLightingShader->addPropertyValue("Fragment Shader Source", fsSource); // Add the Shader to the Module Renderer. newRenderer->addShader(deferredPassLightingShader); // createDeferredPassLightingTexturesAndFramebuffers(); } // Default DPassLightingModule Destructor. DPassLightingModule::~DPassLightingModule() { } // Render the Deferred Pass Lighting Module. void DPassLightingModule::render(const float & deltaFrameTime, const float & currentFrameTime, const float & lastFrameTime, std::shared_ptr<const Camera> activeCamera) { // Use the Program. glUseProgram(deferredPassLightingShader->getShaderID()); // Bind the Deferred Pass Lighting Framebuffer Object. glBindFramebuffer(GL_FRAMEBUFFER, deferredPassLightingFramebuffer); glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); // std::shared_ptr<ModuleRenderer> moduleRenderer = std::dynamic_pointer_cast<ModuleRenderer>(getRenderer().lock()); // Upload the Ambient Light Data. moduleRenderer->uploadAmbientLightData(*deferredPassLightingShader); // Upload the Camera Data. moduleRenderer->uploadCameraData(*deferredPassLightingShader, glm::vec4(activeCamera->getCameraPosition(), 1.0), activeCamera->getPerspectiveMatrix(), activeCamera->getViewMatrix(), glm::vec4(activeCamera->getNearClip(), activeCamera->getFarClip(), 0.0, 0.0)); // Upload the G Buffer Textures. moduleRenderer->uploadGBufferTextures(*deferredPassLightingShader, gBufferModule.lock()->viewWorldSpacePositionTexture(), gBufferModule.lock()->viewWorldSpaceVertexNormalAndDepthTexture(), gBufferModule.lock()->viewAmbientColorTexture(), gBufferModule.lock()->viewDiffuseAlbedoAndLitTypeTexture(), gBufferModule.lock()->viewSpecularAlbedoAndLightingTypeTexture(), gBufferModule.lock()->viewMRFOTexture(), gBufferModule.lock()->viewEmissiveColorAndIntensityTexture(), 0); // Upload the Lights Data. lightsModule.lock()->uploadLightsData(deferredPassLightingShader); // Draw the Arrays. glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); // Bind the Default Framebuffer. glBindFramebuffer(GL_FRAMEBUFFER, 0); } // Create the Deferred Pass Lighting Textures And Framebuffers. void DPassLightingModule::createDeferredPassLightingTexturesAndFramebuffers() { // Create the Deferred Pass Lighting Module Color Texture. glGenTextures(1, &deferredPassLightingModuleColorTexture); glBindTexture(GL_TEXTURE_2D, deferredPassLightingModuleColorTexture); glTextureImage2DEXT(deferredPassLightingModuleColorTexture, GL_TEXTURE_2D, 0, GL_RGBA32F, screenWidth, screenHeight, 0, GL_RGBA, GL_FLOAT, NULL); glTextureParameteri(deferredPassLightingModuleColorTexture, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTextureParameteri(deferredPassLightingModuleColorTexture, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glBindTexture(GL_TEXTURE_2D, 0); // Create the Deferred Pass Lighting Module Depth Texture. glGenTextures(1, &deferredPassLightingModuleDepthTexture); glBindTexture(GL_TEXTURE_2D, deferredPassLightingModuleDepthTexture); glTextureImage2DEXT(deferredPassLightingModuleDepthTexture, GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, screenWidth, screenHeight, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL); glTextureParameteri(deferredPassLightingModuleDepthTexture, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTextureParameteri(deferredPassLightingModuleDepthTexture, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glBindTexture(GL_TEXTURE_2D, 0); // Bind the Deferred Pass Lighting Framebuffer Object glGenFramebuffers(1, &deferredPassLightingFramebuffer); glBindFramebuffer(GL_FRAMEBUFFER, deferredPassLightingFramebuffer); // Associate the Color Texture with the Current Framebuffer. glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + 0, GL_TEXTURE_2D, deferredPassLightingModuleColorTexture, 0); // Associate the Depth Stencil Texture with the Current Framebuffer. glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, deferredPassLightingModuleDepthTexture, 0); // Set the Draw Buffers of the Current Framebuffer. GLenum framebufferDrawBuffers[] = { GL_COLOR_ATTACHMENT0 + 0 }; glDrawBuffers(1, framebufferDrawBuffers); // Bind the Default Framebuffer. glBindFramebuffer(GL_FRAMEBUFFER, 0); } // Return the Deferred Pass Lighting Color Texture. unsigned int DPassLightingModule::viewDeferredPassLightingColorTexture() { return deferredPassLightingModuleColorTexture; } // Return the Deferred Pass Lighting Depth Texture. unsigned int DPassLightingModule::viewDeferredPassLightingDepthTexture() { return deferredPassLightingModuleDepthTexture; }
45.80292
471
0.821514
AshwinKumarVijay
5f54235200ec8d97ec06dea28849d76f39f3f2f0
894
cpp
C++
Week00/Kruskal.cpp
princesinghtomar/Competitive-Programming
a0df818dfa56267fdde59bd1862d0b78f6e069c4
[ "MIT" ]
3
2020-11-11T13:45:40.000Z
2021-07-20T11:53:34.000Z
Week00/Kruskal.cpp
princesinghtomar/Competitive-Programming
a0df818dfa56267fdde59bd1862d0b78f6e069c4
[ "MIT" ]
11
2020-10-03T14:26:35.000Z
2021-10-30T15:26:40.000Z
Week00/Kruskal.cpp
princesinghtomar/Competitive-Programming
a0df818dfa56267fdde59bd1862d0b78f6e069c4
[ "MIT" ]
12
2020-05-12T08:39:54.000Z
2021-10-30T14:56:27.000Z
#include<iostream> #include<utility> #include<vector> #include<algorithm> using namespace std; vector<pair<long long int,pair<long long int,long long int>>> v; long long int P[1000006],S[1000006]; long long int dsu(long long int x,long long int y) { long long int i,j; i=x; while(i!=P[i]) { P[i]=P[P[i]]; i=P[i]; } j=y; while(j!=P[j]) { P[j]=P[P[j]]; j=P[j]; } if(i==j) return 1; else { if(S[i]>S[j]) { P[j]=P[i]; S[i] += S[j]; } else { P[i]=P[j]; S[j] += S[i]; } return 0; } } int main() { long long int N,M,i,j,a,b,c,ans=0; cin>>N>>M; for(i=0;i<N;i++) { P[i]=i; S[i]=1; } for(i=0;i<M;i++) { cin>>a>>b>>c; v.push_back(make_pair(c,make_pair(a,b))); } sort(v.begin(),v.end()); for(i=0;i<M;i++) { j = dsu(v[i].second.first,v[i].second.second); if(j==0) ans += v[i].first; } cout<<ans<<endl; return 0; }
11.461538
64
0.517897
princesinghtomar
5f55451154271c6f2ddcb48dab20ed261f716b75
12,889
cpp
C++
src/ndnSIM/NFD/tests/daemon/mgmt/command-authenticator.t.cpp
NDNLink/NDN-Chord
cfabf8f56eea2c4ba47052ce145a939ebdc21e57
[ "MIT" ]
1
2021-09-07T04:12:15.000Z
2021-09-07T04:12:15.000Z
src/ndnSIM/NFD/tests/daemon/mgmt/command-authenticator.t.cpp
NDNLink/NDN-Chord
cfabf8f56eea2c4ba47052ce145a939ebdc21e57
[ "MIT" ]
null
null
null
src/ndnSIM/NFD/tests/daemon/mgmt/command-authenticator.t.cpp
NDNLink/NDN-Chord
cfabf8f56eea2c4ba47052ce145a939ebdc21e57
[ "MIT" ]
1
2020-07-15T06:21:03.000Z
2020-07-15T06:21:03.000Z
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2014-2018, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, * Washington University in St. Louis, * Beijing Institute of Technology, * The University of Memphis. * * This file is part of NFD (Named Data Networking Forwarding Daemon). * See AUTHORS.md for complete list of NFD authors and contributors. * * NFD is free software: you can redistribute it and/or modify it under the terms * of the GNU General Public License as published by the Free Software Foundation, * either version 3 of the License, or (at your option) any later version. * * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. */ #include "mgmt/command-authenticator.hpp" #include "tests/test-common.hpp" #include "tests/manager-common-fixture.hpp" #include <boost/filesystem.hpp> namespace nfd { namespace tests { class CommandAuthenticatorFixture : public CommandInterestSignerFixture { protected: CommandAuthenticatorFixture() : authenticator(CommandAuthenticator::create()) { } void makeModules(std::initializer_list<std::string> modules) { for (const std::string& module : modules) { authorizations.emplace(module, authenticator->makeAuthorization(module, "verb")); } } void loadConfig(const std::string& config) { auto configPath = boost::filesystem::current_path() / "command-authenticator-test.conf"; ConfigFile cf; authenticator->setConfigFile(cf); cf.parse(config, false, configPath.c_str()); } bool authorize(const std::string& module, const Name& identity, const std::function<void(Interest&)>& modifyInterest = nullptr) { Interest interest = this->makeControlCommandRequest(Name("/prefix/" + module + "/verb"), ControlParameters(), identity); if (modifyInterest != nullptr) { modifyInterest(interest); } ndn::mgmt::Authorization authorization = authorizations.at(module); bool isAccepted = false; bool isRejected = false; authorization(Name("/prefix"), interest, nullptr, [this, &isAccepted, &isRejected] (const std::string& requester) { BOOST_REQUIRE_MESSAGE(!isAccepted && !isRejected, "authorization function should invoke only one continuation"); isAccepted = true; lastRequester = requester; }, [this, &isAccepted, &isRejected] (ndn::mgmt::RejectReply act) { BOOST_REQUIRE_MESSAGE(!isAccepted && !isRejected, "authorization function should invoke only one continuation"); isRejected = true; lastRejectReply = act; }); this->advanceClocks(1_ms, 10); BOOST_REQUIRE_MESSAGE(isAccepted || isRejected, "authorization function should invoke one continuation"); return isAccepted; } protected: shared_ptr<CommandAuthenticator> authenticator; std::unordered_map<std::string, ndn::mgmt::Authorization> authorizations; std::string lastRequester; ndn::mgmt::RejectReply lastRejectReply; }; BOOST_AUTO_TEST_SUITE(Mgmt) BOOST_FIXTURE_TEST_SUITE(TestCommandAuthenticator, CommandAuthenticatorFixture) BOOST_AUTO_TEST_CASE(Certs) { Name id0("/localhost/CommandAuthenticator/0"); Name id1("/localhost/CommandAuthenticator/1"); Name id2("/localhost/CommandAuthenticator/2"); BOOST_REQUIRE(addIdentity(id0)); BOOST_REQUIRE(saveIdentityCertificate(id1, "1.ndncert", true)); BOOST_REQUIRE(saveIdentityCertificate(id2, "2.ndncert", true)); makeModules({"module0", "module1", "module2", "module3", "module4", "module5", "module6", "module7"}); const std::string& config = R"CONFIG( authorizations { authorize { certfile any privileges { module1 module3 module5 module7 } } authorize { certfile "1.ndncert" privileges { module2 module3 module6 module7 } } authorize { certfile "2.ndncert" privileges { module4 module5 module6 module7 } } } )CONFIG"; loadConfig(config); // module0: none BOOST_CHECK_EQUAL(authorize("module0", id0), false); BOOST_CHECK_EQUAL(authorize("module0", id1), false); BOOST_CHECK_EQUAL(authorize("module0", id2), false); // module1: any BOOST_CHECK_EQUAL(authorize("module1", id0), true); BOOST_CHECK_EQUAL(authorize("module1", id1), true); BOOST_CHECK_EQUAL(authorize("module1", id2), true); // module2: id1 BOOST_CHECK_EQUAL(authorize("module2", id0), false); BOOST_CHECK_EQUAL(authorize("module2", id1), true); BOOST_CHECK_EQUAL(authorize("module2", id2), false); // module3: any,id1 BOOST_CHECK_EQUAL(authorize("module3", id0), true); BOOST_CHECK_EQUAL(authorize("module3", id1), true); BOOST_CHECK_EQUAL(authorize("module3", id2), true); // module4: id2 BOOST_CHECK_EQUAL(authorize("module4", id0), false); BOOST_CHECK_EQUAL(authorize("module4", id1), false); BOOST_CHECK_EQUAL(authorize("module4", id2), true); // module5: any,id2 BOOST_CHECK_EQUAL(authorize("module5", id0), true); BOOST_CHECK_EQUAL(authorize("module5", id1), true); BOOST_CHECK_EQUAL(authorize("module5", id2), true); // module6: id1,id2 BOOST_CHECK_EQUAL(authorize("module6", id0), false); BOOST_CHECK_EQUAL(authorize("module6", id1), true); BOOST_CHECK_EQUAL(authorize("module6", id2), true); // module7: any,id1,id2 BOOST_CHECK_EQUAL(authorize("module7", id0), true); BOOST_CHECK_EQUAL(authorize("module7", id1), true); BOOST_CHECK_EQUAL(authorize("module7", id2), true); } BOOST_AUTO_TEST_CASE(Requester) { Name id0("/localhost/CommandAuthenticator/0"); Name id1("/localhost/CommandAuthenticator/1"); BOOST_REQUIRE(addIdentity(id0)); BOOST_REQUIRE(saveIdentityCertificate(id1, "1.ndncert", true)); makeModules({"module0", "module1"}); const std::string& config = R"CONFIG( authorizations { authorize { certfile any privileges { module0 } } authorize { certfile "1.ndncert" privileges { module1 } } } )CONFIG"; loadConfig(config); // module0: any BOOST_CHECK_EQUAL(authorize("module0", id0), true); BOOST_CHECK_EQUAL(lastRequester, "*"); BOOST_CHECK_EQUAL(authorize("module0", id1), true); BOOST_CHECK_EQUAL(lastRequester, "*"); // module1: id1 BOOST_CHECK_EQUAL(authorize("module1", id0), false); BOOST_CHECK_EQUAL(authorize("module1", id1), true); BOOST_CHECK(id1.isPrefixOf(lastRequester)); } class IdentityAuthorizedFixture : public CommandAuthenticatorFixture { protected: IdentityAuthorizedFixture() : id1("/localhost/CommandAuthenticator/1") { BOOST_REQUIRE(saveIdentityCertificate(id1, "1.ndncert", true)); makeModules({"module1"}); const std::string& config = R"CONFIG( authorizations { authorize { certfile "1.ndncert" privileges { module1 } } } )CONFIG"; loadConfig(config); } bool authorize1(const std::function<void(Interest&)>& modifyInterest) { return authorize("module1", id1, modifyInterest); } protected: Name id1; }; BOOST_FIXTURE_TEST_SUITE(Rejects, IdentityAuthorizedFixture) BOOST_AUTO_TEST_CASE(BadKeyLocator_NameTooShort) { BOOST_CHECK_EQUAL(authorize1( [] (Interest& interest) { interest.setName("/prefix"); } ), false); BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::SILENT); } BOOST_AUTO_TEST_CASE(BadKeyLocator_BadSigInfo) { BOOST_CHECK_EQUAL(authorize1( [] (Interest& interest) { setNameComponent(interest, ndn::signed_interest::POS_SIG_INFO, "not-SignatureInfo"); } ), false); BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::SILENT); } BOOST_AUTO_TEST_CASE(BadKeyLocator_MissingKeyLocator) { BOOST_CHECK_EQUAL(authorize1( [] (Interest& interest) { ndn::SignatureInfo sigInfo(tlv::SignatureSha256WithRsa); setNameComponent(interest, ndn::signed_interest::POS_SIG_INFO, sigInfo.wireEncode().begin(), sigInfo.wireEncode().end()); } ), false); BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::SILENT); } BOOST_AUTO_TEST_CASE(BadKeyLocator_BadKeyLocatorType) { BOOST_CHECK_EQUAL(authorize1( [] (Interest& interest) { ndn::KeyLocator kl; kl.setKeyDigest(ndn::encoding::makeBinaryBlock(tlv::KeyDigest, "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD", 8)); ndn::SignatureInfo sigInfo(tlv::SignatureSha256WithRsa); sigInfo.setKeyLocator(kl); setNameComponent(interest, ndn::signed_interest::POS_SIG_INFO, sigInfo.wireEncode().begin(), sigInfo.wireEncode().end()); } ), false); BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::SILENT); } BOOST_AUTO_TEST_CASE(NotAuthorized) { Name id0("/localhost/CommandAuthenticator/0"); BOOST_REQUIRE(addIdentity(id0)); BOOST_CHECK_EQUAL(authorize("module1", id0), false); BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::STATUS403); } BOOST_AUTO_TEST_CASE(BadSig) { BOOST_CHECK_EQUAL(authorize1( [] (Interest& interest) { setNameComponent(interest, ndn::command_interest::POS_SIG_VALUE, "bad-signature-bits"); } ), false); BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::STATUS403); } BOOST_AUTO_TEST_CASE(InvalidTimestamp) { name::Component timestampComp; BOOST_CHECK_EQUAL(authorize1( [&timestampComp] (const Interest& interest) { timestampComp = interest.getName().at(ndn::command_interest::POS_TIMESTAMP); } ), true); // accept first command BOOST_CHECK_EQUAL(authorize1( [&timestampComp] (Interest& interest) { setNameComponent(interest, ndn::command_interest::POS_TIMESTAMP, timestampComp); } ), false); // reject second command because timestamp equals first command BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::STATUS403); } BOOST_FIXTURE_TEST_CASE(MissingAuthorizationsSection, CommandAuthenticatorFixture) { Name id0("/localhost/CommandAuthenticator/0"); BOOST_REQUIRE(addIdentity(id0)); makeModules({"module42"}); loadConfig(""); BOOST_CHECK_EQUAL(authorize("module42", id0), false); BOOST_CHECK(lastRejectReply == ndn::mgmt::RejectReply::STATUS403); } BOOST_AUTO_TEST_SUITE_END() // Rejects BOOST_AUTO_TEST_SUITE(BadConfig) BOOST_AUTO_TEST_CASE(EmptyAuthorizationsSection) { const std::string& config = R"CONFIG( authorizations { } )CONFIG"; BOOST_CHECK_THROW(loadConfig(config), ConfigFile::Error); } BOOST_AUTO_TEST_CASE(UnrecognizedKey) { const std::string& config = R"CONFIG( authorizations { unrecognized_key { } } )CONFIG"; BOOST_CHECK_THROW(loadConfig(config), ConfigFile::Error); } BOOST_AUTO_TEST_CASE(CertfileMissing) { const std::string& config = R"CONFIG( authorizations { authorize { privileges { } } } )CONFIG"; BOOST_CHECK_THROW(loadConfig(config), ConfigFile::Error); } BOOST_AUTO_TEST_CASE(CertUnreadable) { const std::string& config = R"CONFIG( authorizations { authorize { certfile "1.ndncert" privileges { } } } )CONFIG"; BOOST_CHECK_THROW(loadConfig(config), ConfigFile::Error); } BOOST_AUTO_TEST_CASE(PrivilegesMissing) { const std::string& config = R"CONFIG( authorizations { authorize { certfile any } } )CONFIG"; BOOST_CHECK_THROW(loadConfig(config), ConfigFile::Error); } BOOST_AUTO_TEST_CASE(UnregisteredModule) { const std::string& config = R"CONFIG( authorizations { authorize { certfile any privileges { nosuchmodule } } } )CONFIG"; BOOST_CHECK_THROW(loadConfig(config), ConfigFile::Error); } BOOST_AUTO_TEST_SUITE_END() // BadConfig BOOST_AUTO_TEST_SUITE_END() // TestCommandAuthenticator BOOST_AUTO_TEST_SUITE_END() // Mgmt } // namespace tests } // namespace nfd
27.134737
109
0.66708
NDNLink
5f5592726c03618955fb5f662a83cf8ca5b042a6
343
cpp
C++
Source/TextureBaker/Private/TextureBakerCommands.cpp
WhiteWh/UE4TextureBaker
976decb8a895bb7aa8c4dad17e857b25a7a753ce
[ "MIT" ]
7
2021-05-04T10:33:36.000Z
2022-02-02T20:06:21.000Z
Source/TextureBaker/Private/TextureBakerCommands.cpp
WhiteWh/UE4TextureBaker
976decb8a895bb7aa8c4dad17e857b25a7a753ce
[ "MIT" ]
null
null
null
Source/TextureBaker/Private/TextureBakerCommands.cpp
WhiteWh/UE4TextureBaker
976decb8a895bb7aa8c4dad17e857b25a7a753ce
[ "MIT" ]
null
null
null
// Copyright Epic Games, Inc. All Rights Reserved. #include "TextureBakerCommands.h" #define LOCTEXT_NAMESPACE "FTextureBakerModule" void FTextureBakerCommands::RegisterCommands() { UI_COMMAND(OpenPluginWindow, "TextureBaker", "Bring up TextureBaker window", EUserInterfaceActionType::Button, FInputGesture()); } #undef LOCTEXT_NAMESPACE
26.384615
129
0.80758
WhiteWh
5f58e8a2a07d36c37ebe2d543e363510648bc238
3,934
cc
C++
src/imageprocessing/contour.cc
SanczoPL/gt-annotate
b760d0dc3f91ce5748190b95468e2e54bee76b2a
[ "MIT" ]
null
null
null
src/imageprocessing/contour.cc
SanczoPL/gt-annotate
b760d0dc3f91ce5748190b95468e2e54bee76b2a
[ "MIT" ]
null
null
null
src/imageprocessing/contour.cc
SanczoPL/gt-annotate
b760d0dc3f91ce5748190b95468e2e54bee76b2a
[ "MIT" ]
null
null
null
#include "imageprocessing/contour.h" #include <QJsonObject> #include <QJsonArray> #include <QFile> #include <QJsonDocument> #include <QDebug> #include <QRectF> #include <QString> //#define DEBUG constexpr auto NAME{ "Name" }; constexpr auto WIDTH{ "Width" }; constexpr auto HEIGHT{ "Height" }; constexpr auto X{ "X" }; constexpr auto Y{ "Y" }; constexpr auto SIZE{ "Size" }; constexpr auto CONTOUR{ "Contour" }; constexpr auto CANNY_TRESHOLD{ "CannyTreshold" }; constexpr auto DILATE_COUNTER{ "DilateCounter" }; constexpr auto ERODE_COUNTER{ "ErodeCounter" }; constexpr auto MIN_AREA{ "MinArea" }; constexpr auto MAX_AREA{ "MaxArea" }; constexpr auto ROTATED_RECT{ "RotatedRect" }; constexpr auto BOUNDING_RECT{ "BoundingRect" }; Contour::Contour() { configureDefault(); } void Contour::configureDefault() { m_treshCanny = 3; m_dilateCounter = 2; m_erodeCounter = 2; m_minArea = 4; m_maxArea = 40000; } void Contour::configure(const QJsonObject &a_config) { m_treshCanny = a_config[CANNY_TRESHOLD].toInt(); m_dilateCounter = a_config[DILATE_COUNTER].toInt(); m_erodeCounter = a_config[ERODE_COUNTER].toInt(); m_minArea = a_config[MIN_AREA].toInt(); m_maxArea = a_config[MAX_AREA].toInt(); } void Contour::createCannyImage(cv::Mat &opencv_img, cv::Mat &canny_output) { #ifdef DEBUG Logger->debug("Contour::createCannyImage()"); #endif cv::dilate(opencv_img, opencv_img, cv::Mat(), cv::Point(-1, -1), m_dilateCounter, 1, 1); cv::erode(opencv_img, opencv_img, cv::Mat(), cv::Point(-1, -1), m_erodeCounter, 1, 1); cv::Canny(opencv_img, canny_output, m_treshCanny, m_treshCanny*2 ); } void Contour::findContours(cv::Mat & input, QJsonArray & contoursArray, QString label) { #ifdef DEBUG Logger->debug("Contour::FindContours()"); #endif cv::Mat canny_output; Contour::createCannyImage(input, canny_output); std::vector<std::vector<cv::Point> > contours; std::vector<cv::Vec4i> hierarchy; cv::findContours(input, contours, hierarchy, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE ); double area; std::vector<std::vector<cv::Point>> contoursBEST; std::vector<cv::Vec4i> hierarchyBEST; std::vector<cv::Point> approx; for (unsigned int i = 0; i < contours.size(); i++) { area = cv::contourArea(contours[i]); //if ((area >= m_minArea) && (area <= m_maxArea)) { contoursBEST.push_back(contours[i]); hierarchyBEST.push_back(hierarchy[i]); } } for (unsigned int i = 0; i < contoursBEST.size(); i++) { cv::approxPolyDP(cv::Mat(contoursBEST[i]), approx, cv::arcLength(cv::Mat(contoursBEST[i]), true) * 0.04, true); area = cv::contourArea(contoursBEST[i]); cv::Rect boundRect; boundRect = cv::boundingRect(contoursBEST[i]); /* // TODO: add support for rotatedrect: cv::RotatedRect; RotatedRect = minAreaRect( contoursBEST[i] ); // rotated rectangle Point2f rect_points[4]; minRect[i].points( rect_points ); for ( int j = 0; j < 4; j++ ) { line( drawing, rect_points[j], rect_points[(j+1)%4], color ); }*/ int x = boundRect.x; int y = boundRect.y; int width = boundRect.width; int height = boundRect.height; int size = qAbs(width / 2) * qAbs(height / 2); QJsonObject obj { { NAME, label}, { X, x }, { Y, y }, { WIDTH, width }, { HEIGHT, height }, { SIZE, size} }; contoursArray.append(obj); #ifdef DEBUG Logger->debug("Contour::FindContours() obj, contoursArray:"); qDebug() << "obj:" << obj; qDebug() << "contoursArray:" << contoursArray; #endif } } /* void Contour::crateRois(cv::Mat &opencv_img, QString label, QJsonArray& contoursArray) { Logger->trace("Contour::CrateRois()"); cv::Mat canny_output; Contour::CreateCannyImage(opencv_img, canny_output); QString _name = label + "_canny_output.png"; cv::imwrite(_name.toStdString(), canny_output); Contour::FindContours(canny_output, contoursArray, label); Logger->trace("Contour::CrateRois() done"); }*/
26.402685
113
0.684291
SanczoPL
5f591ef1df93a565bdf87b4967e0b3b6c6cc98ce
4,793
cpp
C++
teleconf.cpp
boochow/teleconf
c90b04c0daf786870709d218f4c29848d16ecace
[ "MIT" ]
3
2020-08-01T17:46:06.000Z
2021-04-09T17:24:53.000Z
teleconf.cpp
boochow/teleconf
c90b04c0daf786870709d218f4c29848d16ecace
[ "MIT" ]
null
null
null
teleconf.cpp
boochow/teleconf
c90b04c0daf786870709d218f4c29848d16ecace
[ "MIT" ]
null
null
null
/* * File: teleconf.cpp */ #include "usermodfx.h" #include "biquad.hpp" #define SUBTIMBRE 0 // filter parameters #define LPF_FC 3000.f #define HPF_FC 300.f #define LPF_Q 0.707f // filters before downsampling static dsp::BiQuad s_bq_lpf_r; static dsp::BiQuad s_bq_hpf_r; static dsp::BiQuad s_bq_lpf_l; static dsp::BiQuad s_bq_hpf_l; #if SUBTIMBRE static dsp::BiQuad s_bqs_lpf_r; static dsp::BiQuad s_bqs_hpf_r; static dsp::BiQuad s_bqs_lpf_l; static dsp::BiQuad s_bqs_hpf_l; #endif // filters after downsampling static dsp::BiQuad s_bq_lpf_out_r; static dsp::BiQuad s_bq_lpf_out2_r; static dsp::BiQuad s_bq_lpf_out_l; static dsp::BiQuad s_bq_lpf_out2_l; #if SUBTIMBRE static dsp::BiQuad s_bqs_lpf_out_r; static dsp::BiQuad s_bqs_lpf_out2_r; static dsp::BiQuad s_bqs_lpf_out_l; static dsp::BiQuad s_bqs_lpf_out2_l; #endif static const float s_fs_recip = 1.f / 48000.f; static float dry = 0.f; static float wet = 1.f; static uint32_t count = 0; static float lastmy_r; static float lastmy_l; #if SUBTIMBRE static float lastsy_r; static float lastsy_l; #endif void init_lpf(const float f, const float q) { float wc = s_bq_lpf_r.mCoeffs.wc(f, s_fs_recip); s_bq_lpf_r.mCoeffs.setSOLP(fx_tanpif(wc), q); s_bq_lpf_out_r.mCoeffs = s_bq_lpf_r.mCoeffs; s_bq_lpf_out2_r.mCoeffs = s_bq_lpf_r.mCoeffs; #if SUBTIMBRE s_bqs_lpf_r.mCoeffs = s_bq_lpf_r.mCoeffs; s_bqs_lpf_out_r.mCoeffs = s_bq_lpf_r.mCoeffs; s_bqs_lpf_out2_r.mCoeffs = s_bq_lpf_r.mCoeffs; #endif s_bq_lpf_l.mCoeffs = s_bq_lpf_r.mCoeffs; s_bq_lpf_out_l.mCoeffs = s_bq_lpf_r.mCoeffs; s_bq_lpf_out2_l.mCoeffs = s_bq_lpf_r.mCoeffs; #if SUBTIMBRE s_bqs_lpf_l.mCoeffs = s_bq_lpf_r.mCoeffs; s_bqs_lpf_out_l.mCoeffs = s_bq_lpf_r.mCoeffs; s_bqs_lpf_out2_l.mCoeffs = s_bq_lpf_r.mCoeffs; #endif } void MODFX_INIT(uint32_t platform, uint32_t api) { s_bq_lpf_r.flush(); s_bq_lpf_out_r.flush(); s_bq_lpf_out2_r.flush(); s_bq_lpf_l.flush(); s_bq_lpf_out_l.flush(); s_bq_lpf_out2_l.flush(); s_bq_hpf_r.flush(); s_bq_hpf_l.flush(); #if SUBTIMBRE s_bqs_lpf_r.flush(); s_bqs_lpf_out_r.flush(); s_bqs_lpf_out2_r.flush(); s_bqs_lpf_l.flush(); s_bqs_lpf_out_l.flush(); s_bqs_lpf_out2_l.flush(); s_bqs_hpf_r.flush(); s_bqs_hpf_l.flush(); #endif init_lpf(LPF_FC, LPF_Q); float wc = s_bq_hpf_r.mCoeffs.wc(HPF_FC, s_fs_recip); s_bq_hpf_r.mCoeffs.setSOHP(fx_tanpif(wc), 0.5); s_bq_hpf_l.mCoeffs = s_bq_hpf_r.mCoeffs; #if SUBTIMBRE s_bqs_hpf_r.mCoeffs = s_bq_hpf_r.mCoeffs; s_bqs_hpf_l.mCoeffs = s_bq_hpf_r.mCoeffs; #endif } __fast_inline float g711(const float s) { q15_t val = f32_to_q15(s); int16_t sign = (val < 0) ? -1 : 1; val = q15abs(val); uint16_t mask = 1 << 14; int i; for(i = 0; i < 6; i++) { if (val & mask) break; else val <<=1; } val &= 0x7c00; val >>= i; val = val * sign; return q15_to_f32(val); } void MODFX_PROCESS(const float *main_xn, float *main_yn, const float *sub_xn, float *sub_yn, uint32_t frames) { const float * mx = main_xn; float * __restrict my = main_yn; const float * my_e = my + 2*frames; const float * sx = sub_xn; float * __restrict sy = sub_yn; float vmx; float vsx; for (; my != my_e; ) { // Left channel vmx = s_bq_hpf_l.process_so(s_bq_lpf_l.process_so(*mx)); #if SUBTIMBRE vsx = s_bqs_hpf_l.process_so(s_bqs_lpf_l.process_so(*sx)); #endif if (count == 0) { lastmy_l = g711(vmx); #if SUBTIMBRE lastsy_l = g711(vsx); #endif } *my++ = dry * (*mx++) + wet * \ s_bq_lpf_out2_l.process_so(s_bq_lpf_out_l.process_so(lastmy_l)); #if SUBTIMBRE *sy++ = dry * (*sx++) + wet * \ s_bq_lpf_out2_l.process_so(s_bqs_lpf_out_l.process_so(lastsy_l)); #endif // Right channel vmx = s_bq_hpf_r.process_so(s_bq_lpf_r.process_so(*mx)); #if SUBTIMBRE vsx = s_bqs_hpf_r.process_so(s_bqs_lpf_r.process_so(*sx)); #endif if (count == 0) { lastmy_r = g711(vmx); #if SUBTIMBRE lastsy_r = g711(vsx); #endif } *my++ = dry * (*mx++) + wet * \ s_bq_lpf_out2_r.process_so(s_bq_lpf_out_r.process_so(lastmy_r)); #if SUBTIMBRE *sy++ = dry * (*sx++) + wet * \ s_bq_lpf_out2_r.process_so(s_bqs_lpf_out_r.process_so(lastsy_r)); #endif count = (count + 1) % 6; } } void MODFX_PARAM(uint8_t index, int32_t value) { const float valf = q31_to_f32(value); switch (index) { case k_user_modfx_param_time: init_lpf(LPF_FC, LPF_Q + 1.6 * valf); break; case k_user_modfx_param_depth: wet = valf; dry = 1.0 - wet; break; default: break; } }
24.207071
75
0.666388
boochow
5f5a5fbfa7cbb3aced2ba754aa5d9ce4ac21bef0
2,564
cxx
C++
main/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
Grosskopf/openoffice
93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7
[ "Apache-2.0" ]
679
2015-01-06T06:34:58.000Z
2022-03-30T01:06:03.000Z
main/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
Grosskopf/openoffice
93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7
[ "Apache-2.0" ]
102
2017-11-07T08:51:31.000Z
2022-03-17T12:13:49.000Z
main/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
Grosskopf/openoffice
93df6e8a695d5e3eac16f3ad5e9ade1b963ab8d7
[ "Apache-2.0" ]
331
2015-01-06T11:40:55.000Z
2022-03-14T04:07:51.000Z
/************************************************************** * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * *************************************************************/ #include "precompiled_sw.hxx" #include <retrieveinputstreamconsumer.hxx> #include <ndgrf.hxx> #include <retrieveinputstream.hxx> #include <swthreadmanager.hxx> /** class to provide creation of a thread to retrieve an input stream given by an URL and to consume the retrieved input stream. OD 2007-01-29 #i73788# @author OD */ SwAsyncRetrieveInputStreamThreadConsumer::SwAsyncRetrieveInputStreamThreadConsumer( SwGrfNode& rGrfNode ) : mrGrfNode( rGrfNode ), mnThreadID( 0 ) { } SwAsyncRetrieveInputStreamThreadConsumer::~SwAsyncRetrieveInputStreamThreadConsumer() { SwThreadManager::GetThreadManager().RemoveThread( mnThreadID ); } void SwAsyncRetrieveInputStreamThreadConsumer::CreateThread( const String& rURL ) { // Get new data container for input stream data SwRetrievedInputStreamDataManager::tDataKey nDataKey = SwRetrievedInputStreamDataManager::GetManager().ReserveData( mrGrfNode.GetThreadConsumer() ); rtl::Reference< ObservableThread > pNewThread = SwAsyncRetrieveInputStreamThread::createThread( nDataKey, rURL ); // Add thread to thread manager and pass ownership of thread to thread manager. mnThreadID = SwThreadManager::GetThreadManager().AddThread( pNewThread ); } void SwAsyncRetrieveInputStreamThreadConsumer::ApplyInputStream( com::sun::star::uno::Reference<com::sun::star::io::XInputStream> xInputStream, const sal_Bool bIsStreamReadOnly ) { mrGrfNode.ApplyInputStream( xInputStream, bIsStreamReadOnly ); }
37.15942
85
0.692668
Grosskopf
5f5eb07b5c05bac6798a9ad1e9b96ccb07a1ece8
1,390
cpp
C++
TouchGFX/generated/fonts/src/Table_Asap_Bold_12_4bpp.cpp
koson/car-dash
7be8f02a243d43b4fd9fd33b0a160faa5901f747
[ "MIT" ]
null
null
null
TouchGFX/generated/fonts/src/Table_Asap_Bold_12_4bpp.cpp
koson/car-dash
7be8f02a243d43b4fd9fd33b0a160faa5901f747
[ "MIT" ]
null
null
null
TouchGFX/generated/fonts/src/Table_Asap_Bold_12_4bpp.cpp
koson/car-dash
7be8f02a243d43b4fd9fd33b0a160faa5901f747
[ "MIT" ]
null
null
null
// Autogenerated, do not edit #include <fonts/GeneratedFont.hpp> FONT_TABLE_LOCATION_FLASH_PRAGMA KEEP extern const touchgfx::GlyphNode glyphs_Asap_Bold_12_4bpp[] FONT_TABLE_LOCATION_FLASH_ATTRIBUTE = { { 0, 0x0031, 6, 9, 9, 0, 6, 0, 0, 0x00 }, { 27, 0x0032, 6, 9, 9, 0, 6, 0, 0, 0x00 }, { 54, 0x0033, 6, 9, 9, 0, 6, 0, 0, 0x00 }, { 81, 0x0034, 7, 9, 9, 0, 6, 0, 0, 0x00 }, { 117, 0x0035, 6, 9, 9, 0, 6, 0, 0, 0x00 }, { 144, 0x0036, 6, 9, 9, 0, 6, 0, 0, 0x00 }, { 171, 0x0037, 6, 9, 9, 0, 6, 0, 0, 0x00 }, { 198, 0x0038, 7, 9, 9, 0, 6, 0, 0, 0x00 }, { 234, 0x003F, 6, 9, 9, 0, 5, 0, 0, 0x00 } }; // Asap_Bold_12_4bpp extern const touchgfx::GlyphNode glyphs_Asap_Bold_12_4bpp[]; extern const uint8_t unicodes_Asap_Bold_12_4bpp_0[]; extern const uint8_t* const unicodes_Asap_Bold_12_4bpp[] = { unicodes_Asap_Bold_12_4bpp_0 }; extern const touchgfx::KerningNode kerning_Asap_Bold_12_4bpp[]; touchgfx::GeneratedFont& getFont_Asap_Bold_12_4bpp(); touchgfx::GeneratedFont& getFont_Asap_Bold_12_4bpp() { static touchgfx::GeneratedFont Asap_Bold_12_4bpp(glyphs_Asap_Bold_12_4bpp, 9, 12, 0, 4, 1, 0, 1, unicodes_Asap_Bold_12_4bpp, kerning_Asap_Bold_12_4bpp, 63, 0, 0); return Asap_Bold_12_4bpp; }
39.714286
166
0.605036
koson
5f63f37831fc89994b6c70e806053b00a494acc9
191
cpp
C++
willis_game_framework/WGF/InputListener.cpp
mrwonko/ancient
fcee7c5f55ad5cdf16fe2dc4560cd34785b7bb01
[ "MIT" ]
null
null
null
willis_game_framework/WGF/InputListener.cpp
mrwonko/ancient
fcee7c5f55ad5cdf16fe2dc4560cd34785b7bb01
[ "MIT" ]
null
null
null
willis_game_framework/WGF/InputListener.cpp
mrwonko/ancient
fcee7c5f55ad5cdf16fe2dc4560cd34785b7bb01
[ "MIT" ]
null
null
null
#include "InputListener.h" namespace WGF { InputListener::InputListener() { //ctor } InputListener::~InputListener() { //dtor } } // namespace WGF
11.235294
35
0.549738
mrwonko
5f68e65393a05b2daa346d882f09e8eb4c063733
287
cpp
C++
LibreOJ/loj10230.cpp
wzl19371/OI-LIfe
f7f54542d1369b5e4047fcbb2e26c1c64d22ee26
[ "MIT" ]
1
2020-10-05T02:07:52.000Z
2020-10-05T02:07:52.000Z
LibreOJ/loj10230.cpp
wzl19371/OI-LIfe
f7f54542d1369b5e4047fcbb2e26c1c64d22ee26
[ "MIT" ]
null
null
null
LibreOJ/loj10230.cpp
wzl19371/OI-LIfe
f7f54542d1369b5e4047fcbb2e26c1c64d22ee26
[ "MIT" ]
null
null
null
#include <cstdio> using namespace std; typedef long long ll; const int p=5000011; const int maxn=1e5+10; int n,k; ll f[maxn]; int main(){ scanf("%d%d",&n,&k); for(int i=0;i<=k;i++) f[i]=(i+1)%p; for(int i=k+1;i<=n;i++) f[i]=(f[i-1]+f[i-k-1])%p; printf("%lld\n",f[n]); }
20.5
51
0.550523
wzl19371
5f68f140cbe176c4d78210070f227d661d99bfe4
7,405
cc
C++
third_party/perfetto/src/ftrace_reader/ftrace_procfs.cc
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/perfetto/src/ftrace_reader/ftrace_procfs.cc
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/perfetto/src/ftrace_reader/ftrace_procfs.cc
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
/* * Copyright (C) 2017 The Android Open Source Project * * 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. */ #include "src/ftrace_reader/ftrace_procfs.h" #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include <fstream> #include <sstream> #include <string> #include "perfetto/base/file_utils.h" #include "perfetto/base/logging.h" #include "perfetto/base/utils.h" namespace perfetto { // Reading /trace produces human readable trace output. // Writing to this file clears all trace buffers for all CPUS. // Writing to /trace_marker file injects an event into the trace buffer. // Reading /tracing_on returns 1/0 if tracing is enabled/disabled. // Writing 1/0 to this file enables/disables tracing. // Disabling tracing with this file prevents further writes but // does not clear the buffer. namespace { void KernelLogWrite(const char* s) { PERFETTO_DCHECK(*s && s[strlen(s) - 1] == '\n'); if (FtraceProcfs::g_kmesg_fd != -1) base::ignore_result(write(FtraceProcfs::g_kmesg_fd, s, strlen(s))); } } // namespace // static int FtraceProcfs::g_kmesg_fd = -1; // Set by ProbesMain() in probes.cc . // static std::unique_ptr<FtraceProcfs> FtraceProcfs::Create(const std::string& root) { if (!CheckRootPath(root)) { return nullptr; } return std::unique_ptr<FtraceProcfs>(new FtraceProcfs(root)); } FtraceProcfs::FtraceProcfs(const std::string& root) : root_(root) {} FtraceProcfs::~FtraceProcfs() = default; bool FtraceProcfs::EnableEvent(const std::string& group, const std::string& name) { std::string path = root_ + "events/" + group + "/" + name + "/enable"; return WriteToFile(path, "1"); } bool FtraceProcfs::DisableEvent(const std::string& group, const std::string& name) { std::string path = root_ + "events/" + group + "/" + name + "/enable"; return WriteToFile(path, "0"); } bool FtraceProcfs::DisableAllEvents() { std::string path = root_ + "events/enable"; return WriteToFile(path, "0"); } std::string FtraceProcfs::ReadEventFormat(const std::string& group, const std::string& name) const { std::string path = root_ + "events/" + group + "/" + name + "/format"; return ReadFileIntoString(path); } std::string FtraceProcfs::ReadPageHeaderFormat() const { std::string path = root_ + "events/header_page"; return ReadFileIntoString(path); } std::string FtraceProcfs::ReadCpuStats(size_t cpu) const { std::string path = root_ + "per_cpu/cpu" + std::to_string(cpu) + "/stats"; return ReadFileIntoString(path); } size_t FtraceProcfs::NumberOfCpus() const { static size_t num_cpus = static_cast<size_t>(sysconf(_SC_NPROCESSORS_CONF)); return num_cpus; } void FtraceProcfs::ClearTrace() { std::string path = root_ + "trace"; PERFETTO_CHECK(ClearFile(path)); // Could not clear. } bool FtraceProcfs::WriteTraceMarker(const std::string& str) { std::string path = root_ + "trace_marker"; return WriteToFile(path, str); } bool FtraceProcfs::SetCpuBufferSizeInPages(size_t pages) { if (pages * base::kPageSize > 1 * 1024 * 1024 * 1024) { PERFETTO_ELOG("Tried to set the per CPU buffer size to more than 1gb."); return false; } std::string path = root_ + "buffer_size_kb"; return WriteNumberToFile(path, pages * (base::kPageSize / 1024ul)); } bool FtraceProcfs::EnableTracing() { KernelLogWrite("perfetto: enabled ftrace\n"); std::string path = root_ + "tracing_on"; return WriteToFile(path, "1"); } bool FtraceProcfs::DisableTracing() { KernelLogWrite("perfetto: disabled ftrace\n"); std::string path = root_ + "tracing_on"; return WriteToFile(path, "0"); } bool FtraceProcfs::SetTracingOn(bool enable) { return enable ? EnableTracing() : DisableTracing(); } bool FtraceProcfs::IsTracingEnabled() { std::string path = root_ + "tracing_on"; return ReadOneCharFromFile(path) == '1'; } bool FtraceProcfs::SetClock(const std::string& clock_name) { std::string path = root_ + "trace_clock"; return WriteToFile(path, clock_name); } std::string FtraceProcfs::GetClock() { std::string path = root_ + "trace_clock"; std::string s = ReadFileIntoString(path); size_t start = s.find('['); if (start == std::string::npos) return ""; size_t end = s.find(']', start); if (end == std::string::npos) return ""; return s.substr(start + 1, end - start - 1); } std::set<std::string> FtraceProcfs::AvailableClocks() { std::string path = root_ + "trace_clock"; std::string s = ReadFileIntoString(path); std::set<std::string> names; size_t start = 0; size_t end = 0; while (true) { end = s.find(' ', start); if (end == std::string::npos) end = s.size(); if (start == end) break; std::string name = s.substr(start, end - start); if (name[0] == '[') name = name.substr(1, name.size() - 2); names.insert(name); if (end == s.size()) break; start = end + 1; } return names; } bool FtraceProcfs::WriteNumberToFile(const std::string& path, size_t value) { // 2^65 requires 20 digits to write. char buf[21]; int res = snprintf(buf, 21, "%zu", value); if (res < 0 || res >= 21) return false; return WriteToFile(path, std::string(buf)); } bool FtraceProcfs::WriteToFile(const std::string& path, const std::string& str) { base::ScopedFile fd = base::OpenFile(path, O_WRONLY); if (!fd) return false; ssize_t written = PERFETTO_EINTR(write(fd.get(), str.c_str(), str.length())); ssize_t length = static_cast<ssize_t>(str.length()); // This should either fail or write fully. PERFETTO_CHECK(written == length || written == -1); return written == length; } base::ScopedFile FtraceProcfs::OpenPipeForCpu(size_t cpu) { std::string path = root_ + "per_cpu/cpu" + std::to_string(cpu) + "/trace_pipe_raw"; return base::OpenFile(path, O_RDONLY | O_NONBLOCK); } char FtraceProcfs::ReadOneCharFromFile(const std::string& path) { base::ScopedFile fd = base::OpenFile(path, O_RDONLY); PERFETTO_CHECK(fd); char result = '\0'; ssize_t bytes = PERFETTO_EINTR(read(fd.get(), &result, 1)); PERFETTO_CHECK(bytes == 1 || bytes == -1); return result; } bool FtraceProcfs::ClearFile(const std::string& path) { base::ScopedFile fd = base::OpenFile(path, O_WRONLY | O_TRUNC); return !!fd; } std::string FtraceProcfs::ReadFileIntoString(const std::string& path) const { // You can't seek or stat the procfs files on Android. // The vast majority (884/886) of format files are under 4k. std::string str; str.reserve(4096); if (!base::ReadFile(path, &str)) return ""; return str; } // static bool FtraceProcfs::CheckRootPath(const std::string& root) { base::ScopedFile fd = base::OpenFile(root + "trace", O_RDONLY); return static_cast<bool>(fd); } } // namespace perfetto
29.039216
79
0.674139
zipated
5f6cbdca6a051b4956ce42dd94703eb78799ff86
1,465
cpp
C++
Libs/Common/Region.cpp
ajensen1234/ShapeWorks
fb308c8c38ad0e00c7f62aa7221e00e72140d909
[ "MIT" ]
40
2019-07-26T18:02:13.000Z
2022-03-28T07:24:23.000Z
Libs/Common/Region.cpp
ajensen1234/ShapeWorks
fb308c8c38ad0e00c7f62aa7221e00e72140d909
[ "MIT" ]
1,359
2019-06-20T17:17:53.000Z
2022-03-31T05:42:29.000Z
Libs/Common/Region.cpp
ajensen1234/ShapeWorks
fb308c8c38ad0e00c7f62aa7221e00e72140d909
[ "MIT" ]
13
2019-12-06T01:31:48.000Z
2022-02-24T04:34:23.000Z
#include "Region.h" namespace shapeworks { IndexRegion& IndexRegion::pad(int padding) { for (auto i = 0; i < 3; i++) { min[i] -= padding; max[i] += padding; } return *this; } std::ostream &operator<<(std::ostream &os, const IndexRegion &r) { return os << "{\n\tmin: [" << r.min[0] << ", " << r.min[1] << ", " << r.min[2] << "]" << ",\n\tmax: [" << r.max[0] << ", " << r.max[1] << ", " << r.max[2] << "]\n}"; } PhysicalRegion& PhysicalRegion::shrink(const PhysicalRegion &other) { for (auto i = 0; i < 3; i++) { min[i] = std::max(min[i], other.min[i]); max[i] = std::min(max[i], other.max[i]); } return *this; } PhysicalRegion& PhysicalRegion::expand(const PhysicalRegion &other) { for (auto i = 0; i < 3; i++) { min[i] = std::min(min[i], other.min[i]); max[i] = std::max(max[i], other.max[i]); } return *this; } PhysicalRegion& PhysicalRegion::expand(const Point &pt) { for (auto i=0; i<3; i++) { min[i] = std::min(min[i], pt[i]); max[i] = std::max(max[i], pt[i]); } return *this; } std::ostream &operator<<(std::ostream &os, const PhysicalRegion &r) { return os << "{\n\tmin: [" << r.min[0] << ", " << r.min[1] << ", " << r.min[2] << "]" << ",\n\tmax: [" << r.max[0] << ", " << r.max[1] << ", " << r.max[2] << "]\n}"; } PhysicalRegion& PhysicalRegion::pad(double padding) { min -= Point({padding, padding, padding}); max += Point({padding, padding, padding}); return *this; } }
20.347222
91
0.527645
ajensen1234
5f6d12b7ee7528691a2fa8ea09a2c9ab14dac0cd
5,815
cc
C++
parsers/gumbo_url_filter_test.cc
google/plusfish
a56ac07ca132613ecda7f252a69312ada66bbbca
[ "Apache-2.0" ]
14
2020-10-16T18:33:37.000Z
2022-03-27T18:29:00.000Z
parsers/gumbo_url_filter_test.cc
qause/plusfish
a56ac07ca132613ecda7f252a69312ada66bbbca
[ "Apache-2.0" ]
2
2021-03-18T11:19:59.000Z
2021-04-26T12:27:33.000Z
parsers/gumbo_url_filter_test.cc
qause/plusfish
a56ac07ca132613ecda7f252a69312ada66bbbca
[ "Apache-2.0" ]
5
2021-06-29T10:51:04.000Z
2022-01-09T05:18:16.000Z
// Copyright 2020 Google LLC. 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. #include "parsers/gumbo_url_filter.h" #include <memory> #include <gtest/gtest.h> #include "gtest/gtest.h" #include "absl/container/node_hash_set.h" #include <gumbo.h> #include "parsers/gumbo_filter.h" #include "parsers/gumbo_parser.h" #include "proto/issue_details.pb.h" namespace plusfish { class GumboUrlFilterTest : public ::testing::Test { protected: GumboUrlFilterTest() {} void SetUp() override { url_filter_.reset(new GumboUrlFilter(&anchors_, &issues_)); filters_.emplace_back(url_filter_.get()); gumbo_.reset(new GumboParser()); } void ParseAndFilter(const std::string& content_to_parse) { gumbo_->Parse(content_to_parse); gumbo_->FilterDocument(filters_); } std::vector<std::string> anchors_; absl::node_hash_set<std::unique_ptr<IssueDetails>> issues_; std::vector<GumboFilter*> filters_; std::unique_ptr<GumboParser> gumbo_; std::unique_ptr<GumboUrlFilter> url_filter_; }; TEST_F(GumboUrlFilterTest, ParseUrlFromKnownAttribute) { ParseAndFilter("<a href='hello'>hello</a>"); ASSERT_EQ(1, anchors_.size()); EXPECT_STREQ("hello", anchors_[0].c_str()); EXPECT_STREQ("hello", anchors_[0].c_str()); } TEST_F(GumboUrlFilterTest, ParseUrlFromRandomAttribute) { ParseAndFilter("<a foo='//hello'>hello</a>"); ASSERT_EQ(1, anchors_.size()); EXPECT_STREQ("//hello", anchors_[0].c_str()); } TEST_F(GumboUrlFilterTest, ParseContentFromRandomAttributeIgnored) { ParseAndFilter("<a foo='hello'>hello</a>"); ASSERT_EQ(0, anchors_.size()); } TEST_F(GumboUrlFilterTest, ParseSkipDuplicateUrls) { ParseAndFilter("<a href='hello'></a><a href='hello'></a>"); ASSERT_EQ(1, anchors_.size()); EXPECT_STREQ("hello", anchors_[0].c_str()); } TEST_F(GumboUrlFilterTest, ParseUrlFromTextElement) { std::string basic_url("http://example.com"); ParseAndFilter("<b>" + basic_url + "</b>"); ASSERT_EQ(1, anchors_.size()); EXPECT_EQ(basic_url, anchors_[0]); } TEST_F(GumboUrlFilterTest, ParseMultipleUrlsFromTextElements) { std::string basic_url("http://example.com"); std::string url_without_scheme("//example.com/aa"); std::string url_with_params("https://example.com/foo?a=a"); // The three URLs are spread over two text elements. ParseAndFilter("<b>" + basic_url + "</b>" + url_without_scheme + " foobar " + url_with_params); ASSERT_EQ(3, anchors_.size()); ASSERT_EQ(1, std::count(anchors_.begin(), anchors_.end(), basic_url)); ASSERT_EQ(1, std::count(anchors_.begin(), anchors_.end(), url_without_scheme)); ASSERT_EQ(1, std::count(anchors_.begin(), anchors_.end(), url_with_params)); } TEST_F(GumboUrlFilterTest, ParseFromJavascriptUrl) { ParseAndFilter("<a href=\"javascript:location = '/here';\"></a>"); ASSERT_EQ(1, anchors_.size()); EXPECT_STREQ("/here", anchors_[0].c_str()); } TEST_F(GumboUrlFilterTest, ParseFromVbscriptUrl) { ParseAndFilter("<a href=\"vbscript:location.href = '/here';\"></a>"); ASSERT_EQ(1, anchors_.size()); EXPECT_STREQ("/here", anchors_[0].c_str()); } TEST_F(GumboUrlFilterTest, ParseFromJavascriptMixedCaseUrl) { ParseAndFilter("<a href=\"jaVascript:location = '/again';\"></a>"); ASSERT_EQ(1, anchors_.size()); EXPECT_STREQ("/again", anchors_[0].c_str()); } TEST_F(GumboUrlFilterTest, ParseUrlEmptyJavascriptUrl) { ParseAndFilter("<a href=\"javascript:\"></a>"); ASSERT_EQ(0, anchors_.size()); } TEST_F(GumboUrlFilterTest, ParseUrlFromMetaTag) { std::string url("http://meta"); ParseAndFilter("<meta http-equiv=\"refresh\" content=\"5; url=" + url + "\"/>"); ASSERT_EQ(1, anchors_.size()); EXPECT_STREQ("http://meta", anchors_[0].c_str()); } TEST_F(GumboUrlFilterTest, ParseUrlFromMetaTagIgnoresCase) { std::string url("http://meta"); ParseAndFilter("<meta http-equiv=\"refresh\" content=\"5; uRl=" + url + "\"/>"); ASSERT_EQ(1, anchors_.size()); EXPECT_STREQ("http://meta", anchors_[0].c_str()); } TEST_F(GumboUrlFilterTest, ParseQuotedUrlFromMetaTag) { std::string url("http://meta"); ParseAndFilter("<meta http-equiv=\"refresh\" content=\"5; url='" + url + "'\"/>"); ASSERT_EQ(1, anchors_.size()); EXPECT_STREQ("http://meta", anchors_[0].c_str()); } TEST_F(GumboUrlFilterTest, ParseUrlFromMetaTagWithOneQuote) { std::string url("http://meta"); ParseAndFilter("<meta http-equiv=\"refresh\" content=\"5; url='" + url + "\"/>"); ASSERT_EQ(1, anchors_.size()); EXPECT_STREQ("http://meta", anchors_[0].c_str()); } TEST_F(GumboUrlFilterTest, ParseUrlFromMetaWithoutContent) { ParseAndFilter("<meta http-equiv=\"\"/>"); ASSERT_EQ(0, anchors_.size()); } TEST_F(GumboUrlFilterTest, ParsedGumboUrlIsUnescaped) { ParseAndFilter("<a href='hello&amp;'>hello</a>"); ASSERT_EQ(1, anchors_.size()); EXPECT_STREQ("hello&", anchors_[0].c_str()); } TEST_F(GumboUrlFilterTest, ParseUrlOnclick) { ParseAndFilter("<p onclick=\"location.href='/url';\">"); ASSERT_EQ(1, anchors_.size()); } TEST_F(GumboUrlFilterTest, ParseUrlOnclickFindsXss) { ParseAndFilter( "<p onclick=\"var customerName='';plus123fish;'; " "alert('Welcome Mr. ' + customerName);\">"); ASSERT_EQ(1, issues_.size()); } } // namespace plusfish
32.853107
79
0.693895
google
5f71afccb2722ea46e95da751a1150f0d225eec0
1,870
hpp
C++
Sources/etwprof/OS/Stream/OStreamManipulators.hpp
Donpedro13/etwprof
a9db371ef556d564529c5112c231157d3789292b
[ "MIT" ]
38
2018-06-11T19:09:16.000Z
2022-03-17T04:15:15.000Z
Sources/etwprof/OS/Stream/OStreamManipulators.hpp
killvxk/etwprof
37ca044b5dd6be39dbd77ba7653395aa95768692
[ "MIT" ]
12
2018-06-12T20:24:05.000Z
2021-07-31T18:28:48.000Z
Sources/etwprof/OS/Stream/OStreamManipulators.hpp
killvxk/etwprof
37ca044b5dd6be39dbd77ba7653395aa95768692
[ "MIT" ]
5
2019-02-23T04:11:03.000Z
2022-03-17T04:15:18.000Z
#ifndef ETWP_OSTREAM_MANIPULATORS_HPP #define ETWP_OSTREAM_MANIPULATORS_HPP namespace ETWP { class ConsoleOStream; using OStreamManipulator = void (*)(ConsoleOStream*); void Endl (ConsoleOStream* stream); void ColorReset (ConsoleOStream* stream); void FgColorReset (ConsoleOStream* stream); void FgColorBlack (ConsoleOStream* stream); void FgColorBlue (ConsoleOStream* stream); void FgColorDarkBlue (ConsoleOStream* stream); void FgColorCyan (ConsoleOStream* stream); void FgColorDarkCyan (ConsoleOStream* stream); void FgColorGray (ConsoleOStream* stream); void FgColorDarkGray (ConsoleOStream* stream); void FgColorGreen (ConsoleOStream* stream); void FgColorDarkGreen (ConsoleOStream* stream); void FgColorMagenta (ConsoleOStream* stream); void FgColorDarkMagenta (ConsoleOStream* stream); void FgColorRed (ConsoleOStream* stream); void FgColorDarkRed (ConsoleOStream* stream); void FgColorWhite (ConsoleOStream* stream); void FgColorYellow (ConsoleOStream* stream); void FgColorDarkYellow (ConsoleOStream* stream); void BgColorReset (ConsoleOStream* stream); void BgColorBlack (ConsoleOStream* stream); void BgColorBlue (ConsoleOStream* stream); void BgColorDarkBlue (ConsoleOStream* stream); void BgColorCyan (ConsoleOStream* stream); void BgColorDarkCyan (ConsoleOStream* stream); void BgColorGray (ConsoleOStream* stream); void BgColorDarkGray (ConsoleOStream* stream); void BgColorGreen (ConsoleOStream* stream); void BgColorDarkGreen (ConsoleOStream* stream); void BgColorMagenta (ConsoleOStream* stream); void BgColorDarkMagenta (ConsoleOStream* stream); void BgColorRed (ConsoleOStream* stream); void BgColorDarkRed (ConsoleOStream* stream); void BgColorWhite (ConsoleOStream* stream); void BgColorYellow (ConsoleOStream* stream); void BgColorDarkYellow (ConsoleOStream* stream); } // namespace ETWP #endif // #ifndef ETWP_OSTREAM_MANIPULATORS_HPP
35.961538
53
0.818182
Donpedro13
5f769c53c564d2e8ab345db842a6e9f09e0a9cf4
115
cpp
C++
docs/mfc/reference/codesnippet/CPP/application-information-and-management_1.cpp
bobbrow/cpp-docs
769b186399141c4ea93400863a7d8463987bf667
[ "CC-BY-4.0", "MIT" ]
965
2017-06-25T23:57:11.000Z
2022-03-31T14:17:32.000Z
docs/mfc/reference/codesnippet/CPP/application-information-and-management_1.cpp
bobbrow/cpp-docs
769b186399141c4ea93400863a7d8463987bf667
[ "CC-BY-4.0", "MIT" ]
3,272
2017-06-24T00:26:34.000Z
2022-03-31T22:14:07.000Z
docs/mfc/reference/codesnippet/CPP/application-information-and-management_1.cpp
bobbrow/cpp-docs
769b186399141c4ea93400863a7d8463987bf667
[ "CC-BY-4.0", "MIT" ]
951
2017-06-25T12:36:14.000Z
2022-03-26T22:49:06.000Z
// Print the application's executable filename. TRACE(_T("Executable filename = %s\n"), AfxGetApp()->m_pszExeName);
57.5
67
0.747826
bobbrow
5f77a8ba5661c148146681589a80917d88931e12
4,833
cpp
C++
utils/swc_to_nlxml.cpp
Twinklebear/nlxml
2044a89c8b0b1d69c7762dc48406770f4b7c9834
[ "MIT" ]
null
null
null
utils/swc_to_nlxml.cpp
Twinklebear/nlxml
2044a89c8b0b1d69c7762dc48406770f4b7c9834
[ "MIT" ]
1
2019-03-18T00:37:08.000Z
2019-03-18T21:45:35.000Z
utils/swc_to_nlxml.cpp
Twinklebear/nlxml
2044a89c8b0b1d69c7762dc48406770f4b7c9834
[ "MIT" ]
null
null
null
#include <iostream> #include <set> #include <map> #include <iterator> #include <vector> #include <sstream> #include <fstream> #include <algorithm> #include <vector> #include <algorithm> #include <glm/glm.hpp> #include <glm/ext.hpp> #include "nlxml.h" using namespace nlxml; /* Read the SWC file (http://research.mssm.edu/cnic/swc.html) recursively * down the branches to import it as NLXML * File format is a bunch of lines in ASCII with numbers specifying: * * n T x y z R P * * n is an integer label that identifies the current point * and increments by one from one line to the next. * * T is an integer representing the type of neuronal segment, * such as soma, axon, apical dendrite, etc. The standard accepted * integer values are given below. * * 0 = undefined * 1 = soma * 2 = axon * 3 = dendrite * 4 = apical dendrite * 5 = fork point * 6 = end point * 7 = custom * * x, y, z gives the cartesian coordinates of each node. * * R is the radius at that node. * * P indicates the parent (the integer label) of the current point * or -1 to indicate an origin (soma). */ struct SWCPoint { int id = 0; int type = 0; float x = 0; float y = 0; float z = 0; float radius = 0; int parent_id = 0; int children = 0; }; std::ostream& operator<<(std::ostream &os, const SWCPoint &p) { os << "(" << p.id << ", " << p.type << ", [" << p.x << ", " << p.y << ", " << p.z << "], " << p.radius << ", " << p.parent_id << ", {" << p.children << "})"; return os; } bool operator<(const SWCPoint &a, const SWCPoint &b) { return a.id < b.id; } SWCPoint read_point(const std::string &l) { std::istringstream iss(l); std::vector<std::string> vals{std::istream_iterator<std::string>(iss), std::istream_iterator<std::string>()}; SWCPoint p; p.id = std::stoi(vals[0]); p.type = std::stoi(vals[1]); p.x = std::stof(vals[2]); p.y = std::stof(vals[3]); p.z = std::stof(vals[4]); p.radius = std::stof(vals[5]); p.parent_id = std::stoi(vals[6]); return p; } // Points in the map are indexed by their parent ID, with a set of // all points who are parented by that point using SWCMap = std::map<int, std::set<SWCPoint>>; template<typename T> void convert_swc_branch(T &branch, const SWCPoint parent, const std::set<SWCPoint> &children, const SWCMap &swcpoints) { if (children.size() > 1) { for (auto branches = children.cbegin(); branches != children.cend(); ++branches) { Branch b; b.leaf = "Normal"; SWCPoint bstart = *branches; b.points.push_back(Point(bstart.x, bstart.y, bstart.z, bstart.radius)); auto bpoints = swcpoints.find(bstart.id); if (bpoints != swcpoints.end()) { convert_swc_branch(b, bstart, bpoints->second, swcpoints); } branch.branches.push_back(b); } } else if (children.size() == 1) { SWCPoint child = *children.cbegin(); branch.points.push_back(Point(child.x, child.y, child.z, child.radius)); auto child_children = swcpoints.find(child.id); if (child_children != swcpoints.end() && !child_children->second.empty()) { convert_swc_branch(branch, child, child_children->second, swcpoints); } } } NeuronData convert_swc(const SWCMap &swcpoints) { NeuronData data; auto treeiter = swcpoints.find(-1); if (treeiter == swcpoints.end()) { std::cout << "No trees in file!?\n"; return data; } auto trees = treeiter->second; for (auto it = trees.begin(); it != trees.end(); ++it) { const SWCPoint p = *it; Tree t; t.color = Color(1, 1, 1); switch (p.type) { case 1: t.type = "Soma"; break; case 2: t.type = "Axon"; break; case 3: t.type = "Dendrite"; break; case 4: t.type = "Apical Dendrite"; break; case 7: t.type = "Custom"; break; default: t.type = "Undefined"; } t.leaf = "Normal"; t.points.push_back(Point(p.x, p.y, p.z, p.radius)); auto children = swcpoints.find(p.id); if (children != swcpoints.end()) { convert_swc_branch(t, p, children->second, swcpoints); } data.trees.push_back(t); } return data; } SWCMap import_swc(const std::string &fname) { std::ifstream fin(fname.c_str()); SWCMap points; std::string line; while (std::getline(fin, line)) { if (line.empty() || line[0] == '#') { continue; } SWCPoint p = read_point(line); points[p.parent_id].insert(p); } return points; } int main(int argc, char **argv) { std::string input, output; for (int i = 1; i < argc; ++i) { if (std::strcmp(argv[i], "-o") == 0) { output = argv[++i]; } else { input = argv[i]; } } if (input.empty() || output.empty()) { std::cout << "Error: an input and output file are needed.\n" << "Usage: ./" << argv[0] << " <input> -o <output>\n"; return 1; } std::cout << "Exporting SWC file as NLXML to " << output << "\n"; auto swcpoints = import_swc(input); auto data = convert_swc(swcpoints); export_file(data, output); return 0; }
25.303665
84
0.634802
Twinklebear
5f7a9c797738783fd2ab6b6edf2c15f5c2023d2b
588
hpp
C++
src/moistureMeasurement.hpp
umiko/MoistureMeter
89b617e57bf5934ccd4d0fdfa2eda12c4385edf1
[ "MIT" ]
null
null
null
src/moistureMeasurement.hpp
umiko/MoistureMeter
89b617e57bf5934ccd4d0fdfa2eda12c4385edf1
[ "MIT" ]
null
null
null
src/moistureMeasurement.hpp
umiko/MoistureMeter
89b617e57bf5934ccd4d0fdfa2eda12c4385edf1
[ "MIT" ]
null
null
null
//AUTHOR: //umiko(https://github.com/umiko) //Permission to copy and modify is granted under the MIT license // //DESCRIPTION: //A struct to save the last measurement taken, so it can be supplied at a later time again #ifndef MOISTUREMEASUREMENT_CPP #define MOISTUREMEASUREMENT_CPP #include <Arduino.h> class moistureMeasurement { private: public: static int m_measurement_count; int m_rawValue{0}; int m_baseline{0}; moistureMeasurement(); moistureMeasurement(int rawValue, int baseline); ~moistureMeasurement(); float getMoistureInPercentage(); void print(); }; #endif
23.52
90
0.765306
umiko
5f81a2abcc92a1c85e45e4f6f0eef014ce0282ea
141
hh
C++
host/device-reference.hh
free-audio/clap-host
4602d26b91a526ac80933bdc9f6fcafdf2423bbf
[ "MIT" ]
24
2021-12-01T13:36:25.000Z
2022-03-17T10:12:29.000Z
host/device-reference.hh
free-audio/clap-host
4602d26b91a526ac80933bdc9f6fcafdf2423bbf
[ "MIT" ]
9
2021-11-02T14:39:54.000Z
2022-03-19T11:04:54.000Z
host/device-reference.hh
free-audio/clap-host
4602d26b91a526ac80933bdc9f6fcafdf2423bbf
[ "MIT" ]
4
2021-11-02T09:01:50.000Z
2022-02-04T20:00:35.000Z
#pragma once #include <QString> struct DeviceReference { QString _api = "(none)"; QString _name = "(noname)"; int _index = 0; };
14.1
30
0.624113
free-audio
5f81c6c8c4ea9f912d51ed641b32741f6feecb1c
2,784
hpp
C++
accumulate.hpp
dean985/itertools
842715b5fe7db5c74f65da642aa06ae365bb68c2
[ "MIT" ]
null
null
null
accumulate.hpp
dean985/itertools
842715b5fe7db5c74f65da642aa06ae365bb68c2
[ "MIT" ]
2
2020-06-18T11:35:37.000Z
2020-06-18T11:35:45.000Z
accumulate.hpp
dean985/itertools
842715b5fe7db5c74f65da642aa06ae365bb68c2
[ "MIT" ]
null
null
null
#pragma once #include <iostream> namespace itertools { typedef struct { template <typename T> T operator()(T a, T b) { return a + b; } } add; template <typename Container,typename Ftor = add> class accumulate { Ftor _fnctor = [](int x, int y){return x*y;}; Container _container; public: accumulate(Container cont, Ftor func) : _fnctor(func), _container(cont) {} accumulate(Container cont):_fnctor(add()), _container(cont) { } class iterator { typename Container::iterator _iter; typename Container::iterator _current; typename Container::iterator _end; Ftor ftor; typename std::decay<decltype(*_iter)>::type sum; public: explicit iterator(typename Container::iterator iter, typename Container::iterator end, Ftor functor) : _iter(iter), _end(end), _current(_iter), ftor(functor) { if(_iter != _end) sum = *iter; } iterator(iterator &copy) = default; iterator &operator=(const iterator &it) { this->_iter = it->_iter; this->_end = it->_end; this->ftor = it->ftor; return *this; } iterator &operator++() { std::not_equal_to neq; ++_current; if((neq(_current, _end)) ) { sum = ftor(sum, (*_current)); } return (*this); } iterator operator++(int a) { iterator temp(*this); operator++(); return temp; } bool operator==(const iterator &it) { return (it._iter == this->_current) ; } bool operator!=(const iterator &it) { // std::cout<<"in !="<<std::endl; return it._iter != this->_current; } decltype(*_iter) operator*()//// I need to make it template {// i need to put here somthing that will return return sum; } }; iterator begin() { return iterator(_container.begin(), _container.end(), _fnctor); } iterator end() { return iterator(_container.end(), _container.end(), _fnctor); } }; } // namespace itertools
27.029126
91
0.431753
dean985
5f83b93ffc743d1c6cb8c993a3e37548387c905c
5,903
cpp
C++
source/octree/linear-octree.cpp
triplu-zero/monte-carlo-ray-tracer
8b36d5154204fc67e13376ad15b8bac33065c2d1
[ "MIT" ]
149
2020-03-06T00:39:43.000Z
2022-03-31T07:28:36.000Z
source/octree/linear-octree.cpp
triplu-zero/monte-carlo-ray-tracer
8b36d5154204fc67e13376ad15b8bac33065c2d1
[ "MIT" ]
4
2020-07-27T15:33:09.000Z
2022-02-24T11:34:40.000Z
source/octree/linear-octree.cpp
triplu-zero/monte-carlo-ray-tracer
8b36d5154204fc67e13376ad15b8bac33065c2d1
[ "MIT" ]
17
2020-03-23T16:05:36.000Z
2022-02-21T02:38:31.000Z
#include "linear-octree.hpp" #include <glm/gtx/norm.hpp> #include "../common/constexpr-math.hpp" #include "../common/util.hpp" template <class Data> LinearOctree<Data>::LinearOctree(Octree<Data> &octree_root) { size_t octree_size = 0, data_size = 0; octreeSize(octree_root, octree_size, data_size); if (octree_size == 0 || data_size == 0) return; uint32_t df_idx = root_idx; uint64_t data_idx = 0; compact(&octree_root, df_idx, data_idx, true); } template <class Data> std::vector<SearchResult<Data>> LinearOctree<Data>::knnSearch(const glm::dvec3& p, size_t k, double radius_est) const { std::vector<SearchResult<Data>> result; if (linear_tree.empty()) return result; if (k > ordered_data.size()) k = ordered_data.size(); result.reserve(k); double min_distance2 = -1.0; double max_distance2 = pow2(radius_est); double distance2 = linear_tree[root_idx].BB.distance2(p); auto to_visit = reservedPriorityQueue<KNNode>(64); KNNode current(root_idx, distance2); while (true) { if (current.octant != null_idx) { if (linear_tree[current.octant].leaf) { uint64_t end_idx = linear_tree[current.octant].start_data + linear_tree[current.octant].num_data; for (uint64_t i = linear_tree[current.octant].start_data; i < end_idx; i++) { double distance2 = glm::distance2(ordered_data[i].pos(), p); if (distance2 <= max_distance2 && distance2 > min_distance2) { to_visit.emplace(distance2, i); } } } else { uint32_t child_octant = current.octant + 1; while (child_octant != null_idx) { const auto& node = linear_tree[child_octant]; distance2 = node.BB.distance2(p); if (distance2 <= max_distance2 && node.BB.max_distance2(p) > min_distance2) { to_visit.emplace(child_octant, distance2); } child_octant = node.next_sibling; } } } else { result.emplace_back(ordered_data[current.data], current.distance2); if (result.size() == k) return result; } if (to_visit.empty()) { // Maximum search sphere doesn't contain k points. Increase radius and // traverse octree again, ignoring the already found closest points. max_distance2 *= 2.0; if (!result.empty()) min_distance2 = result.back().distance2; current = KNNode(root_idx, linear_tree[root_idx].BB.distance2(p)); } else { current = to_visit.top(); to_visit.pop(); } } } template <class Data> std::vector<SearchResult<Data>> LinearOctree<Data>::radiusSearch(const glm::dvec3& p, double radius) const { std::vector<SearchResult<Data>> result; if (linear_tree.empty()) return result; recursiveRadiusSearch(root_idx, p, pow2(radius), result); return result; } template <class Data> void LinearOctree<Data>::recursiveRadiusSearch(const uint32_t current, const glm::dvec3& p, double radius2, std::vector<SearchResult<Data>>& result) const { if (linear_tree[current].leaf) { uint64_t end_idx = linear_tree[current].start_data + linear_tree[current].num_data; for (uint64_t i = linear_tree[current].start_data; i < end_idx; i++) { double distance2 = glm::distance2(ordered_data[i].pos(), p); if (distance2 <= radius2) { result.emplace_back(ordered_data[i], distance2); } } } else { uint32_t child_octant = current + 1; while (child_octant != null_idx) { if (linear_tree[child_octant].BB.distance2(p) <= radius2) { recursiveRadiusSearch(child_octant, p, radius2, result); } child_octant = linear_tree[child_octant].next_sibling; } } } template <class Data> void LinearOctree<Data>::octreeSize(const Octree<Data> &octree_root, size_t &size, size_t &data_size) const { if (octree_root.leaf() && octree_root.data_vec.empty()) return; size++; data_size += octree_root.data_vec.size(); if (!octree_root.leaf()) { for (const auto &octant : octree_root.octants) { octreeSize(*octant, size, data_size); } } } template <class Data> BoundingBox LinearOctree<Data>::compact(Octree<Data> *node, uint32_t &df_idx, uint64_t &data_idx, bool last) { uint32_t idx = df_idx++; linear_tree.emplace_back(); linear_tree[idx].leaf = (uint8_t)node->leaf(); linear_tree[idx].start_data = data_idx; linear_tree[idx].num_data = (uint16_t)node->data_vec.size(); BoundingBox BB; for (auto&& data : node->data_vec) BB.merge(data.pos()); ordered_data.insert(ordered_data.end(), node->data_vec.begin(), node->data_vec.end()); data_idx += node->data_vec.size(); node->data_vec.clear(); node->data_vec.shrink_to_fit(); if (!node->leaf()) { std::vector<size_t> use; for (size_t i = 0; i < node->octants.size(); i++) { if (!(node->octants[i]->leaf() && node->octants[i]->data_vec.empty())) { use.push_back(i); } } for (const auto &i : use) { BB.merge(compact(node->octants[i].get(), df_idx, data_idx, i == use.back())); } } node->octants.clear(); node->octants.shrink_to_fit(); linear_tree[idx].next_sibling = last ? null_idx : df_idx; linear_tree[idx].BB = BB; return BB; }
31.566845
154
0.580891
triplu-zero
5f84f5c1e5e2bacec64ab1c2ad6891b75f2c5ec7
3,397
cpp
C++
source/LinearizedImplicitEuler.cpp
sergeneren/BubbleH
e018e5a008e101221a4f8a3bbb25e7ec03fc9662
[ "BSD-3-Clause-Clear" ]
52
2019-10-06T17:25:39.000Z
2022-01-20T23:01:13.000Z
source/LinearizedImplicitEuler.cpp
sergeneren/BubbleH
e018e5a008e101221a4f8a3bbb25e7ec03fc9662
[ "BSD-3-Clause-Clear" ]
1
2019-10-08T18:44:41.000Z
2019-10-09T07:48:31.000Z
source/LinearizedImplicitEuler.cpp
sergeneren/BubbleH
e018e5a008e101221a4f8a3bbb25e7ec03fc9662
[ "BSD-3-Clause-Clear" ]
10
2019-10-07T16:33:24.000Z
2020-10-21T01:09:47.000Z
#include "LinearizedImplicitEuler.h" #include "VS3D.h" // TODO: Save space by creating dx, dv, rhs, A only once. LinearizedImplicitEuler::LinearizedImplicitEuler() : SceneStepper() {} LinearizedImplicitEuler::~LinearizedImplicitEuler() {} bool LinearizedImplicitEuler::stepScene( VS3D& scene, scalar dt ) { const int ndof = scene.constrainedPositions().size() * 3; const VecXd& x = Eigen::Map<VecXd>((double*) &scene.constrainedPositions()[0], ndof); const VecXd& v = Eigen::Map<VecXd>((double*) &scene.constrainedVelocities()[0], ndof); const VecXd& m = Eigen::Map<VecXd>((double*) &scene.constrainedMass()[0], ndof); assert(x.size() == v.size()); assert( ndof % 3 == 0 ); int nprts = scene.constrainedPositions().size(); assert( 3 * nprts == ndof ); // We specify the current iterate as a change from last timestep's solution // Linearizing about the previous timestep's solution implies dx = dt*v0 VectorXs dx = dt*v; // Linearizing about the previous timestep's solution implies dv = 0 VectorXs dv = VectorXs::Zero(ndof); scene.preCompute(dx, dv, dt); // RHS of linear system is force. rhs == f SparseXs A(ndof,ndof); TripletXs tri_A; SparseXs Av(ndof, ndof); TripletXs tri_Av; SparseXs M(ndof, ndof); TripletXs mm; SparseXs C(ndof, ndof); TripletXs cc; for(int i = 0; i < ndof; ++i) { if(scene.constrainedFixed()[i / 3]) { mm.push_back(Triplets(i, i, 1.0)); } else { mm.push_back(Triplets(i, i, m(i))); cc.push_back(Triplets(i, i, 1.0)); } } M.setFromTriplets(mm.begin(), mm.end()); C.setFromTriplets(cc.begin(), cc.end()); tri_A.clear(); scene.accumulateddUdxdx(tri_A); tri_Av.clear(); scene.accumulateddUdxdv(tri_Av); // lhs == -df/dx A.setFromTriplets(tri_A.begin(), tri_A.end()); A *= dt; SparseXs B = A; // lhs == -h*df/dx Av.setFromTriplets(tri_Av.begin(), tri_Av.end()); // lhs == -h*df/dv -h^2*df/dx // lhs == -df/dv -h*df/dx A += Av; // lhs == -h*df/dv -h^2*df/dx A *= dt; // For scripted DoFs, zero out the rows/cols of fixed degrees of freedom A = C * A; // lhs == M -h*df/dv -h^2*df/dx A += M; Eigen::SimplicialLDLT<SparseXs> solver(A); VectorXs rhs = VectorXs::Zero(ndof); scene.accumulateGradU(rhs,dx,dv); rhs *= -1.0; // rhs == f - hessE * v rhs -= C * (B * v); // rhs == h*f rhs *= dt; // For scripted DoFs, zero the elements of fixed degrees of freedom zeroFixedDoFs( scene, rhs ); // Change in velocity returned by linear solve VectorXs dqdot = solver.solve(rhs); Eigen::Map<VecXd>((double*) &scene.constrainedVelocities()[0], ndof) += dqdot; Eigen::Map<VecXd>((double*) &scene.constrainedPositions()[0], ndof) += dt * Eigen::Map<VecXd>((double*) &scene.constrainedVelocities()[0], ndof); return true; } std::string LinearizedImplicitEuler::getName() const { return "Linearized Implicit Euler"; } void LinearizedImplicitEuler::zeroFixedDoFs( const VS3D& scene, VectorXs& vec ) { int nprts = scene.constrainedPositions().size(); for( int i = 0; i < nprts; ++i ) if( scene.constrainedFixed()[i] ) vec.segment<3>(3 * i).setZero(); }
28.308333
149
0.600236
sergeneren
5f86049f22b9d449118b81ec1a272d8b8a360ade
1,433
cpp
C++
android-30/java/util/logging/ErrorManager.cpp
YJBeetle/QtAndroidAPI
1468b5dc6eafaf7709f0b00ba1a6ec2b70684266
[ "Apache-2.0" ]
12
2020-03-26T02:38:56.000Z
2022-03-14T08:17:26.000Z
android-31/java/util/logging/ErrorManager.cpp
YJBeetle/QtAndroidAPI
1468b5dc6eafaf7709f0b00ba1a6ec2b70684266
[ "Apache-2.0" ]
1
2021-01-27T06:07:45.000Z
2021-11-13T19:19:43.000Z
android-29/java/util/logging/ErrorManager.cpp
YJBeetle/QtAndroidAPI
1468b5dc6eafaf7709f0b00ba1a6ec2b70684266
[ "Apache-2.0" ]
3
2021-02-02T12:34:55.000Z
2022-03-08T07:45:57.000Z
#include "../../lang/Exception.hpp" #include "../../../JString.hpp" #include "./ErrorManager.hpp" namespace java::util::logging { // Fields jint ErrorManager::CLOSE_FAILURE() { return getStaticField<jint>( "java.util.logging.ErrorManager", "CLOSE_FAILURE" ); } jint ErrorManager::FLUSH_FAILURE() { return getStaticField<jint>( "java.util.logging.ErrorManager", "FLUSH_FAILURE" ); } jint ErrorManager::FORMAT_FAILURE() { return getStaticField<jint>( "java.util.logging.ErrorManager", "FORMAT_FAILURE" ); } jint ErrorManager::GENERIC_FAILURE() { return getStaticField<jint>( "java.util.logging.ErrorManager", "GENERIC_FAILURE" ); } jint ErrorManager::OPEN_FAILURE() { return getStaticField<jint>( "java.util.logging.ErrorManager", "OPEN_FAILURE" ); } jint ErrorManager::WRITE_FAILURE() { return getStaticField<jint>( "java.util.logging.ErrorManager", "WRITE_FAILURE" ); } // QJniObject forward ErrorManager::ErrorManager(QJniObject obj) : JObject(obj) {} // Constructors ErrorManager::ErrorManager() : JObject( "java.util.logging.ErrorManager", "()V" ) {} // Methods void ErrorManager::error(JString arg0, java::lang::Exception arg1, jint arg2) const { callMethod<void>( "error", "(Ljava/lang/String;Ljava/lang/Exception;I)V", arg0.object<jstring>(), arg1.object(), arg2 ); } } // namespace java::util::logging
19.364865
84
0.677599
YJBeetle
5f87173eaafc62afd8454c1067053ee3c35ec14e
759
hpp
C++
cpp/src/vcf/reader.hpp
dylex/wecall
35d24cefa4fba549e737cd99329ae1b17dd0156b
[ "MIT" ]
8
2018-10-08T15:47:21.000Z
2021-11-09T07:13:05.000Z
cpp/src/vcf/reader.hpp
dylex/wecall
35d24cefa4fba549e737cd99329ae1b17dd0156b
[ "MIT" ]
4
2018-11-05T09:16:27.000Z
2020-04-09T12:32:56.000Z
cpp/src/vcf/reader.hpp
dylex/wecall
35d24cefa4fba549e737cd99329ae1b17dd0156b
[ "MIT" ]
4
2019-09-03T15:46:39.000Z
2021-06-04T07:28:33.000Z
// All content Copyright (C) 2018 Genomics plc #ifndef VCF_READER_HPP #define VCF_READER_HPP #include <utils/logging.hpp> #include <fstream> #include <boost/optional/optional.hpp> #include <map> #include <set> #include "vcf/filterDescription.hpp" #include "vcf/record.hpp" #include "utils/timer.hpp" struct shouldParseValidVCFFilterHeaderUpperCaseID; struct shouldParseValidVCFFilterHeaderLowerCaseID; struct shouldParseValidVCFFilterHeaderDigitsAndPunctuation; struct shouldRaiseOnINFOHeaderType; struct shouldRaiseOnInvalidVCFFilterHeader; struct shouldRaiseOnFORMATHeaderType; namespace wecall { namespace vcf { using vcfMetaInformation_t = std::map< std::string, std::string >; Info parseVCFInfo( const std::string & raw_info ); } } #endif
22.323529
70
0.806324
dylex
5f87d676b4c228f3da68f6dd69d9f0811cf23a07
18,446
cpp
C++
DotnetLibraryTests/StringTests.cpp
lambertlb/CppTranslator
8d9e94f01a0eb099c224fbd9720a0d060a49bda9
[ "MIT" ]
null
null
null
DotnetLibraryTests/StringTests.cpp
lambertlb/CppTranslator
8d9e94f01a0eb099c224fbd9720a0d060a49bda9
[ "MIT" ]
null
null
null
DotnetLibraryTests/StringTests.cpp
lambertlb/CppTranslator
8d9e94f01a0eb099c224fbd9720a0d060a49bda9
[ "MIT" ]
null
null
null
// Copyright (c) 2019 LLambert // // Permission is hereby granted, free of charge, to any person obtaining a copy of this // software and associated documentation files (the "Software"), to deal in the Software // without restriction, including without limitation the rights to use, copy, modify, merge, // publish, distribute, sub-license, and/or sell copies of the Software, and to permit persons // to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or // substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. #include "gtest/gtest.h" #include <DotnetTypes.h> using namespace DotnetLibrary; TEST(StringTests, ConstructorTest) { String string(L"Test String"); ASSERT_TRUE(!string.IsAllocated()); ASSERT_TRUE(string.get_Length() == 11); ASSERT_TRUE(wcscmp(string.get_Buffer(), L"Test String") == 0); } TEST(StringTests, Constructor2Test) { String string(L"Test String 1234567890", 12, 10); ASSERT_TRUE(string.IsAllocated()); ASSERT_TRUE(string.get_Length() == 10); ASSERT_TRUE(wcscmp(string.get_Buffer(), L"1234567890") == 0); } TEST(StringTests, Constructor3Test) { Array array(CharType, 6); Char data[] = { 'A','B', 'C', 'D', 'E', 'F' }; array.Initialize(data); String string(&array); ASSERT_TRUE(string.IsAllocated()); ASSERT_TRUE(string.get_Length() == 6); ASSERT_TRUE(wcscmp(string.get_Buffer(), L"ABCDEF") == 0); } TEST(StringTests, Constructor4Test) { Array array(CharType, 6); Char data[] = { 'A','B', 'C', 'D', 'E', 'F' }; array.Initialize(data); String string(&array, 3, 3); ASSERT_TRUE(string.IsAllocated()); ASSERT_TRUE(string.get_Length() == 3); ASSERT_TRUE(wcscmp(string.get_Buffer(), L"DEF") == 0); } TEST(StringTests, Constructor5Test) { String string(L'C', 6); ASSERT_TRUE(string.IsAllocated()); ASSERT_TRUE(string.get_Length() == 6); ASSERT_TRUE(wcscmp(string.get_Buffer(), L"CCCCCC") == 0); } TEST(StringTests, GetCharsTest) { String string(L"Test String"); ASSERT_TRUE(string.get_Chars(0) == L'T'); ASSERT_TRUE(string.get_Chars(10) == L'g'); } TEST(StringTests, GetLengthTest) { String string(L"Test String"); ASSERT_TRUE(string.get_Length() == 11); } TEST(StringTests, AddressTest) { String string(L"Test String"); ASSERT_TRUE(*string.Address(0) == L'T'); } TEST(StringTests, CompareTest) { String string(L"ABCDEFGHI"); String string2(L"ABCDEFGHI"); ASSERT_TRUE(String::Compare(&string,&string2) == 0); } TEST(StringTests, Compare2Test) { String string(L"ABCDEFGHI"); String string2(L"aBCDEFGHI"); ASSERT_TRUE(String::Compare(&string, &string2) > 0); } TEST(StringTests, Compare3Test) { String string(L"ABCDEFGHI"); String string2(L"aBCDEFGHI"); ASSERT_TRUE(String::Compare(&string, &string2, true) == 0); } TEST(StringTests, Compare4Test) { String string(L"1ABCDEFGHI"); String string2(L"ABCDEFGHI"); ASSERT_TRUE(String::Compare(&string, &string2) < 0); } TEST(StringTests, Compare5Test) { String string(L"1ABCDEFGHI"); String string2(L"ABCXXXXX"); ASSERT_TRUE(String::Compare(&string, 1, &string2, 0 ,3) == 0); } TEST(StringTests, Compare6Test) { String string(L"1ABCDEFGHI"); String string2(L"abcXXXXX"); ASSERT_TRUE(String::Compare(&string, 1, &string2, 0, 3, true) == 0); } TEST(StringTests, CompareOrinalTest) { String string(L"ABCDEFGHI"); String string2(L"ABCDEFGHI"); ASSERT_TRUE(String::CompareOrdinal(&string, &string2) == 0); } TEST(StringTests, CompareOrinal2Test) { String string(L"ABCDEFGHI"); String string2(L"aBCDEFGHI"); ASSERT_TRUE(String::CompareOrdinal(&string, &string2) < 0); } TEST(StringTests, CompareOrinal3Test) { String string(L"1ABCDEFGHI"); String string2(L"ABCXXXXX"); ASSERT_TRUE(String::CompareOrdinal(&string, 1, &string2, 0, 3) == 0); } TEST(StringTests, CompareToTest) { String string(L"ABCDEFGHI"); String string2(L"ABCDEFGHI"); ASSERT_TRUE(string.CompareTo(&string2) == 0); } TEST(StringTests, CompareTo2Test) { String string(L"ABCDEFGHI"); ASSERT_TRUE(string.CompareTo((String*)nullptr) == 1); } TEST(StringTests, CompareTo3Test) { String string(L"ABCDEFGHI"); String string2(L"ABCDEFGHI"); ASSERT_TRUE(string.CompareTo((Object*)&string2) == 0); } TEST(StringTests, ConcatTest) { String string(L"ABC"); String* s2 = String::Concat(&string); ASSERT_TRUE(wcscmp(s2->get_Buffer(), L"ABC") == 0); } TEST(StringTests, Concat2Test) { String string(L"ABC"); String string2(L"DEF"); String string3(L"GHI"); String string4(L"JKL"); String* s2 = String::Concat(&string, &string2, &string3, &string4); ASSERT_TRUE(wcscmp(s2->get_Buffer(), L"ABCDEFGHIJKL") == 0); } TEST(StringTests, Concat3Test) { Array array(ObjectType, 4); String string(L"ABC"); String string2(L"DEF"); String string3(L"GHI"); String string4(L"JKL"); Object* list[4] = { &string, &string2, &string3, &string4 }; array.Initialize(list); String* s2 = String::Concat(&array); ASSERT_TRUE(wcscmp(s2->get_Buffer(), L"ABCDEFGHIJKL") == 0); } TEST(StringTests, ContainsTest) { String string(L"ABCDEFGHI"); String string2(L"ABCDEFGHI"); ASSERT_TRUE(string.Contains(&string2)); } TEST(StringTests, Contains2Test) { String string(L"ABCDEFGHI"); String string2(L"DEF"); ASSERT_TRUE(string.Contains(&string2)); } TEST(StringTests, Contains3Test) { String string(L"ABCDEFGHI"); String string2(L"123"); ASSERT_TRUE(!string.Contains(&string2)); } TEST(StringTests, CopyTest) { String string(L"ABCDEFGHI"); String* string2 = String::Copy(&string); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L"ABCDEFGHI") == 0); } TEST(StringTests, CopyToTest) { String string(L"1234567890"); Array array(CharType, 6); Char data[] = { 'A','B', 'C', 'D', 'E', 'F' }; array.Initialize(data); string.CopyTo(3, &array, 2, 3); Char* x = (Char*)array.Address(0); ASSERT_TRUE(wcsncmp((Char*)array.Address(0), L"AB456F", 6) == 0); } TEST(StringTests, EndsWithTest) { String string(L"ABCDEFGHI"); String string1(L"GHI"); ASSERT_TRUE(string.EndsWith(&string1)); } TEST(StringTests, EndsWith2Test) { String string(L"ABCDEFGHI"); String string1(L"ABCDEFGHI"); ASSERT_TRUE(string.EndsWith(&string1)); } TEST(StringTests, EndsWith3Test) { String string(L"ABCDEFGHI"); ASSERT_TRUE(string.EndsWith(L'I')); } TEST(StringTests, EndsWith4Test) { String string(L""); ASSERT_TRUE(!string.EndsWith(L'I')); } TEST(StringTests, EqualsTest) { String string(L"ABCDEFGHI"); ASSERT_TRUE(string.Equals(&string)); } TEST(StringTests, Equals2Test) { String string(L"ABCDEFGHI"); String string2(L"ABCDEFGHI"); ASSERT_TRUE(string.Equals(&string2)); } TEST(StringTests, Equals3Test) { String string(L"ABCDEFGHI"); String string2(L"ABCDEFGHI"); ASSERT_TRUE(string.Equals((Object*)&string2)); } TEST(StringTests, Equals4Test) { String string(L"ABCDEFGHI"); String string2(L"ABCDEFGHI"); ASSERT_TRUE(((Object*)&string)->Equals((Object*)&string2)); } TEST(StringTests, Equals5Test) { String string(L"ABCDEFGHI"); String string2(L"ABCDEFGHI"); ASSERT_TRUE(Object::Equals((Object*)&string, (Object*)&string2)); } TEST(StringTests, Equals6Test) { String string(L"ABCDEFGHI"); String string2(L"ABCDEFGHI"); ASSERT_TRUE(String::Equals(&string, (Object*)&string2)); } TEST(StringTests, GetEnumeratorTest) { Char* chars = (Char*)L"ABCDEFGHI"; String string(chars); CharEnumerator* iter = string.GetEnumerator(); Int32 i = 0; while (iter->MoveNext()) { ASSERT_TRUE(iter->get_Current() == chars[i++]); } i = 0; iter->Reset(); while (iter->MoveNext()) { ASSERT_TRUE(iter->get_Current() == chars[i++]); } } TEST(StringTests, IndexOfTest) { String string(L"ABCDEFGHI"); ASSERT_TRUE(string.IndexOf(L'A') == 0); } TEST(StringTests, IndexOf2Test) { String string(L"ABCDEFGHI"); ASSERT_TRUE(string.IndexOf(L'I') == 8); } TEST(StringTests, IndexOf3Test) { String string(L"ABCDEFGHI"); ASSERT_TRUE(string.IndexOf(L'C', 2) == 2); } TEST(StringTests, IndexOf4Test) { String string(L"ABCDEFGHI"); ASSERT_TRUE(string.IndexOf(L'C', 2, 3) == 2); } TEST(StringTests, IndexOf10Test) { String string(L"ABCDEFGHI"); ASSERT_TRUE(string.IndexOf(L'C', 0, 2) == -1); } TEST(StringTests, IndexOf5Test) { String string(L"ABCDEFGHI"); ASSERT_TRUE(string.IndexOf(L'1') == -1); } TEST(StringTests, IndexOfStringTest) { String string(L"ABCDEFGHI"); String string2(L"BCD"); ASSERT_TRUE(string.IndexOf(&string2) == 1); } TEST(StringTests, IndexOfString2Test) { String string(L"ABCDEFGHI"); String string2(L"I"); ASSERT_TRUE(string.IndexOf(&string2, 4) == 8); } TEST(StringTests, IndexOfString3Test) { String string(L"ABCDEFGHI"); String string2(L"EFG"); ASSERT_TRUE(string.IndexOf(&string2, 2, 6) == 4); } TEST(StringTests, IndexOfString4Test) { String string(L"ABCDEFGHI"); String string2(L"123"); ASSERT_TRUE(string.IndexOf(&string2) == -1); } TEST(StringTests, IndexOfString5Test) { String string(L"ABCDEFGHI"); String string2(L"ABC"); ASSERT_TRUE(string.IndexOf(&string2, 2) == -1); } TEST(StringTests, IndexOfAnyTest) { String string(L"12 34 56"); Array array(CharType, 2); Char data[] = { '3','4'}; array.Initialize(data); ASSERT_TRUE(string.IndexOfAny(&array) == 3); } TEST(StringTests, IndexOfAny2Test) { String string(L"12 34 56"); Array array(CharType, 2); Char data[] = { '3','4' }; array.Initialize(data); ASSERT_TRUE(string.IndexOfAny(&array, 3) == 3); } TEST(StringTests, IndexOfAny3Test) { String string(L"12 34 56"); Array array(CharType, 2); Char data[] = { 'X','3' }; array.Initialize(data); ASSERT_TRUE(string.IndexOfAny(&array, 3, 2) == 3); } TEST(StringTests, IndexOfAny4Test) { String string(L"12 34 56"); Array array(CharType, 2); Char data[] = { 'X','Y' }; array.Initialize(data); ASSERT_TRUE(string.IndexOfAny(&array) == -1); } TEST(StringTests, InsertTest) { String string(L"ABCDEFGHI"); String string2(L"123"); String* newStr = string.Insert(3, &string2); ASSERT_TRUE(wcscmp(newStr->get_Buffer(), L"ABC123DEFGHI") == 0); } TEST(StringTests, Insert2Test) { String string(L"ABCDEFGHI"); String string2(L"123"); String* newStr = string.Insert(string.get_Length(), &string2); ASSERT_TRUE(wcscmp(newStr->get_Buffer(), L"ABCDEFGHI123") == 0); } TEST(StringTests, IsNullOrEmptyTest) { ASSERT_TRUE(String::IsNullOrEmpty(String::Empty)); ASSERT_TRUE(String::IsNullOrEmpty(nullptr)); String string2(L"123"); ASSERT_TRUE(!String::IsNullOrEmpty(&string2)); } TEST(StringTests, IsNullOrWhiteSpaceTest) { ASSERT_TRUE(String::IsNullOrWhiteSpace(String::Empty)); ASSERT_TRUE(String::IsNullOrWhiteSpace(nullptr)); String string2(L" 2 "); ASSERT_TRUE(!String::IsNullOrWhiteSpace(&string2)); String string3(L" \t "); ASSERT_TRUE(String::IsNullOrWhiteSpace(&string3)); } TEST(StringTests, JoinTest) { Array array(StringType, 4); String string(L"ABC"); String string2(L"DEF"); String string3(L"GHI"); String string4(L"JKL"); Object* list[4] = { &string, &string2, &string3, &string4 }; array.Initialize(list); String separator(L","); String* s2 = String::Join(&separator, &array); ASSERT_TRUE(wcscmp(s2->get_Buffer(), L"ABC,DEF,GHI,JKL") == 0); } TEST(StringTests, Join2Test) { Array array(StringType, 4); String string(L"ABC"); String string2(L"DEF"); String string3(L"GHI"); String string4(L"JKL"); Object* list[4] = { &string, &string2, &string3, &string4 }; array.Initialize(list); String* s2 = String::Join(String::Empty, &array); ASSERT_TRUE(wcscmp(s2->get_Buffer(), L"ABCDEFGHIJKL") == 0); } TEST(StringTests, Join3Test) { Array array(StringType, 4); String string(L"ABC"); String string2(L"DEF"); String string3(L"GHI"); String string4(L"JKL"); Object* list[4] = { &string, &string2, &string3, &string4 }; array.Initialize(list); String separator(L","); String* s2 = String::Join(&separator, &array, 1); ASSERT_TRUE(wcscmp(s2->get_Buffer(), L"DEF,GHI,JKL") == 0); } TEST(StringTests, Join4Test) { Array array(StringType, 4); String string(L"ABC"); String string2(L"DEF"); String string3(L"GHI"); String string4(L"JKL"); Object* list[4] = { &string, &string2, &string3, &string4 }; array.Initialize(list); String separator(L","); String* s2 = String::Join(&separator, &array, 1, 2); ASSERT_TRUE(wcscmp(s2->get_Buffer(), L"DEF,GHI") == 0); } TEST(StringTests, LastIndexOfTest) { String string(L"11223311"); String subString(L"11"); ASSERT_TRUE(string.LastIndexOf(&subString) == 6); ASSERT_TRUE(string.LastIndexOf(&subString, 4) == 0); ASSERT_TRUE(string.LastIndexOf(&subString, 4, 5) == 0); String subString2(L"1"); ASSERT_TRUE(string.LastIndexOf(&subString2) == 7); } TEST(StringTests, LastIndexOfCharTest) { String string(L"11223311"); ASSERT_TRUE(string.LastIndexOf(L'1') == 7); ASSERT_TRUE(string.LastIndexOf(L'1', 4) == 1); ASSERT_TRUE(string.LastIndexOf(L'1', 4, 4) == 1); } TEST(StringTests, LastIndexOfAnyTest) { String string(L"11223311"); Array array(CharType, 2); Char data[] = { '1','2' }; array.Initialize(data); ASSERT_TRUE(string.LastIndexOfAny(&array) == 7); ASSERT_TRUE(string.LastIndexOfAny(&array, 4) == 3); ASSERT_TRUE(string.LastIndexOfAny(&array, 4, 4) == 3); } TEST(StringTests, PadLeftTest) { String string(L"11223311"); String* rtn = string.PadLeft(13); ASSERT_TRUE(wcscmp(rtn->get_Buffer(), L" 11223311") == 0); String* rtn2 = string.PadLeft(13, L'-'); ASSERT_TRUE(wcscmp(rtn2->get_Buffer(), L"-----11223311") == 0); } TEST(StringTests, PadRightTest) { String string(L"11223311"); String* rtn = string.PadRight(13); ASSERT_TRUE(wcscmp(rtn->get_Buffer(), L"11223311 ") == 0); String* rtn2 = string.PadRight(13, L'-'); ASSERT_TRUE(wcscmp(rtn2->get_Buffer(), L"11223311-----") == 0); } TEST(StringTests, RemoveTest) { String string(L"11223311"); String* rtn = string.Remove(2,2); ASSERT_TRUE(wcscmp(rtn->get_Buffer(), L"113311") == 0); String* rtn2 = string.Remove(6, 2); ASSERT_TRUE(wcscmp(rtn2->get_Buffer(), L"112233") == 0); String* rtn3 = string.Remove(0, 2); ASSERT_TRUE(wcscmp(rtn3->get_Buffer(), L"223311") == 0); } TEST(StringTests, ReplaceCharTest) { String string(L"11223311"); String* rtn = string.Replace(L'1', L'A'); ASSERT_TRUE(wcscmp(rtn->get_Buffer(), L"AA2233AA") == 0); } TEST(StringTests, ReplaceStringTest) { String string(L"11223311"); String search(L"11"); String replacement(L"ZZ"); String* rtn = string.Replace(&search, &replacement); ASSERT_TRUE(wcscmp(rtn->get_Buffer(), L"ZZ2233ZZ") == 0); } TEST(StringTests, StartWithTest) { String string(L"11223311"); String search(L"11"); ASSERT_TRUE(string.StartsWith(&search)); String search2(L"22"); ASSERT_TRUE(!string.StartsWith(&search2)); } TEST(StringTests, SubStringTest) { String string(L"11223311"); String* str1 = string.Substring(2); ASSERT_TRUE(wcscmp(str1->get_Buffer(), L"223311") == 0); String* str2 = string.Substring(6,2); ASSERT_TRUE(wcscmp(str2->get_Buffer(), L"11") == 0); } TEST(StringTests, ToCharArrayTest) { String string(L"11223311"); Array* array = string.ToCharArray(); ASSERT_TRUE(array != nullptr); ASSERT_TRUE(array->get_Length() == string.get_Length()); ASSERT_TRUE(*(Char*)array->Address(1) == string.get_Chars(1)); ASSERT_TRUE(*(Char*)array->Address(7) == string.get_Chars(7)); } TEST(StringTests, ToCharArray2Test) { String string(L"11223311"); Array* array = string.ToCharArray(4, 2); ASSERT_TRUE(array != nullptr); ASSERT_TRUE(array->get_Length() == 2); ASSERT_TRUE(*(Char*)array->Address(0) == L'3'); ASSERT_TRUE(*(Char*)array->Address(1) == L'3'); } TEST(StringTests, ToLowerTest) { String string(L"ABCDEFGHI"); String* string2 = string.ToLower(); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L"abcdefghi") == 0); } TEST(StringTests, ToUpperTest) { String string(L"abcdefghi"); String* string2 = string.ToUpper(); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L"ABCDEFGHI") == 0); } TEST(StringTests, TrimTest) { String string(L" \tABCDEFGHI\n\r"); String* string2 = string.Trim(); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L"ABCDEFGHI") == 0); } TEST(StringTests, Trim2Test) { String string(L" \tABCDEFGHI\n\r"); Array array(CharType, 2); Char data[] = { ' ','\t' }; array.Initialize(data); String* string2 = string.Trim(&array); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L"ABCDEFGHI\n\r") == 0); } TEST(StringTests, Trim3Test) { String string(L" \tABCDEFGHI\n\r"); Array array(CharType, 2); Char data[] = { ' ','\t' }; array.Initialize(data); String* string2 = string.Trim(nullptr); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L"ABCDEFGHI") == 0); } TEST(StringTests, TrimEndTest) { String string(L" \tABCDEFGHI\n\r"); Array array(CharType, 2); Char data[] = { ' ','\t' }; array.Initialize(data); String* string2 = string.TrimEnd(nullptr); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L" \tABCDEFGHI") == 0); } TEST(StringTests, TrimEnd2Test) { String string(L" \tABCDEFGHI\n\r"); Array array(CharType, 2); Char data[] = { ' ','\t' }; array.Initialize(data); String* string2 = string.TrimEnd(&array); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L" \tABCDEFGHI\n\r") == 0); } TEST(StringTests, TrimEnd3Test) { String string(L" \tABCDEFGHI\n\r\t"); Array array(CharType, 2); Char data[] = { ' ','\t' }; array.Initialize(data); String* string2 = string.TrimEnd(&array); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L" \tABCDEFGHI\n\r") == 0); } TEST(StringTests, TrimStartTest) { String string(L" \tABCDEFGHI\n\r"); Array array(CharType, 2); Char data[] = { ' ','\t' }; array.Initialize(data); String* string2 = string.TrimStart(nullptr); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L"ABCDEFGHI\n\r") == 0); } TEST(StringTests, TrimStart2Test) { String string(L" \tABCDEFGHI\n\r"); Array array(CharType, 2); Char data[] = { '\n','\r' }; array.Initialize(data); String* string2 = string.TrimStart(&array); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L" \tABCDEFGHI\n\r") == 0); } TEST(StringTests, TrimStart3Test) { String string(L"\r \tABCDEFGHI\n\r"); Array array(CharType, 2); Char data[] = { '\n','\r' }; array.Initialize(data); String* string2 = string.TrimStart(&array); ASSERT_TRUE(wcscmp(string2->get_Buffer(), L" \tABCDEFGHI\n\r") == 0); }
32.763766
94
0.702862
lambertlb
5f8c4c298e5aaebad3601c5603119c24986e3bb0
1,364
cpp
C++
src/config/LaserConfig.cpp
isaiah-v/rgb-laser-controller
641da5ceab3500432d5cba2cc6789fa635803494
[ "Apache-2.0" ]
null
null
null
src/config/LaserConfig.cpp
isaiah-v/rgb-laser-controller
641da5ceab3500432d5cba2cc6789fa635803494
[ "Apache-2.0" ]
null
null
null
src/config/LaserConfig.cpp
isaiah-v/rgb-laser-controller
641da5ceab3500432d5cba2cc6789fa635803494
[ "Apache-2.0" ]
null
null
null
#include <Arduino.h> #include <config/LaserConfig.h> Pwm pwm = Pwm(PWM_DEFAULT_PERIOD); PwmController pwmController = PwmController( &pwm, PWM_PIN_RED, PWM_PIN_GREEN, PWM_PIN_BLUE); PwmTimerPotentiometerCallback timerPotentiometerCallback = PwmTimerPotentiometerCallback(PWM_PERIOD_MIN, PWM_PERIOD_MAX, &pwm); PwmChannelPotentiometerCallback redPotentiometerCallback = PwmChannelPotentiometerCallback(&pwm, PwmChannel::RED); PwmChannelPotentiometerCallback greenPotentiometerCallback = PwmChannelPotentiometerCallback(&pwm, PwmChannel::GREEN); PwmChannelPotentiometerCallback bluePotentiometerCallback = PwmChannelPotentiometerCallback(&pwm, PwmChannel::BLUE); Potentiometer timmerPotentiometer = Potentiometer( POTENTIOMETER_SIGNAL_OFF, POTENTIOMETER_SIGNAL_ON, POTENTIOMETER_PIN_PERIOD, &timerPotentiometerCallback); Potentiometer redPotentiometer = Potentiometer( POTENTIOMETER_SIGNAL_OFF, POTENTIOMETER_SIGNAL_ON, POTENTIOMETER_PIN_RED, &redPotentiometerCallback); Potentiometer greenPotentiometer = Potentiometer( POTENTIOMETER_SIGNAL_OFF, POTENTIOMETER_SIGNAL_ON, POTENTIOMETER_PIN_GREEN, &greenPotentiometerCallback); Potentiometer bluePotentiometer = Potentiometer( POTENTIOMETER_SIGNAL_OFF, POTENTIOMETER_SIGNAL_ON, POTENTIOMETER_PIN_BLUE, &bluePotentiometerCallback);
34.974359
127
0.82478
isaiah-v
5f9546f9a266b3fce0de657ba183711f056e1543
1,336
cpp
C++
Contributor Corner/Mercy/print bracket number/bracket.cpp
hitu1304/interview-corner
97503d1967c646f731275ae3665f142814c6a9d7
[ "MIT" ]
39
2020-11-01T13:58:48.000Z
2021-02-12T08:39:37.000Z
Contributor Corner/Mercy/print bracket number/bracket.cpp
hitu1304/interview-corner
97503d1967c646f731275ae3665f142814c6a9d7
[ "MIT" ]
86
2020-09-25T07:20:40.000Z
2021-02-18T20:36:29.000Z
Contributor Corner/Mercy/print bracket number/bracket.cpp
hitu1304/interview-corner
97503d1967c646f731275ae3665f142814c6a9d7
[ "MIT" ]
43
2020-12-18T03:32:42.000Z
2021-02-19T18:08:19.000Z
#include <bits/stdc++.h> using namespace std; // function to print the bracket number void printBracketNumber(string exp, int n) { // used to print the bracket number // for the left bracket int left_bnum = 1; // used to obtain the bracket number // for the right bracket stack<int> right_bnum; // traverse the given expression 'exp' for (int i = 0; i < n; i++) { // if current character is a left bracket if (exp[i] == '(') { // print 'left_bnum', cout << left_bnum << " "; // push 'left_bum' on to the stack 'right_bnum' right_bnum.push(left_bnum); // increment 'left_bnum' by 1 left_bnum++; } // else if current character is a right bracket else if(exp[i] == ')') { // print the top element of stack 'right_bnum' // it will be the right bracket number cout << right_bnum.top() << " "; // pop the top element from the stack right_bnum.pop(); } } } int main() { string exp = "(a+(b*c))+(d/e)"; int n = exp.size(); printBracketNumber(exp, n); return 0; }
24.740741
60
0.480539
hitu1304
5f963f2c5fc660202b0908998a06753987c7df51
3,465
cpp
C++
src/metafs/mim/meta_io_req_q.cpp
mjlee34/poseidonos
8eff75c5ba7af8090d3ff4ac51d7507b37571f9b
[ "BSD-3-Clause" ]
null
null
null
src/metafs/mim/meta_io_req_q.cpp
mjlee34/poseidonos
8eff75c5ba7af8090d3ff4ac51d7507b37571f9b
[ "BSD-3-Clause" ]
null
null
null
src/metafs/mim/meta_io_req_q.cpp
mjlee34/poseidonos
8eff75c5ba7af8090d3ff4ac51d7507b37571f9b
[ "BSD-3-Clause" ]
null
null
null
/* * BSD LICENSE * Copyright (c) 2021 Samsung Electronics Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * Neither the name of Intel Corporation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "meta_io_req_q.h" #include "mfs_mutex.h" MetaIoQ::MetaIoQ(void) { } bool MetaIoQ::IsEmpty(void) { return q.empty(); } bool MetaIoQ::Enqueue(MetaFsIoReqMsg* msg) { SPIN_LOCK_GUARD_IN_SCOPE(qlock); q.push_back(msg); return true; } MetaFsIoReqMsg* MetaIoQ::Dequeue(void) { SPIN_LOCK_GUARD_IN_SCOPE(qlock); if (unlikely(true == IsEmpty())) { return nullptr; } MetaFsIoReqMsg* msg = q.front(); if (msg != nullptr) { q.pop_front(); } return msg; } MetaIoMultiQ::MetaIoMultiQ(void) { for (uint32_t index = 0; index < MetaFsConfig::DEFAULT_MAX_CORE_COUNT; index++) { msgQ[index] = nullptr; } } MetaIoMultiQ::~MetaIoMultiQ(void) { Clear(); } void MetaIoMultiQ::Init(void) { } void MetaIoMultiQ::Clear(void) { for (uint32_t index = 0; index < MetaFsConfig::DEFAULT_MAX_CORE_COUNT; index++) { if (nullptr != msgQ[index]) { delete msgQ[index]; msgQ[index] = nullptr; } } } bool MetaIoMultiQ::EnqueueReqMsg(uint32_t coreId, MetaFsIoReqMsg& reqMsg) { MetaIoQ* reqMsgQ = msgQ[coreId]; if (unlikely(nullptr == reqMsgQ)) { MetaIoQ* newReqMsgQ = new MetaIoQ(); msgQ[coreId] = newReqMsgQ; reqMsgQ = newReqMsgQ; } bool mioQueued = reqMsgQ->Enqueue(&reqMsg); return mioQueued; } bool MetaIoMultiQ::IsEmpty(int coreId) { MetaIoQ* reqMsgQ = msgQ[coreId]; if (nullptr == reqMsgQ) return true; return msgQ[coreId]->IsEmpty(); } MetaFsIoReqMsg* MetaIoMultiQ::DequeueReqMsg(uint32_t coreId) { MetaIoQ* reqMsgQ = msgQ[coreId]; if (nullptr == reqMsgQ) { return nullptr; } MetaFsIoReqMsg* reqMsg = reqMsgQ->Dequeue(); return reqMsg; }
23.896552
83
0.674459
mjlee34
5f98d36504125aa4f7d3690db1a51afc184288c4
6,406
cpp
C++
core/impl/file/file_obj_mesh.cpp
auyunli/enhance
ca99530c80b42842e713ed4b62e40d12e56ee24a
[ "BSD-2-Clause" ]
null
null
null
core/impl/file/file_obj_mesh.cpp
auyunli/enhance
ca99530c80b42842e713ed4b62e40d12e56ee24a
[ "BSD-2-Clause" ]
null
null
null
core/impl/file/file_obj_mesh.cpp
auyunli/enhance
ca99530c80b42842e713ed4b62e40d12e56ee24a
[ "BSD-2-Clause" ]
null
null
null
#include <fstream> #include <string> #include <sstream> #include <iostream> #include <vector> #include <cmath> #include <tuple> #include <regex> #include <cassert> #include "file_obj_mesh.hpp" #include "renderable_info.hpp" renderable_info_tris file_obj_mesh::calc_renderable_info_tris( file_obj_mesh::data_mesh & dm ){ renderable_info_tris ret {}; //add vertex and normals for rendering for( auto & t : dm._tris ){ for( int i = 0; i < 3; ++i ){ int vert_index = t._vert_indices[ i ]; auto & v = dm._verts[ vert_index ]; ret._pos.push_back( v._pos[0] ); ret._pos.push_back( v._pos[1] ); ret._pos.push_back( v._pos[2] ); ret._normal.push_back( v._normal[0] ); ret._normal.push_back( v._normal[1] ); ret._normal.push_back( v._normal[2] ); ret._uv.push_back( v._tex_coords[0] ); ret._uv.push_back( v._tex_coords[1] ); } } return std::move(ret); } std::pair<bool, file_obj_mesh::data_mesh> file_obj_mesh::process( std::string file_path ){ std::fstream input; input.open( file_path, std::fstream::in ); std::string current; std::stringstream ss; size_t count_normals = 0; size_t count_verts = 0; size_t count_tris = 0; size_t count_tc = 0; std::vector<std::string> vTextureName; int objectCount = 0; int triangleCount = 0; std::string result_obj_name; file_obj_mesh::data_mesh dm {}; std::vector<file_obj_mesh::norm> normals {}; std::vector<file_obj_mesh::texturecoord> textures {}; while (getline(input, current)) { // object name std::regex reg_obj_name("^o (\\w+)"); std::smatch match_obj_name; if (std::regex_search( current, match_obj_name, reg_obj_name ) && match_obj_name.size() > 1 ) { result_obj_name = match_obj_name.str(1); // std::cout << "Object Name: " << result_obj_name << std::endl; continue; } //vertices std::regex reg_vert_coord("^v ([+-]?\\d+(?:\\.\\d+)?) ([+-]?\\d+(?:\\.\\d+)?) ([+-]?\\d+(?:\\.\\d+)?)"); std::smatch match_vert_coord; std::string result_vert_coord; if (std::regex_search( current, match_vert_coord, reg_vert_coord ) && match_vert_coord.size() > 3 ) { file_obj_mesh::vert v; v._index = count_verts++; for( int i = 0; i < 3; ++i ) v._pos[i] = stod( match_vert_coord.str( i + 1 ) ); // std::cout << "Vertice Coord: " << v._pos[0] << ", " << v._pos[1] <<", " << v._pos[2] << std::endl; dm._verts.push_back(v); continue; } //normals std::regex reg_vert_norm("^vn ([+-]?\\d+(?:\\.\\d+)?) ([+-]?\\d+(?:\\.\\d+)?) ([+-]?\\d+(?:\\.\\d+)?)"); std::smatch match_vert_norm; std::string result_vert_norm; if (std::regex_search( current, match_vert_norm, reg_vert_norm ) && match_vert_norm.size() > 3 ) { file_obj_mesh::norm n {}; n._index = count_normals++; for( int i = 0; i < 3; ++i ) n._normal[i] = stod( match_vert_norm.str( i + 1 ) ); // std::cout << "Vertice Normal: " << n._normal[0] << ", " << n._normal[1] <<", " << n._normal[2] << std::endl; normals.push_back( n ); continue; } //texture coordinates std::regex reg_tc("^vt ([+-]?\\d+(?:\\.\\d+)?) ([+-]?\\d+(?:\\.\\d+)?)"); std::smatch match_tc; std::string result_tc; if (std::regex_search( current, match_tc, reg_tc ) && match_tc.size() > 2 ) { file_obj_mesh::texturecoord tc {}; tc._index = count_tc++; for( int i = 0; i < 2; ++i ) tc._tc[i] = stod( match_tc.str( i + 1 ) ); // std::cout << "Texture Coord: " << tc._tc[0] << ", " << tc._tc[1] << std::endl; textures.push_back( tc ); continue; } //triangle faces std::regex reg_face("^f (\\d+)//(\\d+) (\\d+)//(\\d+) (\\d+)//(\\d+)"); // v_coord, v_normal std::regex reg_face_2("^f (\\d+)/(?:\\d+)/(\\d+) (\\d+)/(?:\\d+)/(\\d+) (\\d+)/(?:\\d+)/(\\d+)"); // v_coord, v_texturecoord, v_normal std::smatch match_face; std::string result_face; if (std::regex_search( current, match_face, reg_face ) && match_face.size() > 6 ){ file_obj_mesh::tri t {}; t._index = count_tris++; for( int i = 0; i < 3; ++i ) t._vert_indices[ i ] = stoi( match_face.str( 1 + i * 2 ) ) - 1; dm._tris.push_back( t ); //get normals and copy into vert structure for( int i = 0; i < 3; ++i ){ int index_norm = stoi( match_face.str( 2 + i * 2 ) ) - 1; if( index_norm < 0 || index_norm >= normals.size() ){ assert( 0 && "triangle normal index out of range." ); return { false, {} }; } int index_vert = t._vert_indices[i]; if( index_vert < 0 || index_vert >= dm._verts.size() ){ assert( 0 && "triangle vert index out of range." ); return { false, {} }; } file_obj_mesh::vert & v = dm._verts[ index_vert ]; for( int j = 0; j < 3; ++j ){ v._normal[j] = normals[ index_norm ]._normal[j]; } } continue; } if (std::regex_search( current, match_face, reg_face_2 ) && match_face.size() > 9 ) { tri t {}; t._index = count_tris++; for( int i = 0; i < 3; ++i ) t._vert_indices[ i ] = stoi( match_face.str( 1 + i * 3 ) ) - 1; dm._tris.push_back( t ); for( int i = 0; i < 3; ++i ){ //get normals and copy into vert structure int index_norm = stoi( match_face.str( 3 + i * 3 ) ) - 1; if( index_norm < 0 || index_norm >= normals.size() ){ assert( 0 && "triangle normal index out of range." ); return { false, {} }; } int index_vert = t._vert_indices[i]; if( index_vert < 0 || index_vert >= dm._verts.size() ){ assert( 0 && "triangle vert index out of range." ); return { false, {} }; } vert & v = dm._verts[ index_vert ]; for( int j = 0; j < 3; ++j ){ v._normal[j] = normals[ index_norm ]._normal[j]; } //get texture coordinate indices and copy into vert structure int index_tc = stoi( match_face.str( 2 + i * 3 ) ); if( index_tc < 0 || index_tc >= textures.size() ){ assert( 0 && "triangle texture index out of range." ); return { false, {} }; } file_obj_mesh::texturecoord & tc = textures[ index_tc ]; for( int j = 0; j < 2; ++j ){ v._tex_coords[j] = tc._tc[j]; } } continue; } } input.close(); dm._numverts = dm._verts.size(); dm._numtris = dm._tris.size(); return { true, std::move(dm) }; }
35.787709
135
0.559319
auyunli
5f9910857c950cc9d8a1e909f4d25ada7ff99d84
1,311
cpp
C++
Sub-stringDivisibility.cpp
AlirezaKamyab/ProjectEuler
7237d2813ec2fe851c77960e41cd2e8e1520bf9f
[ "MIT" ]
null
null
null
Sub-stringDivisibility.cpp
AlirezaKamyab/ProjectEuler
7237d2813ec2fe851c77960e41cd2e8e1520bf9f
[ "MIT" ]
null
null
null
Sub-stringDivisibility.cpp
AlirezaKamyab/ProjectEuler
7237d2813ec2fe851c77960e41cd2e8e1520bf9f
[ "MIT" ]
1
2020-12-28T16:49:06.000Z
2020-12-28T16:49:06.000Z
// This file is written by Alireza Kamyab 3/30/2021 // Solution to problem projecteuler.net/problem=43 #include <iostream> #include <vector> #include <algorithm> #include <cinttypes> using namespace std; bool hasProperty(vector<int> arr); int primeAfter(int number); uint64_t convertVectorToNumber(vector<int> numbers); int main() { vector<int> numbers = { 1,0,2,3,4,5,6,7,8,9 }; uint64_t summation = 0; do { if (hasProperty(numbers)) summation += convertVectorToNumber(numbers); } while (next_permutation(numbers.begin(), numbers.end())); cout << summation << endl; return 0; } uint64_t convertVectorToNumber(vector<int> numbers) { uint64_t result = 0; for (int i = 0; i < numbers.size(); ++i) { result *= 10; result += numbers[i]; } return result; } bool hasProperty(vector<int> arr) { int prime = 2; for (int i = 1; i <= 7; i++) { int number = 0; number += arr[i]; number *= 10; number += arr[i + 1]; number *= 10; number += arr[i + 2]; if (number % prime != 0) return false; prime = primeAfter(prime); } return true; } int primeAfter(int number) { if (number == 2) return 3; if (number == 3) return 5; int remainder = number % 6; int counter = number / 6; if (remainder > 1) { return (counter + 1) * 6 + 1; } else { return (counter + 1) * 6 - 1; } }
20.809524
72
0.641495
AlirezaKamyab
5f9c022780dd09af3f0da56b54bbbd1bec455d9e
31
cpp
C++
soplex/src/soplex/git_hash.cpp
avrech/scipoptsuite-6.0.2-avrech
bb4ef31b6e84ff7e1e65cee982acf150739cda86
[ "MIT" ]
null
null
null
soplex/src/soplex/git_hash.cpp
avrech/scipoptsuite-6.0.2-avrech
bb4ef31b6e84ff7e1e65cee982acf150739cda86
[ "MIT" ]
null
null
null
soplex/src/soplex/git_hash.cpp
avrech/scipoptsuite-6.0.2-avrech
bb4ef31b6e84ff7e1e65cee982acf150739cda86
[ "MIT" ]
1
2022-01-19T01:15:11.000Z
2022-01-19T01:15:11.000Z
#define SPX_GITHASH "b8833cd3"
15.5
30
0.806452
avrech
5f9e63dab889a49fe82ceaa575f866b943cf2ae3
644
hpp
C++
higan/gb/cartridge/mbc3/mbc3.hpp
13824125580/higan
fbdd3f980b65412c362096579869ae76730e4118
[ "Intel", "ISC" ]
38
2018-04-05T05:00:05.000Z
2022-02-06T00:02:02.000Z
higan/gb/cartridge/mbc3/mbc3.hpp
13824125580/higan
fbdd3f980b65412c362096579869ae76730e4118
[ "Intel", "ISC" ]
1
2018-04-29T19:45:14.000Z
2018-04-29T19:45:14.000Z
higan/gb/cartridge/mbc3/mbc3.hpp
13824125580/higan
fbdd3f980b65412c362096579869ae76730e4118
[ "Intel", "ISC" ]
8
2018-04-16T22:37:46.000Z
2021-02-10T07:37:03.000Z
struct MBC3 : Mapper { auto second() -> void; auto read(uint16 address) -> uint8; auto write(uint16 address, uint8 data) -> void; auto power() -> void; auto serialize(serializer& s) -> void; struct IO { struct ROM { uint8 bank = 0x01; } rom; struct RAM { uint1 enable; uint8 bank; } ram; struct RTC { uint1 halt = true; uint1 latch; uint8 second; uint8 minute; uint8 hour; uint9 day; uint1 dayCarry; uint8 latchSecond; uint8 latchMinute; uint8 latchHour; uint9 latchDay; uint1 latchDayCarry; } rtc; } io; } mbc3;
18.941176
49
0.569876
13824125580
5fa14f0d066969b5eed836ed5f70579eebf75663
1,612
cpp
C++
src/BitmapReader.cpp
antenous/image
7743a31d87bae1b76efdd4023f21d0f861093057
[ "BSD-3-Clause" ]
null
null
null
src/BitmapReader.cpp
antenous/image
7743a31d87bae1b76efdd4023f21d0f861093057
[ "BSD-3-Clause" ]
null
null
null
src/BitmapReader.cpp
antenous/image
7743a31d87bae1b76efdd4023f21d0f861093057
[ "BSD-3-Clause" ]
null
null
null
/* * BitmapReader.cpp * * Created on: Dec 17, 2017 * Author: Antero Nousiainen */ #include "BitmapReader.hpp" using namespace image; namespace { template<typename T> void read(std::istream & stream, T & t, std::streamsize count = sizeof(T)) { stream.read(reinterpret_cast<char*>(&t), count); } inline void skipPadding(std::istream & from, uint8_t padding) { from.seekg(padding, from.cur); } void read(std::istream & from, Bitmap::Data & data, int32_t height, int32_t width, uint8_t padding) { data.resize(height*width); for (int32_t row(0), firstInRow(0); row < height; ++row, firstInRow += width, skipPadding(from, padding)) read(from, data[firstInRow], width*sizeof(Bitmap::Data::value_type)); } Bitmap readBitmap(std::istream & from) { Bitmap bmp; read(from, bmp.magic); if (!bmp) throw BitmapReader::InvalidType(); read(from, bmp.header.file); read(from, bmp.header.info); read(from, bmp.data, bmp.height(), bmp.width(), bmp.padding()); return bmp; } } BitmapReader::BadFile::BadFile() : std::invalid_argument("bad file") {} BitmapReader::InvalidType::InvalidType() : std::runtime_error("invalid type") {} Bitmap BitmapReader::read(std::istream & from) { if (!from) throw BitmapReader::BadFile(); from.exceptions(std::istream::failbit | std::istream::badbit); try { return readBitmap(from); } catch (const std::istream::failure &) { throw BadFile(); } }
22.082192
113
0.603598
antenous
5fa3d390d814fdc6c5f3be91a0f2cb7433526079
167,382
cpp
C++
src/magic/actmagic.cpp
PegasusEpsilon/Barony
6311f7e5da4835eaea65a95b5cc258409bb0dfa4
[ "FTL", "Zlib", "MIT" ]
373
2016-06-28T06:56:46.000Z
2022-03-23T02:32:54.000Z
src/magic/actmagic.cpp
PegasusEpsilon/Barony
6311f7e5da4835eaea65a95b5cc258409bb0dfa4
[ "FTL", "Zlib", "MIT" ]
361
2016-07-06T19:09:25.000Z
2022-03-26T14:14:19.000Z
src/magic/actmagic.cpp
PegasusEpsilon/Barony
6311f7e5da4835eaea65a95b5cc258409bb0dfa4
[ "FTL", "Zlib", "MIT" ]
129
2016-06-29T09:02:49.000Z
2022-01-23T09:56:06.000Z
/*------------------------------------------------------------------------------- BARONY File: actmagic.cpp Desc: behavior function for magic balls Copyright 2013-2016 (c) Turning Wheel LLC, all rights reserved. See LICENSE for details. -------------------------------------------------------------------------------*/ #include "../main.hpp" #include "../game.hpp" #include "../stat.hpp" #include "../entity.hpp" #include "../interface/interface.hpp" #include "../sound.hpp" #include "../items.hpp" #include "../monster.hpp" #include "../net.hpp" #include "../collision.hpp" #include "../paths.hpp" #include "../player.hpp" #include "magic.hpp" #include "../scores.hpp" void actMagiclightBall(Entity* my) { Entity* caster = NULL; if (!my) { return; } my->skill[2] = -10; // so the client sets the behavior of this entity if (clientnum != 0 && multiplayer == CLIENT) { my->removeLightField(); //Light up the area. my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 192); if ( flickerLights ) { //Magic light ball will never flicker if this setting is disabled. lightball_flicker++; } if (lightball_flicker > 5) { lightball_lighting = (lightball_lighting == 1) + 1; if (lightball_lighting == 1) { my->removeLightField(); my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 192); } else { my->removeLightField(); my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 174); } lightball_flicker = 0; } lightball_timer--; return; } my->yaw += .01; if ( my->yaw >= PI * 2 ) { my->yaw -= PI * 2; } /*if (!my->parent) { //This means that it doesn't have a caster. In other words, magic light staff. return; })*/ //list_t *path = NULL; pathnode_t* pathnode = NULL; //TODO: Follow player around (at a distance -- and delay before starting to follow). //TODO: Circle around player's head if they stand still for a little bit. Continue circling even if the player walks away -- until the player is far enough to trigger move (or if the player moved for a bit and then stopped, then update position). //TODO: Don't forget to cast flickering light all around it. //TODO: Move out of creatures' way if they collide. /*if (!my->children) { list_RemoveNode(my->mynode); //Delete the light spell. return; }*/ if (!my->children.first) { list_RemoveNode(my->mynode); //Delete the light spell.C return; } node_t* node = NULL; spell_t* spell = NULL; node = my->children.first; spell = (spell_t*)node->element; if (!spell) { list_RemoveNode(my->mynode); return; //We need the source spell! } caster = uidToEntity(spell->caster); if (caster) { Stat* stats = caster->getStats(); if (stats) { if (stats->HP <= 0) { my->removeLightField(); list_RemoveNode(my->mynode); //Delete the light spell. return; } } } else if (spell->caster >= 1) //So no caster...but uidToEntity returns NULL if entity is already dead, right? And if the uid is supposed to point to an entity, but it doesn't...it means the caster has died. { my->removeLightField(); list_RemoveNode(my->mynode); return; } // if the spell has been unsustained, remove it if ( !spell->magicstaff && !spell->sustain ) { int i = 0; int player = -1; for (i = 0; i < MAXPLAYERS; ++i) { if (players[i]->entity == caster) { player = i; } } if (player > 0 && multiplayer == SERVER) { strcpy( (char*)net_packet->data, "UNCH"); net_packet->data[4] = player; SDLNet_Write32(spell->ID, &net_packet->data[5]); net_packet->address.host = net_clients[player - 1].host; net_packet->address.port = net_clients[player - 1].port; net_packet->len = 9; sendPacketSafe(net_sock, -1, net_packet, player - 1); } my->removeLightField(); list_RemoveNode(my->mynode); return; } if (magic_init) { my->removeLightField(); if (lightball_timer <= 0) { if ( spell->sustain ) { //Attempt to sustain the magic light. if (caster) { //Deduct mana from caster. Cancel spell if not enough mana (simply leave sustained at false). bool deducted = caster->safeConsumeMP(1); //Consume 1 mana every duration / mana seconds if (deducted) { lightball_timer = spell->channel_duration / getCostOfSpell(spell); } else { int i = 0; int player = -1; for (i = 0; i < MAXPLAYERS; ++i) { if (players[i]->entity == caster) { player = i; } } if (player > 0 && multiplayer == SERVER) { strcpy( (char*)net_packet->data, "UNCH"); net_packet->data[4] = player; SDLNet_Write32(spell->ID, &net_packet->data[5]); net_packet->address.host = net_clients[player - 1].host; net_packet->address.port = net_clients[player - 1].port; net_packet->len = 9; sendPacketSafe(net_sock, -1, net_packet, player - 1); } my->removeLightField(); list_RemoveNode(my->mynode); return; } } } } //TODO: Make hovering always smooth. For example, when transitioning from ceiling to no ceiling, don't just have it jump to a new position. Figure out away to transition between the two. if (lightball_hoverangle > 360) { lightball_hoverangle = 0; } if (map.tiles[(int)((my->y / 16) * MAPLAYERS + (my->x / 16) * MAPLAYERS * map.height)]) { //Ceiling. my->z = lightball_hover_basez + ((lightball_hover_basez + LIGHTBALL_HOVER_HIGHPEAK + lightball_hover_basez + LIGHTBALL_HOVER_LOWPEAK) / 2) * sin(lightball_hoverangle * (12.568f / 360.0f)) * 0.1f; } else { //No ceiling. //TODO: Float higher? //my->z = lightball_hover_basez - 4 + ((lightball_hover_basez + LIGHTBALL_HOVER_HIGHPEAK - 4 + lightball_hover_basez + LIGHTBALL_HOVER_LOWPEAK - 4) / 2) * sin(lightball_hoverangle * (12.568f / 360.0f)) * 0.1f; my->z = lightball_hover_basez + ((lightball_hover_basez + LIGHTBALL_HOVER_HIGHPEAK + lightball_hover_basez + LIGHTBALL_HOVER_LOWPEAK) / 2) * sin(lightball_hoverangle * (12.568f / 360.0f)) * 0.1f; } lightball_hoverangle += 1; //Lightball moving. //messagePlayer(0, "*"); Entity* parent = uidToEntity(my->parent); if ( !parent ) { return; } double distance = sqrt(pow(my->x - parent->x, 2) + pow(my->y - parent->y, 2)); if ( distance > MAGICLIGHT_BALL_FOLLOW_DISTANCE || my->path) { lightball_player_lastmove_timer = 0; if (lightball_movement_timer > 0) { lightball_movement_timer--; } else { //messagePlayer(0, "****Moving."); double tangent = atan2(parent->y - my->y, parent->x - my->x); lineTraceTarget(my, my->x, my->y, tangent, 1024, IGNORE_ENTITIES, false, parent); if ( !hit.entity || hit.entity == parent ) //Line of sight to caster? { if (my->path != NULL) { list_FreeAll(my->path); my->path = NULL; } //double tangent = atan2(parent->y - my->y, parent->x - my->x); my->vel_x = cos(tangent) * ((distance - MAGICLIGHT_BALL_FOLLOW_DISTANCE) / MAGICLIGHTBALL_DIVIDE_CONSTANT); my->vel_y = sin(tangent) * ((distance - MAGICLIGHT_BALL_FOLLOW_DISTANCE) / MAGICLIGHTBALL_DIVIDE_CONSTANT); my->x += (my->vel_x < MAGIC_LIGHTBALL_SPEEDLIMIT) ? my->vel_x : MAGIC_LIGHTBALL_SPEEDLIMIT; my->y += (my->vel_y < MAGIC_LIGHTBALL_SPEEDLIMIT) ? my->vel_y : MAGIC_LIGHTBALL_SPEEDLIMIT; //} else if (!map.tiles[(int)(OBSTACLELAYER + (my->y / 16) * MAPLAYERS + (my->x / 16) * MAPLAYERS * map.height)]) { //If not in wall.. } else { //messagePlayer(0, "******Pathfinding."); //Caster is not in line of sight. Calculate a move path. /*if (my->children->first != NULL) { list_RemoveNode(my->children->first); my->children->first = NULL; }*/ if (!my->path) { //messagePlayer(0, "[Light ball] Generating path."); list_t* path = generatePath((int)floor(my->x / 16), (int)floor(my->y / 16), (int)floor(parent->x / 16), (int)floor(parent->y / 16), my, parent); if ( path != NULL ) { my->path = path; } else { //messagePlayer(0, "[Light ball] Failed to generate path (%s line %d).", __FILE__, __LINE__); } } if (my->path) { double total_distance = 0; //Calculate the total distance to the player to get the right move speed. double prevx = my->x; double prevy = my->y; if (my->path != NULL) { for (node = my->path->first; node != NULL; node = node->next) { if (node->element) { pathnode = (pathnode_t*)node->element; //total_distance += sqrt(pow(pathnode->y - prevy, 2) + pow(pathnode->x - prevx, 2) ); total_distance += sqrt(pow(prevx - pathnode->x, 2) + pow(prevy - pathnode->y, 2) ); prevx = pathnode->x; prevy = pathnode->y; } } } else if (my->path) //If the path has been traversed, reset it. { list_FreeAll(my->path); my->path = NULL; } total_distance -= MAGICLIGHT_BALL_FOLLOW_DISTANCE; if (my->path != NULL) { if (my->path->first != NULL) { pathnode = (pathnode_t*)my->path->first->element; //double distance = sqrt(pow(pathnode->y * 16 + 8 - my->y, 2) + pow(pathnode->x * 16 + 8 - my->x, 2) ); //double distance = sqrt(pow((my->y) - ((pathnode->y + 8) * 16), 2) + pow((my->x) - ((pathnode->x + 8) * 16), 2)); double distance = sqrt(pow(((pathnode->y * 16) + 8) - (my->y), 2) + pow(((pathnode->x * 16) + 8) - (my->x), 2)); if (distance <= 4) { list_RemoveNode(pathnode->node); //TODO: Make sure it doesn't get stuck here. Maybe remove the node only if it's the last one? if (!my->path->first) { list_FreeAll(my->path); my->path = NULL; } } else { double target_tangent = atan2((pathnode->y * 16) + 8 - my->y, (pathnode->x * 16) + 8 - my->x); if (target_tangent > my->yaw) //TODO: Do this yaw thing for all movement. { my->yaw = (target_tangent >= my->yaw + MAGIC_LIGHTBALL_TURNSPEED) ? my->yaw + MAGIC_LIGHTBALL_TURNSPEED : target_tangent; } else if (target_tangent < my->yaw) { my->yaw = (target_tangent <= my->yaw - MAGIC_LIGHTBALL_TURNSPEED) ? my->yaw - MAGIC_LIGHTBALL_TURNSPEED : target_tangent; } my->vel_x = cos(my->yaw) * (total_distance / MAGICLIGHTBALL_DIVIDE_CONSTANT); my->vel_y = sin(my->yaw) * (total_distance / MAGICLIGHTBALL_DIVIDE_CONSTANT); my->x += (my->vel_x < MAGIC_LIGHTBALL_SPEEDLIMIT) ? my->vel_x : MAGIC_LIGHTBALL_SPEEDLIMIT; my->y += (my->vel_y < MAGIC_LIGHTBALL_SPEEDLIMIT) ? my->vel_y : MAGIC_LIGHTBALL_SPEEDLIMIT; } } } //else assertion error, hehehe } else //Path failed to generate. Fallback on moving straight to the player. { //messagePlayer(0, "**************NO PATH WHEN EXPECTED PATH."); my->vel_x = cos(tangent) * ((distance) / MAGICLIGHTBALL_DIVIDE_CONSTANT); my->vel_y = sin(tangent) * ((distance) / MAGICLIGHTBALL_DIVIDE_CONSTANT); my->x += (my->vel_x < MAGIC_LIGHTBALL_SPEEDLIMIT) ? my->vel_x : MAGIC_LIGHTBALL_SPEEDLIMIT; my->y += (my->vel_y < MAGIC_LIGHTBALL_SPEEDLIMIT) ? my->vel_y : MAGIC_LIGHTBALL_SPEEDLIMIT; } } /*else { //In a wall. Get out of it. double tangent = atan2(parent->y - my->y, parent->x - my->x); my->vel_x = cos(tangent) * ((distance) / 100); my->vel_y = sin(tangent) * ((distance) / 100); my->x += my->vel_x; my->y += my->vel_y; }*/ } } else { lightball_movement_timer = LIGHTBALL_MOVE_DELAY; /*if (lightball_player_lastmove_timer < LIGHTBALL_CIRCLE_TIME) { lightball_player_lastmove_timer++; } else { //TODO: Orbit the player. Maybe. my->x = parent->x + (lightball_orbit_length * cos(lightball_orbit_angle)); my->y = parent->y + (lightball_orbit_length * sin(lightball_orbit_angle)); lightball_orbit_angle++; if (lightball_orbit_angle > 360) { lightball_orbit_angle = 0; } }*/ if (my->path != NULL) { list_FreeAll(my->path); my->path = NULL; } if (map.tiles[(int)(OBSTACLELAYER + (my->y / 16) * MAPLAYERS + (my->x / 16) * MAPLAYERS * map.height)]) //If the ball has come to rest in a wall, move its butt. { double tangent = atan2(parent->y - my->y, parent->x - my->x); my->vel_x = cos(tangent) * ((distance) / MAGICLIGHTBALL_DIVIDE_CONSTANT); my->vel_y = sin(tangent) * ((distance) / MAGICLIGHTBALL_DIVIDE_CONSTANT); my->x += my->vel_x; my->y += my->vel_y; } } //Light up the area. my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 192); if ( flickerLights ) { //Magic light ball will never flicker if this setting is disabled. lightball_flicker++; } if (lightball_flicker > 5) { lightball_lighting = (lightball_lighting == 1) + 1; if (lightball_lighting == 1) { my->removeLightField(); my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 192); } else { my->removeLightField(); my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 174); } lightball_flicker = 0; } lightball_timer--; } else { //Init the lightball. That is, shoot out from the player. //Move out from the player. my->vel_x = cos(my->yaw) * 4; my->vel_y = sin(my->yaw) * 4; double dist = clipMove(&my->x, &my->y, my->vel_x, my->vel_y, my); unsigned int distance = sqrt(pow(my->x - lightball_player_startx, 2) + pow(my->y - lightball_player_starty, 2)); if (distance > MAGICLIGHT_BALL_FOLLOW_DISTANCE * 2 || dist != sqrt(my->vel_x * my->vel_x + my->vel_y * my->vel_y)) { magic_init = 1; my->sprite = 174; //Go from black ball to white ball. lightball_lighting = 1; lightball_movement_timer = 0; //Start off at 0 so that it moves towards the player as soon as it's created (since it's created farther away from the player). } } } void actMagicMissile(Entity* my) //TODO: Verify this function. { if (!my || !my->children.first || !my->children.first->element) { return; } spell_t* spell = (spell_t*)my->children.first->element; if (!spell) { return; } //node_t *node = NULL; spellElement_t* element = NULL; node_t* node = NULL; int i = 0; int c = 0; Entity* entity = NULL; double tangent; Entity* parent = uidToEntity(my->parent); if (magic_init) { my->removeLightField(); if ( multiplayer != CLIENT ) { //Handle the missile's life. MAGIC_LIFE++; if (MAGIC_LIFE >= MAGIC_MAXLIFE) { my->removeLightField(); list_RemoveNode(my->mynode); return; } if ( spell->ID == SPELL_CHARM_MONSTER || spell->ID == SPELL_ACID_SPRAY ) { Entity* caster = uidToEntity(spell->caster); if ( !caster ) { my->removeLightField(); list_RemoveNode(my->mynode); return; } } node = spell->elements.first; //element = (spellElement_t *) spell->elements->first->element; element = (spellElement_t*)node->element; Sint32 entityHealth = 0; double dist = 0.f; bool hitFromAbove = false; if ( (parent && parent->behavior == &actMagicTrapCeiling) || my->actmagicIsVertical == MAGIC_ISVERTICAL_Z ) { // moving vertically. my->z += my->vel_z; hitFromAbove = my->magicFallingCollision(); if ( !hitFromAbove ) { // nothing hit yet, let's keep trying... } } else if ( my->actmagicIsOrbiting != 0 ) { int turnRate = 4; if ( parent && my->actmagicIsOrbiting == 1 ) { my->yaw += 0.1; my->x = parent->x + my->actmagicOrbitDist * cos(my->yaw); my->y = parent->y + my->actmagicOrbitDist * sin(my->yaw); } else if ( my->actmagicIsOrbiting == 2 ) { my->yaw += 0.2; turnRate = 4; my->x = my->actmagicOrbitStationaryX + my->actmagicOrbitStationaryCurrentDist * cos(my->yaw); my->y = my->actmagicOrbitStationaryY + my->actmagicOrbitStationaryCurrentDist * sin(my->yaw); my->actmagicOrbitStationaryCurrentDist = std::min(my->actmagicOrbitStationaryCurrentDist + 0.5, static_cast<real_t>(my->actmagicOrbitDist)); } hitFromAbove = my->magicOrbitingCollision(); my->z += my->vel_z * my->actmagicOrbitVerticalDirection; if ( my->actmagicIsOrbiting == 2 ) { // we don't change direction, upwards we go! // target speed is actmagicOrbitVerticalSpeed. my->vel_z = std::min(my->actmagicOrbitVerticalSpeed, my->vel_z / 0.95); my->roll += (PI / 8) / (turnRate / my->vel_z) * my->actmagicOrbitVerticalDirection; my->roll = std::max(my->roll, -PI / 4); } else if ( my->z > my->actmagicOrbitStartZ ) { if ( my->actmagicOrbitVerticalDirection == 1 ) { my->vel_z = std::max(0.01, my->vel_z * 0.95); my->roll -= (PI / 8) / (turnRate / my->vel_z) * my->actmagicOrbitVerticalDirection; } else { my->vel_z = std::min(my->actmagicOrbitVerticalSpeed, my->vel_z / 0.95); my->roll += (PI / 8) / (turnRate / my->vel_z) * my->actmagicOrbitVerticalDirection; } } else { if ( my->actmagicOrbitVerticalDirection == 1 ) { my->vel_z = std::min(my->actmagicOrbitVerticalSpeed, my->vel_z / 0.95); my->roll += (PI / 8) / (turnRate / my->vel_z) * my->actmagicOrbitVerticalDirection; } else { my->vel_z = std::max(0.01, my->vel_z * 0.95); my->roll -= (PI / 8) / (turnRate / my->vel_z) * my->actmagicOrbitVerticalDirection; } } if ( my->actmagicIsOrbiting == 1 ) { if ( (my->z > my->actmagicOrbitStartZ + 4) && my->actmagicOrbitVerticalDirection == 1 ) { my->actmagicOrbitVerticalDirection = -1; } else if ( (my->z < my->actmagicOrbitStartZ - 4) && my->actmagicOrbitVerticalDirection != 1 ) { my->actmagicOrbitVerticalDirection = 1; } } } else { if ( my->actmagicIsVertical == MAGIC_ISVERTICAL_XYZ ) { // moving vertically and horizontally, check if we hit the floor my->z += my->vel_z; hitFromAbove = my->magicFallingCollision(); dist = clipMove(&my->x, &my->y, my->vel_x, my->vel_y, my); if ( !hitFromAbove && my->z > -5 ) { // if we didn't hit the floor, process normal horizontal movement collision if we aren't too high if ( dist != sqrt(my->vel_x * my->vel_x + my->vel_y * my->vel_y) ) { hitFromAbove = true; } } if ( my->actmagicProjectileArc > 0 ) { real_t z = -1 - my->z; if ( z > 0 ) { my->pitch = -atan(z * 0.1 / sqrt(my->vel_x * my->vel_x + my->vel_y * my->vel_y)); } else { my->pitch = -atan(z * 0.15 / sqrt(my->vel_x * my->vel_x + my->vel_y * my->vel_y)); } if ( my->actmagicProjectileArc == 1 ) { //messagePlayer(0, "z: %f vel: %f", my->z, my->vel_z); my->vel_z = my->vel_z * 0.9; if ( my->vel_z > -0.1 ) { //messagePlayer(0, "arc down"); my->actmagicProjectileArc = 2; my->vel_z = 0.01; } } else if ( my->actmagicProjectileArc == 2 ) { //messagePlayer(0, "z: %f vel: %f", my->z, my->vel_z); my->vel_z = std::min(0.8, my->vel_z * 1.2); } } } else { dist = clipMove(&my->x, &my->y, my->vel_x, my->vel_y, my); //normal flat projectiles } } if ( hitFromAbove || (my->actmagicIsVertical != MAGIC_ISVERTICAL_XYZ && dist != sqrt(my->vel_x * my->vel_x + my->vel_y * my->vel_y)) ) { node = element->elements.first; //element = (spellElement_t *) element->elements->first->element; element = (spellElement_t*)node->element; //if (hit.entity != NULL) { Stat* hitstats = nullptr; int player = -1; if ( hit.entity ) { hitstats = hit.entity->getStats(); if ( hit.entity->behavior == &actPlayer ) { bool skipMessage = false; if ( !(svFlags & SV_FLAG_FRIENDLYFIRE) && my->actmagicTinkerTrapFriendlyFire == 0 ) { if ( parent && (parent->behavior == &actMonster || parent->behavior == &actPlayer) && parent->checkFriend(hit.entity) ) { skipMessage = true; } } player = hit.entity->skill[2]; if ( my->actmagicCastByTinkerTrap == 1 ) { skipMessage = true; } if ( !skipMessage ) { Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 0); messagePlayerColor(player, color, language[376]); } if ( hitstats ) { entityHealth = hitstats->HP; } } if ( parent && hitstats ) { if ( parent->behavior == &actPlayer ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); if ( strcmp(element->name, spellElement_charmMonster.name) ) { if ( my->actmagicCastByTinkerTrap == 1 ) { //messagePlayerMonsterEvent(parent->skill[2], color, *hitstats, language[3498], language[3499], MSG_COMBAT); } else { messagePlayerMonsterEvent(parent->skill[2], color, *hitstats, language[378], language[377], MSG_COMBAT); } } } } } // Handling reflecting the missile int reflection = 0; if ( hitstats ) { if ( !strcmp(map.name, "Hell Boss") && hit.entity->behavior == &actPlayer ) { /* no longer in use */ /*bool founddevil = false; node_t* tempNode; for ( tempNode = map.creatures->first; tempNode != nullptr; tempNode = tempNode->next ) { Entity* tempEntity = (Entity*)tempNode->element; if ( tempEntity->behavior == &actMonster ) { Stat* stats = tempEntity->getStats(); if ( stats ) { if ( stats->type == DEVIL ) { founddevil = true; break; } } } } if ( !founddevil ) { reflection = 3; }*/ } else if ( parent && ( (hit.entity->getRace() == LICH_ICE && parent->getRace() == LICH_FIRE) || ( (hit.entity->getRace() == LICH_FIRE || hitstats->leader_uid == parent->getUID()) && parent->getRace() == LICH_ICE) || (parent->getRace() == LICH_ICE) && !strncmp(hitstats->name, "corrupted automaton", 19) ) ) { reflection = 3; } if ( !reflection ) { reflection = hit.entity->getReflection(); } if ( my->actmagicCastByTinkerTrap == 1 ) { reflection = 0; } if ( reflection == 3 && hitstats->shield && hitstats->shield->type == MIRROR_SHIELD && hitstats->defending ) { if ( my->actmagicIsVertical == MAGIC_ISVERTICAL_Z ) { reflection = 0; } // calculate facing angle to projectile, need to be facing projectile to reflect. else if ( player >= 0 && players[player] && players[player]->entity ) { real_t yawDiff = my->yawDifferenceFromPlayer(player); if ( yawDiff < (6 * PI / 5) ) { reflection = 0; } else { reflection = 3; if ( parent && (parent->behavior == &actMonster || parent->behavior == &actPlayer) ) { my->actmagicMirrorReflected = 1; my->actmagicMirrorReflectedCaster = parent->getUID(); } } } } } if ( reflection ) { spell_t* spellIsReflectingMagic = hit.entity->getActiveMagicEffect(SPELL_REFLECT_MAGIC); playSoundEntity(hit.entity, 166, 128); if ( hit.entity ) { if ( hit.entity->behavior == &actPlayer ) { if ( !strcmp(element->name, spellElement_charmMonster.name) ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); messagePlayerMonsterEvent(parent->skill[2], color, *hitstats, language[378], language[377], MSG_COMBAT); } if ( !spellIsReflectingMagic ) { messagePlayer(player, language[379]); } else { messagePlayer(player, language[2475]); } } } if ( parent ) { if ( parent->behavior == &actPlayer ) { messagePlayer(parent->skill[2], language[379]); } } if ( hit.side == HORIZONTAL ) { my->vel_x *= -1; my->yaw = atan2(my->vel_y, my->vel_x); } else if ( hit.side == VERTICAL ) { my->vel_y *= -1; my->yaw = atan2(my->vel_y, my->vel_x); } else if ( hit.side == 0 ) { my->vel_x *= -1; my->vel_y *= -1; my->yaw = atan2(my->vel_y, my->vel_x); } if ( hit.entity ) { if ( (parent && parent->behavior == &actMagicTrapCeiling) || my->actmagicIsVertical == MAGIC_ISVERTICAL_Z ) { // this missile came from the ceiling, let's redirect it.. my->x = hit.entity->x + cos(hit.entity->yaw); my->y = hit.entity->y + sin(hit.entity->yaw); my->yaw = hit.entity->yaw; my->z = -1; my->vel_x = 4 * cos(hit.entity->yaw); my->vel_y = 4 * sin(hit.entity->yaw); my->vel_z = 0; my->pitch = 0; } my->parent = hit.entity->getUID(); } // Only degrade the equipment if Friendly Fire is ON or if it is (OFF && target is an enemy) bool bShouldEquipmentDegrade = false; if ( (svFlags & SV_FLAG_FRIENDLYFIRE) ) { // Friendly Fire is ON, equipment should always degrade, as hit will register bShouldEquipmentDegrade = true; } else { // Friendly Fire is OFF, is the target an enemy? if ( parent != nullptr && (parent->checkFriend(hit.entity)) == false ) { // Target is an enemy, equipment should degrade bShouldEquipmentDegrade = true; } } if ( bShouldEquipmentDegrade ) { // Reflection of 3 does not degrade equipment if ( rand() % 2 == 0 && hitstats && reflection < 3 ) { // set armornum to the relevant equipment slot to send to clients int armornum = 5 + reflection; if ( (player >= 0 && players[player]->isLocalPlayer()) || player < 0 ) { if ( reflection == 1 ) { if ( hitstats->cloak->count > 1 ) { newItem(hitstats->cloak->type, hitstats->cloak->status, hitstats->cloak->beatitude, hitstats->cloak->count - 1, hitstats->cloak->appearance, hitstats->cloak->identified, &hitstats->inventory); } } else if ( reflection == 2 ) { if ( hitstats->amulet->count > 1 ) { newItem(hitstats->amulet->type, hitstats->amulet->status, hitstats->amulet->beatitude, hitstats->amulet->count - 1, hitstats->amulet->appearance, hitstats->amulet->identified, &hitstats->inventory); } } else if ( reflection == -1 ) { if ( hitstats->shield->count > 1 ) { newItem(hitstats->shield->type, hitstats->shield->status, hitstats->shield->beatitude, hitstats->shield->count - 1, hitstats->shield->appearance, hitstats->shield->identified, &hitstats->inventory); } } } if ( reflection == 1 ) { hitstats->cloak->count = 1; hitstats->cloak->status = static_cast<Status>(std::max(static_cast<int>(BROKEN), hitstats->cloak->status - 1)); if ( hitstats->cloak->status != BROKEN ) { messagePlayer(player, language[380]); } else { messagePlayer(player, language[381]); playSoundEntity(hit.entity, 76, 64); } } else if ( reflection == 2 ) { hitstats->amulet->count = 1; hitstats->amulet->status = static_cast<Status>(std::max(static_cast<int>(BROKEN), hitstats->amulet->status - 1)); if ( hitstats->amulet->status != BROKEN ) { messagePlayer(player, language[382]); } else { messagePlayer(player, language[383]); playSoundEntity(hit.entity, 76, 64); } } else if ( reflection == -1 ) { hitstats->shield->count = 1; hitstats->shield->status = static_cast<Status>(std::max(static_cast<int>(BROKEN), hitstats->shield->status - 1)); if ( hitstats->shield->status != BROKEN ) { messagePlayer(player, language[384]); } else { messagePlayer(player, language[385]); playSoundEntity(hit.entity, 76, 64); } } if ( player > 0 && multiplayer == SERVER ) { strcpy((char*)net_packet->data, "ARMR"); net_packet->data[4] = armornum; if ( reflection == 1 ) { net_packet->data[5] = hitstats->cloak->status; } else if ( reflection == 2 ) { net_packet->data[5] = hitstats->amulet->status; } else { net_packet->data[5] = hitstats->shield->status; } net_packet->address.host = net_clients[player - 1].host; net_packet->address.port = net_clients[player - 1].port; net_packet->len = 6; sendPacketSafe(net_sock, -1, net_packet, player - 1); } } } if ( spellIsReflectingMagic ) { int spellCost = getCostOfSpell(spell); bool unsustain = false; if ( spellCost >= hit.entity->getMP() ) //Unsustain the spell if expended all mana. { unsustain = true; } hit.entity->drainMP(spellCost); spawnMagicEffectParticles(hit.entity->x, hit.entity->y, hit.entity->z / 2, 174); playSoundEntity(hit.entity, 166, 128); //TODO: Custom sound effect? if ( unsustain ) { spellIsReflectingMagic->sustain = false; if ( hitstats ) { hit.entity->setEffect(EFF_MAGICREFLECT, false, 0, true); messagePlayer(player, language[2476]); } } } return; } // Test for Friendly Fire, if Friendly Fire is OFF, delete the missile if ( !(svFlags & SV_FLAG_FRIENDLYFIRE) ) { if ( !strcmp(element->name, spellElement_telePull.name) || !strcmp(element->name, spellElement_shadowTag.name) || my->actmagicTinkerTrapFriendlyFire == 1 ) { // these spells can hit allies no penalty. } else if ( parent && parent->checkFriend(hit.entity) ) { my->removeLightField(); list_RemoveNode(my->mynode); return; } } // Alerting the hit Entity if ( hit.entity ) { // alert the hit entity if it was a monster if ( hit.entity->behavior == &actMonster && parent != nullptr ) { if ( parent->behavior == &actMagicTrap || parent->behavior == &actMagicTrapCeiling ) { if ( parent->behavior == &actMagicTrap ) { if ( static_cast<int>(parent->y / 16) == static_cast<int>(hit.entity->y / 16) ) { // avoid y axis. int direction = 1; if ( rand() % 2 == 0 ) { direction = -1; } if ( hit.entity->monsterSetPathToLocation(hit.entity->x / 16, (hit.entity->y / 16) + 1 * direction, 0) ) { hit.entity->monsterState = MONSTER_STATE_HUNT; serverUpdateEntitySkill(hit.entity, 0); } else if ( hit.entity->monsterSetPathToLocation(hit.entity->x / 16, (hit.entity->y / 16) - 1 * direction, 0) ) { hit.entity->monsterState = MONSTER_STATE_HUNT; serverUpdateEntitySkill(hit.entity, 0); } else { monsterMoveAside(hit.entity, hit.entity); } } else if ( static_cast<int>(parent->x / 16) == static_cast<int>(hit.entity->x / 16) ) { int direction = 1; if ( rand() % 2 == 0 ) { direction = -1; } // avoid x axis. if ( hit.entity->monsterSetPathToLocation((hit.entity->x / 16) + 1 * direction, hit.entity->y / 16, 0) ) { hit.entity->monsterState = MONSTER_STATE_HUNT; serverUpdateEntitySkill(hit.entity, 0); } else if ( hit.entity->monsterSetPathToLocation((hit.entity->x / 16) - 1 * direction, hit.entity->y / 16, 0) ) { hit.entity->monsterState = MONSTER_STATE_HUNT; serverUpdateEntitySkill(hit.entity, 0); } else { monsterMoveAside(hit.entity, hit.entity); } } else { monsterMoveAside(hit.entity, hit.entity); } } else { monsterMoveAside(hit.entity, hit.entity); } } else { bool alertTarget = true; bool alertAllies = true; if ( parent->behavior == &actMonster && parent->monsterAllyIndex != -1 ) { if ( hit.entity->behavior == &actMonster && hit.entity->monsterAllyIndex != -1 ) { // if a player ally + hit another ally, don't aggro back alertTarget = false; } } if ( !strcmp(element->name, spellElement_telePull.name) || !strcmp(element->name, spellElement_shadowTag.name) ) { alertTarget = false; alertAllies = false; } if ( my->actmagicCastByTinkerTrap == 1 ) { if ( entityDist(hit.entity, parent) > TOUCHRANGE ) { // don't alert if bomb thrower far away. alertTarget = false; alertAllies = false; } } if ( alertTarget && hit.entity->monsterState != MONSTER_STATE_ATTACK && (hitstats->type < LICH || hitstats->type >= SHOPKEEPER) ) { hit.entity->monsterAcquireAttackTarget(*parent, MONSTER_STATE_PATH, true); } if ( parent->behavior == &actPlayer || parent->monsterAllyIndex != -1 ) { if ( hit.entity->behavior == &actPlayer || (hit.entity->behavior == &actMonster && hit.entity->monsterAllyIndex != -1) ) { // if a player ally + hit another ally or player, don't alert other allies. alertAllies = false; } } // alert other monsters too Entity* ohitentity = hit.entity; for ( node = map.creatures->first; node != nullptr && alertAllies; node = node->next ) { entity = (Entity*)node->element; if ( entity->behavior == &actMonster && entity != ohitentity ) { Stat* buddystats = entity->getStats(); if ( buddystats != nullptr ) { if ( hit.entity && hit.entity->checkFriend(entity) ) //TODO: hit.entity->checkFriend() without first checking if it's NULL crashes because hit.entity turns to NULL somewhere along the line. It looks like ohitentity preserves that value though, so....uh...ya, I don't know. { if ( entity->monsterState == MONSTER_STATE_WAIT ) { tangent = atan2( entity->y - ohitentity->y, entity->x - ohitentity->x ); lineTrace(ohitentity, ohitentity->x, ohitentity->y, tangent, 1024, 0, false); if ( hit.entity == entity ) { entity->monsterAcquireAttackTarget(*parent, MONSTER_STATE_PATH); } } } } } } hit.entity = ohitentity; } } } // check for magic resistance... // resistance stacks diminishingly //TODO: EFFECTS[EFF_MAGICRESIST] int resistance = 0; if ( hit.entity ) { resistance = hit.entity->getMagicResistance(); } if ( resistance > 0 ) { if ( parent ) { if ( parent->behavior == &actPlayer ) { messagePlayer(parent->skill[2], language[386]); } } } real_t spellbookDamageBonus = (my->actmagicSpellbookBonus / 100.f); if ( my->actmagicCastByMagicstaff == 0 && my->actmagicCastByTinkerTrap == 0 ) { spellbookDamageBonus += getBonusFromCasterOfSpellElement(parent, element); } if (!strcmp(element->name, spellElement_force.name)) { if (hit.entity) { if (hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer) { Entity* parent = uidToEntity(my->parent); playSoundEntity(hit.entity, 28, 128); int damage = element->damage; damage += (spellbookDamageBonus * damage); //damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage; damage *= hit.entity->getDamageTableMultiplier(*hitstats, DAMAGE_TABLE_MAGIC); damage /= (1 + (int)resistance); hit.entity->modHP(-damage); for (i = 0; i < damage; i += 2) //Spawn a gib for every two points of damage. { Entity* gib = spawnGib(hit.entity); serverSpawnGibForClient(gib); } if (parent) { parent->killedByMonsterObituary(hit.entity); } // update enemy bar for attacker if ( !strcmp(hitstats->name, "") ) { if ( hitstats->type < KOBOLD ) //Original monster count { updateEnemyBar(parent, hit.entity, language[90 + hitstats->type], hitstats->HP, hitstats->MAXHP); } else if ( hitstats->type >= KOBOLD ) //New monsters { updateEnemyBar(parent, hit.entity, language[2000 + (hitstats->type - KOBOLD)], hitstats->HP, hitstats->MAXHP); } } else { updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP); } if ( hitstats->HP <= 0 && parent) { parent->awardXP( hit.entity, true, true ); } } else if (hit.entity->behavior == &actDoor) { int damage = element->damage; damage += (spellbookDamageBonus * damage); damage /= (1 + (int)resistance); hit.entity->doorHandleDamageMagic(damage, *my, parent); my->removeLightField(); list_RemoveNode(my->mynode); return; } else if ( hit.entity->behavior == &actChest ) { int damage = element->damage; damage += (spellbookDamageBonus * damage); damage /= (1 + (int)resistance); hit.entity->chestHandleDamageMagic(damage, *my, parent); my->removeLightField(); list_RemoveNode(my->mynode); return; } else if (hit.entity->behavior == &actFurniture ) { int damage = element->damage; damage += (spellbookDamageBonus * damage); damage /= (1 + (int)resistance); hit.entity->furnitureHealth -= damage; if ( hit.entity->furnitureHealth < 0 ) { if ( parent ) { if ( parent->behavior == &actPlayer ) { switch ( hit.entity->furnitureType ) { case FURNITURE_CHAIR: messagePlayer(parent->skill[2], language[388]); updateEnemyBar(parent, hit.entity, language[677], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_TABLE: messagePlayer(parent->skill[2], language[389]); updateEnemyBar(parent, hit.entity, language[676], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_BED: messagePlayer(parent->skill[2], language[2508], language[2505]); updateEnemyBar(parent, hit.entity, language[2505], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_BUNKBED: messagePlayer(parent->skill[2], language[2508], language[2506]); updateEnemyBar(parent, hit.entity, language[2506], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_PODIUM: messagePlayer(parent->skill[2], language[2508], language[2507]); updateEnemyBar(parent, hit.entity, language[2507], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; default: break; } } } } playSoundEntity(hit.entity, 28, 128); } } } else if (!strcmp(element->name, spellElement_magicmissile.name)) { spawnExplosion(my->x, my->y, my->z); if (hit.entity) { if (hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer) { Entity* parent = uidToEntity(my->parent); playSoundEntity(hit.entity, 28, 128); int damage = element->damage; damage += (spellbookDamageBonus * damage); //damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage; if ( my->actmagicIsOrbiting == 2 ) { spawnExplosion(my->x, my->y, my->z); if ( parent && my->actmagicOrbitCastFromSpell == 1 ) { // cast through amplify magic effect damage /= 2; } damage = damage - rand() % ((damage / 8) + 1); } damage *= hit.entity->getDamageTableMultiplier(*hitstats, DAMAGE_TABLE_MAGIC); damage /= (1 + (int)resistance); hit.entity->modHP(-damage); for (i = 0; i < damage; i += 2) //Spawn a gib for every two points of damage. { Entity* gib = spawnGib(hit.entity); serverSpawnGibForClient(gib); } // write the obituary if ( parent ) { parent->killedByMonsterObituary(hit.entity); } // update enemy bar for attacker if ( !strcmp(hitstats->name, "") ) { if ( hitstats->type < KOBOLD ) //Original monster count { updateEnemyBar(parent, hit.entity, language[90 + hitstats->type], hitstats->HP, hitstats->MAXHP); } else if ( hitstats->type >= KOBOLD ) //New monsters { updateEnemyBar(parent, hit.entity, language[2000 + (hitstats->type - KOBOLD)], hitstats->HP, hitstats->MAXHP); } } else { updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP); } if ( hitstats->HP <= 0 && parent) { parent->awardXP( hit.entity, true, true ); } } else if ( hit.entity->behavior == &actDoor ) { int damage = element->damage; damage += (spellbookDamageBonus * damage); //damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage; damage /= (1 + (int)resistance); hit.entity->doorHandleDamageMagic(damage, *my, parent); if ( my->actmagicProjectileArc > 0 ) { Entity* caster = uidToEntity(spell->caster); spawnMagicTower(caster, my->x, my->y, spell->ID, nullptr); } if ( !(my->actmagicIsOrbiting == 2) ) { my->removeLightField(); list_RemoveNode(my->mynode); } else { spawnExplosion(my->x, my->y, my->z); } return; } else if ( hit.entity->behavior == &actChest ) { int damage = element->damage; damage += (spellbookDamageBonus * damage); damage /= (1 + (int)resistance); hit.entity->chestHandleDamageMagic(damage, *my, parent); if ( my->actmagicProjectileArc > 0 ) { Entity* caster = uidToEntity(spell->caster); spawnMagicTower(caster, my->x, my->y, spell->ID, nullptr); } if ( !(my->actmagicIsOrbiting == 2) ) { my->removeLightField(); list_RemoveNode(my->mynode); } else { spawnExplosion(my->x, my->y, my->z); } return; } else if (hit.entity->behavior == &actFurniture ) { int damage = element->damage; damage += (spellbookDamageBonus * damage); damage /= (1 + (int)resistance); hit.entity->furnitureHealth -= damage; if ( hit.entity->furnitureHealth < 0 ) { if ( parent ) { if ( parent->behavior == &actPlayer ) { switch ( hit.entity->furnitureType ) { case FURNITURE_CHAIR: messagePlayer(parent->skill[2], language[388]); updateEnemyBar(parent, hit.entity, language[677], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_TABLE: messagePlayer(parent->skill[2], language[389]); updateEnemyBar(parent, hit.entity, language[676], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_BED: messagePlayer(parent->skill[2], language[2508], language[2505]); updateEnemyBar(parent, hit.entity, language[2505], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_BUNKBED: messagePlayer(parent->skill[2], language[2508], language[2506]); updateEnemyBar(parent, hit.entity, language[2506], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_PODIUM: messagePlayer(parent->skill[2], language[2508], language[2507]); updateEnemyBar(parent, hit.entity, language[2507], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; default: break; } } } } playSoundEntity(hit.entity, 28, 128); if ( my->actmagicProjectileArc > 0 ) { Entity* caster = uidToEntity(spell->caster); spawnMagicTower(caster, my->x, my->y, spell->ID, nullptr); } if ( !(my->actmagicIsOrbiting == 2) ) { my->removeLightField(); list_RemoveNode(my->mynode); } else { spawnExplosion(my->x, my->y, my->z); } return; } } } else if (!strcmp(element->name, spellElement_fire.name)) { if ( !(my->actmagicIsOrbiting == 2) ) { spawnExplosion(my->x, my->y, my->z); } if (hit.entity) { // Attempt to set the Entity on fire hit.entity->SetEntityOnFire(); if (hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer) { //playSoundEntity(my, 153, 64); playSoundEntity(hit.entity, 28, 128); //TODO: Apply fire resistances/weaknesses. int damage = element->damage; damage += (spellbookDamageBonus * damage); //damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage; if ( my->actmagicIsOrbiting == 2 ) { spawnExplosion(my->x, my->y, my->z); if ( parent && my->actmagicOrbitCastFromSpell == 0 ) { if ( parent->behavior == &actParticleDot ) { damage = parent->skill[1]; } else if ( parent->behavior == &actPlayer ) { Stat* playerStats = parent->getStats(); if ( playerStats ) { int skillLVL = playerStats->PROFICIENCIES[PRO_ALCHEMY] / 20; damage = (14 + skillLVL * 1.5); } } else { damage = 14; } } else if ( parent && my->actmagicOrbitCastFromSpell == 1 ) { // cast through amplify magic effect damage /= 2; } else { damage = 14; } damage = damage - rand() % ((damage / 8) + 1); } damage *= hit.entity->getDamageTableMultiplier(*hitstats, DAMAGE_TABLE_MAGIC); if ( parent ) { Stat* casterStats = parent->getStats(); if ( casterStats && casterStats->type == LICH_FIRE && parent->monsterLichAllyStatus == LICH_ALLY_DEAD ) { damage *= 2; } } int oldHP = hitstats->HP; damage /= (1 + (int)resistance); hit.entity->modHP(-damage); //for (i = 0; i < damage; i += 2) { //Spawn a gib for every two points of damage. Entity* gib = spawnGib(hit.entity); serverSpawnGibForClient(gib); //} // write the obituary if ( parent ) { if ( my->actmagicIsOrbiting == 2 && parent->behavior == &actParticleDot && parent->skill[1] > 0 ) { if ( hitstats && hitstats->obituary && !strcmp(hitstats->obituary, language[3898]) ) { // was caused by a flaming boulder. hit.entity->setObituary(language[3898]); } else { // blew the brew (alchemy) hit.entity->setObituary(language[3350]); } } else { parent->killedByMonsterObituary(hit.entity); } } if ( hitstats ) { hitstats->burningInflictedBy = static_cast<Sint32>(my->parent); } // update enemy bar for attacker if ( !strcmp(hitstats->name, "") ) { if ( hitstats->type < KOBOLD ) //Original monster count { updateEnemyBar(parent, hit.entity, language[90 + hitstats->type], hitstats->HP, hitstats->MAXHP); } else if ( hitstats->type >= KOBOLD ) //New monsters { updateEnemyBar(parent, hit.entity, language[2000 + (hitstats->type - KOBOLD)], hitstats->HP, hitstats->MAXHP); } } else { updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP); } if ( oldHP > 0 && hitstats->HP <= 0 ) { if ( parent ) { if ( my->actmagicIsOrbiting == 2 && my->actmagicOrbitCastFromSpell == 0 && parent->behavior == &actPlayer ) { if ( hitstats->type == LICH || hitstats->type == LICH_ICE || hitstats->type == LICH_FIRE ) { if ( client_classes[parent->skill[2]] == CLASS_BREWER ) { steamAchievementClient(parent->skill[2], "BARONY_ACH_SECRET_WEAPON"); } } steamStatisticUpdateClient(parent->skill[2], STEAM_STAT_BOMBARDIER, STEAM_STAT_INT, 1); } if ( my->actmagicCastByTinkerTrap == 1 && parent->behavior == &actPlayer && hitstats->type == MINOTAUR ) { steamAchievementClient(parent->skill[2], "BARONY_ACH_TIME_TO_PLAN"); } parent->awardXP( hit.entity, true, true ); } else { if ( achievementObserver.checkUidIsFromPlayer(my->parent) >= 0 ) { steamAchievementClient(achievementObserver.checkUidIsFromPlayer(my->parent), "BARONY_ACH_TAKING_WITH"); } } } } else if (hit.entity->behavior == &actDoor) { int damage = element->damage; damage += (spellbookDamageBonus * damage); damage /= (1 + (int)resistance); hit.entity->doorHandleDamageMagic(damage, *my, parent); if ( my->actmagicProjectileArc > 0 ) { Entity* caster = uidToEntity(spell->caster); spawnMagicTower(caster, my->x, my->y, spell->ID, nullptr); } if ( !(my->actmagicIsOrbiting == 2) ) { my->removeLightField(); list_RemoveNode(my->mynode); } else { spawnExplosion(my->x, my->y, my->z); } return; } else if (hit.entity->behavior == &actChest) { int damage = element->damage; damage += (spellbookDamageBonus * damage); damage /= (1+(int)resistance); hit.entity->chestHandleDamageMagic(damage, *my, parent); if ( my->actmagicProjectileArc > 0 ) { Entity* caster = uidToEntity(spell->caster); spawnMagicTower(caster, my->x, my->y, spell->ID, nullptr); } if ( !(my->actmagicIsOrbiting == 2) ) { my->removeLightField(); list_RemoveNode(my->mynode); } else { spawnExplosion(my->x, my->y, my->z); } return; } else if (hit.entity->behavior == &actFurniture ) { int damage = element->damage; damage += (spellbookDamageBonus * damage); damage /= (1 + (int)resistance); hit.entity->furnitureHealth -= damage; if ( hit.entity->furnitureHealth < 0 ) { if ( parent ) { if ( parent->behavior == &actPlayer ) { switch ( hit.entity->furnitureType ) { case FURNITURE_CHAIR: messagePlayer(parent->skill[2], language[388]); updateEnemyBar(parent, hit.entity, language[677], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_TABLE: messagePlayer(parent->skill[2], language[389]); updateEnemyBar(parent, hit.entity, language[676], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_BED: messagePlayer(parent->skill[2], language[2508], language[2505]); updateEnemyBar(parent, hit.entity, language[2505], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_BUNKBED: messagePlayer(parent->skill[2], language[2508], language[2506]); updateEnemyBar(parent, hit.entity, language[2506], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_PODIUM: messagePlayer(parent->skill[2], language[2508], language[2507]); updateEnemyBar(parent, hit.entity, language[2507], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; default: break; } } } } playSoundEntity(hit.entity, 28, 128); if ( my->actmagicProjectileArc > 0 ) { Entity* caster = uidToEntity(spell->caster); spawnMagicTower(caster, my->x, my->y, spell->ID, nullptr); } if ( !(my->actmagicIsOrbiting == 2) ) { my->removeLightField(); list_RemoveNode(my->mynode); } else { spawnExplosion(my->x, my->y, my->z); } return; } } } else if (!strcmp(element->name, spellElement_confuse.name)) { if (hit.entity) { if (hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer) { playSoundEntity(hit.entity, 174, 64); hitstats->EFFECTS[EFF_CONFUSED] = true; hitstats->EFFECTS_TIMERS[EFF_CONFUSED] = (element->duration * (((element->mana) / static_cast<double>(element->base_mana)) * element->overload_multiplier)); hitstats->EFFECTS_TIMERS[EFF_CONFUSED] /= (1 + (int)resistance); // If the Entity hit is a Player, update their status to be Slowed if ( hit.entity->behavior == &actPlayer ) { serverUpdateEffects(hit.entity->skill[2]); } hit.entity->skill[1] = 0; //Remove the monster's target. if ( parent ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); if ( parent->behavior == &actPlayer ) { messagePlayerMonsterEvent(parent->skill[2], color, *hitstats, language[391], language[390], MSG_COMBAT); } } Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 0); if ( player >= 0 ) { messagePlayerColor(player, color, language[392]); } spawnMagicEffectParticles(hit.entity->x, hit.entity->y, hit.entity->z, my->sprite); } } } else if (!strcmp(element->name, spellElement_cold.name)) { playSoundEntity(my, 197, 128); if (hit.entity) { if (hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer) { playSoundEntity(hit.entity, 28, 128); hitstats->EFFECTS[EFF_SLOW] = true; hitstats->EFFECTS_TIMERS[EFF_SLOW] = (element->duration * (((element->mana) / static_cast<double>(element->base_mana)) * element->overload_multiplier)); hitstats->EFFECTS_TIMERS[EFF_SLOW] /= (1 + (int)resistance); // If the Entity hit is a Player, update their status to be Slowed if ( hit.entity->behavior == &actPlayer ) { serverUpdateEffects(hit.entity->skill[2]); } int damage = element->damage; damage += (spellbookDamageBonus * damage); //messagePlayer(0, "damage: %d", damage); if ( my->actmagicIsOrbiting == 2 ) { if ( parent && my->actmagicOrbitCastFromSpell == 0 ) { if ( parent->behavior == &actParticleDot ) { damage = parent->skill[1]; } else if ( parent->behavior == &actPlayer ) { Stat* playerStats = parent->getStats(); if ( playerStats ) { int skillLVL = playerStats->PROFICIENCIES[PRO_ALCHEMY] / 20; damage = (18 + skillLVL * 1.5); } } else { damage = 18; } } else if ( parent && my->actmagicOrbitCastFromSpell == 1 ) { // cast through amplify magic effect damage /= 2; } else { damage = 18; } damage = damage - rand() % ((damage / 8) + 1); } //damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage; int oldHP = hitstats->HP; damage *= hit.entity->getDamageTableMultiplier(*hitstats, DAMAGE_TABLE_MAGIC); damage /= (1 + (int)resistance); hit.entity->modHP(-damage); Entity* gib = spawnGib(hit.entity); serverSpawnGibForClient(gib); // write the obituary if ( parent ) { parent->killedByMonsterObituary(hit.entity); } // update enemy bar for attacker if ( !strcmp(hitstats->name, "") ) { if ( hitstats->type < KOBOLD ) //Original monster count { updateEnemyBar(parent, hit.entity, language[90 + hitstats->type], hitstats->HP, hitstats->MAXHP); } else if ( hitstats->type >= KOBOLD ) //New monsters { updateEnemyBar(parent, hit.entity, language[2000 + (hitstats->type - KOBOLD)], hitstats->HP, hitstats->MAXHP); } } else { updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP); } if ( parent ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); if ( parent->behavior == &actPlayer ) { messagePlayerMonsterEvent(parent->skill[2], color, *hitstats, language[394], language[393], MSG_COMBAT); } } Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 0); if ( player >= 0 ) { messagePlayerColor(player, color, language[395]); } spawnMagicEffectParticles(hit.entity->x, hit.entity->y, hit.entity->z, my->sprite); if ( oldHP > 0 && hitstats->HP <= 0 ) { if ( parent ) { parent->awardXP(hit.entity, true, true); if ( my->actmagicIsOrbiting == 2 && my->actmagicOrbitCastFromSpell == 0 && parent->behavior == &actPlayer ) { if ( hitstats->type == LICH || hitstats->type == LICH_ICE || hitstats->type == LICH_FIRE ) { if ( client_classes[parent->skill[2]] == CLASS_BREWER ) { steamAchievementClient(parent->skill[2], "BARONY_ACH_SECRET_WEAPON"); } } steamStatisticUpdateClient(parent->skill[2], STEAM_STAT_BOMBARDIER, STEAM_STAT_INT, 1); } if ( my->actmagicCastByTinkerTrap == 1 && parent->behavior == &actPlayer && hitstats->type == MINOTAUR ) { steamAchievementClient(parent->skill[2], "BARONY_ACH_TIME_TO_PLAN"); } } else { if ( achievementObserver.checkUidIsFromPlayer(my->parent) >= 0 ) { steamAchievementClient(achievementObserver.checkUidIsFromPlayer(my->parent), "BARONY_ACH_TAKING_WITH"); } } } } } } else if (!strcmp(element->name, spellElement_slow.name)) { if (hit.entity) { if (hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer) { playSoundEntity(hit.entity, 396 + rand() % 3, 64); hitstats->EFFECTS[EFF_SLOW] = true; hitstats->EFFECTS_TIMERS[EFF_SLOW] = (element->duration * (((element->mana) / static_cast<double>(element->base_mana)) * element->overload_multiplier)); hitstats->EFFECTS_TIMERS[EFF_SLOW] /= (1 + (int)resistance); // If the Entity hit is a Player, update their status to be Slowed if ( hit.entity->behavior == &actPlayer ) { serverUpdateEffects(hit.entity->skill[2]); } // update enemy bar for attacker if ( parent ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); if ( parent->behavior == &actPlayer ) { messagePlayerMonsterEvent(parent->skill[2], color, *hitstats, language[394], language[393], MSG_COMBAT); } } Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 0); if ( player >= 0 ) { messagePlayerColor(player, color, language[395]); } spawnMagicEffectParticles(hit.entity->x, hit.entity->y, hit.entity->z, my->sprite); } } } else if (!strcmp(element->name, spellElement_sleep.name)) { if (hit.entity) { if (hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer) { playSoundEntity(hit.entity, 174, 64); int effectDuration = 0; if ( parent && parent->behavior == &actMagicTrapCeiling ) { effectDuration = 200 + rand() % 150; // 4 seconds + 0 to 3 seconds. } else { effectDuration = 600 + rand() % 300; // 12 seconds + 0 to 6 seconds. if ( hitstats ) { effectDuration = std::max(0, effectDuration - ((hitstats->CON % 10) * 50)); // reduce 1 sec every 10 CON. } } effectDuration /= (1 + (int)resistance); bool magicTrapReapplySleep = true; if ( parent && (parent->behavior == &actMagicTrap || parent->behavior == &actMagicTrapCeiling) ) { if ( hitstats && hitstats->EFFECTS[EFF_ASLEEP] ) { // check to see if we're reapplying the sleep effect. int preventSleepRoll = rand() % 4 - resistance; if ( hit.entity->behavior == &actPlayer || (preventSleepRoll <= 0) ) { magicTrapReapplySleep = false; //messagePlayer(0, "Target already asleep!"); } } } if ( magicTrapReapplySleep ) { if ( hit.entity->setEffect(EFF_ASLEEP, true, effectDuration, false) ) { hitstats->OLDHP = hitstats->HP; if ( hit.entity->behavior == &actPlayer ) { serverUpdateEffects(hit.entity->skill[2]); Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 0); messagePlayerColor(hit.entity->skill[2], color, language[396]); } if ( parent ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); if ( parent->behavior == &actPlayer ) { messagePlayerMonsterEvent(parent->skill[2], color, *hitstats, language[398], language[397], MSG_COMBAT); } } } else { if ( parent ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); if ( parent->behavior == &actPlayer ) { messagePlayerMonsterEvent(parent->skill[2], color, *hitstats, language[2905], language[2906], MSG_COMBAT); } } } } spawnMagicEffectParticles(hit.entity->x, hit.entity->y, hit.entity->z, my->sprite); } } } else if (!strcmp(element->name, spellElement_lightning.name)) { playSoundEntity(my, 173, 128); if (hit.entity) { if (hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer) { Entity* parent = uidToEntity(my->parent); playSoundEntity(my, 173, 64); playSoundEntity(hit.entity, 28, 128); int damage = element->damage; damage += (spellbookDamageBonus * damage); if ( my->actmagicIsOrbiting == 2 ) { if ( parent && my->actmagicOrbitCastFromSpell == 0 ) { if ( parent->behavior == &actParticleDot ) { damage = parent->skill[1]; } else if ( parent->behavior == &actPlayer ) { Stat* playerStats = parent->getStats(); if ( playerStats ) { int skillLVL = playerStats->PROFICIENCIES[PRO_ALCHEMY] / 20; damage = (22 + skillLVL * 1.5); } } else { damage = 22; } } else if ( parent && my->actmagicOrbitCastFromSpell == 1 ) { // cast through amplify magic effect damage /= 2; } else { damage = 22; } damage = damage - rand() % ((damage / 8) + 1); } //damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage; int oldHP = hitstats->HP; damage *= hit.entity->getDamageTableMultiplier(*hitstats, DAMAGE_TABLE_MAGIC); damage /= (1 + (int)resistance); hit.entity->modHP(-damage); // write the obituary if (parent) { parent->killedByMonsterObituary(hit.entity); } // update enemy bar for attacker if ( !strcmp(hitstats->name, "") ) { if ( hitstats->type < KOBOLD ) //Original monster count { updateEnemyBar(parent, hit.entity, language[90 + hitstats->type], hitstats->HP, hitstats->MAXHP); } else if ( hitstats->type >= KOBOLD ) //New monsters { updateEnemyBar(parent, hit.entity, language[2000 + (hitstats->type - KOBOLD)], hitstats->HP, hitstats->MAXHP); } } else { updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP); } if ( oldHP > 0 && hitstats->HP <= 0 && parent) { parent->awardXP( hit.entity, true, true ); if ( my->actmagicIsOrbiting == 2 && my->actmagicOrbitCastFromSpell == 0 && parent->behavior == &actPlayer ) { if ( hitstats->type == LICH || hitstats->type == LICH_ICE || hitstats->type == LICH_FIRE ) { if ( client_classes[parent->skill[2]] == CLASS_BREWER ) { steamAchievementClient(parent->skill[2], "BARONY_ACH_SECRET_WEAPON"); } } steamStatisticUpdateClient(parent->skill[2], STEAM_STAT_BOMBARDIER, STEAM_STAT_INT, 1); } } } else if ( hit.entity->behavior == &actDoor ) { int damage = element->damage; damage += (spellbookDamageBonus * damage); //damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage; damage /= (1 + (int)resistance); hit.entity->doorHandleDamageMagic(damage, *my, parent); if ( my->actmagicProjectileArc > 0 ) { Entity* caster = uidToEntity(spell->caster); spawnMagicTower(caster, my->x, my->y, spell->ID, nullptr); } if ( !(my->actmagicIsOrbiting == 2) ) { my->removeLightField(); list_RemoveNode(my->mynode); } return; } else if ( hit.entity->behavior == &actChest ) { int damage = element->damage; damage += (spellbookDamageBonus * damage); damage /= (1 + (int)resistance); hit.entity->chestHandleDamageMagic(damage, *my, parent); if ( my->actmagicProjectileArc > 0 ) { Entity* caster = uidToEntity(spell->caster); spawnMagicTower(caster, my->x, my->y, spell->ID, nullptr); } if ( !(my->actmagicIsOrbiting == 2) ) { my->removeLightField(); list_RemoveNode(my->mynode); } return; } else if (hit.entity->behavior == &actFurniture ) { int damage = element->damage; damage += (spellbookDamageBonus * damage); damage /= (1 + (int)resistance); hit.entity->furnitureHealth -= damage; if ( hit.entity->furnitureHealth < 0 ) { if ( parent ) { if ( parent->behavior == &actPlayer ) { switch ( hit.entity->furnitureType ) { case FURNITURE_CHAIR: messagePlayer(parent->skill[2], language[388]); updateEnemyBar(parent, hit.entity, language[677], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_TABLE: messagePlayer(parent->skill[2], language[389]); updateEnemyBar(parent, hit.entity, language[676], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_BED: messagePlayer(parent->skill[2], language[2508], language[2505]); updateEnemyBar(parent, hit.entity, language[2505], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_BUNKBED: messagePlayer(parent->skill[2], language[2508], language[2506]); updateEnemyBar(parent, hit.entity, language[2506], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; case FURNITURE_PODIUM: messagePlayer(parent->skill[2], language[2508], language[2507]); updateEnemyBar(parent, hit.entity, language[2507], hit.entity->furnitureHealth, hit.entity->furnitureMaxHealth); break; default: break; } } } } playSoundEntity(hit.entity, 28, 128); if ( my->actmagicProjectileArc > 0 ) { Entity* caster = uidToEntity(spell->caster); spawnMagicTower(caster, my->x, my->y, spell->ID, nullptr); } } } } else if (!strcmp(element->name, spellElement_locking.name)) { if ( hit.entity ) { if (hit.entity->behavior == &actDoor) { if ( parent && parent->behavior == &actPlayer && MFLAG_DISABLEOPENING ) { Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 255); messagePlayerColor(parent->skill[2], 0xFFFFFFFF, language[3096], language[3097]); messagePlayerColor(parent->skill[2], color, language[3101]); // disabled locking spell. } else { playSoundEntity(hit.entity, 92, 64); hit.entity->skill[5] = 1; //Lock the door. if ( parent ) { if ( parent->behavior == &actPlayer ) { messagePlayer(parent->skill[2], language[399]); } } } } else if (hit.entity->behavior == &actChest) { //Lock chest playSoundEntity(hit.entity, 92, 64); if ( !hit.entity->chestLocked ) { if ( parent && parent->behavior == &actPlayer && MFLAG_DISABLEOPENING ) { Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 255); messagePlayerColor(parent->skill[2], 0xFFFFFFFF, language[3096], language[3099]); messagePlayerColor(parent->skill[2], color, language[3100]); // disabled locking spell. } else { hit.entity->lockChest(); if ( parent ) { if ( parent->behavior == &actPlayer ) { messagePlayer(parent->skill[2], language[400]); } } } } } else { if ( parent ) if ( parent->behavior == &actPlayer ) { messagePlayer(parent->skill[2], language[401]); } if ( player >= 0 ) { messagePlayer(player, language[401]); } } spawnMagicEffectParticles(hit.entity->x, hit.entity->y, hit.entity->z, my->sprite); } } else if (!strcmp(element->name, spellElement_opening.name)) { if (hit.entity) { if (hit.entity->behavior == &actDoor) { if ( MFLAG_DISABLEOPENING || hit.entity->doorDisableOpening == 1 ) { if ( parent && parent->behavior == &actPlayer ) { Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 255); messagePlayerColor(parent->skill[2], 0xFFFFFFFF, language[3096], language[3097]); messagePlayerColor(parent->skill[2], color, language[3101]); // disabled opening spell. } } else { // Open the Door playSoundEntity(hit.entity, 91, 64); // "UnlockDoor.ogg" hit.entity->doorLocked = 0; // Unlocks the Door hit.entity->doorPreventLockpickExploit = 1; if ( !hit.entity->skill[0] && !hit.entity->skill[3] ) { hit.entity->skill[3] = 1 + (my->x > hit.entity->x); // Opens the Door playSoundEntity(hit.entity, 21, 96); // "UnlockDoor.ogg" } else if ( hit.entity->skill[0] && !hit.entity->skill[3] ) { hit.entity->skill[3] = 1 + (my->x < hit.entity->x); // Opens the Door playSoundEntity(hit.entity, 21, 96); // "UnlockDoor.ogg" } if ( parent ) { if ( parent->behavior == &actPlayer) { messagePlayer(parent->skill[2], language[402]); } } } } else if ( hit.entity->behavior == &actGate ) { if ( MFLAG_DISABLEOPENING || hit.entity->gateDisableOpening == 1 ) { if ( parent && parent->behavior == &actPlayer ) { Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 255); messagePlayerColor(parent->skill[2], 0xFFFFFFFF, language[3096], language[3098]); messagePlayerColor(parent->skill[2], color, language[3102]); // disabled opening spell. } } else { // Open the Gate if ( (hit.entity->skill[28] != 2 && hit.entity->gateInverted == 0) || (hit.entity->skill[28] != 1 && hit.entity->gateInverted == 1) ) { if ( hit.entity->gateInverted == 1 ) { hit.entity->skill[28] = 1; // Depowers the Gate } else { hit.entity->skill[28] = 2; // Powers the Gate } if ( parent ) { if ( parent->behavior == &actPlayer ) { messagePlayer(parent->skill[2], language[403]); // "The spell opens the gate!" } } } } } else if ( hit.entity->behavior == &actChest ) { // Unlock the Chest if ( hit.entity->chestLocked ) { if ( MFLAG_DISABLEOPENING ) { if ( parent && parent->behavior == &actPlayer ) { Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 255); messagePlayerColor(parent->skill[2], 0xFFFFFFFF, language[3096], language[3099]); messagePlayerColor(parent->skill[2], color, language[3100]); // disabled opening spell. } } else { playSoundEntity(hit.entity, 91, 64); // "UnlockDoor.ogg" hit.entity->unlockChest(); if ( parent ) { if ( parent->behavior == &actPlayer) { messagePlayer(parent->skill[2], language[404]); // "The spell unlocks the chest!" } } } } } else if ( hit.entity->behavior == &actPowerCrystalBase ) { Entity* childentity = nullptr; if ( hit.entity->children.first ) { childentity = static_cast<Entity*>((&hit.entity->children)->first->element); if ( childentity != nullptr ) { //Unlock crystal if ( childentity->crystalSpellToActivate ) { playSoundEntity(hit.entity, 151, 128); childentity->crystalSpellToActivate = 0; // send the clients the updated skill. serverUpdateEntitySkill(childentity, 10); if ( parent ) { if ( parent->behavior == &actPlayer ) { messagePlayer(parent->skill[2], language[2358]); } } } } } } else { if ( parent ) { if ( parent->behavior == &actPlayer ) { messagePlayer(parent->skill[2], language[401]); // "No telling what it did..." } } if ( player >= 0 ) { messagePlayer(player, language[401]); // "No telling what it did..." } } spawnMagicEffectParticles(hit.entity->x, hit.entity->y, hit.entity->z, my->sprite); } } else if (!strcmp(element->name, spellElement_dig.name)) { if ( !hit.entity ) { if ( hit.mapx >= 1 && hit.mapx < map.width - 1 && hit.mapy >= 1 && hit.mapy < map.height - 1 ) { magicDig(parent, my, 8, 4); } } else { if ( hit.entity->behavior == &actBoulder ) { if ( hit.entity->sprite == 989 || hit.entity->sprite == 990 ) { magicDig(parent, my, 0, 1); } else { magicDig(parent, my, 8, 4); } } else { if ( parent ) if ( parent->behavior == &actPlayer ) { messagePlayer(parent->skill[2], language[401]); } if ( player >= 0 ) { messagePlayer(player, language[401]); } } } } else if ( !strcmp(element->name, spellElement_stoneblood.name) ) { if ( hit.entity ) { if ( hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer ) { playSoundEntity(hit.entity, 172, 64); //TODO: Paralyze spell sound. int effectDuration = (element->duration * (((element->mana) / static_cast<double>(element->base_mana)) * element->overload_multiplier)); effectDuration /= (1 + (int)resistance); if ( hit.entity->setEffect(EFF_PARALYZED, true, effectDuration, false) ) { if ( hit.entity->behavior == &actPlayer ) { serverUpdateEffects(hit.entity->skill[2]); } // update enemy bar for attacker if ( parent ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); if ( parent->behavior == &actPlayer ) { messagePlayerMonsterEvent(parent->skill[2], color, *hitstats, language[2421], language[2420], MSG_COMBAT); } } Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 0); if ( player >= 0 ) { messagePlayerColor(player, color, language[2422]); } } else { if ( parent ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); if ( parent->behavior == &actPlayer ) { messagePlayerMonsterEvent(parent->skill[2], color, *hitstats, language[2905], language[2906], MSG_COMBAT); } } } spawnMagicEffectParticles(hit.entity->x, hit.entity->y, hit.entity->z, my->sprite); } } } else if ( !strcmp(element->name, spellElement_bleed.name) ) { playSoundEntity(my, 173, 128); if ( hit.entity ) { if ( hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer ) { Entity* parent = uidToEntity(my->parent); playSoundEntity(my, 173, 64); playSoundEntity(hit.entity, 28, 128); int damage = element->damage; damage += (spellbookDamageBonus * damage); //damage += ((element->mana - element->base_mana) / static_cast<double>(element->overload_multiplier)) * element->damage; damage *= hit.entity->getDamageTableMultiplier(*hitstats, DAMAGE_TABLE_MAGIC); if ( parent ) { Stat* casterStats = parent->getStats(); if ( casterStats && casterStats->type == LICH_FIRE && parent->monsterLichAllyStatus == LICH_ALLY_DEAD ) { damage *= 2; } } damage /= (1 + (int)resistance); hit.entity->modHP(-damage); // write the obituary if ( parent ) { parent->killedByMonsterObituary(hit.entity); } int bleedDuration = (element->duration * (((element->mana) / static_cast<double>(element->base_mana)) * element->overload_multiplier)); bleedDuration /= (1 + (int)resistance); if ( hit.entity->setEffect(EFF_BLEEDING, true, bleedDuration, true) ) { if ( parent ) { hitstats->bleedInflictedBy = static_cast<Sint32>(my->parent); } } hitstats->EFFECTS[EFF_SLOW] = true; hitstats->EFFECTS_TIMERS[EFF_SLOW] = (element->duration * (((element->mana) / static_cast<double>(element->base_mana)) * element->overload_multiplier)); hitstats->EFFECTS_TIMERS[EFF_SLOW] /= 4; hitstats->EFFECTS_TIMERS[EFF_SLOW] /= (1 + (int)resistance); if ( hit.entity->behavior == &actPlayer ) { serverUpdateEffects(hit.entity->skill[2]); } // update enemy bar for attacker if ( parent ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); if ( parent->behavior == &actPlayer ) { messagePlayerMonsterEvent(parent->skill[2], color, *hitstats, language[2424], language[2423], MSG_COMBAT); } } // write the obituary if ( parent ) { parent->killedByMonsterObituary(hit.entity); } // update enemy bar for attacker if ( !strcmp(hitstats->name, "") ) { if ( hitstats->type < KOBOLD ) //Original monster count { updateEnemyBar(parent, hit.entity, language[90 + hitstats->type], hitstats->HP, hitstats->MAXHP); } else if ( hitstats->type >= KOBOLD ) //New monsters { updateEnemyBar(parent, hit.entity, language[2000 + (hitstats->type - KOBOLD)], hitstats->HP, hitstats->MAXHP); } } else { updateEnemyBar(parent, hit.entity, hitstats->name, hitstats->HP, hitstats->MAXHP); } if ( hitstats->HP <= 0 && parent ) { parent->awardXP(hit.entity, true, true); if ( hit.entity->behavior == &actMonster ) { bool tryBloodVial = false; if ( gibtype[hitstats->type] == 1 || gibtype[hitstats->type] == 2 ) { for ( c = 0; c < MAXPLAYERS; ++c ) { if ( players[c]->entity && players[c]->entity->playerRequiresBloodToSustain() ) { tryBloodVial = true; break; } } if ( tryBloodVial ) { Item* blood = newItem(FOOD_BLOOD, EXCELLENT, 0, 1, gibtype[hitstats->type] - 1, true, &hitstats->inventory); } } } } Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 0); if ( player >= 0 ) { messagePlayerColor(player, color, language[2425]); } spawnMagicEffectParticles(hit.entity->x, hit.entity->y, hit.entity->z, my->sprite); for ( int gibs = 0; gibs < 10; ++gibs ) { Entity* gib = spawnGib(hit.entity); serverSpawnGibForClient(gib); } } } } else if ( !strcmp(element->name, spellElement_dominate.name) ) { Entity *caster = uidToEntity(spell->caster); if ( caster ) { if ( spellEffectDominate(*my, *element, *caster, parent) ) { //Success } } } else if ( !strcmp(element->name, spellElement_acidSpray.name) ) { Entity* caster = uidToEntity(spell->caster); if ( caster ) { spellEffectAcid(*my, *element, parent, resistance); } } else if ( !strcmp(element->name, spellElement_poison.name) ) { Entity* caster = uidToEntity(spell->caster); if ( caster ) { spellEffectPoison(*my, *element, parent, resistance); } } else if ( !strcmp(element->name, spellElement_sprayWeb.name) ) { Entity* caster = uidToEntity(spell->caster); if ( caster ) { spellEffectSprayWeb(*my, *element, parent, resistance); } } else if ( !strcmp(element->name, spellElement_stealWeapon.name) ) { Entity* caster = uidToEntity(spell->caster); if ( caster ) { spellEffectStealWeapon(*my, *element, parent, resistance); } } else if ( !strcmp(element->name, spellElement_drainSoul.name) ) { Entity* caster = uidToEntity(spell->caster); if ( caster ) { spellEffectDrainSoul(*my, *element, parent, resistance); } } else if ( !strcmp(element->name, spellElement_charmMonster.name) ) { Entity* caster = uidToEntity(spell->caster); if ( caster ) { spellEffectCharmMonster(*my, *element, parent, resistance, static_cast<bool>(my->actmagicCastByMagicstaff)); } } else if ( !strcmp(element->name, spellElement_telePull.name) ) { Entity* caster = uidToEntity(spell->caster); if ( caster ) { spellEffectTeleportPull(my, *element, parent, hit.entity, resistance); } } else if ( !strcmp(element->name, spellElement_shadowTag.name) ) { Entity* caster = uidToEntity(spell->caster); if ( caster ) { spellEffectShadowTag(*my, *element, parent, resistance); } } else if ( !strcmp(element->name, spellElement_demonIllusion.name) ) { Entity* caster = uidToEntity(spell->caster); if ( caster ) { spellEffectDemonIllusion(*my, *element, parent, hit.entity, resistance); } } if ( hitstats ) { if ( player >= 0 ) { entityHealth -= hitstats->HP; if ( entityHealth > 0 ) { // entity took damage, shake screen. if ( multiplayer == SERVER && player > 0 ) { strcpy((char*)net_packet->data, "SHAK"); net_packet->data[4] = 10; // turns into .1 net_packet->data[5] = 10; net_packet->address.host = net_clients[player - 1].host; net_packet->address.port = net_clients[player - 1].port; net_packet->len = 6; sendPacketSafe(net_sock, -1, net_packet, player - 1); } else if (player == 0 || (splitscreen && player > 0) ) { cameravars[player].shakex += .1; cameravars[player].shakey += 10; } } } else { if ( parent && parent->behavior == &actPlayer ) { if ( hitstats->HP <= 0 ) { if ( hitstats->type == SCARAB ) { // killed a scarab with magic. steamAchievementEntity(parent, "BARONY_ACH_THICK_SKULL"); } if ( my->actmagicMirrorReflected == 1 && static_cast<Uint32>(my->actmagicMirrorReflectedCaster) == hit.entity->getUID() ) { // killed a monster with it's own spell with mirror reflection. steamAchievementEntity(parent, "BARONY_ACH_NARCISSIST"); } if ( stats[parent->skill[2]] && stats[parent->skill[2]]->playerRace == RACE_INSECTOID && stats[parent->skill[2]]->appearance == 0 ) { if ( !achievementObserver.playerAchievements[parent->skill[2]].gastricBypass ) { if ( achievementObserver.playerAchievements[parent->skill[2]].gastricBypassSpell.first == spell->ID ) { Uint32 oldTicks = achievementObserver.playerAchievements[parent->skill[2]].gastricBypassSpell.second; if ( parent->ticks - oldTicks < TICKS_PER_SECOND * 5 ) { steamAchievementEntity(parent, "BARONY_ACH_GASTRIC_BYPASS"); achievementObserver.playerAchievements[parent->skill[2]].gastricBypass = true; } } } } } } } } if ( my->actmagicProjectileArc > 0 ) { Entity* caster = uidToEntity(spell->caster); spawnMagicTower(caster, my->x, my->y, spell->ID, nullptr); } if ( !(my->actmagicIsOrbiting == 2) ) { my->removeLightField(); if ( my->mynode ) { list_RemoveNode(my->mynode); } } return; } } //Go down two levels to the next element. This will need to get re-written shortly. node = spell->elements.first; element = (spellElement_t*)node->element; //element = (spellElement_t *)spell->elements->first->element; //element = (spellElement_t *)element->elements->first->element; //Go down two levels to the second element. node = element->elements.first; element = (spellElement_t*)node->element; if (!strcmp(element->name, spellElement_fire.name) || !strcmp(element->name, spellElement_lightning.name)) { //Make the ball light up stuff as it travels. my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 192); if ( flickerLights ) { //Magic light ball will never flicker if this setting is disabled. lightball_flicker++; } my->skill[2] = -11; // so clients know to create a light field if (lightball_flicker > 5) { lightball_lighting = (lightball_lighting == 1) + 1; if (lightball_lighting == 1) { my->removeLightField(); my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 192); } else { my->removeLightField(); my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 174); } lightball_flicker = 0; } } else { my->skill[2] = -12; // so clients know to simply spawn particles } // spawn particles spawnMagicParticle(my); } else { //Any init stuff that needs to happen goes here. magic_init = 1; my->skill[2] = -7; // ordinarily the client won't do anything with this entity if ( my->actmagicIsOrbiting == 1 || my->actmagicIsOrbiting == 2 ) { MAGIC_MAXLIFE = my->actmagicOrbitLifetime; } else if ( my->actmagicIsVertical != MAGIC_ISVERTICAL_NONE ) { MAGIC_MAXLIFE = 512; } } } void actMagicClient(Entity* my) { my->removeLightField(); my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 192); if ( flickerLights ) { //Magic light ball will never flicker if this setting is disabled. lightball_flicker++; } my->skill[2] = -11; // so clients know to create a light field if (lightball_flicker > 5) { lightball_lighting = (lightball_lighting == 1) + 1; if (lightball_lighting == 1) { my->removeLightField(); my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 192); } else { my->removeLightField(); my->light = lightSphereShadow(my->x / 16, my->y / 16, 8, 174); } lightball_flicker = 0; } // spawn particles spawnMagicParticle(my); } void actMagicClientNoLight(Entity* my) { spawnMagicParticle(my); // simply spawn particles } void actMagicParticle(Entity* my) { my->x += my->vel_x; my->y += my->vel_y; my->z += my->vel_z; if ( my->sprite == 943 || my->sprite == 979 ) { my->scalex -= 0.05; my->scaley -= 0.05; my->scalez -= 0.05; } my->scalex -= 0.05; my->scaley -= 0.05; my->scalez -= 0.05; if ( my->scalex <= 0 ) { my->scalex = 0; my->scaley = 0; my->scalez = 0; list_RemoveNode(my->mynode); return; } } Entity* spawnMagicParticle(Entity* parentent) { if ( !parentent ) { return nullptr; } Entity* entity; entity = newEntity(parentent->sprite, 1, map.entities, nullptr); //Particle entity. entity->x = parentent->x + (rand() % 50 - 25) / 20.f; entity->y = parentent->y + (rand() % 50 - 25) / 20.f; entity->z = parentent->z + (rand() % 50 - 25) / 20.f; entity->scalex = 0.7; entity->scaley = 0.7; entity->scalez = 0.7; entity->sizex = 1; entity->sizey = 1; entity->yaw = parentent->yaw; entity->pitch = parentent->pitch; entity->roll = parentent->roll; entity->flags[NOUPDATE] = true; entity->flags[PASSABLE] = true; entity->flags[BRIGHT] = true; entity->flags[UNCLICKABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UPDATENEEDED] = false; entity->behavior = &actMagicParticle; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); return entity; } Entity* spawnMagicParticleCustom(Entity* parentent, int sprite, real_t scale, real_t spreadReduce) { if ( !parentent ) { return nullptr; } Entity* entity; entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. int size = 50 / spreadReduce; entity->x = parentent->x + (rand() % size - size / 2) / 20.f; entity->y = parentent->y + (rand() % size - size / 2) / 20.f; entity->z = parentent->z + (rand() % size - size / 2) / 20.f; entity->scalex = scale; entity->scaley = scale; entity->scalez = scale; entity->sizex = 1; entity->sizey = 1; entity->yaw = parentent->yaw; entity->pitch = parentent->pitch; entity->roll = parentent->roll; entity->flags[NOUPDATE] = true; entity->flags[PASSABLE] = true; entity->flags[BRIGHT] = true; entity->flags[UNCLICKABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UPDATENEEDED] = false; entity->behavior = &actMagicParticle; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); return entity; } void spawnMagicEffectParticles(Sint16 x, Sint16 y, Sint16 z, Uint32 sprite) { int c; if ( multiplayer == SERVER ) { for ( c = 1; c < MAXPLAYERS; c++ ) { if ( client_disconnected[c] ) { continue; } strcpy((char*)net_packet->data, "MAGE"); SDLNet_Write16(x, &net_packet->data[4]); SDLNet_Write16(y, &net_packet->data[6]); SDLNet_Write16(z, &net_packet->data[8]); SDLNet_Write32(sprite, &net_packet->data[10]); net_packet->address.host = net_clients[c - 1].host; net_packet->address.port = net_clients[c - 1].port; net_packet->len = 14; sendPacketSafe(net_sock, -1, net_packet, c - 1); } } // boosty boost for ( c = 0; c < 10; c++ ) { Entity* entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->x = x - 5 + rand() % 11; entity->y = y - 5 + rand() % 11; entity->z = z - 10 + rand() % 21; entity->scalex = 0.7; entity->scaley = 0.7; entity->scalez = 0.7; entity->sizex = 1; entity->sizey = 1; entity->yaw = (rand() % 360) * PI / 180.f; entity->flags[PASSABLE] = true; entity->flags[BRIGHT] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; entity->behavior = &actMagicParticle; entity->vel_z = -1; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); } } void createParticle1(Entity* caster, int player) { Entity* entity = newEntity(-1, 1, map.entities, nullptr); //Particle entity. entity->sizex = 0; entity->sizey = 0; entity->x = caster->x; entity->y = caster->y; entity->z = -7; entity->vel_z = 0.3; entity->yaw = (rand() % 360) * PI / 180.0; entity->skill[0] = 50; entity->skill[1] = player; entity->fskill[0] = 0.03; entity->light = lightSphereShadow(entity->x / 16, entity->y / 16, 3, 192); entity->behavior = &actParticleCircle; entity->flags[PASSABLE] = true; entity->flags[INVISIBLE] = true; entity->setUID(-3); } void createParticleCircling(Entity* parent, int duration, int sprite) { if ( !parent ) { return; } Entity* entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x; entity->y = parent->y; entity->focalx = 8; entity->z = -7; entity->vel_z = 0.15; entity->yaw = (rand() % 360) * PI / 180.0; entity->skill[0] = duration; entity->skill[1] = -1; //entity->scalex = 0.01; //entity->scaley = 0.01; entity->fskill[0] = -0.1; entity->behavior = &actParticleCircle; entity->flags[PASSABLE] = true; entity->setUID(-3); real_t tmp = entity->yaw; entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x; entity->y = parent->y; entity->focalx = 8; entity->z = -7; entity->vel_z = 0.15; entity->yaw = tmp + (2 * PI / 3); entity->particleDuration = duration; entity->skill[1] = -1; //entity->scalex = 0.01; //entity->scaley = 0.01; entity->fskill[0] = -0.1; entity->behavior = &actParticleCircle; entity->flags[PASSABLE] = true; entity->setUID(-3); entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x; entity->y = parent->y; entity->focalx = 8; entity->z = -7; entity->vel_z = 0.15; entity->yaw = tmp - (2 * PI / 3); entity->particleDuration = duration; entity->skill[1] = -1; //entity->scalex = 0.01; //entity->scaley = 0.01; entity->fskill[0] = -0.1; entity->behavior = &actParticleCircle; entity->flags[PASSABLE] = true; entity->setUID(-3); entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x; entity->y = parent->y; entity->focalx = 16; entity->z = -12; entity->vel_z = 0.2; entity->yaw = tmp; entity->particleDuration = duration; entity->skill[1] = -1; //entity->scalex = 0.01; //entity->scaley = 0.01; entity->fskill[0] = 0.1; entity->behavior = &actParticleCircle; entity->flags[PASSABLE] = true; entity->setUID(-3); entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x; entity->y = parent->y; entity->focalx = 16; entity->z = -12; entity->vel_z = 0.2; entity->yaw = tmp + (2 * PI / 3); entity->particleDuration = duration; entity->skill[1] = -1; //entity->scalex = 0.01; //entity->scaley = 0.01; entity->fskill[0] = 0.1; entity->behavior = &actParticleCircle; entity->flags[PASSABLE] = true; entity->setUID(-3); entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x; entity->y = parent->y; entity->focalx = 16; entity->z = -12; entity->vel_z = 0.2; entity->yaw = tmp - (2 * PI / 3); entity->particleDuration = duration; entity->skill[1] = -1; //entity->scalex = 0.01; //entity->scaley = 0.01; entity->fskill[0] = 0.1; entity->behavior = &actParticleCircle; entity->flags[PASSABLE] = true; entity->setUID(-3); } #define PARTICLE_LIFE my->skill[0] #define PARTICLE_CASTER my->skill[1] void actParticleCircle(Entity* my) { if ( PARTICLE_LIFE < 0 ) { list_RemoveNode(my->mynode); return; } else { --PARTICLE_LIFE; my->yaw += my->fskill[0]; if ( my->fskill[0] < 0.4 && my->fskill[0] > (-0.4) ) { my->fskill[0] = my->fskill[0] * 1.05; } my->z += my->vel_z; if ( my->focalx > 0.05 ) { if ( my->vel_z == 0.15 ) { my->focalx = my->focalx * 0.97; } else { my->focalx = my->focalx * 0.97; } } my->scalex *= 0.995; my->scaley *= 0.995; my->scalez *= 0.995; } } void createParticleDot(Entity* parent) { if ( !parent ) { return; } for ( int c = 0; c < 50; c++ ) { Entity* entity = newEntity(576, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x + (-4 + rand() % 9); entity->y = parent->y + (-4 + rand() % 9); entity->z = 7.5 + rand()%50; entity->vel_z = -1; //entity->yaw = (rand() % 360) * PI / 180.0; entity->skill[0] = 10 + rand()% 50; entity->behavior = &actParticleDot; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); } } Entity* createParticleAestheticOrbit(Entity* parent, int sprite, int duration, int effectType) { if ( !parent ) { return nullptr; } Entity* entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->actmagicOrbitDist = 6; entity->yaw = parent->yaw; entity->x = parent->x + entity->actmagicOrbitDist * cos(entity->yaw); entity->y = parent->y + entity->actmagicOrbitDist * sin(entity->yaw); entity->z = parent->z; entity->skill[1] = effectType; entity->parent = parent->getUID(); //entity->vel_z = -1; //entity->yaw = (rand() % 360) * PI / 180.0; entity->skill[0] = duration; entity->fskill[0] = entity->x; entity->fskill[1] = entity->y; entity->behavior = &actParticleAestheticOrbit; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[BRIGHT] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); return entity; } void createParticleRock(Entity* parent) { if ( !parent ) { return; } for ( int c = 0; c < 5; c++ ) { Entity* entity = newEntity(78, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x + (-4 + rand() % 9); entity->y = parent->y + (-4 + rand() % 9); entity->z = 7.5; entity->yaw = c * 2 * PI / 5;//(rand() % 360) * PI / 180.0; entity->roll = (rand() % 360) * PI / 180.0; entity->vel_x = 0.2 * cos(entity->yaw); entity->vel_y = 0.2 * sin(entity->yaw); entity->vel_z = 3;// 0.25 - (rand() % 5) / 10.0; entity->skill[0] = 50; // particle life entity->skill[1] = 0; // particle direction, 0 = upwards, 1 = downwards. entity->behavior = &actParticleRock; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); } } void actParticleRock(Entity* my) { if ( PARTICLE_LIFE < 0 || my->z > 10 ) { list_RemoveNode(my->mynode); } else { --PARTICLE_LIFE; my->x += my->vel_x; my->y += my->vel_y; my->roll += 0.1; if ( my->vel_z < 0.01 ) { my->skill[1] = 1; // start moving downwards my->vel_z = 0.1; } if ( my->skill[1] == 0 ) // upwards motion { my->z -= my->vel_z; my->vel_z *= 0.7; } else // downwards motion { my->z += my->vel_z; my->vel_z *= 1.1; } } return; } void actParticleDot(Entity* my) { if ( PARTICLE_LIFE < 0 ) { list_RemoveNode(my->mynode); } else { --PARTICLE_LIFE; my->z += my->vel_z; //my->z -= 0.01; } return; } void actParticleAestheticOrbit(Entity* my) { if ( PARTICLE_LIFE < 0 ) { list_RemoveNode(my->mynode); } else { Entity* parent = uidToEntity(my->parent); if ( !parent ) { list_RemoveNode(my->mynode); return; } Stat* stats = parent->getStats(); if ( my->skill[1] == PARTICLE_EFFECT_SPELLBOT_ORBIT ) { my->yaw = parent->yaw; my->x = parent->x + 2 * cos(parent->yaw); my->y = parent->y + 2 * sin(parent->yaw); my->z = parent->z - 1.5; Entity* particle = spawnMagicParticle(my); if ( particle ) { particle->x = my->x + (-10 + rand() % 21) / (50.f); particle->y = my->y + (-10 + rand() % 21) / (50.f); particle->z = my->z + (-10 + rand() % 21) / (50.f); particle->scalex = my->scalex; particle->scaley = my->scaley; particle->scalez = my->scalez; } //spawnMagicParticle(my); } else if ( my->skill[1] == PARTICLE_EFFECT_SPELL_WEB_ORBIT ) { if ( my->sprite == 863 && !stats->EFFECTS[EFF_WEBBED] ) { list_RemoveNode(my->mynode); return; } my->yaw += 0.2; spawnMagicParticle(my); my->x = parent->x + my->actmagicOrbitDist * cos(my->yaw); my->y = parent->y + my->actmagicOrbitDist * sin(my->yaw); } --PARTICLE_LIFE; } return; } void actParticleTest(Entity* my) { if ( PARTICLE_LIFE < 0 ) { list_RemoveNode(my->mynode); return; } else { --PARTICLE_LIFE; my->x += my->vel_x; my->y += my->vel_y; my->z += my->vel_z; //my->z -= 0.01; } } void createParticleErupt(Entity* parent, int sprite) { if ( !parent ) { return; } real_t yaw = 0; int numParticles = 8; for ( int c = 0; c < 8; c++ ) { Entity* entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x; entity->y = parent->y; entity->z = 7.5; // start from the ground. entity->yaw = yaw; entity->vel_x = 0.2; entity->vel_y = 0.2; entity->vel_z = -2; entity->skill[0] = 100; entity->skill[1] = 0; // direction. entity->fskill[0] = 0.1; entity->behavior = &actParticleErupt; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); yaw += 2 * PI / numParticles; } } Entity* createParticleSapCenter(Entity* parent, Entity* target, int spell, int sprite, int endSprite) { if ( !parent || !target ) { return nullptr; } // spawns the invisible 'center' of the magic particle Entity* entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = target->x; entity->y = target->y; entity->parent = (parent->getUID()); entity->yaw = parent->yaw + PI; // face towards the caster. entity->skill[0] = 45; entity->skill[2] = -13; // so clients know my behavior. entity->skill[3] = 0; // init entity->skill[4] = sprite; // visible sprites. entity->skill[5] = endSprite; // sprite to spawn on return to caster. entity->skill[6] = spell; entity->behavior = &actParticleSapCenter; if ( target->sprite == 977 ) { // boomerang. entity->yaw = target->yaw; entity->roll = target->roll; entity->pitch = target->pitch; entity->z = target->z; } entity->flags[INVISIBLE] = true; entity->flags[PASSABLE] = true; entity->flags[UPDATENEEDED] = true; entity->flags[UNCLICKABLE] = true; return entity; } void createParticleSap(Entity* parent) { real_t speed = 0.4; if ( !parent ) { return; } for ( int c = 0; c < 4; c++ ) { // 4 particles, in an 'x' pattern around parent sprite. int sprite = parent->sprite; if ( parent->sprite == 977 ) { if ( c > 0 ) { continue; } // boomerang return. sprite = parent->sprite; } if ( parent->skill[6] == SPELL_STEAL_WEAPON || parent->skill[6] == SHADOW_SPELLCAST ) { sprite = parent->sprite; } else if ( parent->skill[6] == SPELL_DRAIN_SOUL ) { if ( c == 0 || c == 3 ) { sprite = parent->sprite; } else { sprite = 599; } } else if ( parent->skill[6] == SPELL_SUMMON ) { sprite = parent->sprite; } else if ( parent->skill[6] == SPELL_FEAR ) { sprite = parent->sprite; } else if ( multiplayer == CLIENT ) { // client won't receive the sprite skill data in time, fix for this until a solution is found! if ( sprite == 598 ) { if ( c == 0 || c == 3 ) { // drain HP particle sprite = parent->sprite; } else { // drain MP particle sprite = 599; } } } Entity* entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x; entity->y = parent->y; entity->z = 0; entity->scalex = 0.9; entity->scaley = 0.9; entity->scalez = 0.9; if ( sprite == 598 || sprite == 599 ) { entity->scalex = 0.5; entity->scaley = 0.5; entity->scalez = 0.5; } entity->parent = (parent->getUID()); entity->yaw = parent->yaw; if ( c == 0 ) { entity->vel_z = -speed; entity->vel_x = speed * cos(entity->yaw + PI / 2); entity->vel_y = speed * sin(entity->yaw + PI / 2); entity->yaw += PI / 3; entity->pitch -= PI / 6; entity->fskill[2] = -(PI / 3) / 25; // yaw rate of change. entity->fskill[3] = (PI / 6) / 25; // pitch rate of change. } else if ( c == 1 ) { entity->vel_z = -speed; entity->vel_x = speed * cos(entity->yaw - PI / 2); entity->vel_y = speed * sin(entity->yaw - PI / 2); entity->yaw -= PI / 3; entity->pitch -= PI / 6; entity->fskill[2] = (PI / 3) / 25; // yaw rate of change. entity->fskill[3] = (PI / 6) / 25; // pitch rate of change. } else if ( c == 2 ) { entity->vel_x = speed * cos(entity->yaw + PI / 2); entity->vel_y = speed * sin(entity->yaw + PI / 2); entity->vel_z = speed; entity->yaw += PI / 3; entity->pitch += PI / 6; entity->fskill[2] = -(PI / 3) / 25; // yaw rate of change. entity->fskill[3] = -(PI / 6) / 25; // pitch rate of change. } else if ( c == 3 ) { entity->vel_x = speed * cos(entity->yaw - PI / 2); entity->vel_y = speed * sin(entity->yaw - PI / 2); entity->vel_z = speed; entity->yaw -= PI / 3; entity->pitch += PI / 6; entity->fskill[2] = (PI / 3) / 25; // yaw rate of change. entity->fskill[3] = -(PI / 6) / 25; // pitch rate of change. } entity->skill[3] = c; // particle index entity->fskill[0] = entity->vel_x; // stores the accumulated x offset from center entity->fskill[1] = entity->vel_y; // stores the accumulated y offset from center entity->skill[0] = 200; // lifetime entity->skill[1] = 0; // direction outwards entity->behavior = &actParticleSap; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); if ( sprite == 977 ) // boomerang { entity->z = parent->z; entity->scalex = 1.f; entity->scaley = 1.f; entity->scalez = 1.f; entity->skill[0] = 175; entity->fskill[2] = -((PI / 3) + (PI / 6)) / (150); // yaw rate of change over 3 seconds entity->fskill[3] = 0.f; entity->focalx = 2; entity->focalz = 0.5; entity->pitch = parent->pitch; entity->yaw = parent->yaw; entity->roll = parent->roll; entity->vel_x = 1 * cos(entity->yaw); entity->vel_y = 1 * sin(entity->yaw); int x = entity->x / 16; int y = entity->y / 16; if ( !map.tiles[(MAPLAYERS - 1) + y * MAPLAYERS + x * MAPLAYERS * map.height] ) { // no ceiling, bounce higher. entity->vel_z = -0.4; entity->skill[3] = 1; // high bounce. } else { entity->vel_z = -0.08; } entity->yaw += PI / 3; } } } void createParticleDropRising(Entity* parent, int sprite, double scale) { if ( !parent ) { return; } for ( int c = 0; c < 50; c++ ) { // shoot drops to the sky Entity* entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x - 4 + rand() % 9; entity->y = parent->y - 4 + rand() % 9; entity->z = 7.5 + rand() % 50; entity->vel_z = -1; //entity->yaw = (rand() % 360) * PI / 180.0; entity->particleDuration = 10 + rand() % 50; entity->scalex *= scale; entity->scaley *= scale; entity->scalez *= scale; entity->behavior = &actParticleDot; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); } } Entity* createParticleTimer(Entity* parent, int duration, int sprite) { Entity* entity = newEntity(-1, 1, map.entities, nullptr); //Timer entity. entity->sizex = 1; entity->sizey = 1; if ( parent ) { entity->x = parent->x; entity->y = parent->y; entity->parent = (parent->getUID()); } entity->behavior = &actParticleTimer; entity->particleTimerDuration = duration; entity->flags[INVISIBLE] = true; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); return entity; } void actParticleErupt(Entity* my) { if ( PARTICLE_LIFE < 0 ) { list_RemoveNode(my->mynode); return; } else { // particles jump up from the ground then back down again. --PARTICLE_LIFE; my->x += my->vel_x * cos(my->yaw); my->y += my->vel_y * sin(my->yaw); my->scalex *= 0.99; my->scaley *= 0.99; my->scalez *= 0.99; spawnMagicParticle(my); if ( my->skill[1] == 0 ) // rising { my->z += my->vel_z; my->vel_z *= 0.8; my->pitch = std::min<real_t>(my->pitch + my->fskill[0], PI / 2); my->fskill[0] = std::max<real_t>(my->fskill[0] * 0.85, 0.05); if ( my->vel_z > -0.02 ) { my->skill[1] = 1; } } else // falling { my->pitch = std::min<real_t>(my->pitch + my->fskill[0], 15 * PI / 16); my->fskill[0] = std::min<real_t>(my->fskill[0] * (1 / 0.99), 0.1); my->z -= my->vel_z; my->vel_z *= (1 / 0.8); my->vel_z = std::max<real_t>(my->vel_z, -0.8); } } } void actParticleTimer(Entity* my) { if ( PARTICLE_LIFE < 0 ) { if ( multiplayer != CLIENT ) { if ( my->particleTimerEndAction == PARTICLE_EFFECT_INCUBUS_TELEPORT_STEAL ) { // teleport to random location spell. Entity* parent = uidToEntity(my->parent); if ( parent ) { createParticleErupt(parent, my->particleTimerEndSprite); if ( parent->teleportRandom() ) { // teleport success. if ( multiplayer == SERVER ) { serverSpawnMiscParticles(parent, PARTICLE_EFFECT_ERUPT, my->particleTimerEndSprite); } } } } else if ( my->particleTimerEndAction == PARTICLE_EFFECT_INCUBUS_TELEPORT_TARGET ) { // teleport to target spell. Entity* parent = uidToEntity(my->parent); Entity* target = uidToEntity(static_cast<Uint32>(my->particleTimerTarget)); if ( parent && target ) { createParticleErupt(parent, my->particleTimerEndSprite); if ( parent->teleportAroundEntity(target, my->particleTimerVariable1) ) { // teleport success. if ( multiplayer == SERVER ) { serverSpawnMiscParticles(parent, PARTICLE_EFFECT_ERUPT, my->particleTimerEndSprite); } } } } else if ( my->particleTimerEndAction == PARTICLE_EFFECT_TELEPORT_PULL ) { // teleport to target spell. Entity* parent = uidToEntity(my->parent); Entity* target = uidToEntity(static_cast<Uint32>(my->particleTimerTarget)); if ( parent && target ) { real_t oldx = target->x; real_t oldy = target->y; my->flags[PASSABLE] = true; int tx = static_cast<int>(std::floor(my->x)) >> 4; int ty = static_cast<int>(std::floor(my->y)) >> 4; if ( !target->isBossMonster() && target->teleport(tx, ty) ) { // teleport success. if ( parent->behavior == &actPlayer ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); if ( target->getStats() ) { messagePlayerMonsterEvent(parent->skill[2], color, *(target->getStats()), language[3450], language[3451], MSG_COMBAT); } } if ( target->behavior == &actPlayer ) { Uint32 color = SDL_MapRGB(mainsurface->format, 255, 255, 255); messagePlayerColor(target->skill[2], color, language[3461]); } real_t distance = sqrt((target->x - oldx) * (target->x - oldx) + (target->y - oldy) * (target->y - oldy)) / 16.f; //real_t distance = (entityDist(parent, target)) / 16; createParticleErupt(target, my->particleTimerEndSprite); int durationToStun = 0; if ( distance >= 2 ) { durationToStun = 25 + std::min((distance - 4) * 10, 50.0); } if ( target->behavior == &actMonster ) { if ( durationToStun > 0 && target->setEffect(EFF_DISORIENTED, true, durationToStun, false) ) { int numSprites = std::min(3, durationToStun / 25); for ( int i = 0; i < numSprites; ++i ) { spawnFloatingSpriteMisc(134, target->x + (-4 + rand() % 9) + cos(target->yaw) * 2, target->y + (-4 + rand() % 9) + sin(target->yaw) * 2, target->z + rand() % 4); } } target->monsterReleaseAttackTarget(); target->lookAtEntity(*parent); target->monsterLookDir += (PI - PI / 4 + (rand() % 10) * PI / 40); } else if ( target->behavior == &actPlayer ) { durationToStun = std::max(50, durationToStun); target->setEffect(EFF_DISORIENTED, true, durationToStun, false); int numSprites = std::min(3, durationToStun / 50); for ( int i = 0; i < numSprites; ++i ) { spawnFloatingSpriteMisc(134, target->x + (-4 + rand() % 9) + cos(target->yaw) * 2, target->y + (-4 + rand() % 9) + sin(target->yaw) * 2, target->z + rand() % 4); } Uint32 color = SDL_MapRGB(mainsurface->format, 255, 255, 255); messagePlayerColor(target->skill[2], color, language[3462]); } if ( multiplayer == SERVER ) { serverSpawnMiscParticles(target, PARTICLE_EFFECT_ERUPT, my->particleTimerEndSprite); } } } } else if ( my->particleTimerEndAction == PARTICLE_EFFECT_PORTAL_SPAWN ) { Entity* parent = uidToEntity(my->parent); if ( parent ) { parent->flags[INVISIBLE] = false; serverUpdateEntityFlag(parent, INVISIBLE); playSoundEntity(parent, 164, 128); } spawnExplosion(my->x, my->y, 0); } else if ( my->particleTimerEndAction == PARTICLE_EFFECT_SUMMON_MONSTER || my->particleTimerEndAction == PARTICLE_EFFECT_DEVIL_SUMMON_MONSTER ) { playSoundEntity(my, 164, 128); spawnExplosion(my->x, my->y, -4.0); bool forceLocation = false; if ( my->particleTimerEndAction == PARTICLE_EFFECT_DEVIL_SUMMON_MONSTER && !map.tiles[static_cast<int>(my->y / 16) * MAPLAYERS + static_cast<int>(my->x / 16) * MAPLAYERS * map.height] ) { if ( my->particleTimerVariable1 == SHADOW || my->particleTimerVariable1 == CREATURE_IMP ) { forceLocation = true; } } Entity* monster = summonMonster(static_cast<Monster>(my->particleTimerVariable1), my->x, my->y, forceLocation); if ( monster ) { Stat* monsterStats = monster->getStats(); if ( my->parent != 0 && uidToEntity(my->parent) ) { if ( uidToEntity(my->parent)->getRace() == LICH_ICE ) { //monsterStats->leader_uid = my->parent; switch ( monsterStats->type ) { case AUTOMATON: strcpy(monsterStats->name, "corrupted automaton"); monsterStats->EFFECTS[EFF_CONFUSED] = true; monsterStats->EFFECTS_TIMERS[EFF_CONFUSED] = -1; break; default: break; } } else if ( uidToEntity(my->parent)->getRace() == DEVIL ) { monsterStats->LVL = 5; if ( my->particleTimerVariable2 >= 0 && players[my->particleTimerVariable2] && players[my->particleTimerVariable2]->entity ) { monster->monsterAcquireAttackTarget(*(players[my->particleTimerVariable2]->entity), MONSTER_STATE_ATTACK); } } } } } else if ( my->particleTimerEndAction == PARTICLE_EFFECT_SPELL_SUMMON ) { //my->removeLightField(); } else if ( my->particleTimerEndAction == PARTICLE_EFFECT_SHADOW_TELEPORT ) { // teleport to target spell. Entity* parent = uidToEntity(my->parent); if ( parent ) { if ( parent->monsterSpecialState == SHADOW_TELEPORT_ONLY ) { //messagePlayer(0, "Resetting shadow's monsterSpecialState!"); parent->monsterSpecialState = 0; serverUpdateEntitySkill(parent, 33); // for clients to keep track of animation } } Entity* target = uidToEntity(static_cast<Uint32>(my->particleTimerTarget)); if ( parent ) { bool teleported = false; createParticleErupt(parent, my->particleTimerEndSprite); if ( target ) { teleported = parent->teleportAroundEntity(target, my->particleTimerVariable1); } else { teleported = parent->teleportRandom(); } if ( teleported ) { // teleport success. if ( multiplayer == SERVER ) { serverSpawnMiscParticles(parent, PARTICLE_EFFECT_ERUPT, my->particleTimerEndSprite); } } } } else if ( my->particleTimerEndAction == PARTICLE_EFFECT_LICHFIRE_TELEPORT_STATIONARY ) { // teleport to fixed location spell. node_t* node; int c = 0 + rand() % 3; Entity* target = nullptr; for ( node = map.entities->first; node != nullptr; node = node->next ) { target = (Entity*)node->element; if ( target->behavior == &actDevilTeleport ) { if ( (c == 0 && target->sprite == 72) || (c == 1 && target->sprite == 73) || (c == 2 && target->sprite == 74) ) { break; } } } Entity* parent = uidToEntity(my->parent); if ( parent && target ) { createParticleErupt(parent, my->particleTimerEndSprite); if ( parent->teleport(target->x / 16, target->y / 16) ) { // teleport success. if ( multiplayer == SERVER ) { serverSpawnMiscParticles(parent, PARTICLE_EFFECT_ERUPT, my->particleTimerEndSprite); } } } } else if ( my->particleTimerEndAction == PARTICLE_EFFECT_LICH_TELEPORT_ROAMING ) { bool teleported = false; // teleport to target spell. node_t* node; Entity* parent = uidToEntity(my->parent); Entity* target = nullptr; if ( parent ) { for ( node = map.entities->first; node != nullptr; node = node->next ) { target = (Entity*)node->element; if ( target->behavior == &actDevilTeleport && target->sprite == 128 ) { break; // found specified center of map } } if ( target ) { createParticleErupt(parent, my->particleTimerEndSprite); teleported = parent->teleport((target->x / 16) - 11 + rand() % 23, (target->y / 16) - 11 + rand() % 23); if ( teleported ) { // teleport success. if ( multiplayer == SERVER ) { serverSpawnMiscParticles(parent, PARTICLE_EFFECT_ERUPT, my->particleTimerEndSprite); } } } } } else if ( my->particleTimerEndAction == PARTICLE_EFFECT_LICHICE_TELEPORT_STATIONARY ) { // teleport to fixed location spell. node_t* node; Entity* target = nullptr; for ( node = map.entities->first; node != nullptr; node = node->next ) { target = (Entity*)node->element; if ( target->behavior == &actDevilTeleport && target->sprite == 128 ) { break; } } Entity* parent = uidToEntity(my->parent); if ( parent && target ) { createParticleErupt(parent, my->particleTimerEndSprite); if ( parent->teleport(target->x / 16, target->y / 16) ) { // teleport success. if ( multiplayer == SERVER ) { serverSpawnMiscParticles(parent, PARTICLE_EFFECT_ERUPT, my->particleTimerEndSprite); } parent->lichIceCreateCannon(); } } } } my->removeLightField(); list_RemoveNode(my->mynode); return; } else { --PARTICLE_LIFE; if ( my->particleTimerPreDelay <= 0 ) { // shoot particles for the duration of the timer, centered at caster. if ( my->particleTimerCountdownAction == PARTICLE_TIMER_ACTION_SHOOT_PARTICLES ) { Entity* parent = uidToEntity(my->parent); // shoot drops to the sky if ( parent && my->particleTimerCountdownSprite != 0 ) { Entity* entity = newEntity(my->particleTimerCountdownSprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x - 4 + rand() % 9; entity->y = parent->y - 4 + rand() % 9; entity->z = 7.5; entity->vel_z = -1; entity->yaw = (rand() % 360) * PI / 180.0; entity->particleDuration = 10 + rand() % 30; entity->behavior = &actParticleDot; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); } } // fire once off. else if ( my->particleTimerCountdownAction == PARTICLE_TIMER_ACTION_SPAWN_PORTAL ) { Entity* parent = uidToEntity(my->parent); if ( parent && my->particleTimerCountdownAction < 100 ) { playSoundEntityLocal(parent, 167, 128); createParticleDot(parent); createParticleCircling(parent, 100, my->particleTimerCountdownSprite); my->particleTimerCountdownAction = 0; } } // fire once off. else if ( my->particleTimerCountdownAction == PARTICLE_TIMER_ACTION_SUMMON_MONSTER ) { if ( my->particleTimerCountdownAction < 100 ) { my->light = lightSphereShadow(my->x / 16, my->y / 16, 5, 92); playSoundEntityLocal(my, 167, 128); createParticleDropRising(my, 680, 1.0); createParticleCircling(my, 70, my->particleTimerCountdownSprite); my->particleTimerCountdownAction = 0; } } // fire once off. else if ( my->particleTimerCountdownAction == PARTICLE_TIMER_ACTION_DEVIL_SUMMON_MONSTER ) { if ( my->particleTimerCountdownAction < 100 ) { my->light = lightSphereShadow(my->x / 16, my->y / 16, 5, 92); playSoundEntityLocal(my, 167, 128); createParticleDropRising(my, 593, 1.0); createParticleCircling(my, 70, my->particleTimerCountdownSprite); my->particleTimerCountdownAction = 0; } } // continually fire else if ( my->particleTimerCountdownAction == PARTICLE_TIMER_ACTION_SPELL_SUMMON ) { if ( multiplayer != CLIENT && my->particleTimerPreDelay != -100 ) { // once-off hack :) spawnExplosion(my->x, my->y, -1); playSoundEntity(my, 171, 128); my->particleTimerPreDelay = -100; createParticleErupt(my, my->particleTimerCountdownSprite); serverSpawnMiscParticles(my, PARTICLE_EFFECT_ERUPT, my->particleTimerCountdownSprite); } } // fire once off. else if ( my->particleTimerCountdownAction == PARTICLE_EFFECT_TELEPORT_PULL_TARGET_LOCATION ) { createParticleDropRising(my, my->particleTimerCountdownSprite, 1.0); my->particleTimerCountdownAction = 0; } } else { --my->particleTimerPreDelay; } } } void actParticleSap(Entity* my) { real_t decel = 0.9; real_t accel = 0.9; real_t z_accel = accel; real_t z_decel = decel; real_t minSpeed = 0.05; if ( PARTICLE_LIFE < 0 ) { list_RemoveNode(my->mynode); return; } else { if ( my->sprite == 977 ) // boomerang { if ( my->skill[3] == 1 ) { // specific for the animation I want... // magic numbers that take approximately 75 frames (50% of travel time) to go outward or inward. // acceleration is a little faster to overshoot into the right hand side. decel = 0.9718; accel = 0.9710; z_decel = decel; z_accel = z_decel; } else { decel = 0.95; accel = 0.949; z_decel = 0.9935; z_accel = z_decel; } Entity* particle = spawnMagicParticleCustom(my, (rand() % 2) ? 943 : 979, 1, 10); if ( particle ) { particle->focalx = 2; particle->focaly = -2; particle->focalz = 2.5; } if ( PARTICLE_LIFE < 100 && my->ticks % 6 == 0 ) { if ( PARTICLE_LIFE < 70 ) { playSoundEntityLocal(my, 434 + rand() % 10, 64); } else { playSoundEntityLocal(my, 434 + rand() % 10, 32); } } //particle->flags[SPRITE] = true; } else { spawnMagicParticle(my); } Entity* parent = uidToEntity(my->parent); if ( parent ) { my->x = parent->x + my->fskill[0]; my->y = parent->y + my->fskill[1]; } else { list_RemoveNode(my->mynode); return; } if ( my->skill[1] == 0 ) { // move outwards diagonally. if ( abs(my->vel_z) > minSpeed ) { my->fskill[0] += my->vel_x; my->fskill[1] += my->vel_y; my->vel_x *= decel; my->vel_y *= decel; my->z += my->vel_z; my->vel_z *= z_decel; my->yaw += my->fskill[2]; my->pitch += my->fskill[3]; } else { my->skill[1] = 1; my->vel_x *= -1; my->vel_y *= -1; my->vel_z *= -1; } } else if ( my->skill[1] == 1 ) { // move inwards diagonally. if ( (abs(my->vel_z) < 0.08 && my->skill[3] == 0) || (abs(my->vel_z) < 0.4 && my->skill[3] == 1) ) { my->fskill[0] += my->vel_x; my->fskill[1] += my->vel_y; my->vel_x /= accel; my->vel_y /= accel; my->z += my->vel_z; my->vel_z /= z_accel; my->yaw += my->fskill[2]; my->pitch += my->fskill[3]; } else { // movement completed. my->skill[1] = 2; } } my->scalex *= 0.99; my->scaley *= 0.99; my->scalez *= 0.99; if ( my->sprite == 977 ) { my->scalex = 1.f; my->scaley = 1.f; my->scalez = 1.f; my->roll -= 0.5; my->pitch = std::max(my->pitch - 0.015, 0.0); } --PARTICLE_LIFE; } } void actParticleSapCenter(Entity* my) { // init if ( my->skill[3] == 0 ) { // for clients and server spawn the visible arcing particles. my->skill[3] = 1; createParticleSap(my); } if ( multiplayer == CLIENT ) { return; } Entity* parent = uidToEntity(my->parent); if ( parent ) { // if reached the caster, delete self and spawn some particles. if ( my->sprite == 977 && PARTICLE_LIFE > 1 ) { // store these in case parent dies. // boomerang doesn't check for collision until end of life. my->fskill[4] = parent->x; my->fskill[5] = parent->y; } else if ( entityInsideEntity(my, parent) || (my->sprite == 977 && PARTICLE_LIFE == 0) ) { if ( my->skill[6] == SPELL_STEAL_WEAPON ) { if ( my->skill[7] == 1 ) { // found stolen item. Item* item = newItemFromEntity(my); if ( parent->behavior == &actPlayer ) { itemPickup(parent->skill[2], item); } else if ( parent->behavior == &actMonster ) { parent->addItemToMonsterInventory(item); Stat *myStats = parent->getStats(); if ( myStats ) { node_t* weaponNode = itemNodeInInventory(myStats, static_cast<ItemType>(-1), WEAPON); if ( weaponNode ) { swapMonsterWeaponWithInventoryItem(parent, myStats, weaponNode, false, true); if ( myStats->type == INCUBUS ) { parent->monsterSpecialState = INCUBUS_TELEPORT_STEAL; parent->monsterSpecialTimer = 100 + rand() % MONSTER_SPECIAL_COOLDOWN_INCUBUS_TELEPORT_RANDOM; } } } } item = nullptr; } playSoundEntity(parent, 168, 128); spawnMagicEffectParticles(parent->x, parent->y, parent->z, my->skill[5]); } else if ( my->skill[6] == SPELL_DRAIN_SOUL ) { parent->modHP(my->skill[7]); parent->modMP(my->skill[8]); if ( parent->behavior == &actPlayer ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); messagePlayerColor(parent->skill[2], color, language[2445]); } playSoundEntity(parent, 168, 128); spawnMagicEffectParticles(parent->x, parent->y, parent->z, 169); } else if ( my->skill[6] == SHADOW_SPELLCAST ) { parent->shadowSpecialAbility(parent->monsterShadowInitialMimic); playSoundEntity(parent, 166, 128); spawnMagicEffectParticles(parent->x, parent->y, parent->z, my->skill[5]); } else if ( my->skill[6] == SPELL_SUMMON ) { parent->modMP(my->skill[7]); /*if ( parent->behavior == &actPlayer ) { Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); messagePlayerColor(parent->skill[2], color, language[774]); }*/ playSoundEntity(parent, 168, 128); spawnMagicEffectParticles(parent->x, parent->y, parent->z, 169); } else if ( my->skill[6] == SPELL_FEAR ) { playSoundEntity(parent, 168, 128); spawnMagicEffectParticles(parent->x, parent->y, parent->z, 174); Entity* caster = uidToEntity(my->skill[7]); if ( caster ) { spellEffectFear(nullptr, spellElement_fear, caster, parent, 0); } } else if ( my->sprite == 977 ) // boomerang { Item* item = newItemFromEntity(my); if ( parent->behavior == &actPlayer ) { item->ownerUid = parent->getUID(); Item* pickedUp = itemPickup(parent->skill[2], item); Uint32 color = SDL_MapRGB(mainsurface->format, 0, 255, 0); messagePlayerColor(parent->skill[2], color, language[3746], items[item->type].name_unidentified); achievementObserver.awardAchievementIfActive(parent->skill[2], parent, AchievementObserver::BARONY_ACH_IF_YOU_LOVE_SOMETHING); if ( pickedUp ) { if ( parent->skill[2] == 0 || (parent->skill[2] > 0 && splitscreen) ) { // pickedUp is the new inventory stack for server, free the original items free(item); item = nullptr; if ( multiplayer != CLIENT && !stats[parent->skill[2]]->weapon ) { useItem(pickedUp, parent->skill[2]); } auto& hotbar_t = players[parent->skill[2]]->hotbar; if ( hotbar_t.magicBoomerangHotbarSlot >= 0 ) { auto& hotbar = hotbar_t.slots(); hotbar[hotbar_t.magicBoomerangHotbarSlot].item = pickedUp->uid; for ( int i = 0; i < NUM_HOTBAR_SLOTS; ++i ) { if ( i != hotbar_t.magicBoomerangHotbarSlot && hotbar[i].item == pickedUp->uid ) { hotbar[i].item = 0; } } } } else { free(pickedUp); // item is the picked up items (item == pickedUp) } } } else if ( parent->behavior == &actMonster ) { parent->addItemToMonsterInventory(item); Stat *myStats = parent->getStats(); if ( myStats ) { node_t* weaponNode = itemNodeInInventory(myStats, static_cast<ItemType>(-1), WEAPON); if ( weaponNode ) { swapMonsterWeaponWithInventoryItem(parent, myStats, weaponNode, false, true); } } } playSoundEntity(parent, 431 + rand() % 3, 92); item = nullptr; } list_RemoveNode(my->mynode); return; } // calculate direction to caster and move. real_t tangent = atan2(parent->y - my->y, parent->x - my->x); real_t dist = sqrt(pow(my->x - parent->x, 2) + pow(my->y - parent->y, 2)); real_t speed = dist / std::max(PARTICLE_LIFE, 1); my->vel_x = speed * cos(tangent); my->vel_y = speed * sin(tangent); my->x += my->vel_x; my->y += my->vel_y; } else { if ( my->skill[6] == SPELL_SUMMON ) { real_t dist = sqrt(pow(my->x - my->skill[8], 2) + pow(my->y - my->skill[9], 2)); if ( dist < 4 ) { spawnMagicEffectParticles(my->skill[8], my->skill[9], 0, my->skill[5]); Entity* caster = uidToEntity(my->skill[7]); if ( caster && caster->behavior == &actPlayer && stats[caster->skill[2]] ) { // kill old summons. for ( node_t* node = stats[caster->skill[2]]->FOLLOWERS.first; node != nullptr; node = node->next ) { Entity* follower = nullptr; if ( (Uint32*)(node)->element ) { follower = uidToEntity(*((Uint32*)(node)->element)); } if ( follower && follower->monsterAllySummonRank != 0 ) { Stat* followerStats = follower->getStats(); if ( followerStats && followerStats->HP > 0 ) { follower->setMP(followerStats->MAXMP * (followerStats->HP / static_cast<float>(followerStats->MAXHP))); follower->setHP(0); } } } Monster creature = SKELETON; Entity* monster = summonMonster(creature, my->skill[8], my->skill[9]); if ( monster ) { Stat* monsterStats = monster->getStats(); monster->yaw = my->yaw - PI; if ( monsterStats ) { int magicLevel = 1; magicLevel = std::min(7, 1 + (stats[caster->skill[2]]->playerSummonLVLHP >> 16) / 5); monster->monsterAllySummonRank = magicLevel; strcpy(monsterStats->name, "skeleton knight"); forceFollower(*caster, *monster); monster->setEffect(EFF_STUNNED, true, 20, false); bool spawnSecondAlly = false; if ( (caster->getINT() + stats[caster->skill[2]]->PROFICIENCIES[PRO_MAGIC]) >= SKILL_LEVEL_EXPERT ) { spawnSecondAlly = true; } //parent->increaseSkill(PRO_LEADERSHIP); monster->monsterAllyIndex = caster->skill[2]; if ( multiplayer == SERVER ) { serverUpdateEntitySkill(monster, 42); // update monsterAllyIndex for clients. } // change the color of the hit entity. monster->flags[USERFLAG2] = true; serverUpdateEntityFlag(monster, USERFLAG2); if ( monsterChangesColorWhenAlly(monsterStats) ) { int bodypart = 0; for ( node_t* node = (monster)->children.first; node != nullptr; node = node->next ) { if ( bodypart >= LIMB_HUMANOID_TORSO ) { Entity* tmp = (Entity*)node->element; if ( tmp ) { tmp->flags[USERFLAG2] = true; serverUpdateEntityFlag(tmp, USERFLAG2); } } ++bodypart; } } if ( spawnSecondAlly ) { Entity* monster = summonMonster(creature, my->skill[8], my->skill[9]); if ( monster ) { if ( multiplayer != CLIENT ) { spawnExplosion(monster->x, monster->y, -1); playSoundEntity(monster, 171, 128); createParticleErupt(monster, 791); serverSpawnMiscParticles(monster, PARTICLE_EFFECT_ERUPT, 791); } Stat* monsterStats = monster->getStats(); monster->yaw = my->yaw - PI; if ( monsterStats ) { strcpy(monsterStats->name, "skeleton sentinel"); magicLevel = 1; if ( stats[caster->skill[2]] ) { magicLevel = std::min(7, 1 + (stats[caster->skill[2]]->playerSummon2LVLHP >> 16) / 5); } monster->monsterAllySummonRank = magicLevel; forceFollower(*caster, *monster); monster->setEffect(EFF_STUNNED, true, 20, false); monster->monsterAllyIndex = caster->skill[2]; if ( multiplayer == SERVER ) { serverUpdateEntitySkill(monster, 42); // update monsterAllyIndex for clients. } if ( caster && caster->behavior == &actPlayer ) { steamAchievementClient(caster->skill[2], "BARONY_ACH_SKELETON_CREW"); } // change the color of the hit entity. monster->flags[USERFLAG2] = true; serverUpdateEntityFlag(monster, USERFLAG2); if ( monsterChangesColorWhenAlly(monsterStats) ) { int bodypart = 0; for ( node_t* node = (monster)->children.first; node != nullptr; node = node->next ) { if ( bodypart >= LIMB_HUMANOID_TORSO ) { Entity* tmp = (Entity*)node->element; if ( tmp ) { tmp->flags[USERFLAG2] = true; serverUpdateEntityFlag(tmp, USERFLAG2); } } ++bodypart; } } } } } } } } list_RemoveNode(my->mynode); return; } // calculate direction to caster and move. real_t tangent = atan2(my->skill[9] - my->y, my->skill[8] - my->x); real_t speed = dist / PARTICLE_LIFE; my->vel_x = speed * cos(tangent); my->vel_y = speed * sin(tangent); my->x += my->vel_x; my->y += my->vel_y; } else if ( my->skill[6] == SPELL_STEAL_WEAPON ) { Entity* entity = newEntity(-1, 1, map.entities, nullptr); //Item entity. entity->flags[INVISIBLE] = true; entity->flags[UPDATENEEDED] = true; entity->x = my->x; entity->y = my->y; entity->sizex = 4; entity->sizey = 4; entity->yaw = my->yaw; entity->vel_x = (rand() % 20 - 10) / 10.0; entity->vel_y = (rand() % 20 - 10) / 10.0; entity->vel_z = -.5; entity->flags[PASSABLE] = true; entity->flags[USERFLAG1] = true; // speeds up game when many items are dropped entity->behavior = &actItem; entity->skill[10] = my->skill[10]; entity->skill[11] = my->skill[11]; entity->skill[12] = my->skill[12]; entity->skill[13] = my->skill[13]; entity->skill[14] = my->skill[14]; entity->skill[15] = my->skill[15]; entity->itemOriginalOwner = my->itemOriginalOwner; entity->parent = 0; // no parent, no target to travel to. list_RemoveNode(my->mynode); return; } else if ( my->sprite == 977 ) { // calculate direction to caster and move. real_t tangent = atan2(my->fskill[5] - my->y, my->fskill[4] - my->x); real_t dist = sqrt(pow(my->x - my->fskill[4], 2) + pow(my->y - my->fskill[5], 2)); real_t speed = dist / std::max(PARTICLE_LIFE, 1); if ( dist < 4 || (abs(my->fskill[5]) < 0.001 && abs(my->fskill[4]) < 0.001) ) { // reached goal, or goal not set then spawn the item. Entity* entity = newEntity(-1, 1, map.entities, nullptr); //Item entity. entity->flags[INVISIBLE] = true; entity->flags[UPDATENEEDED] = true; entity->x = my->x; entity->y = my->y; entity->sizex = 4; entity->sizey = 4; entity->yaw = my->yaw; entity->vel_x = (rand() % 20 - 10) / 10.0; entity->vel_y = (rand() % 20 - 10) / 10.0; entity->vel_z = -.5; entity->flags[PASSABLE] = true; entity->flags[USERFLAG1] = true; // speeds up game when many items are dropped entity->behavior = &actItem; entity->skill[10] = my->skill[10]; entity->skill[11] = my->skill[11]; entity->skill[12] = my->skill[12]; entity->skill[13] = my->skill[13]; entity->skill[14] = my->skill[14]; entity->skill[15] = my->skill[15]; entity->itemOriginalOwner = 0; entity->parent = 0; list_RemoveNode(my->mynode); return; } my->vel_x = speed * cos(tangent); my->vel_y = speed * sin(tangent); my->x += my->vel_x; my->y += my->vel_y; } else { // no parent, no target to travel to. list_RemoveNode(my->mynode); return; } } if ( PARTICLE_LIFE < 0 ) { list_RemoveNode(my->mynode); return; } else { --PARTICLE_LIFE; } } void createParticleExplosionCharge(Entity* parent, int sprite, int particleCount, double scale) { if ( !parent ) { return; } for ( int c = 0; c < particleCount; c++ ) { // shoot drops to the sky Entity* entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = parent->x - 3 + rand() % 7; entity->y = parent->y - 3 + rand() % 7; entity->z = 0 + rand() % 190; if ( parent && parent->behavior == &actPlayer ) { entity->z /= 2; } entity->vel_z = -1; entity->yaw = (rand() % 360) * PI / 180.0; entity->particleDuration = entity->z + 10; /*if ( rand() % 5 > 0 ) { entity->vel_x = 0.5*cos(entity->yaw); entity->vel_y = 0.5*sin(entity->yaw); entity->particleDuration = 6; entity->z = 0; entity->vel_z = 0.5 *(-1 + rand() % 3); }*/ entity->scalex *= scale; entity->scaley *= scale; entity->scalez *= scale; entity->behavior = &actParticleExplosionCharge; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; entity->parent = parent->getUID(); if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); } int radius = STRIKERANGE * 2 / 3; real_t arc = PI / 16; int randScale = 1; for ( int c = 0; c < 128; c++ ) { // shoot drops to the sky Entity* entity = newEntity(670, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->yaw = 0 + c * arc; entity->x = parent->x + (radius * cos(entity->yaw));// - 2 + rand() % 5; entity->y = parent->y + (radius * sin(entity->yaw));// - 2 + rand() % 5; entity->z = radius + 150; entity->particleDuration = entity->z + rand() % 3; entity->vel_z = -1; if ( parent && parent->behavior == &actPlayer ) { entity->z /= 2; } randScale = 1 + rand() % 3; entity->scalex *= (scale / randScale); entity->scaley *= (scale / randScale); entity->scalez *= (scale / randScale); entity->behavior = &actParticleExplosionCharge; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; entity->parent = parent->getUID(); if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); if ( c > 0 && c % 16 == 0 ) { radius -= 2; } } } void actParticleExplosionCharge(Entity* my) { if ( PARTICLE_LIFE < 0 || (my->z < -4 && rand() % 4 == 0) || (ticks % 14 == 0 && uidToEntity(my->parent) == nullptr) ) { list_RemoveNode(my->mynode); } else { --PARTICLE_LIFE; my->yaw += 0.1; my->x += my->vel_x; my->y += my->vel_y; my->z += my->vel_z; my->scalex /= 0.99; my->scaley /= 0.99; my->scalez /= 0.99; //my->z -= 0.01; } return; } bool Entity::magicFallingCollision() { hit.entity = nullptr; if ( z <= -5 || fabs(vel_z) < 0.01 ) { // check if particle stopped or too high. return false; } if ( z >= 7.5 ) { return true; } if ( actmagicIsVertical == MAGIC_ISVERTICAL_Z ) { std::vector<list_t*> entLists = TileEntityList.getEntitiesWithinRadiusAroundEntity(this, 1); for ( std::vector<list_t*>::iterator it = entLists.begin(); it != entLists.end(); ++it ) { list_t* currentList = *it; node_t* node; for ( node = currentList->first; node != nullptr; node = node->next ) { Entity* entity = (Entity*)node->element; if ( entity ) { if ( entity == this ) { continue; } if ( entityInsideEntity(this, entity) && !entity->flags[PASSABLE] && (entity->getUID() != this->parent) ) { hit.entity = entity; //hit.side = HORIZONTAL; return true; } } } } } return false; } bool Entity::magicOrbitingCollision() { hit.entity = nullptr; if ( this->actmagicIsOrbiting == 2 ) { if ( this->ticks == 5 && this->actmagicOrbitHitTargetUID4 != 0 ) { // hit this target automatically Entity* tmp = uidToEntity(actmagicOrbitHitTargetUID4); if ( tmp ) { hit.entity = tmp; return true; } } if ( this->z < -8 || this->z > 3 ) { return false; } else if ( this->ticks >= 12 && this->ticks % 4 != 0 ) // check once every 4 ticks, after the missile is alive for a bit { return false; } } else if ( this->z < -10 ) { return false; } if ( this->actmagicIsOrbiting == 2 ) { if ( this->actmagicOrbitStationaryHitTarget >= 3 ) { return false; } } Entity* caster = uidToEntity(parent); std::vector<list_t*> entLists = TileEntityList.getEntitiesWithinRadiusAroundEntity(this, 1); for ( std::vector<list_t*>::iterator it = entLists.begin(); it != entLists.end(); ++it ) { list_t* currentList = *it; node_t* node; for ( node = currentList->first; node != NULL; node = node->next ) { Entity* entity = (Entity*)node->element; if ( entity == this ) { continue; } if ( entity->behavior != &actMonster && entity->behavior != &actPlayer && entity->behavior != &actDoor && entity->behavior != &::actChest && entity->behavior != &::actFurniture ) { continue; } if ( caster && !(svFlags & SV_FLAG_FRIENDLYFIRE) && caster->checkFriend(entity) ) { continue; } if ( actmagicIsOrbiting == 2 ) { if ( static_cast<Uint32>(actmagicOrbitHitTargetUID1) == entity->getUID() || static_cast<Uint32>(actmagicOrbitHitTargetUID2) == entity->getUID() || static_cast<Uint32>(actmagicOrbitHitTargetUID3) == entity->getUID() || static_cast<Uint32>(actmagicOrbitHitTargetUID4) == entity->getUID() ) { // we already hit these guys. continue; } } if ( entityInsideEntity(this, entity) && !entity->flags[PASSABLE] && (entity->getUID() != this->parent) ) { hit.entity = entity; if ( hit.entity->behavior == &actMonster || hit.entity->behavior == &actPlayer ) { if ( actmagicIsOrbiting == 2 ) { if ( actmagicOrbitHitTargetUID4 != 0 && caster && caster->behavior == &actPlayer ) { if ( actmagicOrbitHitTargetUID1 == 0 && actmagicOrbitHitTargetUID2 == 0 && actmagicOrbitHitTargetUID3 == 0 && hit.entity->behavior == &actMonster ) { steamStatisticUpdateClient(caster->skill[2], STEAM_STAT_VOLATILE, STEAM_STAT_INT, 1); } } ++actmagicOrbitStationaryHitTarget; if ( actmagicOrbitHitTargetUID1 == 0 ) { actmagicOrbitHitTargetUID1 = entity->getUID(); } else if ( actmagicOrbitHitTargetUID2 == 0 ) { actmagicOrbitHitTargetUID2 = entity->getUID(); } else if ( actmagicOrbitHitTargetUID3 == 0 ) { actmagicOrbitHitTargetUID3 = entity->getUID(); } } } return true; } } } return false; } void Entity::castFallingMagicMissile(int spellID, real_t distFromCaster, real_t angleFromCasterDirection, int heightDelay) { spell_t* spell = getSpellFromID(spellID); Entity* entity = castSpell(getUID(), spell, false, true); if ( entity ) { entity->x = x + distFromCaster * cos(yaw + angleFromCasterDirection); entity->y = y + distFromCaster * sin(yaw + angleFromCasterDirection); entity->z = -25 - heightDelay; double missile_speed = 4 * ((double)(((spellElement_t*)(spell->elements.first->element))->mana) / ((spellElement_t*)(spell->elements.first->element))->overload_multiplier); entity->vel_x = 0.0; entity->vel_y = 0.0; entity->vel_z = 0.5 * (missile_speed); entity->pitch = PI / 2; entity->actmagicIsVertical = MAGIC_ISVERTICAL_Z; spawnMagicEffectParticles(entity->x, entity->y, 0, 174); playSoundEntity(entity, spellGetCastSound(spell), 128); } } Entity* Entity::castOrbitingMagicMissile(int spellID, real_t distFromCaster, real_t angleFromCasterDirection, int duration) { spell_t* spell = getSpellFromID(spellID); Entity* entity = castSpell(getUID(), spell, false, true); if ( entity ) { if ( spellID == SPELL_FIREBALL ) { entity->sprite = 671; } else if ( spellID == SPELL_MAGICMISSILE ) { entity->sprite = 679; } entity->yaw = angleFromCasterDirection; entity->x = x + distFromCaster * cos(yaw + entity->yaw); entity->y = y + distFromCaster * sin(yaw + entity->yaw); entity->z = -2.5; double missile_speed = 4 * ((double)(((spellElement_t*)(spell->elements.first->element))->mana) / ((spellElement_t*)(spell->elements.first->element))->overload_multiplier); entity->vel_x = 0.0; entity->vel_y = 0.0; entity->actmagicIsOrbiting = 1; entity->actmagicOrbitDist = distFromCaster; entity->actmagicOrbitStartZ = entity->z; entity->z += 4 * sin(angleFromCasterDirection); entity->roll += (PI / 8) * (1 - abs(sin(angleFromCasterDirection))); entity->actmagicOrbitVerticalSpeed = 0.1; entity->actmagicOrbitVerticalDirection = 1; entity->actmagicOrbitLifetime = duration; entity->vel_z = entity->actmagicOrbitVerticalSpeed; playSoundEntity(entity, spellGetCastSound(spell), 128); //spawnMagicEffectParticles(entity->x, entity->y, 0, 174); } return entity; } Entity* castStationaryOrbitingMagicMissile(Entity* parent, int spellID, real_t centerx, real_t centery, real_t distFromCenter, real_t angleFromCenterDirection, int duration) { spell_t* spell = getSpellFromID(spellID); if ( !parent ) { Entity* entity = newEntity(-1, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = centerx; entity->y = centery; entity->z = 15; entity->vel_z = 0; //entity->yaw = (rand() % 360) * PI / 180.0; entity->skill[0] = 100; entity->skill[1] = 10; entity->behavior = &actParticleDot; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; entity->flags[INVISIBLE] = true; parent = entity; } Stat* stats = parent->getStats(); bool amplify = false; if ( stats ) { amplify = stats->EFFECTS[EFF_MAGICAMPLIFY]; stats->EFFECTS[EFF_MAGICAMPLIFY] = false; // temporary skip amplify effects otherwise recursion. } Entity* entity = castSpell(parent->getUID(), spell, false, true); if ( stats ) { stats->EFFECTS[EFF_MAGICAMPLIFY] = amplify; } if ( entity ) { if ( spellID == SPELL_FIREBALL ) { entity->sprite = 671; } else if ( spellID == SPELL_COLD ) { entity->sprite = 797; } else if ( spellID == SPELL_LIGHTNING ) { entity->sprite = 798; } else if ( spellID == SPELL_MAGICMISSILE ) { entity->sprite = 679; } entity->yaw = angleFromCenterDirection; entity->x = centerx; entity->y = centery; entity->z = 4; double missile_speed = 4 * ((double)(((spellElement_t*)(spell->elements.first->element))->mana) / ((spellElement_t*)(spell->elements.first->element))->overload_multiplier); entity->vel_x = 0.0; entity->vel_y = 0.0; entity->actmagicIsOrbiting = 2; entity->actmagicOrbitDist = distFromCenter; entity->actmagicOrbitStationaryCurrentDist = 0.0; entity->actmagicOrbitStartZ = entity->z; //entity->roll -= (PI / 8); entity->actmagicOrbitVerticalSpeed = -0.3; entity->actmagicOrbitVerticalDirection = 1; entity->actmagicOrbitLifetime = duration; entity->actmagicOrbitStationaryX = centerx; entity->actmagicOrbitStationaryY = centery; entity->vel_z = -0.1; playSoundEntity(entity, spellGetCastSound(spell), 128); //spawnMagicEffectParticles(entity->x, entity->y, 0, 174); } return entity; } void createParticleFollowerCommand(real_t x, real_t y, real_t z, int sprite) { Entity* entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. //entity->sizex = 1; //entity->sizey = 1; entity->x = x; entity->y = y; entity->z = 7.5; entity->vel_z = -0.8; //entity->yaw = (rand() % 360) * PI / 180.0; entity->skill[0] = 50; entity->behavior = &actParticleFollowerCommand; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); // boosty boost for ( int c = 0; c < 10; c++ ) { entity = newEntity(sprite, 1, map.entities, nullptr); //Particle entity. entity->x = x - 4 + rand() % 9; entity->y = y - 4 + rand() % 9; entity->z = z - 0 + rand() % 11; entity->scalex = 0.7; entity->scaley = 0.7; entity->scalez = 0.7; entity->sizex = 1; entity->sizey = 1; entity->yaw = (rand() % 360) * PI / 180.f; entity->flags[PASSABLE] = true; entity->flags[BRIGHT] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; entity->behavior = &actMagicParticle; entity->vel_z = -1; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); } } void actParticleFollowerCommand(Entity* my) { if ( PARTICLE_LIFE < 0 ) { list_RemoveNode(my->mynode); return; } else { --PARTICLE_LIFE; my->z += my->vel_z; my->yaw += my->vel_z * 2; if ( my->z < -3 ) { my->vel_z *= 0.9; } } } void actParticleShadowTag(Entity* my) { if ( PARTICLE_LIFE < 0 ) { // once off, fire some erupt dot particles at end of life. real_t yaw = 0; int numParticles = 8; for ( int c = 0; c < 8; c++ ) { Entity* entity = newEntity(871, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = my->x; entity->y = my->y; entity->z = -10 + my->fskill[0]; entity->yaw = yaw; entity->vel_x = 0.2; entity->vel_y = 0.2; entity->vel_z = -0.02; entity->skill[0] = 100; entity->skill[1] = 0; // direction. entity->fskill[0] = 0.1; entity->behavior = &actParticleErupt; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); yaw += 2 * PI / numParticles; } if ( multiplayer != CLIENT ) { Uint32 casterUid = static_cast<Uint32>(my->skill[2]); Entity* caster = uidToEntity(casterUid); Entity* parent = uidToEntity(my->parent); if ( caster && caster->behavior == &actPlayer && parent ) { // caster is alive, notify they lost their mark Uint32 color = SDL_MapRGB(mainsurface->format, 255, 255, 255); if ( parent->getStats() ) { messagePlayerMonsterEvent(caster->skill[2], color, *(parent->getStats()), language[3466], language[3467], MSG_COMBAT); parent->setEffect(EFF_SHADOW_TAGGED, false, 0, true); } } } my->removeLightField(); list_RemoveNode(my->mynode); return; } else { --PARTICLE_LIFE; my->removeLightField(); my->light = lightSphereShadow(my->x / 16, my->y / 16, 3, 92); Entity* parent = uidToEntity(my->parent); if ( parent ) { my->x = parent->x; my->y = parent->y; } if ( my->skill[1] >= 50 ) // stop changing size { real_t maxspeed = .03; real_t acceleration = 0.95; if ( my->skill[3] == 0 ) { // once off, store the normal height of the particle. my->skill[3] = 1; my->vel_z = -maxspeed; } if ( my->skill[1] % 5 == 0 ) { Uint32 casterUid = static_cast<Uint32>(my->skill[2]); Entity* caster = uidToEntity(casterUid); if ( caster && caster->creatureShadowTaggedThisUid == my->parent && parent ) { // caster is alive, and they have still marked the parent this particle is following. } else { PARTICLE_LIFE = 0; } } if ( PARTICLE_LIFE > 0 && PARTICLE_LIFE < TICKS_PER_SECOND ) { if ( parent && parent->getStats() && parent->getStats()->EFFECTS[EFF_SHADOW_TAGGED] ) { ++PARTICLE_LIFE; } } // bob up and down movement. if ( my->skill[3] == 1 ) { my->vel_z *= acceleration; if ( my->vel_z > -0.005 ) { my->skill[3] = 2; my->vel_z = -0.005; } my->z += my->vel_z; } else if ( my->skill[3] == 2 ) { my->vel_z /= acceleration; if ( my->vel_z < -maxspeed ) { my->skill[3] = 3; my->vel_z = -maxspeed; } my->z -= my->vel_z; } else if ( my->skill[3] == 3 ) { my->vel_z *= acceleration; if ( my->vel_z > -0.005 ) { my->skill[3] = 4; my->vel_z = -0.005; } my->z -= my->vel_z; } else if ( my->skill[3] == 4 ) { my->vel_z /= acceleration; if ( my->vel_z < -maxspeed ) { my->skill[3] = 1; my->vel_z = -maxspeed; } my->z += my->vel_z; } my->yaw += 0.01; } else { my->z += my->vel_z; my->yaw += my->vel_z * 2; if ( my->scalex < 0.5 ) { my->scalex += 0.02; } else { my->scalex = 0.5; } my->scaley = my->scalex; my->scalez = my->scalex; if ( my->z < -3 + my->fskill[0] ) { my->vel_z *= 0.9; } } // once off, fire some erupt dot particles at start. if ( my->skill[1] == 0 ) { real_t yaw = 0; int numParticles = 8; for ( int c = 0; c < 8; c++ ) { Entity* entity = newEntity(871, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = my->x; entity->y = my->y; entity->z = -10 + my->fskill[0]; entity->yaw = yaw; entity->vel_x = 0.2; entity->vel_y = 0.2; entity->vel_z = -0.02; entity->skill[0] = 100; entity->skill[1] = 0; // direction. entity->fskill[0] = 0.1; entity->behavior = &actParticleErupt; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); yaw += 2 * PI / numParticles; } } ++my->skill[1]; } } void createParticleShadowTag(Entity* parent, Uint32 casterUid, int duration) { if ( !parent ) { return; } Entity* entity = newEntity(870, 1, map.entities, nullptr); //Particle entity. entity->parent = parent->getUID(); entity->x = parent->x; entity->y = parent->y; entity->z = 7.5; entity->fskill[0] = parent->z; entity->vel_z = -0.8; entity->scalex = 0.1; entity->scaley = 0.1; entity->scalez = 0.1; entity->yaw = (rand() % 360) * PI / 180.0; entity->skill[0] = duration; entity->skill[1] = 0; entity->skill[2] = static_cast<Sint32>(casterUid); entity->skill[3] = 0; entity->behavior = &actParticleShadowTag; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); } void createParticleCharmMonster(Entity* parent) { if ( !parent ) { return; } Entity* entity = newEntity(685, 1, map.entities, nullptr); //Particle entity. //entity->sizex = 1; //entity->sizey = 1; entity->parent = parent->getUID(); entity->x = parent->x; entity->y = parent->y; entity->z = 7.5; entity->vel_z = -0.8; entity->scalex = 0.1; entity->scaley = 0.1; entity->scalez = 0.1; entity->yaw = (rand() % 360) * PI / 180.0; entity->skill[0] = 45; entity->behavior = &actParticleCharmMonster; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); } void actParticleCharmMonster(Entity* my) { if ( PARTICLE_LIFE < 0 ) { real_t yaw = 0; int numParticles = 8; for ( int c = 0; c < 8; c++ ) { Entity* entity = newEntity(576, 1, map.entities, nullptr); //Particle entity. entity->sizex = 1; entity->sizey = 1; entity->x = my->x; entity->y = my->y; entity->z = -10; entity->yaw = yaw; entity->vel_x = 0.2; entity->vel_y = 0.2; entity->vel_z = -0.02; entity->skill[0] = 100; entity->skill[1] = 0; // direction. entity->fskill[0] = 0.1; entity->behavior = &actParticleErupt; entity->flags[PASSABLE] = true; entity->flags[NOUPDATE] = true; entity->flags[UNCLICKABLE] = true; if ( multiplayer != CLIENT ) { entity_uids--; } entity->setUID(-3); yaw += 2 * PI / numParticles; } list_RemoveNode(my->mynode); return; } else { --PARTICLE_LIFE; Entity* parent = uidToEntity(my->parent); if ( parent ) { my->x = parent->x; my->y = parent->y; } my->z += my->vel_z; my->yaw += my->vel_z * 2; if ( my->scalex < 0.8 ) { my->scalex += 0.02; } else { my->scalex = 0.8; } my->scaley = my->scalex; my->scalez = my->scalex; if ( my->z < -3 ) { my->vel_z *= 0.9; } } } void spawnMagicTower(Entity* parent, real_t x, real_t y, int spellID, Entity* autoHitTarget, bool castedSpell) { bool autoHit = false; if ( autoHitTarget && (autoHitTarget->behavior == &actPlayer || autoHitTarget->behavior == &actMonster) ) { autoHit = true; if ( parent ) { if ( !(svFlags & SV_FLAG_FRIENDLYFIRE) && parent->checkFriend(autoHitTarget) ) { autoHit = false; // don't hit friendlies } } } Entity* orbit = castStationaryOrbitingMagicMissile(parent, spellID, x, y, 16.0, 0.0, 40); if ( orbit ) { if ( castedSpell ) { orbit->actmagicOrbitCastFromSpell = 1; } if ( autoHit ) { orbit->actmagicOrbitHitTargetUID4 = autoHitTarget->getUID(); } } orbit = castStationaryOrbitingMagicMissile(parent, spellID, x, y, 16.0, 2 * PI / 3, 40); if ( orbit ) { if ( castedSpell ) { orbit->actmagicOrbitCastFromSpell = 1; } if ( autoHit ) { orbit->actmagicOrbitHitTargetUID4 = autoHitTarget->getUID(); } } orbit = castStationaryOrbitingMagicMissile(parent, spellID, x, y, 16.0, 4 * PI / 3, 40); if ( orbit ) { if ( castedSpell ) { orbit->actmagicOrbitCastFromSpell = 1; } if ( autoHit ) { orbit->actmagicOrbitHitTargetUID4 = autoHitTarget->getUID(); } } spawnMagicEffectParticles(x, y, 0, 174); spawnExplosion(x, y, -4 + rand() % 8); } void magicDig(Entity* parent, Entity* projectile, int numRocks, int randRocks) { if ( !hit.entity ) { if ( map.tiles[(int)(OBSTACLELAYER + hit.mapy * MAPLAYERS + hit.mapx * MAPLAYERS * map.height)] != 0 ) { if ( parent && parent->behavior == &actPlayer && MFLAG_DISABLEDIGGING ) { Uint32 color = SDL_MapRGB(mainsurface->format, 255, 0, 255); messagePlayerColor(parent->skill[2], color, language[2380]); // disabled digging. playSoundPos(hit.x, hit.y, 66, 128); // strike wall } else { if ( projectile ) { playSoundEntity(projectile, 66, 128); playSoundEntity(projectile, 67, 128); } // spawn several rock items if ( randRocks <= 0 ) { randRocks = 1; } int i = numRocks + rand() % randRocks; for ( int c = 0; c < i; c++ ) { Entity* rock = newEntity(-1, 1, map.entities, nullptr); //Rock entity. rock->flags[INVISIBLE] = true; rock->flags[UPDATENEEDED] = true; rock->x = hit.mapx * 16 + 4 + rand() % 8; rock->y = hit.mapy * 16 + 4 + rand() % 8; rock->z = -6 + rand() % 12; rock->sizex = 4; rock->sizey = 4; rock->yaw = rand() % 360 * PI / 180; rock->vel_x = (rand() % 20 - 10) / 10.0; rock->vel_y = (rand() % 20 - 10) / 10.0; rock->vel_z = -.25 - (rand() % 5) / 10.0; rock->flags[PASSABLE] = true; rock->behavior = &actItem; rock->flags[USERFLAG1] = true; // no collision: helps performance rock->skill[10] = GEM_ROCK; // type rock->skill[11] = WORN; // status rock->skill[12] = 0; // beatitude rock->skill[13] = 1; // count rock->skill[14] = 0; // appearance rock->skill[15] = 1; // identified } if ( map.tiles[(int)(OBSTACLELAYER + hit.mapy * MAPLAYERS + hit.mapx * MAPLAYERS * map.height)] >= 41 && map.tiles[(int)(OBSTACLELAYER + hit.mapy * MAPLAYERS + hit.mapx * MAPLAYERS * map.height)] <= 49 ) { steamAchievementEntity(parent, "BARONY_ACH_BAD_REVIEW"); } map.tiles[(int)(OBSTACLELAYER + hit.mapy * MAPLAYERS + hit.mapx * MAPLAYERS * map.height)] = 0; // send wall destroy info to clients for ( int c = 1; c < MAXPLAYERS; c++ ) { if ( client_disconnected[c] == true ) { continue; } strcpy((char*)net_packet->data, "WALD"); SDLNet_Write16((Uint16)hit.mapx, &net_packet->data[4]); SDLNet_Write16((Uint16)hit.mapy, &net_packet->data[6]); net_packet->address.host = net_clients[c - 1].host; net_packet->address.port = net_clients[c - 1].port; net_packet->len = 8; sendPacketSafe(net_sock, -1, net_packet, c - 1); } generatePathMaps(); } } } else if ( hit.entity->behavior == &actBoulder ) { int i = numRocks + rand() % 4; // spawn several rock items //TODO: This should really be its own function. int c; for ( c = 0; c < i; c++ ) { Entity* entity = newEntity(-1, 1, map.entities, nullptr); //Rock entity. entity->flags[INVISIBLE] = true; entity->flags[UPDATENEEDED] = true; entity->x = hit.entity->x - 4 + rand() % 8; entity->y = hit.entity->y - 4 + rand() % 8; entity->z = -6 + rand() % 12; entity->sizex = 4; entity->sizey = 4; entity->yaw = rand() % 360 * PI / 180; entity->vel_x = (rand() % 20 - 10) / 10.0; entity->vel_y = (rand() % 20 - 10) / 10.0; entity->vel_z = -.25 - (rand() % 5) / 10.0; entity->flags[PASSABLE] = true; entity->behavior = &actItem; entity->flags[USERFLAG1] = true; // no collision: helps performance entity->skill[10] = GEM_ROCK; // type entity->skill[11] = WORN; // status entity->skill[12] = 0; // beatitude entity->skill[13] = 1; // count entity->skill[14] = 0; // appearance entity->skill[15] = false; // identified } double ox = hit.entity->x; double oy = hit.entity->y; boulderLavaOrArcaneOnDestroy(hit.entity, hit.entity->sprite, nullptr); // destroy the boulder playSoundEntity(hit.entity, 67, 128); list_RemoveNode(hit.entity->mynode); if ( parent ) { if ( parent->behavior == &actPlayer ) { messagePlayer(parent->skill[2], language[405]); } } // on sokoban, destroying boulders spawns scorpions if ( !strcmp(map.name, "Sokoban") ) { Entity* monster = nullptr; if ( rand() % 2 == 0 ) { monster = summonMonster(INSECTOID, ox, oy); } else { monster = summonMonster(SCORPION, ox, oy); } if ( monster ) { int c; for ( c = 0; c < MAXPLAYERS; c++ ) { Uint32 color = SDL_MapRGB(mainsurface->format, 255, 128, 0); messagePlayerColor(c, color, language[406]); } } boulderSokobanOnDestroy(false); } } }
29.783274
282
0.577248
PegasusEpsilon
5fa6c1fc9fd0f0600e4fc378eb3b90af03ed94e3
1,148
cc
C++
src/rpc/message_channel.cc
epfl-labos/POCC
6d564356105db6fb5163f8bfa6469ae8ab04852d
[ "Apache-2.0" ]
2
2019-04-12T07:07:18.000Z
2020-08-06T12:37:23.000Z
src/rpc/message_channel.cc
epfl-labos/POCC
6d564356105db6fb5163f8bfa6469ae8ab04852d
[ "Apache-2.0" ]
null
null
null
src/rpc/message_channel.cc
epfl-labos/POCC
6d564356105db6fb5163f8bfa6469ae8ab04852d
[ "Apache-2.0" ]
null
null
null
/* * POCC * * Copyright 2017 Operating Systems Laboratory EPFL * * 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. */ #include "rpc/message_channel.h" namespace scc { MessageChannel::MessageChannel(std::string host, unsigned short port) : _host(host), _port(port), _socket(NULL) { // create a socket and connect to the remote server _socket = new TCPSocket(host, port); } // A socket should not be used in multiple message channels. MessageChannel::MessageChannel(TCPSocket* socket) : _host(), _port(-1), _socket(socket) { } MessageChannel::~MessageChannel() { delete _socket; } }
24.956522
75
0.705575
epfl-labos
5fbabb6d06829191d76a03b0657e53f2ef2c679f
4,178
cpp
C++
Common/Parse.cpp
d0liver/realpolitik
3aa6d7238f3eb77494637861813206295f44f6e0
[ "Artistic-1.0" ]
null
null
null
Common/Parse.cpp
d0liver/realpolitik
3aa6d7238f3eb77494637861813206295f44f6e0
[ "Artistic-1.0" ]
null
null
null
Common/Parse.cpp
d0liver/realpolitik
3aa6d7238f3eb77494637861813206295f44f6e0
[ "Artistic-1.0" ]
null
null
null
//--------------------------------------------------------------------------------- // Copyright (C) 2001 James M. Van Verth // // This program is free software; you can redistribute it and/or // modify it under the terms of the Clarified Artistic License. // In addition, to meet copyright restrictions you must also own at // least one copy of any of the following board games: // Diplomacy, Deluxe Diplomacy, Colonial Diplomacy or Machiavelli. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // Clarified Artistic License for more details. // // You should have received a copy of the Clarified Artistic License // along with this program; if not, write to the Open Source Initiative // at www.opensource.org //--------------------------------------------------------------------------------- #include <ctype.h> #include "MapData.h" #include "Parse.h" #include "Game.h" /* #include "order.h" #include "fails.h" */ int emptyline (char *s) { if (s == NULL) return 1; while (isspace(*s)) s++; if (*s == '\000') return 1; return 0; } void uppercase (char *s) { if (s == NULL) return; for (; *s; s++) if (islower(*s)) *s = toupper(*s); } void capitalize(char *s) { if (s == NULL) return; if (islower(*s)) *s = toupper(*s); s++; for (; *s; s++) if (isupper(*s)) *s = tolower(*s); } bool strnsame(char *s1, char *s2, int n) { bool same; if (*s1 == NULL || *s2 == NULL) return false; same = 1; for (; *s1 && *s2 && n; s1++, s2++, n--) { if (*s1 != *s2 && toupper(*s1) != *s2 && *s1 != toupper(*s2)) { same = 0; break; } } if (n != 0) return 0; return same; } char * samestring(const char *line, const char *key) { if (line == NULL || key == NULL) return NULL; while (*line != '\0' && (*line == *key || toupper(*line) == *key || *line == toupper(*key))) { line++; key++; } if ( *key == '\0' ) return (char*)line; else return NULL; } void appendtabs (char *s) { if (s == NULL) return; /* strncat(s, "\t\t\t\t\t", 5 - (strlen(s))/TABLEN); */ } /* return pointer to beginning of next word in string s */ /* assumes there might be leading blanks */ char * skipword (char *s) { if (s == NULL) return s; s = skipspace(s); /* skip leading blanks */ while (isgraph(*s)) s++; /* skip word */ s = skipspace(s); /* skip trailing blanks */ if (s == NULL || *s == '\0') /* fell off the end? */ return NULL; return s; } char * skipspace (char *s) { if (s == NULL) return s; while (isspace(*s) || *s == ',' || *s == '.' || *s == ':') s++; if (*s == '\0') return NULL; return s; } /* returns length of next word in string */ /* assumes no leading blanks */ short wordlen (char *s) { char *sp = s; if (s == NULL) return 0; while (isgraph(*sp)) sp++; return sp-s; } /* returns pointer to remainder of s if it's a comment */ /* skips leading blanks */ char * findcomment (char *s) { s = skipspace(s); if (s == NULL) return NULL; if (*s == '#') return s+1; else if (*s == '/' && *(s+1) == '/') return s+2; else return NULL; } /* return text stripped of tabs and deal with comments */ /* affects original text where comments are concerned. */ char * striptext (char *orig) { char *copy, *comment = NULL; copy = skipspace(orig); if (wordlen(copy) == 0) return NULL; while (*copy) { /* strip tab */ if (*copy == '\t') *copy = ' '; /* deal w/comment */ else if ((comment = findcomment(copy)) != NULL) { *copy = '\0'; /* order is everything up to this comment */ break; } copy++; } return comment; }
19.895238
84
0.497367
d0liver
5fbd26a426fe8d79e8aa012fd3079f39a924a940
6,259
cpp
C++
src/libraries/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.cpp
MrAwesomeRocks/caelus-cml
55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7
[ "mpich2" ]
null
null
null
src/libraries/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.cpp
MrAwesomeRocks/caelus-cml
55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7
[ "mpich2" ]
null
null
null
src/libraries/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.cpp
MrAwesomeRocks/caelus-cml
55b6dc5ba47d0e95c07412d9446ac72ac11d7fd7
[ "mpich2" ]
null
null
null
/*---------------------------------------------------------------------------*\ Copyright (C) 2011-2015 OpenFOAM Foundation ------------------------------------------------------------------------------- License This file is part of CAELUS. CAELUS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. CAELUS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with CAELUS. If not, see <http://www.gnu.org/licenses/>. \*---------------------------------------------------------------------------*/ #include "cloudSolution.hpp" #include "Time.hpp" #include "localEulerDdtScheme.hpp" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // CML::cloudSolution::cloudSolution(const fvMesh& mesh, const dictionary& dict) : mesh_(mesh), dict_(dict), active_(dict.lookup("active")), transient_(false), calcFrequency_(1), maxCo_(0.3), iter_(1), trackTime_(0), coupled_(false), cellValueSourceCorrection_(false), maxTrackTime_(0), resetSourcesOnStartup_(true), schemes_() { if (active_) { read(); } } CML::cloudSolution::cloudSolution ( const cloudSolution& cs ) : mesh_(cs.mesh_), dict_(cs.dict_), active_(cs.active_), transient_(cs.transient_), calcFrequency_(cs.calcFrequency_), maxCo_(cs.maxCo_), iter_(cs.iter_), trackTime_(cs.trackTime_), coupled_(cs.coupled_), cellValueSourceCorrection_(cs.cellValueSourceCorrection_), maxTrackTime_(cs.maxTrackTime_), resetSourcesOnStartup_(cs.resetSourcesOnStartup_), schemes_(cs.schemes_) {} CML::cloudSolution::cloudSolution ( const fvMesh& mesh ) : mesh_(mesh), dict_(dictionary::null), active_(false), transient_(false), calcFrequency_(0), maxCo_(GREAT), iter_(0), trackTime_(0), coupled_(false), cellValueSourceCorrection_(false), maxTrackTime_(0), resetSourcesOnStartup_(false), schemes_() {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // CML::cloudSolution::~cloudSolution() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void CML::cloudSolution::read() { // For transient runs the Lagrangian tracking may be transient or steady transient_ = dict_.lookupOrDefault("transient", false); // For LTS and steady-state runs the Lagrangian tracking cannot be transient if (transient_) { if (fv::localEulerDdt::enabled(mesh_)) { IOWarningInFunction(dict_) << "Transient tracking is not supported for LTS" " simulations, switching to steady state tracking." << endl; transient_ = false; } if (mesh_.steady()) { IOWarningInFunction(dict_) << "Transient tracking is not supported for steady-state" " simulations, switching to steady state tracking." << endl; transient_ = false; } } dict_.lookup("coupled") >> coupled_; dict_.lookup("cellValueSourceCorrection") >> cellValueSourceCorrection_; dict_.readIfPresent("maxCo", maxCo_); if (steadyState()) { dict_.lookup("calcFrequency") >> calcFrequency_; dict_.lookup("maxTrackTime") >> maxTrackTime_; if (coupled_) { dict_.subDict("sourceTerms").lookup("resetOnStartup") >> resetSourcesOnStartup_; } } if (coupled_) { const dictionary& schemesDict(dict_.subDict("sourceTerms").subDict("schemes")); wordList vars(schemesDict.toc()); schemes_.setSize(vars.size()); forAll(vars, i) { // read solution variable name schemes_[i].first() = vars[i]; // set semi-implicit (1) explicit (0) flag Istream& is = schemesDict.lookup(vars[i]); const word scheme(is); if (scheme == "semiImplicit") { schemes_[i].second().first() = true; } else if (scheme == "explicit") { schemes_[i].second().first() = false; } else { FatalErrorInFunction << "Invalid scheme " << scheme << ". Valid schemes are " << "explicit and semiImplicit" << exit(FatalError); } // read under-relaxation factor is >> schemes_[i].second().second(); } } } CML::scalar CML::cloudSolution::relaxCoeff(const word& fieldName) const { forAll(schemes_, i) { if (fieldName == schemes_[i].first()) { return schemes_[i].second().second(); } } FatalErrorInFunction << "Field name " << fieldName << " not found in schemes" << abort(FatalError); return 1; } bool CML::cloudSolution::semiImplicit(const word& fieldName) const { forAll(schemes_, i) { if (fieldName == schemes_[i].first()) { return schemes_[i].second().first(); } } FatalErrorInFunction << "Field name " << fieldName << " not found in schemes" << abort(FatalError); return false; } bool CML::cloudSolution::solveThisStep() const { return active_ && (mesh_.time().timeIndex() % calcFrequency_ == 0); } bool CML::cloudSolution::canEvolve() { if (transient_) { trackTime_ = mesh_.time().deltaTValue(); } else { trackTime_ = maxTrackTime_; } return solveThisStep(); } bool CML::cloudSolution::output() const { return active_ && mesh_.time().outputTime(); } // ************************************************************************* //
25.546939
80
0.550407
MrAwesomeRocks
5fbd79ada3d0d2bc36c3c2ed324f781e626e4c5e
2,069
cpp
C++
src/ext/transport/FastRTPS/FastRTPSTransport.cpp
r-kurose/OpenRTM-aist
258c922c55a97c6d1265dbf45e1e8b2ea29b2d86
[ "RSA-MD" ]
15
2019-01-08T15:34:04.000Z
2022-03-01T08:36:17.000Z
src/ext/transport/FastRTPS/FastRTPSTransport.cpp
r-kurose/OpenRTM-aist
258c922c55a97c6d1265dbf45e1e8b2ea29b2d86
[ "RSA-MD" ]
448
2018-12-27T03:13:56.000Z
2022-03-24T09:57:03.000Z
src/ext/transport/FastRTPS/FastRTPSTransport.cpp
r-kurose/OpenRTM-aist
258c922c55a97c6d1265dbf45e1e8b2ea29b2d86
[ "RSA-MD" ]
31
2018-12-26T04:34:22.000Z
2021-11-25T04:39:51.000Z
// -*- C++ -*- /*! * @file FastRTPSOutPort.cpp * @brief FastRTPSOutPort class * @date $Date: 2019-01-31 03:08:03 $ * @author Nobuhiko Miyamoto <n-miyamoto@aist.go.jp> * * Copyright (C) 2019 * Nobuhiko Miyamoto * Robot Innovation Research Center, * National Institute of * Advanced Industrial Science and Technology (AIST), Japan * * All rights reserved. * * */ #include "FastRTPSTransport.h" #include "FastRTPSOutPort.h" #include "FastRTPSInPort.h" #include "FastRTPSManager.h" namespace FastRTPSRTC { ManagerActionListener::ManagerActionListener() { } ManagerActionListener::~ManagerActionListener() { } void ManagerActionListener::preShutdown() { } void ManagerActionListener::postShutdown() { RTC::FastRTPSManager::shutdown_global(); } void ManagerActionListener::postReinit() { } void ManagerActionListener::preReinit() { } } extern "C" { /*! * @if jp * @brief モジュール初期化関数 * @else * @brief Module initialization * @endif */ void FastRTPSTransportInit(RTC::Manager* manager) { { RTC::InPortProviderFactory& factory(RTC::InPortProviderFactory::instance()); factory.addFactory("fast-rtps", ::coil::Creator< ::RTC::InPortProvider, ::RTC::FastRTPSInPort>, ::coil::Destructor< ::RTC::InPortProvider, ::RTC::FastRTPSInPort>); } { RTC::InPortConsumerFactory& factory(RTC::InPortConsumerFactory::instance()); factory.addFactory("fast-rtps", ::coil::Creator< ::RTC::InPortConsumer, ::RTC::FastRTPSOutPort>, ::coil::Destructor< ::RTC::InPortConsumer, ::RTC::FastRTPSOutPort>); } FastRTPSRTC::ManagerActionListener *listener = new FastRTPSRTC::ManagerActionListener(); manager->addManagerActionListener(listener); } }
21.778947
92
0.58144
r-kurose
5fbd9bb373456e797a3f5810c8838a8eb569a6ab
3,955
tpp
C++
xolotl/core/include/xolotl/core/network/impl/NucleationReaction.tpp
ORNL-Fusion/xolotl
993434bea0d3bca439a733a12af78034c911690c
[ "BSD-3-Clause" ]
13
2018-06-13T18:08:57.000Z
2021-09-30T02:39:01.000Z
xolotl/core/include/xolotl/core/network/impl/NucleationReaction.tpp
ORNL-Fusion/xolotl
993434bea0d3bca439a733a12af78034c911690c
[ "BSD-3-Clause" ]
97
2018-02-14T15:24:08.000Z
2022-03-29T16:29:48.000Z
xolotl/core/include/xolotl/core/network/impl/NucleationReaction.tpp
ORNL-Fusion/xolotl
993434bea0d3bca439a733a12af78034c911690c
[ "BSD-3-Clause" ]
18
2018-02-13T20:36:03.000Z
2022-01-04T14:54:16.000Z
#pragma once namespace xolotl { namespace core { namespace network { template <typename TNetwork, typename TDerived> KOKKOS_INLINE_FUNCTION NucleationReaction<TNetwork, TDerived>::NucleationReaction( ReactionDataRef reactionData, ClusterDataRef clusterData, IndexType reactionId, IndexType cluster0, IndexType cluster1) : Superclass(reactionData, clusterData, reactionId), _reactant(cluster0), _product(cluster1) { this->initialize(); } template <typename TNetwork, typename TDerived> KOKKOS_INLINE_FUNCTION NucleationReaction<TNetwork, TDerived>::NucleationReaction( ReactionDataRef reactionData, ClusterDataRef clusterData, IndexType reactionId, const detail::ClusterSet& clusterSet) : NucleationReaction(reactionData, clusterData, reactionId, clusterSet.cluster0, clusterSet.cluster1) { } template <typename TNetwork, typename TDerived> KOKKOS_INLINE_FUNCTION double NucleationReaction<TNetwork, TDerived>::computeRate(IndexType gridIndex) { // We say there are 25 bubbles created per fission fragments and there // are 2 fission fragments per fission double rate = 50.0 * this->_clusterData.fissionRate(); return rate; } template <typename TNetwork, typename TDerived> KOKKOS_INLINE_FUNCTION void NucleationReaction<TNetwork, TDerived>::computeConnectivity( const Connectivity& connectivity) { // The reactant connects with the reactant this->addConnectivity(_reactant, _reactant, connectivity); // The product connects with the reactant this->addConnectivity(_product, _reactant, connectivity); } template <typename TNetwork, typename TDerived> KOKKOS_INLINE_FUNCTION void NucleationReaction<TNetwork, TDerived>::computeReducedConnectivity( const Connectivity& connectivity) { // The reactant connects with the reactant this->addConnectivity(_reactant, _reactant, connectivity); // The product connects with the reactant if (_product == _reactant) this->addConnectivity(_product, _reactant, connectivity); } template <typename TNetwork, typename TDerived> KOKKOS_INLINE_FUNCTION void NucleationReaction<TNetwork, TDerived>::computeFlux( ConcentrationsView concentrations, FluxesView fluxes, IndexType gridIndex) { // Get the single concentration to know in which regime we are double singleConc = concentrations(_reactant); // Update the concentrations if (singleConc > 2.0 * this->_rate(gridIndex)) { Kokkos::atomic_sub(&fluxes(_reactant), 2.0 * this->_rate(gridIndex)); Kokkos::atomic_add(&fluxes(_product), this->_rate(gridIndex)); } else { Kokkos::atomic_sub(&fluxes(_reactant), singleConc); Kokkos::atomic_add(&fluxes(_product), singleConc / 2.0); } } template <typename TNetwork, typename TDerived> KOKKOS_INLINE_FUNCTION void NucleationReaction<TNetwork, TDerived>::computePartialDerivatives( ConcentrationsView concentrations, Kokkos::View<double*> values, Connectivity connectivity, IndexType gridIndex) { // Get the single concentration to know in which regime we are double singleConc = concentrations(_reactant); // Update the partials if (singleConc > 2.0 * this->_rate(gridIndex)) { // Nothing } else { Kokkos::atomic_sub(&values(connectivity(_reactant, _reactant)), 1.0); Kokkos::atomic_add(&values(connectivity(_product, _reactant)), 0.5); } } template <typename TNetwork, typename TDerived> KOKKOS_INLINE_FUNCTION void NucleationReaction<TNetwork, TDerived>::computeReducedPartialDerivatives( ConcentrationsView concentrations, Kokkos::View<double*> values, Connectivity connectivity, IndexType gridIndex) { // Get the single concentration to know in which regime we are double singleConc = concentrations(_reactant); // Update the partials if (singleConc > 2.0 * this->_rate(gridIndex)) { // Nothing } else { Kokkos::atomic_sub(&values(connectivity(_reactant, _reactant)), 1.0); if (_product == _reactant) Kokkos::atomic_add(&values(connectivity(_product, _reactant)), 0.5); } } } // namespace network } // namespace core } // namespace xolotl
30.19084
75
0.786599
ORNL-Fusion
5fbffc8f4e6528e19ec06dd7271bb63304fe0285
504
cpp
C++
EU4toV2/Source/V2World/Output/outLeader.cpp
GregB76/EU4toVic2
0a8822101a36a16036fdc315e706d113d9231101
[ "MIT" ]
42
2018-12-22T03:59:43.000Z
2022-02-03T10:45:42.000Z
EU4toV2/Source/V2World/Output/outLeader.cpp
IhateTrains/EU4toVic2
061f5e1a0bc1a1f3b54bdfe471b501260149b56b
[ "MIT" ]
336
2018-12-22T17:15:27.000Z
2022-03-02T11:19:32.000Z
EU4toV2/Source/V2World/Output/outLeader.cpp
klorpa/EU4toVic2
e3068eb2aa459f884c1929f162d0047a4cb5f4d4
[ "MIT" ]
56
2018-12-22T19:13:23.000Z
2022-01-01T23:08:53.000Z
#include "output.h" std::ostream& V2::operator<<(std::ostream& output, const Leader& leader) { output << "leader = {\n"; output << "\tname=\"" << leader.name << "\"\n"; output << "\tdate=\"" << leader.activationDate << "\"\n"; if (leader.isLand) { output << "\ttype=land\n"; } else { output << "\ttype=sea\n"; } output << "\tpersonality=\"" << leader.personality << "\"\n"; output << "\tbackground=\"" << leader.background << "\"\n"; output << "}\n"; output << "\n"; return output; }
21.913043
72
0.553571
GregB76
5fc29ad14d6a097ca6f9bd00e680d43245b810a2
3,387
cpp
C++
capabilities/DavsClient/acsdkDavsClient/test/DavsEndpointHandlerV3Test.cpp
immortalkrazy/avs-device-sdk
703b06188eae146af396f58be4e47442d7ce5b1e
[ "Apache-2.0" ]
1
2018-07-09T16:44:28.000Z
2018-07-09T16:44:28.000Z
capabilities/DavsClient/acsdkDavsClient/test/DavsEndpointHandlerV3Test.cpp
immortalkrazy/avs-device-sdk
703b06188eae146af396f58be4e47442d7ce5b1e
[ "Apache-2.0" ]
null
null
null
capabilities/DavsClient/acsdkDavsClient/test/DavsEndpointHandlerV3Test.cpp
immortalkrazy/avs-device-sdk
703b06188eae146af396f58be4e47442d7ce5b1e
[ "Apache-2.0" ]
2
2019-02-05T23:42:48.000Z
2020-03-01T11:11:30.000Z
/* * Copyright Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0/ * * or in the "license" file accompanying this file. This file 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. */ #include <gtest/gtest.h> #include <string> #include <vector> #include "TestUtil.h" #include "acsdkDavsClient/DavsEndpointHandlerV3.h" using namespace std; using namespace testing; using namespace alexaClientSDK::acsdkAssets::common; using namespace alexaClientSDK::acsdkAssets::commonInterfaces; using namespace alexaClientSDK::acsdkAssets::davs; struct TestDataEndpoints { string description; string segmentId; string locale; string type; string key; DavsRequest::FilterMap filters; Region region; string resultUrl; }; class DavsEndpointHandlerV3Test : public Test , public WithParamInterface<TestDataEndpoints> {}; TEST_F(DavsEndpointHandlerV3Test, InvalidCreate) { // NOLINT ASSERT_EQ(DavsEndpointHandlerV3::create(""), nullptr); } TEST_F(DavsEndpointHandlerV3Test, InvalidInputs) { // NOLINT auto unit = DavsEndpointHandlerV3::create("123"); ASSERT_NE(unit, nullptr); ASSERT_EQ(unit->getDavsUrl(nullptr), ""); } TEST_P(DavsEndpointHandlerV3Test, TestWithVariousEndpointCombinations) { // NOLINT auto& p = GetParam(); auto unit = DavsEndpointHandlerV3::create(p.segmentId, p.locale); auto actualUrl = unit->getDavsUrl(DavsRequest::create(p.type, p.key, p.filters, p.region)); ASSERT_EQ(actualUrl, p.resultUrl); } // clang-format off INSTANTIATE_TEST_CASE_P(EndpointChecks, DavsEndpointHandlerV3Test, ValuesIn<vector<TestDataEndpoints>>( // NOLINT // Description Segment Locale Type Key Filters Region || Result URL {{"NA Endpoint" , "123456", "en-US", "Type1", "Key1", {{"F", {"A", "B"}}}, Region::NA, "https://api.amazonalexa.com/v3/segments/123456/artifacts/Type1/Key1?locale=en-US&encodedFilters=eyJGIjpbIkEiLCJCIl19"}, {"EU Endpoint" , "ABCDEF", "en-US", "Type2", "Key2", {{"F", {"A", "B"}}}, Region::EU, "https://api.eu.amazonalexa.com/v3/segments/ABCDEF/artifacts/Type2/Key2?locale=en-US&encodedFilters=eyJGIjpbIkEiLCJCIl19"}, {"FE Endpoint" , "UVWXYZ", "en-US", "Type3", "Key3", {{"F", {"A", "B"}}}, Region::FE, "https://api.fe.amazonalexa.com/v3/segments/UVWXYZ/artifacts/Type3/Key3?locale=en-US&encodedFilters=eyJGIjpbIkEiLCJCIl19"}, {"No locale" , "123456", "" , "Type4", "Key4", {{"F", {"A", "B"}}}, Region::NA, "https://api.amazonalexa.com/v3/segments/123456/artifacts/Type4/Key4?encodedFilters=eyJGIjpbIkEiLCJCIl19"}, {"No filters" , "123456", "en-GB", "Type5", "Key5", {} , Region::NA, "https://api.amazonalexa.com/v3/segments/123456/artifacts/Type5/Key5?locale=en-GB"}, {"No filters/locale", "123456", "" , "Type6", "Key6", {} , Region::NA, "https://api.amazonalexa.com/v3/segments/123456/artifacts/Type6/Key6"}, }), PrintDescription()); // clang-format on
45.77027
219
0.687924
immortalkrazy
5fc60f95819d5eb5ddbd3d505bc52540009782ec
10,658
cpp
C++
pluginLite/sysutils.cpp
XULPlayer/XULPlayer-legacy
1ab0ad2a196373d81d350bf45c03f690a0bfb8a2
[ "MIT" ]
3
2017-11-29T07:11:24.000Z
2020-03-03T19:23:33.000Z
pluginLite/sysutils.cpp
XULPlayer/XULPlayer-legacy
1ab0ad2a196373d81d350bf45c03f690a0bfb8a2
[ "MIT" ]
null
null
null
pluginLite/sysutils.cpp
XULPlayer/XULPlayer-legacy
1ab0ad2a196373d81d350bf45c03f690a0bfb8a2
[ "MIT" ]
1
2018-07-12T12:48:52.000Z
2018-07-12T12:48:52.000Z
#include <windows.h> #include <stdio.h> #include <comdef.h> // for using bstr_t class #include <vector> #include <tchar.h> #define SYSTEM_OBJECT_INDEX 2 // 'System' object #define PROCESS_OBJECT_INDEX 230 // 'Process' object #define PROCESSOR_OBJECT_INDEX 238 // 'Processor' object #define TOTAL_PROCESSOR_TIME_COUNTER_INDEX 240 // '% Total processor time' counter (valid in WinNT under 'System' object) #define PROCESSOR_TIME_COUNTER_INDEX 6 // '% processor time' counter (for Win2K/XP) #define TOTALBYTES 100*1024 #define BYTEINCREMENT 10*1024 template <class T> class CPerfCounters { public: CPerfCounters() { } ~CPerfCounters() { } T GetCounterValue(PERF_DATA_BLOCK **pPerfData, DWORD dwObjectIndex, DWORD dwCounterIndex, LPCTSTR pInstanceName = NULL) { QueryPerformanceData(pPerfData, dwObjectIndex, dwCounterIndex); PPERF_OBJECT_TYPE pPerfObj = NULL; T lnValue = {0}; // Get the first object type. pPerfObj = FirstObject( *pPerfData ); // Look for the given object index for( DWORD i=0; i < (*pPerfData)->NumObjectTypes; i++ ) { if (pPerfObj->ObjectNameTitleIndex == dwObjectIndex) { lnValue = GetCounterValue(pPerfObj, dwCounterIndex, pInstanceName); break; } pPerfObj = NextObject( pPerfObj ); } return lnValue; } T GetCounterValueForProcessID(PERF_DATA_BLOCK **pPerfData, DWORD dwObjectIndex, DWORD dwCounterIndex, DWORD dwProcessID) { QueryPerformanceData(pPerfData, dwObjectIndex, dwCounterIndex); PPERF_OBJECT_TYPE pPerfObj = NULL; T lnValue = {0}; // Get the first object type. pPerfObj = FirstObject( *pPerfData ); // Look for the given object index for( DWORD i=0; i < (*pPerfData)->NumObjectTypes; i++ ) { if (pPerfObj->ObjectNameTitleIndex == dwObjectIndex) { lnValue = GetCounterValueForProcessID(pPerfObj, dwCounterIndex, dwProcessID); break; } pPerfObj = NextObject( pPerfObj ); } return lnValue; } protected: class CBuffer { public: CBuffer(UINT Size) { m_Size = Size; m_pBuffer = (LPBYTE) malloc( Size*sizeof(BYTE) ); } ~CBuffer() { free(m_pBuffer); } void *Realloc(UINT Size) { m_Size = Size; m_pBuffer = (LPBYTE) realloc( m_pBuffer, Size ); return m_pBuffer; } void Reset() { memset(m_pBuffer,NULL,m_Size); } operator LPBYTE () { return m_pBuffer; } UINT GetSize() { return m_Size; } public: LPBYTE m_pBuffer; private: UINT m_Size; }; // // The performance data is accessed through the registry key // HKEY_PEFORMANCE_DATA. // However, although we use the registry to collect performance data, // the data is not stored in the registry database. // Instead, calling the registry functions with the HKEY_PEFORMANCE_DATA key // causes the system to collect the data from the appropriate system // object managers. // // QueryPerformanceData allocates memory block for getting the // performance data. // // void QueryPerformanceData(PERF_DATA_BLOCK **pPerfData, DWORD dwObjectIndex, DWORD dwCounterIndex) { // // Since i want to use the same allocated area for each query, // i declare CBuffer as static. // The allocated is changed only when RegQueryValueEx return ERROR_MORE_DATA // static CBuffer Buffer(TOTALBYTES); DWORD BufferSize = Buffer.GetSize(); LONG lRes; TCHAR keyName[32]; _stprintf(keyName, _T("%d"), dwObjectIndex); Buffer.Reset(); while( (lRes = RegQueryValueEx( HKEY_PERFORMANCE_DATA, keyName, NULL, NULL, Buffer, &BufferSize )) == ERROR_MORE_DATA ) { // Get a buffer that is big enough. BufferSize += BYTEINCREMENT; Buffer.Realloc(BufferSize); } *pPerfData = (PPERF_DATA_BLOCK) Buffer.m_pBuffer; } // // GetCounterValue gets performance object structure // and returns the value of given counter index . // This functions iterates through the counters of the input object // structure and looks for the given counter index. // // For objects that have instances, this function returns the counter value // of the instance pInstanceName. // T GetCounterValue(PPERF_OBJECT_TYPE pPerfObj, DWORD dwCounterIndex, LPCTSTR pInstanceName) { PPERF_COUNTER_DEFINITION pPerfCntr = NULL; PPERF_INSTANCE_DEFINITION pPerfInst = NULL; PPERF_COUNTER_BLOCK pCounterBlock = NULL; // Get the first counter. pPerfCntr = FirstCounter( pPerfObj ); for( DWORD j=0; j < pPerfObj->NumCounters; j++ ) { if (pPerfCntr->CounterNameTitleIndex == dwCounterIndex) break; // Get the next counter. pPerfCntr = NextCounter( pPerfCntr ); } if( pPerfObj->NumInstances == PERF_NO_INSTANCES ) { pCounterBlock = (PPERF_COUNTER_BLOCK) ((LPBYTE) pPerfObj + pPerfObj->DefinitionLength); } else { pPerfInst = FirstInstance( pPerfObj ); // Look for instance pInstanceName _bstr_t bstrInstance; _bstr_t bstrInputInstance = pInstanceName; for( int k=0; k < pPerfObj->NumInstances; k++ ) { bstrInstance = (wchar_t *)((PBYTE)pPerfInst + pPerfInst->NameOffset); if (!_tcsicmp((LPCTSTR)bstrInstance, (LPCTSTR)bstrInputInstance)) { pCounterBlock = (PPERF_COUNTER_BLOCK) ((LPBYTE) pPerfInst + pPerfInst->ByteLength); break; } // Get the next instance. pPerfInst = NextInstance( pPerfInst ); } } if (pCounterBlock) { T *lnValue = NULL; lnValue = (T*)((LPBYTE) pCounterBlock + pPerfCntr->CounterOffset); return *lnValue; } return -1; } T GetCounterValueForProcessID(PPERF_OBJECT_TYPE pPerfObj, DWORD dwCounterIndex, DWORD dwProcessID) { int PROC_ID_COUNTER = 784; BOOL bProcessIDExist = FALSE; PPERF_COUNTER_DEFINITION pPerfCntr = NULL; PPERF_COUNTER_DEFINITION pTheRequestedPerfCntr = NULL; PPERF_COUNTER_DEFINITION pProcIDPerfCntr = NULL; PPERF_INSTANCE_DEFINITION pPerfInst = NULL; PPERF_COUNTER_BLOCK pCounterBlock = NULL; // Get the first counter. pPerfCntr = FirstCounter( pPerfObj ); for( DWORD j=0; j < pPerfObj->NumCounters; j++ ) { if (pPerfCntr->CounterNameTitleIndex == PROC_ID_COUNTER) { pProcIDPerfCntr = pPerfCntr; if (pTheRequestedPerfCntr) break; } if (pPerfCntr->CounterNameTitleIndex == dwCounterIndex) { pTheRequestedPerfCntr = pPerfCntr; if (pProcIDPerfCntr) break; } // Get the next counter. pPerfCntr = NextCounter( pPerfCntr ); } if( pPerfObj->NumInstances == PERF_NO_INSTANCES ) { pCounterBlock = (PPERF_COUNTER_BLOCK) ((LPBYTE) pPerfObj + pPerfObj->DefinitionLength); } else { pPerfInst = FirstInstance( pPerfObj ); for( int k=0; k < pPerfObj->NumInstances; k++ ) { pCounterBlock = (PPERF_COUNTER_BLOCK) ((LPBYTE) pPerfInst + pPerfInst->ByteLength); if (pCounterBlock) { int processID = 0; processID = *(T*)((LPBYTE) pCounterBlock + pProcIDPerfCntr->CounterOffset); if (processID == dwProcessID) { bProcessIDExist = TRUE; break; } } // Get the next instance. pPerfInst = NextInstance( pPerfInst ); } } if (bProcessIDExist && pCounterBlock) { T *lnValue = NULL; lnValue = (T*)((LPBYTE) pCounterBlock + pTheRequestedPerfCntr->CounterOffset); return *lnValue; } return -1; } /***************************************************************** * * * Functions used to navigate through the performance data. * * * *****************************************************************/ PPERF_OBJECT_TYPE FirstObject( PPERF_DATA_BLOCK PerfData ) { return( (PPERF_OBJECT_TYPE)((PBYTE)PerfData + PerfData->HeaderLength) ); } PPERF_OBJECT_TYPE NextObject( PPERF_OBJECT_TYPE PerfObj ) { return( (PPERF_OBJECT_TYPE)((PBYTE)PerfObj + PerfObj->TotalByteLength) ); } PPERF_COUNTER_DEFINITION FirstCounter( PPERF_OBJECT_TYPE PerfObj ) { return( (PPERF_COUNTER_DEFINITION) ((PBYTE)PerfObj + PerfObj->HeaderLength) ); } PPERF_COUNTER_DEFINITION NextCounter( PPERF_COUNTER_DEFINITION PerfCntr ) { return( (PPERF_COUNTER_DEFINITION)((PBYTE)PerfCntr + PerfCntr->ByteLength) ); } PPERF_INSTANCE_DEFINITION FirstInstance( PPERF_OBJECT_TYPE PerfObj ) { return( (PPERF_INSTANCE_DEFINITION)((PBYTE)PerfObj + PerfObj->DefinitionLength) ); } PPERF_INSTANCE_DEFINITION NextInstance( PPERF_INSTANCE_DEFINITION PerfInst ) { PPERF_COUNTER_BLOCK PerfCntrBlk; PerfCntrBlk = (PPERF_COUNTER_BLOCK)((PBYTE)PerfInst + PerfInst->ByteLength); return( (PPERF_INSTANCE_DEFINITION)((PBYTE)PerfCntrBlk + PerfCntrBlk->ByteLength) ); } }; typedef enum { WINNT, WIN2K_XP, WIN9X, UNKNOWN }PLATFORM; PLATFORM GetPlatform() { OSVERSIONINFO osvi; osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); if (!GetVersionEx(&osvi)) return UNKNOWN; switch (osvi.dwPlatformId) { case VER_PLATFORM_WIN32_WINDOWS: return WIN9X; case VER_PLATFORM_WIN32_NT: if (osvi.dwMajorVersion == 4) return WINNT; else return WIN2K_XP; } return UNKNOWN; } bool m_bFirstTime = true; LONGLONG m_lnOldValue ; LARGE_INTEGER m_OldPerfTime100nSec; float GetCpuUsage() { static PLATFORM Platform = GetPlatform(); static DWORD dwObjectIndex = (Platform == WINNT ? SYSTEM_OBJECT_INDEX : PROCESSOR_OBJECT_INDEX); static DWORD dwCpuUsageIndex = (Platform == WINNT ? TOTAL_PROCESSOR_TIME_COUNTER_INDEX : PROCESSOR_TIME_COUNTER_INDEX); static TCHAR *szInstance = (Platform == WINNT ? "" : "_Total"); // Cpu usage counter is 8 byte length. CPerfCounters<LONGLONG> PerfCounters; // Note: // ==== // On windows NT, cpu usage counter is '% Total processor time' // under 'System' object. However, in Win2K/XP Microsoft moved // that counter to '% processor time' under '_Total' instance // of 'Processor' object. // Read 'INFO: Percent Total Performance Counter Changes on Windows 2000' // Q259390 in MSDN. int CpuUsage = 0; LONGLONG lnNewValue = 0; PPERF_DATA_BLOCK pPerfData = NULL; LARGE_INTEGER NewPerfTime100nSec = {0}; lnNewValue = PerfCounters.GetCounterValue(&pPerfData, dwObjectIndex, dwCpuUsageIndex, szInstance); NewPerfTime100nSec = pPerfData->PerfTime100nSec; if (m_bFirstTime) { m_bFirstTime = false; m_lnOldValue = lnNewValue; m_OldPerfTime100nSec = NewPerfTime100nSec; return 0; } LONGLONG lnValueDelta = lnNewValue - m_lnOldValue; double DeltaPerfTime100nSec = (double)NewPerfTime100nSec.QuadPart - (double)m_OldPerfTime100nSec.QuadPart; m_lnOldValue = lnNewValue; m_OldPerfTime100nSec = NewPerfTime100nSec; float a = 100 - (float)(lnValueDelta / DeltaPerfTime100nSec) * 100; return a; }
25.806295
122
0.693751
XULPlayer
5fc7c5022bb2cd702c6add7ffa1a3a2714535c8d
15,209
cpp
C++
Merrymen/WeaponCS.cpp
Mertank/ToneArm
40c62b0de89ac506bea6674e43578bf4e2631f93
[ "Zlib", "BSD-2-Clause" ]
null
null
null
Merrymen/WeaponCS.cpp
Mertank/ToneArm
40c62b0de89ac506bea6674e43578bf4e2631f93
[ "Zlib", "BSD-2-Clause" ]
null
null
null
Merrymen/WeaponCS.cpp
Mertank/ToneArm
40c62b0de89ac506bea6674e43578bf4e2631f93
[ "Zlib", "BSD-2-Clause" ]
null
null
null
/* ------------------------------------------------------------------------------------------ Copyright (c) 2014 Vinyl Games Studio Author: Mikhail Kutuzov Date: 5/15/2014 4:14:48 PM ------------------------------------------------------------------------------------------ */ #include "WeaponCS.h" #include "Character.h" #include "GameScene.h" #include "ShootingHelperSP.h" #include "../ToneArmEngine/RayCasting.h" #include "../ToneArmEngine/Engine.h" #include "../ToneArmEngine/EngineModule.h" #include "../ToneArmEngine/CachedResourceLoader.h" #include "../ToneArmEngine/InitializationFileResource.h" #include "../ToneArmEngine/SoundModule.h" #include "../ToneArmEngine/ParticleEmitterNode.h" #include "../ToneArmEngine/ParticleEmitterNodePool.h" using namespace merrymen; // // allocates a Weapon object and calls Init() on it // WeaponCS* WeaponCS::Create(const WeaponID& id, Character* const owner, const char* modelFile, char** const soundFiles, const char* iniFile, const char* category) { WeaponCS* weapon = new WeaponCS(); if (weapon && weapon->Init(id, owner, modelFile, soundFiles, iniFile, category)) { return weapon; } delete weapon; return nullptr; } // // default constructor // WeaponCS::WeaponCS() : m_owner(nullptr), m_model(nullptr), m_emitter(nullptr), m_stats(nullptr), m_projectileStats(nullptr), m_cooldownTimer(1.0f), m_reloadTimer(-1.0f), m_active(false), m_shooting(false), m_reloading(false), m_emitterNodePool( NULL ) {} // // destructor // WeaponCS::~WeaponCS() { delete m_stats; delete m_projectileStats; } // // initializes the weapon data with the passed values // bool WeaponCS::Init(const WeaponID& id, Character* const owner, const char* modelFile, char** soundFiles, const char* iniFile, const char* category) { if (Node::Init()) { m_id = id; m_owner = owner; // initialize weapon's stats CachedResourceLoader* loader = Engine::GetInstance()->GetModuleByType<CachedResourceLoader>(EngineModuleType::RESOURCELOADER); std::shared_ptr<InitializationFileResource> ini = loader->LoadResource<InitializationFileResource>(iniFile); m_stats = new WeaponStats<WeaponCS>(this, *ini->GetCategory(category)); m_projectileStats = new ProjectileStats(); // initialize sounds m_sounds.insert(std::pair<WeaponSoundTypes, const char*>(WeaponSoundTypes::ShotSound, soundFiles[0])); m_sounds.insert(std::pair<WeaponSoundTypes, const char*>(WeaponSoundTypes::LoadSound, soundFiles[1])); m_sounds.insert(std::pair<WeaponSoundTypes, const char*>(WeaponSoundTypes::CockSound, soundFiles[2])); m_sounds.insert(std::pair<WeaponSoundTypes, const char*>(WeaponSoundTypes::TriggerClickSound, soundFiles[3])); // create model m_model = ModelNode::Create( modelFile ); m_model->SetVisible(false); m_model->SetPosition(glm::vec3(0.0f, 15.0f, 50.0f)); AddChild(m_model); // TODO: initialize the emitter with respect to the type of the weapon m_emitter = vgs::ParticleEmitterNode::CreateWithSettings(ParticleEmitterSettings(75, 0.1f, 0.05f, 750, 90.0f, glm::vec3(0.85f, 0.75f, 0.0f), 0, 5.0f, 300.0f, 100.0f)); if (id == WeaponID::Pistol) { m_emitter->SetPosition( glm::vec3( -0.898f, 0.3085f, -0.3122f ) * 35.0f); } else if (id == WeaponID::Shotgun) { m_emitter->SetPosition( glm::vec3( -0.898f, 0.3085f, -0.3122f ) * 70.0f); } else if (id == WeaponID::SniperRifle) { m_emitter->SetPosition( glm::vec3( -0.898f, 0.3085f, -0.3122f ) * 85.0f); } m_emitter->SetRotation( glm::vec3( 67.0f, -116.0f, -83.0f ) ); m_model->AddChild(m_emitter); m_emitterNodePool = ParticleEmitterNodePool::CreateEmitterPool( 10 ); AddChild( m_emitterNodePool ); return true; } return false; } // // Weapon object updates it's state // void WeaponCS::Update(float dt) { if (!m_owner->IsOnline() && IsActive()) { UpdateStats(dt); } // cooldown goes on if (m_cooldownTimer > 0.0f) { m_cooldownTimer -= dt; } // reloading timer if (IsReloading()) { m_reloadTimer -= dt; } // auto-reload? if (m_stats->Ammo <= 0 && m_reloadTimer <= -1.0f && !m_owner->IsSprinting()) { Reload(); } Node::Update(dt); } // // weapon updates it's timers and stats // void WeaponCS::UpdateStats(float dt) { if (m_stats->Update(dt)) { m_owner->SetStatsChanged(true); } } // // casts rays to check which objects were hit // void WeaponCS::DoRayCasting(std::multimap<ClientEntity*, float>& hitEntities, std::vector<glm::vec3>& impactPoints) { RayCasting::ColliderResult shotResultPtr; glm::vec3 shotImpactPoint; // prepare data for ray casting std::vector<ColliderComponent*> geometryColliders; ShootingHelperSP helper = ShootingHelperSP(); helper.PreapareGeometryData(this->GetOwner(), geometryColliders, false); GameScene* gs = static_cast<GameScene*>(Engine::GetRunningScene()); std::vector<Character*> targets = gs->GetPlayers(); glm::vec3 shotOrigin = this->GetAbsoluteWorldPosition() + m_owner->GetForward() * WEAPON_LENGTH, shotDirection; // cast as many rays as there are projectiles in one shot for (int i = 0; i < m_projectileStats->ProjectilesPerShot; i++) { // calculate shot direction for that particular projectile glm::vec3 shotDirection = helper.CalculateShotDirection(this->GetOwner(), this->GetWeaponStats()); if (targets.size() > 1) { // cast a ray to each target for (auto target : targets) { bool hitSomething = false; bool hitTheTarget = false; // check what the ray cast from the weapon's position actually hits (target, geometry or nothing) if (target != this->GetOwner() && !target->IsDead()) { ColliderComponent* collider = target->GetComponentOfType<ColliderComponent>(); shotResultPtr = RayCasting::RayCastShot(shotOrigin, shotDirection, geometryColliders, collider); if (shotResultPtr) { ColliderComponent* collider = shotResultPtr.get()->Object; // hit someone if (collider->GetOwner()->GetRTTI().DerivesFrom(ClientEntity::rtti)) { hitEntities.insert(std::pair<ClientEntity*, float>(target, glm::distance(shotOrigin, shotImpactPoint))); } // hit a wall else { impactPoints.push_back(shotResultPtr.get()->Intersection); } } } } } else { std::shared_ptr<RayCasting::RayCastResult<ColliderComponent>> hitObject = RayCasting::RayCastFirst(geometryColliders, shotOrigin, shotDirection); if (hitObject.get()) { impactPoints.push_back(hitObject.get()->Intersection); } } } geometryColliders.clear(); targets.clear(); } // // method that causes damage // void WeaponCS::Shoot() { std::multimap<ClientEntity*, float> hitEntities; std::vector<glm::vec3> impactPoints; // cast rays to check which objects were hit DoRayCasting(hitEntities, impactPoints); // deal damage to the characters which were hit if (hitEntities.size() > 0) { for (std::multimap<ClientEntity*, float>::iterator hitEntitiesItr = hitEntities.begin(); hitEntitiesItr != hitEntities.end(); ++hitEntitiesItr) { int count = hitEntities.count(hitEntitiesItr->first); Damage dmg = Damage::CalculateDamage(count, this->GetWeaponStats().Damage, hitEntitiesItr->second, this->GetWeaponStats().AimingDistance, this->GetProjectileStats()); hitEntitiesItr->first->TakeDamage(dmg, this->GetProjectileStats().Type); std::multimap<ClientEntity*, float>::iterator currentItr = hitEntitiesItr; std::advance(hitEntitiesItr, count - 1); hitEntities.erase(currentItr, hitEntitiesItr); } } // play shot impact effects on the geometry hit by the shot for (auto impactPoint : impactPoints) { PlayShotImpactEffects(impactPoint); } hitEntities.clear(); impactPoints.clear(); } // // handles a shooting command received from the owner // void WeaponCS::HandleShootCommand() { bool canShoot = false; if (m_stats->ShootingType == ShootingType::Automatic) { if (m_stats->Ammo > 0 && m_cooldownTimer <= 0.0f && (!IsReloading() || m_stats->LoadingUnit == LoadingUnit::Bullet)) { canShoot = true; } } // if a weapon is semi-automatic we need to make sure that the fire button was released at least once since the moment of the most recent shot else if (m_stats->ShootingType == ShootingType::Semi_automatic) { if (!IsShooting() && m_stats->Ammo > 0 && m_cooldownTimer <= 0.0f && (!IsReloading() || m_stats->LoadingUnit == LoadingUnit::Bullet)) { canShoot = true; } } // if we have enough ammo, the cooldown has passed and the weapon is not being reloaded a new shot can be performed if (canShoot) { Shoot(); // stop reloading if (IsReloading()) { StopReloading(); } m_stats->Ammo--; m_owner->SetStatsChanged(true); // start cooldown m_cooldownTimer = m_stats->Cooldown; PlayShootingEffects(); m_owner->PlayShootAnimation(); } else if (m_stats->Ammo == 0 && m_cooldownTimer <= 0.0f && !IsShooting()) { m_cooldownTimer = m_stats->Cooldown; if (!IsReloading()) { PlayWeaponSound(WeaponSoundTypes::TriggerClickSound); } } } // // method that handles reloading commands from the owner // void WeaponCS::Reload() { if (!IsReloading() && m_stats->Ammo < m_stats->ClipSize && m_stats->TotalAmmo > 0) { int bulletsToLoad = 1; // set the reload timer to a proper value if (m_stats->LoadingUnit == LoadingUnit::Clip) { m_reloadTimer = m_stats->ReloadTime; } else if (m_stats->LoadingUnit == LoadingUnit::Bullet) { bulletsToLoad = m_stats->TotalAmmo >= m_stats->ClipSize - m_stats->Ammo ? m_stats->ClipSize - m_stats->Ammo : m_stats->TotalAmmo; m_reloadTimer = (m_stats->ReloadTime / m_stats->ClipSize) * bulletsToLoad; } // stop aiming if (m_owner->IsAiming()) { m_owner->SetAiming(false); } // give the player some feedback PlayWeaponSound(WeaponSoundTypes::LoadSound); m_owner->PlayReloadAnimation(bulletsToLoad); m_reloading = true; } } // // describes what needs to happen once the reloading process is finished // void WeaponCS::FinishReloading() { m_reloadTimer = -1.0f; m_reloading = false; m_owner->SetStatsChanged(true); // let the player sprint again if the sprint button was held all the time during reloading if (m_owner->IsSprintInterrupted()) { m_owner->SetSprintInterrupted(false); } // play sound PlayWeaponSound(WeaponSoundTypes::CockSound); // play animation m_owner->PlayCockAnimation(); } // // interrupts reloading // void WeaponCS::StopReloading() { m_reloadTimer = -1.0f; // play some sounds SoundModule* sMod = Engine::GetInstance()->GetModuleByType<SoundModule>(EngineModuleType::SOUNDER); if (sMod) { sMod->StopUniqueSound(m_sounds.at(WeaponSoundTypes::LoadSound)); } SetReloading(false); } // // stops/plays reloading sound depending on whether or not hte weapon is still active (sets the m_active value too of course) // void WeaponCS::SetActive(const bool active) { if (IsReloading()) { // stop reloading sound and restart the timer if (!active) { StopReloading(); } // play the reload sound, the reloading will start automatically in the UpdateStats else { PlayWeaponSound(WeaponSoundTypes::LoadSound); } } m_active = active; } // // plays particle effects on the weapon // void WeaponCS::PlayShootingEffects() { if(m_model->IsVisible()) { m_emitter->Emit(true, 0); } PlayWeaponSound(WeaponSoundTypes::ShotSound); } // // plays particle effects on the projectile impact point // void WeaponCS::PlayShotImpactEffects() { std::multimap<ClientEntity*, float> hitEntities; std::vector<glm::vec3> impactPoints; // cast rays to check which objects were hit DoRayCasting(hitEntities, impactPoints); // play shot impact effects on the geometry hit by the shot for (auto impactPoint : impactPoints) { PlayShotImpactEffects(impactPoint); } hitEntities.clear(); impactPoints.clear(); } // // plays particle effects on the projectile impact point // void WeaponCS::PlayShotImpactEffects(const glm::vec3& impactPoint) { // get an emitter ParticleEmitterNode* emitter = m_emitterNodePool->GetEmitterNode(); // set its parent properly GameScene* gs = static_cast<GameScene*>(Engine::GetRunningScene()); if (gs) { Node* parent = emitter->GetParent(); if (parent && parent != gs) { emitter->RemoveFromParent(); } gs->AddChild(emitter); } // make the emitter look "pretty" emitter->SetEmitterSettings(ParticleEmitterSettings(300, 0.1f, 0.05f, 3000, 180.0f, glm::vec3(0.33f, 0.33f, 0.33f), 0, 4.0f, 200.0f, 50.0f)); // set position of the emitter emitter->SetPosition(impactPoint - m_owner->GetForward()); // rotate the emitter glm::vec3 direction = m_owner->GetAbsoluteWorldPosition() - impactPoint; direction.y = 0.0f; emitter->SetDirection( glm::normalize( direction ) ); emitter->Emit(true, 0); } // // plays the sound of the shot or the sound of a trigger click if the clip is empty // void WeaponCS::PlayWeaponSound(const WeaponSoundTypes& soundType) { // play sound GameScene* gs = static_cast<GameScene*>(Engine::GetRunningScene()); if (gs) { Character* localCharacter = gs->GetLocalCharacter(); if (!localCharacter) { return; } float distance = glm::distance(GetAbsoluteWorldPosition(), localCharacter->GetAbsoluteWorldPosition()); float volume = SoundModule::CalculateVolume(distance); SoundModule* sMod = Engine::GetInstance()->GetModuleByType<SoundModule>(EngineModuleType::SOUNDER); if (!sMod) { std::cout << "Couldn't find sound module in Weapon::PlayWeaponSound" << std::endl; return; } if (soundType == WeaponSoundTypes::ShotSound) { sMod->PlaySound(m_sounds.at(soundType), volume); } else if (GetOwner() == localCharacter) { // if reloading sound needs to be played the duration might need to be adjusted if (soundType == WeaponSoundTypes::LoadSound) { if (m_stats->LoadingUnit == LoadingUnit::Clip) { sMod->PlaySound(m_sounds.at(soundType), volume); } else if (m_stats->LoadingUnit == LoadingUnit::Bullet) { // adjust the duration of the sound with respect to the number of projectiles that need to be loaded unsigned short bulletsToLoad = m_stats->TotalAmmo >= m_stats->ClipSize - m_stats->Ammo ? m_stats->ClipSize - m_stats->Ammo : m_stats->TotalAmmo; float duration = (m_stats->ReloadTime / m_stats->ClipSize) * bulletsToLoad; sMod->PlaySound(m_sounds.at(soundType), volume, duration); } } // there's no need in playing more than one sound of this type at the same time, so PlayUniqueSound() else if (soundType == WeaponSoundTypes::TriggerClickSound) { sMod->PlayUniqueSound(m_sounds.at(soundType), volume); } else if (soundType == WeaponSoundTypes::CockSound) { sMod->StopUniqueSound(m_sounds.at(WeaponSoundTypes::LoadSound)); sMod->PlayUniqueSound(m_sounds.at(soundType), volume); } } } } // // changes visibility of the weapon's model // void WeaponCS::SetVisible(const bool value) { if (m_model) { m_model->SetVisible(value); } } // // reinitializes some member variables // void WeaponCS::Reset() { m_stats->Ammo = m_stats->ClipSize; m_stats->TotalAmmo = m_stats->MaxAmmo; m_cooldownTimer = -1.0f; m_reloadTimer = -1.0f; m_shooting = false; m_reloading = false; m_owner->SetStatsChanged(true); }
27.062278
169
0.700243
Mertank
5fc99d00f17782788d3657d70f939615415347fe
3,540
cc
C++
src/Video.cc
IntelLabs/vcl
eab97ef1e61a2e0578dc2e5c959522cbcacd4be4
[ "MIT" ]
5
2018-03-07T20:20:57.000Z
2022-02-09T16:54:22.000Z
src/Video.cc
IntelLabs/vcl
eab97ef1e61a2e0578dc2e5c959522cbcacd4be4
[ "MIT" ]
9
2018-03-28T21:05:51.000Z
2019-03-06T16:18:43.000Z
src/Video.cc
IntelLabs/vcl
eab97ef1e61a2e0578dc2e5c959522cbcacd4be4
[ "MIT" ]
5
2019-03-04T23:40:11.000Z
2022-02-09T16:54:12.000Z
/** * @file Video.cc * * @section LICENSE * * The MIT License * * @copyright Copyright (c) 2017 Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */ #include "Video.h" #include "VideoData.h" using namespace VCL; Video::Video() { _video = new VideoData(); } Video::Video(const std::string& fileName) { _video = new VideoData(fileName); } Video::Video(void* buffer, long size) { _video = new VideoData(buffer, size); } Video::Video(const Video &video) { _video = new VideoData(*video._video); } Video::~Video() { delete _video; } void Video::operator=(const Video &vid) { delete _video; _video = new VideoData(*vid._video); } /* *********************** */ /* GET FUNCTIONS */ /* *********************** */ std::string Video::get_video_id() const { return _video->get_video_id(); } Video::Codec Video::get_codec() const { return _video->get_codec(); } cv::Mat Video::get_frame(unsigned frame_number) { return _video->get_frame(frame_number); } long Video::get_frame_count() { return _video->get_frame_count(); } float Video::get_fps() { return _video->get_fps(); } cv::Size Video::get_frame_size() { return _video->get_frame_size(); } Video::VideoSize Video::get_size() { return _video->get_size(); } std::vector<unsigned char> Video::get_encoded() { return _video->get_encoded(); } /* *********************** */ /* SET FUNCTIONS */ /* *********************** */ void Video::set_video_id(const std::string &video_id) { _video->set_video_id(video_id); } void Video::set_codec(Video::Codec codec) { _video->set_codec(codec); } void Video::set_dimensions(const cv::Size& dimensions) { _video->set_dimensions(dimensions); } /* *********************** */ /* Video INTERACTION */ /* *********************** */ void Video::resize(int new_height, int new_width) { _video->resize(new_height, new_width); } void Video::interval(Video::Unit u, int start, int stop, int step) { _video->interval(u, start, stop, step); } void Video::crop(const Rectangle &rect) { _video->crop(rect); } void Video::threshold(int value) { _video->threshold(value); } void Video::store(const std::string &video_id, Video::Codec video_codec) { _video->write(video_id, video_codec); } void Video::delete_video() { std::string fname = _video->get_video_id(); if (exists(fname)) { std::remove(fname.c_str()); } }
21.454545
80
0.651412
IntelLabs
5fd39842abda1a0200ca32e1f96fef3c75824d1f
10,470
cc
C++
wrspice/devlib/mos/mossetm.cc
wrcad/xictools
f46ba6d42801426739cc8b2940a809b74f1641e2
[ "Apache-2.0" ]
73
2017-10-26T12:40:24.000Z
2022-03-02T16:59:43.000Z
wrspice/devlib/mos/mossetm.cc
chris-ayala/xictools
4ea72c118679caed700dab3d49a8d36445acaec3
[ "Apache-2.0" ]
12
2017-11-01T10:18:22.000Z
2022-03-20T19:35:36.000Z
wrspice/devlib/mos/mossetm.cc
chris-ayala/xictools
4ea72c118679caed700dab3d49a8d36445acaec3
[ "Apache-2.0" ]
34
2017-10-06T17:04:21.000Z
2022-02-18T16:22:03.000Z
/*========================================================================* * * * Distributed by Whiteley Research Inc., Sunnyvale, California, USA * * http://wrcad.com * * Copyright (C) 2017 Whiteley Research Inc., all rights reserved. * * Author: Stephen R. Whiteley, except as indicated. * * * * As fully as possible recognizing licensing terms and conditions * * imposed by earlier work from which this work was derived, if any, * * this work is released under the Apache License, Version 2.0 (the * * "License"). You may not use this file except in compliance with * * the License, and compliance with inherited licenses which are * * specified in a sub-header below this one if applicable. A copy * * of the License is provided with this distribution, or you may * * obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * See the License for the specific language governing permissions * * and limitations under the License. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- * * INFRINGEMENT. IN NO EVENT SHALL WHITELEY RESEARCH INCORPORATED * * OR STEPHEN R. WHITELEY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * * USE OR OTHER DEALINGS IN THE SOFTWARE. * * * *========================================================================* * XicTools Integrated Circuit Design System * * * * WRspice Circuit Simulation and Analysis Tool: Device Library * * * *========================================================================* $Id:$ *========================================================================*/ /*************************************************************************** JSPICE3 adaptation of Spice3f2 - Copyright (c) Stephen R. Whiteley 1992 Copyright 1990 Regents of the University of California. All rights reserved. Authors: 1985 Thomas L. Quarles 1989 Takayasu Sakurai 1993 Stephen R. Whiteley ****************************************************************************/ #include "mosdefs.h" int MOSdev::setModl(int param, IFdata *data, sGENmodel *genmod) { sMOSmodel *model = static_cast<sMOSmodel*>(genmod); IFvalue *value = &data->v; switch (param) { case MOS_MOD_LEVEL: model->MOSlevel = value->iValue; model->MOSlevelGiven = true; break; case MOS_MOD_TNOM: model->MOStnom = value->rValue+CONSTCtoK; model->MOStnomGiven = true; break; case MOS_MOD_VTO: model->MOSvt0 = value->rValue; model->MOSvt0Given = true; break; case MOS_MOD_KP: model->MOStransconductance = value->rValue; model->MOStransconductanceGiven = true; break; case MOS_MOD_GAMMA: model->MOSgamma = value->rValue; model->MOSgammaGiven = true; break; case MOS_MOD_PHI: model->MOSphi = value->rValue; model->MOSphiGiven = true; break; case MOS_MOD_RD: model->MOSdrainResistance = value->rValue; model->MOSdrainResistanceGiven = true; break; case MOS_MOD_RS: model->MOSsourceResistance = value->rValue; model->MOSsourceResistanceGiven = true; break; case MOS_MOD_CBD: model->MOScapBD = value->rValue; model->MOScapBDGiven = true; break; case MOS_MOD_CBS: model->MOScapBS = value->rValue; model->MOScapBSGiven = true; break; case MOS_MOD_IS: model->MOSjctSatCur = value->rValue; model->MOSjctSatCurGiven = true; break; case MOS_MOD_PB: model->MOSbulkJctPotential = value->rValue; model->MOSbulkJctPotentialGiven = true; break; case MOS_MOD_CGSO: model->MOSgateSourceOverlapCapFactor = value->rValue; model->MOSgateSourceOverlapCapFactorGiven = true; break; case MOS_MOD_CGDO: model->MOSgateDrainOverlapCapFactor = value->rValue; model->MOSgateDrainOverlapCapFactorGiven = true; break; case MOS_MOD_CGBO: model->MOSgateBulkOverlapCapFactor = value->rValue; model->MOSgateBulkOverlapCapFactorGiven = true; break; case MOS_MOD_CJ: model->MOSbulkCapFactor = value->rValue; model->MOSbulkCapFactorGiven = true; break; case MOS_MOD_MJ: model->MOSbulkJctBotGradingCoeff = value->rValue; model->MOSbulkJctBotGradingCoeffGiven = true; break; case MOS_MOD_CJSW: model->MOSsideWallCapFactor = value->rValue; model->MOSsideWallCapFactorGiven = true; break; case MOS_MOD_MJSW: model->MOSbulkJctSideGradingCoeff = value->rValue; model->MOSbulkJctSideGradingCoeffGiven = true; break; case MOS_MOD_JS: model->MOSjctSatCurDensity = value->rValue; model->MOSjctSatCurDensityGiven = true; break; case MOS_MOD_TOX: model->MOSoxideThickness = value->rValue; model->MOSoxideThicknessGiven = true; break; case MOS_MOD_LD: model->MOSlatDiff = value->rValue; model->MOSlatDiffGiven = true; break; case MOS_MOD_RSH: model->MOSsheetResistance = value->rValue; model->MOSsheetResistanceGiven = true; break; case MOS_MOD_U0: model->MOSsurfaceMobility = value->rValue; model->MOSsurfaceMobilityGiven = true; break; case MOS_MOD_FC: model->MOSfwdCapDepCoeff = value->rValue; model->MOSfwdCapDepCoeffGiven = true; break; case MOS_MOD_NSS: model->MOSsurfaceStateDensity = value->rValue; model->MOSsurfaceStateDensityGiven = true; break; case MOS_MOD_NSUB: model->MOSsubstrateDoping = value->rValue; model->MOSsubstrateDopingGiven = true; break; case MOS_MOD_TPG: model->MOSgateType = value->iValue; model->MOSgateTypeGiven = true; break; case MOS_MOD_NMOS: if(value->iValue) { model->MOStype = 1; model->MOStypeGiven = true; } break; case MOS_MOD_PMOS: if(value->iValue) { model->MOStype = -1; model->MOStypeGiven = true; } break; case MOS_MOD_KF: model->MOSfNcoef = value->rValue; model->MOSfNcoefGiven = true; break; case MOS_MOD_AF: model->MOSfNexp = value->rValue; model->MOSfNexpGiven = true; break; case MOS_MOD_LAMBDA: /* levels 1 and 2 */ model->MOSlambda = value->rValue; model->MOSlambdaGiven = true; break; case MOS_MOD_UEXP: /* level 2 */ model->MOScritFieldExp = value->rValue; model->MOScritFieldExpGiven = true; break; case MOS_MOD_NEFF: /* level 2 */ model->MOSchannelCharge = value->rValue; model->MOSchannelChargeGiven = true; break; case MOS_MOD_UCRIT: /* level 2 */ model->MOScritField = value->rValue; model->MOScritFieldGiven = true; break; case MOS_MOD_NFS: /* levels 2 and 3 */ model->MOSfastSurfaceStateDensity = value->rValue; model->MOSfastSurfaceStateDensityGiven = true; break; case MOS_MOD_DELTA: /* levels 2 and 3 */ model->MOSnarrowFactor = value->rValue; model->MOSnarrowFactorGiven = true; break; case MOS_MOD_VMAX: /* levels 2 and 3 */ model->MOSmaxDriftVel = value->rValue; model->MOSmaxDriftVelGiven = true; break; case MOS_MOD_XJ: /* levels 2 and 3 */ model->MOSjunctionDepth = value->rValue; model->MOSjunctionDepthGiven = true; break; case MOS_MOD_ETA: /* level 3 */ model->MOSeta = value->rValue; model->MOSetaGiven = true; break; case MOS_MOD_THETA: /* level 3 */ model->MOStheta = value->rValue; model->MOSthetaGiven = true; break; case MOS_MOD_KAPPA: /* level 3 */ model->MOSkappa = value->rValue; model->MOSkappaGiven = true; break; case MOS_MOD_KV: /* level 6 */ model->MOSkv = value->rValue; model->MOSkvGiven = true; break; case MOS_MOD_NV: /* level 6 */ model->MOSnv = value->rValue; model->MOSnvGiven = true; break; case MOS_MOD_KC: /* level 6 */ model->MOSkc = value->rValue; model->MOSkcGiven = true; break; case MOS_MOD_NC: /* level 6 */ model->MOSnc = value->rValue; model->MOSncGiven = true; break; case MOS_MOD_GAMMA1: /* level 6 */ model->MOSgamma1 = value->rValue; model->MOSgamma1Given = true; break; case MOS_MOD_SIGMA: /* level 6 */ model->MOSsigma = value->rValue; model->MOSsigmaGiven = true; break; case MOS_MOD_LAMDA0: /* level 6 */ model->MOSlamda0 = value->rValue; model->MOSlamda0Given = true; break; case MOS_MOD_LAMDA1: /* level 6 */ model->MOSlamda1 = value->rValue; model->MOSlamda1Given = true; break; default: return (E_BADPARM); } return (OK); }
35.979381
77
0.533715
wrcad
5fd4b2a3d3500877f0ea0aaad0d4f55e6984a839
260
cpp
C++
ALGORITHMS/Reccursion/Factorial/Factorial.cpp
anishsingh42/CodeChef
50f5c0438516210895e513bc4ee959b9d99ef647
[ "Apache-2.0" ]
127
2020-10-13T18:04:35.000Z
2022-02-17T10:56:27.000Z
ALGORITHMS/Reccursion/Factorial/Factorial.cpp
anishsingh42/CodeChef
50f5c0438516210895e513bc4ee959b9d99ef647
[ "Apache-2.0" ]
132
2020-10-13T18:06:53.000Z
2021-10-17T18:44:26.000Z
ALGORITHMS/Reccursion/Factorial/Factorial.cpp
anishsingh42/CodeChef
50f5c0438516210895e513bc4ee959b9d99ef647
[ "Apache-2.0" ]
364
2020-10-13T18:04:52.000Z
2022-03-04T14:34:53.000Z
#include <bits/stdc++.h> using namespace std; int factorial(int n) { if (n > 1) n *= factorial(n - 1); return n; } int main() { int n; cin >> n; cout << factorial(n) << endl; return 0; } // Complexity of the above program is O(n)
13.684211
42
0.55
anishsingh42
5fd4e83c4342a0a31ee949f1b9e89980fd360f03
11,966
cpp
C++
src/QtAudio/CiosAudio/CaDebug.cpp
Vladimir-Lin/QtAudio
5c58e86cda1a88f03c4dde53883a979bec37b504
[ "MIT" ]
null
null
null
src/QtAudio/CiosAudio/CaDebug.cpp
Vladimir-Lin/QtAudio
5c58e86cda1a88f03c4dde53883a979bec37b504
[ "MIT" ]
null
null
null
src/QtAudio/CiosAudio/CaDebug.cpp
Vladimir-Lin/QtAudio
5c58e86cda1a88f03c4dde53883a979bec37b504
[ "MIT" ]
null
null
null
/***************************************************************************** * * * CIOS Audio Core * * * * Version : 1.5.11 * * Author : Brian Lin <lin.foxman@gmail.com> * * Skpye : wolfram_lin * * Lastest update : 2014/12/18 * * Site : http://ciosaudio.sourceforge.net * * License : LGPLv3 * * * * Documents are separated, you will receive the full document when you * * download the source code. It is all-in-one, there is no comment in the * * source code. * * * *****************************************************************************/ #include "CiosAudioPrivate.hpp" #if _MSC_VER #define VSNPRINTF _vsnprintf #define LOG_BUF_SIZE 2048 #else #define VSNPRINTF vsnprintf #endif #ifdef DONT_USE_NAMESPACE #else namespace CAC_NAMESPACE { #endif typedef struct CaHostErrorInfo { CaHostApiTypeId hostApiType ; /**< the host API which returned the error code */ long errorCode ; /**< the error code returned */ const char * errorText ; /**< a textual description of the error if available, otherwise a zero-length string */ } CaHostErrorInfo ; #define CA_LAST_HOST_ERROR_TEXT_LENGTH_ 1024 static char lastHostErrorText_[ CA_LAST_HOST_ERROR_TEXT_LENGTH_ + 1 ] = {0}; static CaHostErrorInfo lastHostErrorInfo_ = { (CaHostApiTypeId)-1 , 0 , lastHostErrorText_ } ; void SetLastHostErrorInfo ( CaHostApiTypeId hostApiType , long errorCode , const char * errorText ) { lastHostErrorInfo_ . hostApiType = hostApiType ; lastHostErrorInfo_ . errorCode = errorCode ; if ( NULL == errorText ) return ; ::strncpy( lastHostErrorText_ , errorText , CA_LAST_HOST_ERROR_TEXT_LENGTH_ ) ; } Debugger:: Debugger (void) { } Debugger::~Debugger (void) { } const char * Debugger::lastError (void) { return lastHostErrorText_ ; } void Debugger::printf(const char * format,...) { // Optional logging into Output console of Visual Studio #if defined(_MSC_VER) && defined(ENABLE_MSVC_DEBUG_OUTPUT) char buf [ LOG_BUF_SIZE ] ; va_list ap ; va_start ( ap , format ) ; VSNPRINTF ( buf , sizeof(buf) , format , ap ) ; buf[sizeof(buf)-1] = 0 ; OutputDebugStringA ( buf ) ; va_end ( ap ) ; #else va_list ap ; va_start ( ap , format ) ; vfprintf ( stderr , format , ap ) ; va_end ( ap ) ; fflush ( stderr ) ; #endif } const char * Debugger::Error(CaError errorCode) { const char * result = NULL ; switch ( errorCode ) { case NoError : result = "Success" ; break ; case NotInitialized : result = "CIOS Audio Core not initialized" ; break ; case UnanticipatedHostError : result = "Unanticipated host error" ; break ; case InvalidChannelCount : result = "Invalid number of channels" ; break ; case InvalidSampleRate : result = "Invalid sample rate" ; break ; case InvalidDevice : result = "Invalid device" ; break ; case InvalidFlag : result = "Invalid flag" ; break ; case SampleFormatNotSupported : result = "Sample format not supported" ; break ; case BadIODeviceCombination : result = "Illegal combination of I/O devices" ; break ; case InsufficientMemory : result = "Insufficient memory" ; break ; case BufferTooBig : result = "Buffer too big" ; break ; case BufferTooSmall : result = "Buffer too small" ; break ; case NullCallback : result = "No callback routine specified" ; break ; case BadStreamPtr : result = "Invalid stream pointer" ; break ; case TimedOut : result = "Wait timed out" ; break ; case InternalError : result = "Internal CIOS Audio error" ; break ; case DeviceUnavailable : result = "Device unavailable" ; break ; case IncompatibleStreamInfo : result = "Incompatible host API specific stream info" ; break ; case StreamIsStopped : result = "Stream is stopped" ; break ; case StreamIsNotStopped : result = "Stream is not stopped" ; break ; case InputOverflowed : result = "Input overflowed" ; break ; case OutputUnderflowed : result = "Output underflowed" ; break ; case HostApiNotFound : result = "Host API not found" ; break ; case InvalidHostApi : result = "Invalid host API" ; break ; case CanNotReadFromACallbackStream : result = "Can't read from a callback stream" ; break ; case CanNotWriteToACallbackStream : result = "Can't write to a callback stream" ; break ; case CanNotReadFromAnOutputOnlyStream : result = "Can't read from an output only stream" ; break ; case CanNotWriteToAnInputOnlyStream : result = "Can't write to an input only stream" ; break ; case IncompatibleStreamHostApi : result = "Incompatible stream host API" ; break ; case BadBufferPtr : result = "Bad buffer pointer" ; break ; default : if( errorCode > 0 ) result = "Invalid error code (value greater than zero)" ; else result = "Invalid error code" ; break ; } ; return result ; } #ifdef DONT_USE_NAMESPACE #else } #endif
60.434343
120
0.272606
Vladimir-Lin
5fd8e47fafc7680ed6025cb53e04e83e34054558
478,011
cpp
C++
Sources/Elastos/LibCore/tests/bak/Namespace/R.cpp
jingcao80/Elastos
d0f39852356bdaf3a1234743b86364493a0441bc
[ "Apache-2.0" ]
7
2017-07-13T10:34:54.000Z
2021-04-16T05:40:35.000Z
Sources/Elastos/LibCore/tests/bak/Namespace/R.cpp
xiaoweiruby/Elastos.RT
238e9b747f70fc129769ae7850def4362c43e443
[ "Apache-2.0" ]
null
null
null
Sources/Elastos/LibCore/tests/bak/Namespace/R.cpp
xiaoweiruby/Elastos.RT
238e9b747f70fc129769ae7850def4362c43e443
[ "Apache-2.0" ]
9
2017-07-13T12:33:20.000Z
2021-06-19T02:46:48.000Z
#include "R.h" namespace Elastos { namespace Droid { const int R::anim::accelerate_decelerate_interpolator=0x010a0004; const int R::anim::accelerate_interpolator=0x010a0005; const int R::anim::activity_close_enter=0x010a000d; const int R::anim::activity_close_exit=0x010a000e; const int R::anim::activity_open_enter=0x010a000f; const int R::anim::activity_open_exit=0x010a0010; const int R::anim::anticipate_interpolator=0x010a0007; const int R::anim::anticipate_overshoot_interpolator=0x010a0009; const int R::anim::app_starting_exit=0x010a0011; const int R::anim::bounce_interpolator=0x010a000a; const int R::anim::cycle_interpolator=0x010a000c; const int R::anim::decelerate_interpolator=0x010a0006; const int R::anim::dialog_enter=0x010a0012; const int R::anim::dialog_exit=0x010a0013; const int R::anim::dock_bottom_enter=0x010a0014; const int R::anim::dock_bottom_exit=0x010a0015; const int R::anim::dock_left_enter=0x010a0016; const int R::anim::dock_left_exit=0x010a0017; const int R::anim::dock_right_enter=0x010a0018; const int R::anim::dock_right_exit=0x010a0019; const int R::anim::dock_top_enter=0x010a001a; const int R::anim::dock_top_exit=0x010a001b; const int R::anim::fade_in=0x010a0000; const int R::anim::fade_out=0x010a0001; const int R::anim::fast_fade_in=0x010a001c; const int R::anim::fast_fade_out=0x010a001d; const int R::anim::grow_fade_in=0x010a001e; const int R::anim::grow_fade_in_center=0x010a001f; const int R::anim::grow_fade_in_from_bottom=0x010a0020; const int R::anim::input_method_enter=0x010a0021; const int R::anim::input_method_exit=0x010a0022; const int R::anim::input_method_extract_enter=0x010a0023; const int R::anim::input_method_extract_exit=0x010a0024; const int R::anim::input_method_fancy_enter=0x010a0025; const int R::anim::input_method_fancy_exit=0x010a0026; const int R::anim::keyguard_action_assist_enter=0x010a0027; const int R::anim::keyguard_action_assist_exit=0x010a0028; const int R::anim::keyguard_security_animate_in=0x010a0029; const int R::anim::keyguard_security_animate_out=0x010a002a; const int R::anim::keyguard_security_fade_in=0x010a002b; const int R::anim::keyguard_security_fade_out=0x010a002c; const int R::anim::linear_interpolator=0x010a000b; const int R::anim::lock_screen_behind_enter=0x010a002d; const int R::anim::lock_screen_enter=0x010a002e; const int R::anim::lock_screen_exit=0x010a002f; const int R::anim::lock_screen_wallpaper_behind_enter=0x010a0030; const int R::anim::options_panel_enter=0x010a0031; const int R::anim::options_panel_exit=0x010a0032; const int R::anim::overshoot_interpolator=0x010a0008; const int R::anim::push_down_in=0x010a0033; const int R::anim::push_down_in_no_alpha=0x010a0034; const int R::anim::push_down_out=0x010a0035; const int R::anim::push_down_out_no_alpha=0x010a0036; const int R::anim::push_up_in=0x010a0037; const int R::anim::push_up_out=0x010a0038; const int R::anim::recent_enter=0x010a0039; const int R::anim::recent_exit=0x010a003a; const int R::anim::recents_fade_in=0x010a003b; const int R::anim::recents_fade_out=0x010a003c; const int R::anim::screen_rotate_0_enter=0x010a003d; const int R::anim::screen_rotate_0_exit=0x010a003e; const int R::anim::screen_rotate_0_frame=0x010a003f; const int R::anim::screen_rotate_180_enter=0x010a0040; const int R::anim::screen_rotate_180_exit=0x010a0041; const int R::anim::screen_rotate_180_frame=0x010a0042; const int R::anim::screen_rotate_finish_enter=0x010a0043; const int R::anim::screen_rotate_finish_exit=0x010a0044; const int R::anim::screen_rotate_finish_frame=0x010a0045; const int R::anim::screen_rotate_minus_90_enter=0x010a0046; const int R::anim::screen_rotate_minus_90_exit=0x010a0047; const int R::anim::screen_rotate_minus_90_frame=0x010a0048; const int R::anim::screen_rotate_plus_90_enter=0x010a0049; const int R::anim::screen_rotate_plus_90_exit=0x010a004a; const int R::anim::screen_rotate_plus_90_frame=0x010a004b; const int R::anim::screen_rotate_start_enter=0x010a004c; const int R::anim::screen_rotate_start_exit=0x010a004d; const int R::anim::screen_rotate_start_frame=0x010a004e; const int R::anim::screen_user_enter=0x010a004f; const int R::anim::screen_user_exit=0x010a0050; const int R::anim::search_bar_enter=0x010a0051; const int R::anim::search_bar_exit=0x010a0052; const int R::anim::shrink_fade_out=0x010a0053; const int R::anim::shrink_fade_out_center=0x010a0054; const int R::anim::shrink_fade_out_from_bottom=0x010a0055; const int R::anim::slide_in_child_bottom=0x010a0056; const int R::anim::slide_in_left=0x010a0002; const int R::anim::slide_in_right=0x010a0057; const int R::anim::slide_in_up=0x010a0058; const int R::anim::slide_out_down=0x010a0059; const int R::anim::slide_out_left=0x010a005a; const int R::anim::slide_out_right=0x010a0003; const int R::anim::slow_fade_in=0x010a005b; const int R::anim::submenu_enter=0x010a005c; const int R::anim::submenu_exit=0x010a005d; const int R::anim::task_close_enter=0x010a005e; const int R::anim::task_close_exit=0x010a005f; const int R::anim::task_open_enter=0x010a0060; const int R::anim::task_open_exit=0x010a0061; const int R::anim::toast_enter=0x010a0062; const int R::anim::toast_exit=0x010a0063; const int R::anim::translucent_enter=0x010a0064; const int R::anim::translucent_exit=0x010a0065; const int R::anim::wallpaper_close_enter=0x010a0066; const int R::anim::wallpaper_close_exit=0x010a0067; const int R::anim::wallpaper_enter=0x010a0068; const int R::anim::wallpaper_exit=0x010a0069; const int R::anim::wallpaper_intra_close_enter=0x010a006a; const int R::anim::wallpaper_intra_close_exit=0x010a006b; const int R::anim::wallpaper_intra_open_enter=0x010a006c; const int R::anim::wallpaper_intra_open_exit=0x010a006d; const int R::anim::wallpaper_open_enter=0x010a006e; const int R::anim::wallpaper_open_exit=0x010a006f; const int R::anim::window_move_from_decor=0x010a0070; const int R::animator::fade_in=0x010b0000; const int R::animator::fade_out=0x010b0001; const int R::animator::fragment_close_enter=0x010b0002; const int R::animator::fragment_close_exit=0x010b0003; const int R::animator::fragment_fade_enter=0x010b0004; const int R::animator::fragment_fade_exit=0x010b0005; const int R::animator::fragment_open_enter=0x010b0006; const int R::animator::fragment_open_exit=0x010b0007; const int R::array::carrier_properties=0x01070038; const int R::array::common_nicknames=0x01070036; const int R::array::config_autoBrightnessButtonBacklightValues=0x0107002b; const int R::array::config_autoBrightnessKeyboardBacklightValues=0x0107002c; const int R::array::config_autoBrightnessLcdBacklightValues=0x0107002a; const int R::array::config_autoBrightnessLevels=0x01070029; const int R::array::config_cdma_dun_supported_types=0x01070020; const int R::array::config_data_usage_network_types=0x01070018; const int R::array::config_defaultNotificationVibePattern=0x01070032; const int R::array::config_keyboardTapVibePattern=0x01070025; const int R::array::config_locationProviderPackageNames=0x0107002d; const int R::array::config_longPressVibePattern=0x01070023; const int R::array::config_masterVolumeRamp=0x01070014; const int R::array::config_mobile_hotspot_provision_app=0x0107001e; const int R::array::config_notificationFallbackVibePattern=0x01070033; const int R::array::config_oemUsbModeOverride=0x01070031; const int R::array::config_protectedNetworks=0x01070016; const int R::array::config_safeModeDisabledVibePattern=0x01070026; const int R::array::config_safeModeEnabledVibePattern=0x01070027; const int R::array::config_scrollBarrierVibePattern=0x01070028; const int R::array::config_serialPorts=0x01070022; const int R::array::config_sms_enabled_locking_shift_tables=0x01070030; const int R::array::config_sms_enabled_single_shift_tables=0x0107002f; const int R::array::config_statusBarIcons=0x01070013; const int R::array::config_tether_bluetooth_regexs=0x0107001c; const int R::array::config_tether_dhcp_range=0x0107001d; const int R::array::config_tether_upstream_types=0x0107001f; const int R::array::config_tether_usb_regexs=0x01070019; const int R::array::config_tether_wifi_regexs=0x0107001a; const int R::array::config_tether_wimax_regexs=0x0107001b; const int R::array::config_twoDigitNumberPattern=0x0107002e; const int R::array::config_usbHostBlacklist=0x01070021; const int R::array::config_virtualKeyVibePattern=0x01070024; const int R::array::emailAddressTypes=0x01070000; const int R::array::imAddressTypes=0x01070037; const int R::array::imProtocols=0x01070001; const int R::array::lockscreen_direction_descriptions=0x0107000b; const int R::array::lockscreen_num_pad_klondike=0x01070012; const int R::array::lockscreen_target_descriptions_unlock_only=0x01070011; const int R::array::lockscreen_target_descriptions_when_silent=0x0107000a; const int R::array::lockscreen_target_descriptions_when_soundon=0x0107000d; const int R::array::lockscreen_target_descriptions_with_camera=0x0107000f; const int R::array::lockscreen_targets_unlock_only=0x01070010; const int R::array::lockscreen_targets_when_silent=0x01070009; const int R::array::lockscreen_targets_when_soundon=0x0107000c; const int R::array::lockscreen_targets_with_camera=0x0107000e; const int R::array::maps_starting_lat_lng=0x01070034; const int R::array::maps_starting_zoom=0x01070035; const int R::array::networkAttributes=0x01070015; const int R::array::organizationTypes=0x01070002; const int R::array::phoneTypes=0x01070003; const int R::array::postalAddressTypes=0x01070004; const int R::array::preloaded_color_state_lists=0x01070006; const int R::array::preloaded_drawables=0x01070005; const int R::array::radioAttributes=0x01070017; const int R::array::special_locale_codes=0x01070007; const int R::array::special_locale_names=0x01070008; const int R::attr::absListViewStyle=0x0101006a; const int R::attr::accessibilityEventTypes=0x01010380; const int R::attr::accessibilityFeedbackType=0x01010382; const int R::attr::accessibilityFlags=0x01010384; const int R::attr::accessibilityFocusedDrawable=0x010103f8; const int R::attr::accountPreferences=0x0101029f; const int R::attr::accountType=0x0101028f; const int R::attr::action=0x0101002d; const int R::attr::actionBarDivider=0x0101039b; const int R::attr::actionBarItemBackground=0x0101039c; const int R::attr::actionBarSize=0x010102eb; const int R::attr::actionBarSplitStyle=0x01010388; const int R::attr::actionBarStyle=0x010102ce; const int R::attr::actionBarTabBarStyle=0x010102f4; const int R::attr::actionBarTabStyle=0x010102f3; const int R::attr::actionBarTabTextStyle=0x010102f5; const int R::attr::actionBarWidgetTheme=0x01010397; const int R::attr::actionButtonStyle=0x010102d8; const int R::attr::actionDropDownStyle=0x010102d7; const int R::attr::actionLayout=0x010102fb; const int R::attr::actionMenuTextAppearance=0x01010360; const int R::attr::actionMenuTextColor=0x01010361; const int R::attr::actionModeBackground=0x010102db; const int R::attr::actionModeCloseButtonStyle=0x010102f7; const int R::attr::actionModeCloseDrawable=0x010102dc; const int R::attr::actionModeCopyDrawable=0x01010312; const int R::attr::actionModeCutDrawable=0x01010311; const int R::attr::actionModeFindDrawable=0x010103e2; const int R::attr::actionModePasteDrawable=0x01010313; const int R::attr::actionModePopupWindowStyle=0x010103e4; const int R::attr::actionModeSelectAllDrawable=0x0101037e; const int R::attr::actionModeShareDrawable=0x010103e1; const int R::attr::actionModeSplitBackground=0x0101039d; const int R::attr::actionModeStyle=0x01010394; const int R::attr::actionModeWebSearchDrawable=0x010103e3; const int R::attr::actionOverflowButtonStyle=0x010102f6; const int R::attr::actionProviderClass=0x01010389; const int R::attr::actionViewClass=0x010102fc; const int R::attr::activatedBackgroundIndicator=0x010102fd; const int R::attr::activityChooserViewStyle=0x010103e0; const int R::attr::activityCloseEnterAnimation=0x010100ba; const int R::attr::activityCloseExitAnimation=0x010100bb; const int R::attr::activityOpenEnterAnimation=0x010100b8; const int R::attr::activityOpenExitAnimation=0x010100b9; const int R::attr::addStatesFromChildren=0x010100f0; const int R::attr::adjustViewBounds=0x0101011e; const int R::attr::alertDialogButtonGroupStyle=0x010103d6; const int R::attr::alertDialogCenterButtons=0x010103d7; const int R::attr::alertDialogIcon=0x01010355; const int R::attr::alertDialogStyle=0x0101005d; const int R::attr::alertDialogTheme=0x01010309; const int R::attr::alignmentMode=0x0101037a; const int R::attr::allContactsName=0x010102cc; const int R::attr::allowBackup=0x01010280; const int R::attr::allowClearUserData=0x01010005; const int R::attr::allowMassStorage=0x01010446; const int R::attr::allowParallelSyncs=0x01010332; const int R::attr::allowScaling=0x0101042c; const int R::attr::allowSingleTap=0x01010259; const int R::attr::allowTaskReparenting=0x01010204; const int R::attr::alpha=0x0101031f; const int R::attr::alphabeticShortcut=0x010101e3; const int R::attr::alwaysDrawnWithCache=0x010100ef; const int R::attr::alwaysRetainTaskState=0x01010203; const int R::attr::alwaysTrackFinger=0x01010435; const int R::attr::angle=0x010101a0; const int R::attr::animateFirstView=0x010102d5; const int R::attr::animateLayoutChanges=0x010102f2; const int R::attr::animateOnClick=0x0101025c; const int R::attr::animation=0x010101cd; const int R::attr::animationCache=0x010100ed; const int R::attr::animationDuration=0x01010112; const int R::attr::animationOrder=0x010101ce; const int R::attr::animationResolution=0x0101031a; const int R::attr::antialias=0x0101011a; const int R::attr::anyDensity=0x0101026c; const int R::attr::apiKey=0x01010211; const int R::attr::aspect=0x01010438; const int R::attr::author=0x010102b4; const int R::attr::authorities=0x01010018; const int R::attr::autoAdvanceViewId=0x0101030f; const int R::attr::autoCompleteTextViewStyle=0x0101006b; const int R::attr::autoLink=0x010100b0; const int R::attr::autoStart=0x010102b5; const int R::attr::autoText=0x0101016a; const int R::attr::autoUrlDetect=0x0101028c; const int R::attr::background=0x010100d4; const int R::attr::backgroundDimAmount=0x01010032; const int R::attr::backgroundDimEnabled=0x0101021f; const int R::attr::backgroundSplit=0x0101038b; const int R::attr::backgroundStacked=0x0101038a; const int R::attr::backupAgent=0x0101027f; const int R::attr::baseline=0x0101031c; const int R::attr::baselineAlignBottom=0x01010122; const int R::attr::baselineAligned=0x01010126; const int R::attr::baselineAlignedChildIndex=0x01010127; const int R::attr::bitmap=0x0101043d; const int R::attr::borderBottom=0x01010408; const int R::attr::borderLeft=0x01010409; const int R::attr::borderRight=0x0101040a; const int R::attr::borderTop=0x01010407; const int R::attr::borderlessButtonStyle=0x0101032b; const int R::attr::bottom=0x010101b0; const int R::attr::bottomBright=0x010100cd; const int R::attr::bottomDark=0x010100c9; const int R::attr::bottomLeftRadius=0x010101ab; const int R::attr::bottomMedium=0x010100ce; const int R::attr::bottomOffset=0x01010257; const int R::attr::bottomRightRadius=0x010101ac; const int R::attr::breadCrumbShortTitle=0x01010304; const int R::attr::breadCrumbTitle=0x01010303; const int R::attr::bufferType=0x0101014e; const int R::attr::button=0x01010107; const int R::attr::buttonBarButtonStyle=0x0101032f; const int R::attr::buttonBarStyle=0x0101032e; const int R::attr::buttonStyle=0x01010048; const int R::attr::buttonStyleInset=0x0101004a; const int R::attr::buttonStyleSmall=0x01010049; const int R::attr::buttonStyleToggle=0x0101004b; const int R::attr::cacheColorHint=0x01010101; const int R::attr::calendarViewShown=0x0101034c; const int R::attr::calendarViewStyle=0x0101035d; const int R::attr::canRetrieveWindowContent=0x01010385; const int R::attr::candidatesTextStyleSpans=0x01010230; const int R::attr::cantSaveState=0x01010456; const int R::attr::capitalize=0x01010169; const int R::attr::centerBright=0x010100cc; const int R::attr::centerColor=0x0101020b; const int R::attr::centerDark=0x010100c8; const int R::attr::centerMedium=0x010100cf; const int R::attr::centerX=0x010101a2; const int R::attr::centerY=0x010101a3; const int R::attr::checkBoxPreferenceStyle=0x0101008f; const int R::attr::checkMark=0x01010108; const int R::attr::checkable=0x010101e5; const int R::attr::checkableBehavior=0x010101e0; const int R::attr::checkboxStyle=0x0101006c; const int R::attr::checked=0x01010106; const int R::attr::checkedButton=0x01010148; const int R::attr::checkedTextViewStyle=0x010103c8; const int R::attr::chevronDrawables=0x0101042f; const int R::attr::childDivider=0x01010111; const int R::attr::childIndicator=0x0101010c; const int R::attr::childIndicatorLeft=0x0101010f; const int R::attr::childIndicatorRight=0x01010110; const int R::attr::choiceMode=0x0101012b; const int R::attr::clearTaskOnLaunch=0x01010015; const int R::attr::clickColor=0x0101040f; const int R::attr::clickable=0x010100e5; const int R::attr::clipChildren=0x010100ea; const int R::attr::clipOrientation=0x0101020a; const int R::attr::clipToPadding=0x010100eb; const int R::attr::codes=0x01010242; const int R::attr::collapseColumns=0x0101014b; const int R::attr::color=0x010101a5; const int R::attr::colorActivatedHighlight=0x01010390; const int R::attr::colorBackground=0x01010031; const int R::attr::colorBackgroundCacheHint=0x010102ab; const int R::attr::colorFocusedHighlight=0x0101038f; const int R::attr::colorForeground=0x01010030; const int R::attr::colorForegroundInverse=0x01010206; const int R::attr::colorLongPressedHighlight=0x0101038e; const int R::attr::colorMultiSelectHighlight=0x01010391; const int R::attr::colorPressedHighlight=0x0101038d; const int R::attr::columnCount=0x01010377; const int R::attr::columnDelay=0x010101cf; const int R::attr::columnOrderPreserved=0x01010378; const int R::attr::columnWidth=0x01010117; const int R::attr::compatibleWidthLimitDp=0x01010365; const int R::attr::completionHint=0x01010172; const int R::attr::completionHintView=0x01010173; const int R::attr::completionThreshold=0x01010174; const int R::attr::configChanges=0x0101001f; const int R::attr::configure=0x0101025d; const int R::attr::constantSize=0x01010196; const int R::attr::content=0x0101025b; const int R::attr::contentAuthority=0x01010290; const int R::attr::contentDescription=0x01010273; const int R::attr::cropToPadding=0x01010123; const int R::attr::cursorVisible=0x01010152; const int R::attr::customNavigationLayout=0x010102d2; const int R::attr::customTokens=0x0101033b; const int R::attr::cycles=0x010101d4; const int R::attr::dashGap=0x010101a7; const int R::attr::dashWidth=0x010101a6; const int R::attr::data=0x0101002e; const int R::attr::datePickerStyle=0x0101035c; const int R::attr::dateTextAppearance=0x01010349; const int R::attr::debuggable=0x0101000f; const int R::attr::defaultValue=0x010101ed; const int R::attr::delay=0x010101cc; const int R::attr::dependency=0x010101ec; const int R::attr::descendantFocusability=0x010100f1; const int R::attr::description=0x01010020; const int R::attr::detachWallpaper=0x010102a6; const int R::attr::detailColumn=0x010102a3; const int R::attr::detailSocialSummary=0x010102a4; const int R::attr::detailsElementBackground=0x0101034e; const int R::attr::dial=0x01010102; const int R::attr::dialogCustomTitleDecorLayout=0x010103e8; const int R::attr::dialogIcon=0x010101f4; const int R::attr::dialogLayout=0x010101f7; const int R::attr::dialogMessage=0x010101f3; const int R::attr::dialogPreferenceStyle=0x01010091; const int R::attr::dialogTheme=0x01010308; const int R::attr::dialogTitle=0x010101f2; const int R::attr::dialogTitleDecorLayout=0x010103e9; const int R::attr::dialogTitleIconsDecorLayout=0x010103e7; const int R::attr::digit=0x01010453; const int R::attr::digits=0x01010166; const int R::attr::direction=0x010101d1; const int R::attr::directionDescriptions=0x010103a1; const int R::attr::directionPriority=0x010101d2; const int R::attr::disableChildrenWhenDisabled=0x01010412; const int R::attr::disableDependentsState=0x010101f1; const int R::attr::disabledAlpha=0x01010033; const int R::attr::displayOptions=0x010102d0; const int R::attr::dither=0x0101011c; const int R::attr::divider=0x01010129; const int R::attr::dividerHeight=0x0101012a; const int R::attr::dividerHorizontal=0x0101032c; const int R::attr::dividerPadding=0x0101032a; const int R::attr::dividerVertical=0x0101030a; const int R::attr::dotSize=0x0101044c; const int R::attr::drawSelectorOnTop=0x010100fc; const int R::attr::drawable=0x01010199; const int R::attr::drawableAlpha=0x01010406; const int R::attr::drawableBottom=0x0101016e; const int R::attr::drawableEnd=0x01010393; const int R::attr::drawableLeft=0x0101016f; const int R::attr::drawablePadding=0x01010171; const int R::attr::drawableRight=0x01010170; const int R::attr::drawableStart=0x01010392; const int R::attr::drawableTop=0x0101016d; const int R::attr::drawingCacheQuality=0x010100e8; const int R::attr::dropDownAnchor=0x01010263; const int R::attr::dropDownHeight=0x01010283; const int R::attr::dropDownHintAppearance=0x01010088; const int R::attr::dropDownHorizontalOffset=0x010102ac; const int R::attr::dropDownItemStyle=0x01010086; const int R::attr::dropDownListViewStyle=0x0101006d; const int R::attr::dropDownSelector=0x01010175; const int R::attr::dropDownSpinnerStyle=0x010102d6; const int R::attr::dropDownVerticalOffset=0x010102ad; const int R::attr::dropDownWidth=0x01010262; const int R::attr::dropdownListPreferredItemHeight=0x010103d4; const int R::attr::duplicateParentState=0x010100e9; const int R::attr::duration=0x01010198; const int R::attr::editTextBackground=0x01010352; const int R::attr::editTextColor=0x01010351; const int R::attr::editTextPreferenceStyle=0x01010092; const int R::attr::editTextStyle=0x0101006e; const int R::attr::editable=0x0101016b; const int R::attr::editorExtras=0x01010224; const int R::attr::ellipsize=0x010100ab; const int R::attr::ems=0x01010158; const int R::attr::emulated=0x01010444; const int R::attr::enabled=0x0101000e; const int R::attr::endColor=0x0101019e; const int R::attr::endYear=0x0101017d; const int R::attr::enterFadeDuration=0x0101030c; const int R::attr::entries=0x010100b2; const int R::attr::entryValues=0x010101f8; const int R::attr::errorMessageAboveBackground=0x010103d2; const int R::attr::errorMessageBackground=0x010103d1; const int R::attr::eventsInterceptionEnabled=0x0101027d; const int R::attr::excludeFromRecents=0x01010017; const int R::attr::exitFadeDuration=0x0101030d; const int R::attr::expandActivityOverflowButtonDrawable=0x01010425; const int R::attr::expandableListPreferredChildIndicatorLeft=0x01010052; const int R::attr::expandableListPreferredChildIndicatorRight=0x01010053; const int R::attr::expandableListPreferredChildPaddingLeft=0x0101004f; const int R::attr::expandableListPreferredItemIndicatorLeft=0x01010050; const int R::attr::expandableListPreferredItemIndicatorRight=0x01010051; const int R::attr::expandableListPreferredItemPaddingLeft=0x0101004e; const int R::attr::expandableListViewStyle=0x0101006f; const int R::attr::expandableListViewWhiteStyle=0x010102b6; const int R::attr::exported=0x01010010; const int R::attr::externalRouteEnabledDrawable=0x01010448; const int R::attr::extraTension=0x0101026b; const int R::attr::factor=0x010101d3; const int R::attr::fadeDuration=0x01010278; const int R::attr::fadeEnabled=0x0101027e; const int R::attr::fadeOffset=0x01010277; const int R::attr::fadeScrollbars=0x010102aa; const int R::attr::fadingEdge=0x010100df; const int R::attr::fadingEdgeLength=0x010100e0; const int R::attr::fastScrollAlwaysVisible=0x01010335; const int R::attr::fastScrollEnabled=0x01010226; const int R::attr::fastScrollOverlayPosition=0x0101033a; const int R::attr::fastScrollPreviewBackgroundLeft=0x01010337; const int R::attr::fastScrollPreviewBackgroundRight=0x01010338; const int R::attr::fastScrollTextColor=0x01010359; const int R::attr::fastScrollThumbDrawable=0x01010336; const int R::attr::fastScrollTrackDrawable=0x01010339; const int R::attr::feedbackCount=0x01010434; const int R::attr::fillAfter=0x010101bd; const int R::attr::fillBefore=0x010101bc; const int R::attr::fillEnabled=0x0101024f; const int R::attr::fillViewport=0x0101017a; const int R::attr::filter=0x0101011b; const int R::attr::filterTouchesWhenObscured=0x010102c4; const int R::attr::findOnPageNextDrawable=0x010103f9; const int R::attr::findOnPagePreviousDrawable=0x010103fa; const int R::attr::finishOnCloseSystemDialogs=0x010102a7; const int R::attr::finishOnTaskLaunch=0x01010014; const int R::attr::firstDayOfWeek=0x0101033d; const int R::attr::firstItemOffset=0x0101042a; const int R::attr::fitsSystemWindows=0x010100dd; const int R::attr::flipInterval=0x01010179; const int R::attr::focusable=0x010100da; const int R::attr::focusableInTouchMode=0x010100db; const int R::attr::focusedMonthDateColor=0x01010343; const int R::attr::fontFamily=0x010103ac; const int R::attr::footerDividersEnabled=0x0101022f; const int R::attr::foreground=0x01010109; const int R::attr::foregroundGravity=0x01010200; const int R::attr::foregroundInsidePadding=0x01010405; const int R::attr::format=0x01010105; const int R::attr::format12Hour=0x010103ca; const int R::attr::format24Hour=0x010103cb; const int R::attr::fragment=0x010102e3; const int R::attr::fragmentCloseEnterAnimation=0x010102e7; const int R::attr::fragmentCloseExitAnimation=0x010102e8; const int R::attr::fragmentFadeEnterAnimation=0x010102e9; const int R::attr::fragmentFadeExitAnimation=0x010102ea; const int R::attr::fragmentOpenEnterAnimation=0x010102e5; const int R::attr::fragmentOpenExitAnimation=0x010102e6; const int R::attr::frameDuration=0x01010421; const int R::attr::framesCount=0x01010422; const int R::attr::freezesText=0x0101016c; const int R::attr::fromAlpha=0x010101ca; const int R::attr::fromDegrees=0x010101b3; const int R::attr::fromXDelta=0x010101c6; const int R::attr::fromXScale=0x010101c2; const int R::attr::fromYDelta=0x010101c8; const int R::attr::fromYScale=0x010101c4; const int R::attr::fullBright=0x010100ca; const int R::attr::fullDark=0x010100c6; const int R::attr::functionalTest=0x01010023; const int R::attr::galleryItemBackground=0x0101004c; const int R::attr::galleryStyle=0x01010070; const int R::attr::gestureColor=0x01010275; const int R::attr::gestureOverlayViewStyle=0x010103db; const int R::attr::gestureStrokeAngleThreshold=0x0101027c; const int R::attr::gestureStrokeLengthThreshold=0x0101027a; const int R::attr::gestureStrokeSquarenessThreshold=0x0101027b; const int R::attr::gestureStrokeType=0x01010279; const int R::attr::gestureStrokeWidth=0x01010274; const int R::attr::glEsVersion=0x01010281; const int R::attr::glowDot=0x0101044e; const int R::attr::glowRadius=0x01010429; const int R::attr::gradientRadius=0x010101a4; const int R::attr::grantUriPermissions=0x0101001b; const int R::attr::gravity=0x010100af; const int R::attr::gridViewStyle=0x01010071; const int R::attr::groupIndicator=0x0101010b; const int R::attr::hand_hour=0x01010103; const int R::attr::hand_minute=0x01010104; const int R::attr::handle=0x0101025a; const int R::attr::handleDrawable=0x0101042e; const int R::attr::handleProfiling=0x01010022; const int R::attr::hapticFeedbackEnabled=0x0101025e; const int R::attr::hardwareAccelerated=0x010102d3; const int R::attr::hasCode=0x0101000c; const int R::attr::headerBackground=0x0101012f; const int R::attr::headerDividersEnabled=0x0101022e; const int R::attr::height=0x01010155; const int R::attr::hint=0x01010150; const int R::attr::homeAsUpIndicator=0x0101030b; const int R::attr::homeLayout=0x0101031d; const int R::attr::horizontalDivider=0x0101012d; const int R::attr::horizontalGap=0x0101023f; const int R::attr::horizontalProgressLayout=0x01010404; const int R::attr::horizontalScrollViewStyle=0x01010353; const int R::attr::horizontalSpacing=0x01010114; const int R::attr::host=0x01010028; const int R::attr::hotSpotX=0x0101043e; const int R::attr::hotSpotY=0x0101043f; const int R::attr::icon=0x01010002; const int R::attr::iconPreview=0x01010249; const int R::attr::iconifiedByDefault=0x010102fa; const int R::attr::id=0x010100d0; const int R::attr::ignoreGravity=0x010101ff; const int R::attr::imageButtonStyle=0x01010072; const int R::attr::imageWellStyle=0x01010073; const int R::attr::imeActionId=0x01010266; const int R::attr::imeActionLabel=0x01010265; const int R::attr::imeExtractEnterAnimation=0x01010268; const int R::attr::imeExtractExitAnimation=0x01010269; const int R::attr::imeFullscreenBackground=0x0101022c; const int R::attr::imeOptions=0x01010264; const int R::attr::imeSubtypeExtraValue=0x010102ee; const int R::attr::imeSubtypeLocale=0x010102ec; const int R::attr::imeSubtypeMode=0x010102ed; const int R::attr::immersive=0x010102c0; const int R::attr::importantForAccessibility=0x010103aa; const int R::attr::inAnimation=0x01010177; const int R::attr::includeFontPadding=0x0101015f; const int R::attr::includeInGlobalSearch=0x0101026e; const int R::attr::indeterminate=0x01010139; const int R::attr::indeterminateBehavior=0x0101013e; const int R::attr::indeterminateDrawable=0x0101013b; const int R::attr::indeterminateDuration=0x0101013d; const int R::attr::indeterminateOnly=0x0101013a; const int R::attr::indeterminateProgressStyle=0x01010318; const int R::attr::indicatorLeft=0x0101010d; const int R::attr::indicatorRight=0x0101010e; const int R::attr::inflatedId=0x010100f3; const int R::attr::initOrder=0x0101001a; const int R::attr::initialActivityCount=0x01010424; const int R::attr::initialKeyguardLayout=0x010103c2; const int R::attr::initialLayout=0x01010251; const int R::attr::innerRadius=0x0101025f; const int R::attr::innerRadiusRatio=0x0101019b; const int R::attr::inputMethod=0x01010168; const int R::attr::inputType=0x01010220; const int R::attr::insetBottom=0x010101ba; const int R::attr::insetLeft=0x010101b7; const int R::attr::insetRight=0x010101b8; const int R::attr::insetTop=0x010101b9; const int R::attr::installLocation=0x010102b7; const int R::attr::internalLayout=0x01010413; const int R::attr::internalMaxHeight=0x0101041d; const int R::attr::internalMaxWidth=0x0101041f; const int R::attr::internalMinHeight=0x0101041c; const int R::attr::internalMinWidth=0x0101041e; const int R::attr::interpolator=0x01010141; const int R::attr::isAlwaysSyncable=0x01010333; const int R::attr::isAuxiliary=0x0101037f; const int R::attr::isDefault=0x01010221; const int R::attr::isIndicator=0x01010147; const int R::attr::isModifier=0x01010246; const int R::attr::isRepeatable=0x01010248; const int R::attr::isScrollContainer=0x0101024e; const int R::attr::isSticky=0x01010247; const int R::attr::isolatedProcess=0x010103a9; const int R::attr::itemBackground=0x01010130; const int R::attr::itemIconDisabledAlpha=0x01010131; const int R::attr::itemPadding=0x0101032d; const int R::attr::itemTextAppearance=0x0101012c; const int R::attr::keepScreenOn=0x01010216; const int R::attr::key=0x010101e8; const int R::attr::keyBackground=0x01010233; const int R::attr::keyEdgeFlags=0x01010245; const int R::attr::keyHeight=0x0101023e; const int R::attr::keyIcon=0x0101024c; const int R::attr::keyLabel=0x0101024b; const int R::attr::keyOutputText=0x0101024a; const int R::attr::keyPreviewHeight=0x01010239; const int R::attr::keyPreviewLayout=0x01010237; const int R::attr::keyPreviewOffset=0x01010238; const int R::attr::keyTextColor=0x01010236; const int R::attr::keyTextSize=0x01010234; const int R::attr::keyWidth=0x0101023d; const int R::attr::keyboardLayout=0x010103ab; const int R::attr::keyboardMode=0x0101024d; const int R::attr::keyboardViewStyle=0x01010426; const int R::attr::keycode=0x010100c5; const int R::attr::killAfterRestore=0x0101029c; const int R::attr::label=0x01010001; const int R::attr::labelFor=0x010103c6; const int R::attr::labelTextSize=0x01010235; const int R::attr::largeHeap=0x0101035a; const int R::attr::largeScreens=0x01010286; const int R::attr::largestWidthLimitDp=0x01010366; const int R::attr::launchMode=0x0101001d; const int R::attr::layerType=0x01010354; const int R::attr::layout=0x010100f2; const int R::attr::layoutAnimation=0x010100ec; const int R::attr::layoutDirection=0x010103b2; const int R::attr::layout_above=0x01010184; const int R::attr::layout_alignBaseline=0x01010186; const int R::attr::layout_alignBottom=0x0101018a; const int R::attr::layout_alignEnd=0x010103ba; const int R::attr::layout_alignLeft=0x01010187; const int R::attr::layout_alignParentBottom=0x0101018e; const int R::attr::layout_alignParentEnd=0x010103bc; const int R::attr::layout_alignParentLeft=0x0101018b; const int R::attr::layout_alignParentRight=0x0101018d; const int R::attr::layout_alignParentStart=0x010103bb; const int R::attr::layout_alignParentTop=0x0101018c; const int R::attr::layout_alignRight=0x01010189; const int R::attr::layout_alignStart=0x010103b9; const int R::attr::layout_alignTop=0x01010188; const int R::attr::layout_alignWithParentIfMissing=0x01010192; const int R::attr::layout_below=0x01010185; const int R::attr::layout_centerHorizontal=0x01010190; const int R::attr::layout_centerInParent=0x0101018f; const int R::attr::layout_centerVertical=0x01010191; const int R::attr::layout_centerWithinArea=0x01010451; const int R::attr::layout_childType=0x01010450; const int R::attr::layout_column=0x0101014c; const int R::attr::layout_columnSpan=0x0101037d; const int R::attr::layout_gravity=0x010100b3; const int R::attr::layout_height=0x010100f5; const int R::attr::layout_margin=0x010100f6; const int R::attr::layout_marginBottom=0x010100fa; const int R::attr::layout_marginEnd=0x010103b6; const int R::attr::layout_marginLeft=0x010100f7; const int R::attr::layout_marginRight=0x010100f9; const int R::attr::layout_marginStart=0x010103b5; const int R::attr::layout_marginTop=0x010100f8; const int R::attr::layout_maxHeight=0x01010436; const int R::attr::layout_maxWidth=0x01010452; const int R::attr::layout_minHeight=0x01010437; const int R::attr::layout_removeBorders=0x0101040b; const int R::attr::layout_row=0x0101037b; const int R::attr::layout_rowSpan=0x0101037c; const int R::attr::layout_scale=0x01010193; const int R::attr::layout_span=0x0101014d; const int R::attr::layout_toEndOf=0x010103b8; const int R::attr::layout_toLeftOf=0x01010182; const int R::attr::layout_toRightOf=0x01010183; const int R::attr::layout_toStartOf=0x010103b7; const int R::attr::layout_weight=0x01010181; const int R::attr::layout_width=0x010100f4; const int R::attr::layout_x=0x0101017f; const int R::attr::layout_y=0x01010180; const int R::attr::left=0x010101ad; const int R::attr::leftToRight=0x0101044f; const int R::attr::lineSpacingExtra=0x01010217; const int R::attr::lineSpacingMultiplier=0x01010218; const int R::attr::lines=0x01010154; const int R::attr::linksClickable=0x010100b1; const int R::attr::listChoiceBackgroundIndicator=0x010102f0; const int R::attr::listChoiceIndicatorMultiple=0x0101021a; const int R::attr::listChoiceIndicatorSingle=0x01010219; const int R::attr::listDivider=0x01010214; const int R::attr::listDividerAlertDialog=0x01010305; const int R::attr::listItemLayout=0x01010402; const int R::attr::listLayout=0x010103ff; const int R::attr::listPopupWindowStyle=0x010102ff; const int R::attr::listPreferredItemHeight=0x0101004d; const int R::attr::listPreferredItemHeightLarge=0x01010386; const int R::attr::listPreferredItemHeightSmall=0x01010387; const int R::attr::listPreferredItemPaddingEnd=0x010103be; const int R::attr::listPreferredItemPaddingLeft=0x010103a3; const int R::attr::listPreferredItemPaddingRight=0x010103a4; const int R::attr::listPreferredItemPaddingStart=0x010103bd; const int R::attr::listSelector=0x010100fb; const int R::attr::listSeparatorTextViewStyle=0x01010208; const int R::attr::listViewStyle=0x01010074; const int R::attr::listViewWhiteStyle=0x01010075; const int R::attr::logo=0x010102be; const int R::attr::longClickable=0x010100e6; const int R::attr::loopViews=0x01010307; const int R::attr::magneticTargets=0x0101042b; const int R::attr::majorWeightMax=0x01010417; const int R::attr::majorWeightMin=0x01010415; const int R::attr::manageSpaceActivity=0x01010004; const int R::attr::mapViewStyle=0x0101008a; const int R::attr::marqueeRepeatLimit=0x0101021d; const int R::attr::max=0x01010136; const int R::attr::maxDate=0x01010340; const int R::attr::maxEms=0x01010157; const int R::attr::maxFileSize=0x01010447; const int R::attr::maxHeight=0x01010120; const int R::attr::maxItems=0x0101040d; const int R::attr::maxItemsPerRow=0x01010134; const int R::attr::maxLength=0x01010160; const int R::attr::maxLevel=0x010101b2; const int R::attr::maxLines=0x01010153; const int R::attr::maxRows=0x01010133; const int R::attr::maxSdkVersion=0x01010271; const int R::attr::maxWidth=0x0101011f; const int R::attr::measureAllChildren=0x0101010a; const int R::attr::measureWithLargestChild=0x010102d4; const int R::attr::mediaRouteButtonStyle=0x010103ad; const int R::attr::mediaRouteTypes=0x010103ae; const int R::attr::menuCategory=0x010101de; const int R::attr::mimeType=0x01010026; const int R::attr::minDate=0x0101033f; const int R::attr::minEms=0x0101015a; const int R::attr::minHeight=0x01010140; const int R::attr::minLevel=0x010101b1; const int R::attr::minLines=0x01010156; const int R::attr::minResizeHeight=0x01010396; const int R::attr::minResizeWidth=0x01010395; const int R::attr::minSdkVersion=0x0101020c; const int R::attr::minWidth=0x0101013f; const int R::attr::minorWeightMax=0x01010418; const int R::attr::minorWeightMin=0x01010416; const int R::attr::mode=0x0101017e; const int R::attr::moreIcon=0x01010135; const int R::attr::mountPoint=0x01010440; const int R::attr::mtpReserve=0x01010445; const int R::attr::multiChoiceItemLayout=0x01010400; const int R::attr::multiprocess=0x01010013; const int R::attr::name=0x01010003; const int R::attr::navigationMode=0x010102cf; const int R::attr::negativeButtonText=0x010101f6; const int R::attr::neverEncrypt=0x01010455; const int R::attr::nextFocusDown=0x010100e4; const int R::attr::nextFocusForward=0x0101033c; const int R::attr::nextFocusLeft=0x010100e1; const int R::attr::nextFocusRight=0x010100e2; const int R::attr::nextFocusUp=0x010100e3; const int R::attr::noHistory=0x0101022d; const int R::attr::normalScreens=0x01010285; const int R::attr::notificationTimeout=0x01010383; const int R::attr::numColumns=0x01010118; const int R::attr::numDots=0x0101044d; const int R::attr::numStars=0x01010144; const int R::attr::numberPickerStyle=0x010103de; const int R::attr::numeric=0x01010165; const int R::attr::numericShortcut=0x010101e4; const int R::attr::onClick=0x0101026f; const int R::attr::oneshot=0x01010197; const int R::attr::opacity=0x0101031e; const int R::attr::order=0x010101ea; const int R::attr::orderInCategory=0x010101df; const int R::attr::ordering=0x010102e2; const int R::attr::orderingFromXml=0x010101e7; const int R::attr::orientation=0x010100c4; const int R::attr::outAnimation=0x01010178; const int R::attr::outerRadius=0x01010431; const int R::attr::outerRingDrawable=0x01010427; const int R::attr::overScrollFooter=0x010102c3; const int R::attr::overScrollHeader=0x010102c2; const int R::attr::overScrollMode=0x010102c1; const int R::attr::overridesImplicitlyEnabledSubtype=0x010103a2; const int R::attr::packageNames=0x01010381; const int R::attr::padding=0x010100d5; const int R::attr::paddingBottom=0x010100d9; const int R::attr::paddingEnd=0x010103b4; const int R::attr::paddingLeft=0x010100d6; const int R::attr::paddingRight=0x010100d8; const int R::attr::paddingStart=0x010103b3; const int R::attr::paddingTop=0x010100d7; const int R::attr::pageSpacing=0x01010449; const int R::attr::panelBackground=0x0101005e; const int R::attr::panelColorBackground=0x01010061; const int R::attr::panelColorForeground=0x01010060; const int R::attr::panelFullBackground=0x0101005f; const int R::attr::panelMenuIsCompact=0x010103d8; const int R::attr::panelMenuListTheme=0x010103da; const int R::attr::panelMenuListWidth=0x010103d9; const int R::attr::panelTextAppearance=0x01010062; const int R::attr::parentActivityName=0x010103a7; const int R::attr::password=0x0101015c; const int R::attr::path=0x0101002a; const int R::attr::pathPattern=0x0101002c; const int R::attr::pathPrefix=0x0101002b; const int R::attr::permission=0x01010006; const int R::attr::permissionFlags=0x010103c7; const int R::attr::permissionGroup=0x0101000a; const int R::attr::permissionGroupFlags=0x010103c5; const int R::attr::persistent=0x0101000d; const int R::attr::persistentDrawingCache=0x010100ee; const int R::attr::phoneNumber=0x01010167; const int R::attr::pivotX=0x010101b5; const int R::attr::pivotY=0x010101b6; const int R::attr::pointDrawable=0x01010428; const int R::attr::pointerIconArrow=0x01010439; const int R::attr::pointerIconSpotAnchor=0x0101043c; const int R::attr::pointerIconSpotHover=0x0101043a; const int R::attr::pointerIconSpotTouch=0x0101043b; const int R::attr::pointerStyle=0x010103f7; const int R::attr::popupAnimationStyle=0x010102c9; const int R::attr::popupBackground=0x01010176; const int R::attr::popupCharacters=0x01010244; const int R::attr::popupKeyboard=0x01010243; const int R::attr::popupLayout=0x0101023b; const int R::attr::popupMenuStyle=0x01010300; const int R::attr::popupPromptView=0x01010411; const int R::attr::popupWindowStyle=0x01010076; const int R::attr::port=0x01010029; const int R::attr::positiveButtonText=0x010101f5; const int R::attr::preferenceCategoryStyle=0x0101008c; const int R::attr::preferenceFragmentStyle=0x010103e5; const int R::attr::preferenceFrameLayoutStyle=0x010103f5; const int R::attr::preferenceInformationStyle=0x0101008d; const int R::attr::preferenceLayoutChild=0x01010094; const int R::attr::preferencePanelStyle=0x010103e6; const int R::attr::preferenceScreenStyle=0x0101008b; const int R::attr::preferenceStyle=0x0101008e; const int R::attr::presentationTheme=0x010103c0; const int R::attr::preserveIconSpacing=0x0101040c; const int R::attr::previewImage=0x010102da; const int R::attr::primary=0x01010442; const int R::attr::primaryUserOnly=0x01010457; const int R::attr::priority=0x0101001c; const int R::attr::privateImeOptions=0x01010223; const int R::attr::process=0x01010011; const int R::attr::progress=0x01010137; const int R::attr::progressBarPadding=0x01010319; const int R::attr::progressBarStyle=0x01010077; const int R::attr::progressBarStyleHorizontal=0x01010078; const int R::attr::progressBarStyleInverse=0x01010287; const int R::attr::progressBarStyleLarge=0x0101007a; const int R::attr::progressBarStyleLargeInverse=0x01010289; const int R::attr::progressBarStyleSmall=0x01010079; const int R::attr::progressBarStyleSmallInverse=0x01010288; const int R::attr::progressBarStyleSmallTitle=0x0101020f; const int R::attr::progressDrawable=0x0101013c; const int R::attr::progressLayout=0x01010403; const int R::attr::prompt=0x0101017b; const int R::attr::propertyName=0x010102e1; const int R::attr::protectionLevel=0x01010009; const int R::attr::publicKey=0x010103a6; const int R::attr::queryActionMsg=0x010101db; const int R::attr::queryAfterZeroResults=0x01010282; const int R::attr::queryHint=0x01010358; const int R::attr::quickContactBadgeOverlay=0x010103dc; const int R::attr::quickContactBadgeStyleSmallWindowLarge=0x010102b3; const int R::attr::quickContactBadgeStyleSmallWindowMedium=0x010102b2; const int R::attr::quickContactBadgeStyleSmallWindowSmall=0x010102b1; const int R::attr::quickContactBadgeStyleWindowLarge=0x010102b0; const int R::attr::quickContactBadgeStyleWindowMedium=0x010102af; const int R::attr::quickContactBadgeStyleWindowSmall=0x010102ae; const int R::attr::quickContactWindowSize=0x01010414; const int R::attr::radioButtonStyle=0x0101007e; const int R::attr::radius=0x010101a8; const int R::attr::rating=0x01010145; const int R::attr::ratingBarStyle=0x0101007c; const int R::attr::ratingBarStyleIndicator=0x01010210; const int R::attr::ratingBarStyleSmall=0x0101007d; const int R::attr::readPermission=0x01010007; const int R::attr::removable=0x01010443; const int R::attr::repeatCount=0x010101bf; const int R::attr::repeatMode=0x010101c0; const int R::attr::reqFiveWayNav=0x01010232; const int R::attr::reqHardKeyboard=0x01010229; const int R::attr::reqKeyboardType=0x01010228; const int R::attr::reqNavigation=0x0101022a; const int R::attr::reqTouchScreen=0x01010227; const int R::attr::required=0x0101028e; const int R::attr::requiresFadingEdge=0x010103a5; const int R::attr::requiresSmallestWidthDp=0x01010364; const int R::attr::resOutColor=0x0101040e; const int R::attr::resizeMode=0x01010363; const int R::attr::resizeable=0x0101028d; const int R::attr::resource=0x01010025; const int R::attr::restoreAnyVersion=0x010102ba; const int R::attr::restoreNeedsApplication=0x0101029d; const int R::attr::right=0x010101af; const int R::attr::ringtonePreferenceStyle=0x01010093; const int R::attr::ringtoneType=0x010101f9; const int R::attr::rotation=0x01010326; const int R::attr::rotationX=0x01010327; const int R::attr::rotationY=0x01010328; const int R::attr::rowCount=0x01010375; const int R::attr::rowDelay=0x010101d0; const int R::attr::rowEdgeFlags=0x01010241; const int R::attr::rowHeight=0x01010132; const int R::attr::rowOrderPreserved=0x01010376; const int R::attr::saveEnabled=0x010100e7; const int R::attr::scaleGravity=0x010101fe; const int R::attr::scaleHeight=0x010101fd; const int R::attr::scaleType=0x0101011d; const int R::attr::scaleWidth=0x010101fc; const int R::attr::scaleX=0x01010324; const int R::attr::scaleY=0x01010325; const int R::attr::scheme=0x01010027; const int R::attr::screenDensity=0x010102cb; const int R::attr::screenOrientation=0x0101001e; const int R::attr::screenSize=0x010102ca; const int R::attr::scrollHorizontally=0x0101015b; const int R::attr::scrollIndicatorPaddingLeft=0x0101044a; const int R::attr::scrollIndicatorPaddingRight=0x0101044b; const int R::attr::scrollViewStyle=0x01010080; const int R::attr::scrollX=0x010100d2; const int R::attr::scrollY=0x010100d3; const int R::attr::scrollbarAlwaysDrawHorizontalTrack=0x01010068; const int R::attr::scrollbarAlwaysDrawVerticalTrack=0x01010069; const int R::attr::scrollbarDefaultDelayBeforeFade=0x010102a9; const int R::attr::scrollbarFadeDuration=0x010102a8; const int R::attr::scrollbarSize=0x01010063; const int R::attr::scrollbarStyle=0x0101007f; const int R::attr::scrollbarThumbHorizontal=0x01010064; const int R::attr::scrollbarThumbVertical=0x01010065; const int R::attr::scrollbarTrackHorizontal=0x01010066; const int R::attr::scrollbarTrackVertical=0x01010067; const int R::attr::scrollbars=0x010100de; const int R::attr::scrollingCache=0x010100fe; const int R::attr::searchButtonText=0x01010205; const int R::attr::searchDialogTheme=0x010103f4; const int R::attr::searchDropdownBackground=0x010103eb; const int R::attr::searchMode=0x010101d5; const int R::attr::searchResultListItemHeight=0x010103d3; const int R::attr::searchSettingsDescription=0x0101028a; const int R::attr::searchSuggestAuthority=0x010101d6; const int R::attr::searchSuggestIntentAction=0x010101d9; const int R::attr::searchSuggestIntentData=0x010101da; const int R::attr::searchSuggestPath=0x010101d7; const int R::attr::searchSuggestSelection=0x010101d8; const int R::attr::searchSuggestThreshold=0x0101026d; const int R::attr::searchViewCloseIcon=0x010103ec; const int R::attr::searchViewEditQuery=0x010103f0; const int R::attr::searchViewEditQueryBackground=0x010103f1; const int R::attr::searchViewGoIcon=0x010103ed; const int R::attr::searchViewSearchIcon=0x010103ee; const int R::attr::searchViewTextField=0x010103f2; const int R::attr::searchViewTextFieldRight=0x010103f3; const int R::attr::searchViewVoiceIcon=0x010103ef; const int R::attr::searchWidgetCorpusItemBackground=0x010103a8; const int R::attr::secondaryProgress=0x01010138; const int R::attr::seekBarStyle=0x0101007b; const int R::attr::segmentedButtonStyle=0x01010330; const int R::attr::selectAllOnFocus=0x0101015e; const int R::attr::selectable=0x010101e6; const int R::attr::selectableItemBackground=0x0101030e; const int R::attr::selectedDateVerticalBar=0x01010347; const int R::attr::selectedWeekBackgroundColor=0x01010342; const int R::attr::selectionDivider=0x01010419; const int R::attr::selectionDividerHeight=0x0101041a; const int R::attr::selectionDividersDistance=0x0101041b; const int R::attr::settingsActivity=0x01010225; const int R::attr::shadowColor=0x01010161; const int R::attr::shadowDx=0x01010162; const int R::attr::shadowDy=0x01010163; const int R::attr::shadowRadius=0x01010164; const int R::attr::shape=0x0101019a; const int R::attr::shareInterpolator=0x010101bb; const int R::attr::sharedUserId=0x0101000b; const int R::attr::sharedUserLabel=0x01010261; const int R::attr::shouldDisableView=0x010101ee; const int R::attr::showAsAction=0x010102d9; const int R::attr::showDefault=0x010101fa; const int R::attr::showDividers=0x01010329; const int R::attr::showOnLockScreen=0x010103c9; const int R::attr::showSilent=0x010101fb; const int R::attr::showWeekNumber=0x0101033e; const int R::attr::shownWeekCount=0x01010341; const int R::attr::shrinkColumns=0x0101014a; const int R::attr::singleChoiceItemLayout=0x01010401; const int R::attr::singleLine=0x0101015d; const int R::attr::singleUser=0x010103bf; const int R::attr::smallIcon=0x0101029e; const int R::attr::smallScreens=0x01010284; const int R::attr::smoothScrollbar=0x01010231; const int R::attr::snapMargin=0x01010433; const int R::attr::solidColor=0x0101034a; const int R::attr::soundEffectsEnabled=0x01010215; const int R::attr::spacing=0x01010113; const int R::attr::spinnerDropDownItemStyle=0x01010087; const int R::attr::spinnerItemStyle=0x01010089; const int R::attr::spinnerMode=0x010102f1; const int R::attr::spinnerStyle=0x01010081; const int R::attr::spinnersShown=0x0101034b; const int R::attr::splitMotionEvents=0x010102ef; const int R::attr::src=0x01010119; const int R::attr::stackFromBottom=0x010100fd; const int R::attr::stackViewStyle=0x010103dd; const int R::attr::starStyle=0x01010082; const int R::attr::startColor=0x0101019d; const int R::attr::startOffset=0x010101be; const int R::attr::startYear=0x0101017c; const int R::attr::stateNotNeeded=0x01010016; const int R::attr::state_above_anchor=0x010100aa; const int R::attr::state_accelerated=0x0101031b; const int R::attr::state_accessibility_focused=0x01010423; const int R::attr::state_activated=0x010102fe; const int R::attr::state_active=0x010100a2; const int R::attr::state_checkable=0x0101009f; const int R::attr::state_checked=0x010100a0; const int R::attr::state_drag_can_accept=0x01010368; const int R::attr::state_drag_hovered=0x01010369; const int R::attr::state_empty=0x010100a9; const int R::attr::state_enabled=0x0101009e; const int R::attr::state_expanded=0x010100a8; const int R::attr::state_first=0x010100a4; const int R::attr::state_focused=0x0101009c; const int R::attr::state_hovered=0x01010367; const int R::attr::state_last=0x010100a6; const int R::attr::state_long_pressable=0x0101023c; const int R::attr::state_middle=0x010100a5; const int R::attr::state_multiline=0x0101034d; const int R::attr::state_pressed=0x010100a7; const int R::attr::state_selected=0x010100a1; const int R::attr::state_single=0x010100a3; const int R::attr::state_window_focused=0x0101009d; const int R::attr::staticWallpaperPreview=0x01010331; const int R::attr::stepSize=0x01010146; const int R::attr::stopWithTask=0x0101036a; const int R::attr::storageDescription=0x01010441; const int R::attr::streamType=0x01010209; const int R::attr::stretchColumns=0x01010149; const int R::attr::stretchMode=0x01010116; const int R::attr::subtitle=0x010102d1; const int R::attr::subtitleTextStyle=0x010102f9; const int R::attr::subtypeExtraValue=0x0101039a; const int R::attr::subtypeId=0x010103c1; const int R::attr::subtypeLocale=0x01010399; const int R::attr::suggestActionMsg=0x010101dc; const int R::attr::suggestActionMsgColumn=0x010101dd; const int R::attr::summary=0x010101e9; const int R::attr::summaryColumn=0x010102a2; const int R::attr::summaryOff=0x010101f0; const int R::attr::summaryOn=0x010101ef; const int R::attr::supportsRtl=0x010103af; const int R::attr::supportsUploading=0x0101029b; const int R::attr::switchMinWidth=0x01010370; const int R::attr::switchPadding=0x01010371; const int R::attr::switchPreferenceStyle=0x0101036d; const int R::attr::switchStyle=0x010103f6; const int R::attr::switchTextAppearance=0x0101036e; const int R::attr::switchTextOff=0x0101036c; const int R::attr::switchTextOn=0x0101036b; const int R::attr::syncable=0x01010019; const int R::attr::tabLayout=0x01010410; const int R::attr::tabStripEnabled=0x010102bd; const int R::attr::tabStripLeft=0x010102bb; const int R::attr::tabStripRight=0x010102bc; const int R::attr::tabWidgetStyle=0x01010083; const int R::attr::tag=0x010100d1; const int R::attr::targetActivity=0x01010202; const int R::attr::targetClass=0x0101002f; const int R::attr::targetDescriptions=0x010103a0; const int R::attr::targetDrawables=0x0101042d; const int R::attr::targetPackage=0x01010021; const int R::attr::targetSdkVersion=0x01010270; const int R::attr::taskAffinity=0x01010012; const int R::attr::taskCloseEnterAnimation=0x010100be; const int R::attr::taskCloseExitAnimation=0x010100bf; const int R::attr::taskOpenEnterAnimation=0x010100bc; const int R::attr::taskOpenExitAnimation=0x010100bd; const int R::attr::taskToBackEnterAnimation=0x010100c2; const int R::attr::taskToBackExitAnimation=0x010100c3; const int R::attr::taskToFrontEnterAnimation=0x010100c0; const int R::attr::taskToFrontExitAnimation=0x010100c1; const int R::attr::tension=0x0101026a; const int R::attr::testOnly=0x01010272; const int R::attr::text=0x0101014f; const int R::attr::textAlignment=0x010103b1; const int R::attr::textAllCaps=0x0101038c; const int R::attr::textAppearance=0x01010034; const int R::attr::textAppearanceAutoCorrectionSuggestion=0x010103ce; const int R::attr::textAppearanceButton=0x01010207; const int R::attr::textAppearanceEasyCorrectSuggestion=0x010103c3; const int R::attr::textAppearanceInverse=0x01010035; const int R::attr::textAppearanceLarge=0x01010040; const int R::attr::textAppearanceLargeInverse=0x01010043; const int R::attr::textAppearanceLargePopupMenu=0x01010301; const int R::attr::textAppearanceListItem=0x0101039e; const int R::attr::textAppearanceListItemSmall=0x0101039f; const int R::attr::textAppearanceMedium=0x01010041; const int R::attr::textAppearanceMediumInverse=0x01010044; const int R::attr::textAppearanceMisspelledSuggestion=0x010103cd; const int R::attr::textAppearanceSearchResultSubtitle=0x010102a0; const int R::attr::textAppearanceSearchResultTitle=0x010102a1; const int R::attr::textAppearanceSmall=0x01010042; const int R::attr::textAppearanceSmallInverse=0x01010045; const int R::attr::textAppearanceSmallPopupMenu=0x01010302; const int R::attr::textCheckMark=0x01010046; const int R::attr::textCheckMarkInverse=0x01010047; const int R::attr::textColor=0x01010098; const int R::attr::textColorAlertDialogListItem=0x01010306; const int R::attr::textColorHighlight=0x01010099; const int R::attr::textColorHighlightInverse=0x0101034f; const int R::attr::textColorHint=0x0101009a; const int R::attr::textColorHintInverse=0x0101003f; const int R::attr::textColorLink=0x0101009b; const int R::attr::textColorLinkInverse=0x01010350; const int R::attr::textColorPrimary=0x01010036; const int R::attr::textColorPrimaryDisableOnly=0x01010037; const int R::attr::textColorPrimaryInverse=0x01010039; const int R::attr::textColorPrimaryInverseDisableOnly=0x0101028b; const int R::attr::textColorPrimaryInverseNoDisable=0x0101003d; const int R::attr::textColorPrimaryNoDisable=0x0101003b; const int R::attr::textColorSearchUrl=0x01010267; const int R::attr::textColorSecondary=0x01010038; const int R::attr::textColorSecondaryInverse=0x0101003a; const int R::attr::textColorSecondaryInverseNoDisable=0x0101003e; const int R::attr::textColorSecondaryNoDisable=0x0101003c; const int R::attr::textColorTertiary=0x01010212; const int R::attr::textColorTertiaryInverse=0x01010213; const int R::attr::textCursorDrawable=0x01010362; const int R::attr::textDirection=0x010103b0; const int R::attr::textEditNoPasteWindowLayout=0x01010315; const int R::attr::textEditPasteWindowLayout=0x01010314; const int R::attr::textEditSideNoPasteWindowLayout=0x0101035f; const int R::attr::textEditSidePasteWindowLayout=0x0101035e; const int R::attr::textEditSuggestionItemLayout=0x01010374; const int R::attr::textFilterEnabled=0x010100ff; const int R::attr::textIsSelectable=0x01010316; const int R::attr::textOff=0x01010125; const int R::attr::textOn=0x01010124; const int R::attr::textScaleX=0x01010151; const int R::attr::textSelectHandle=0x010102c7; const int R::attr::textSelectHandleLeft=0x010102c5; const int R::attr::textSelectHandleRight=0x010102c6; const int R::attr::textSelectHandleWindowStyle=0x010102c8; const int R::attr::textSize=0x01010095; const int R::attr::textStyle=0x01010097; const int R::attr::textSuggestionsWindowStyle=0x01010373; const int R::attr::textUnderlineColor=0x010103cf; const int R::attr::textUnderlineThickness=0x010103d0; const int R::attr::textView=0x01010454; const int R::attr::textViewStyle=0x01010084; const int R::attr::theme=0x01010000; const int R::attr::thickness=0x01010260; const int R::attr::thicknessRatio=0x0101019c; const int R::attr::thumb=0x01010142; const int R::attr::thumbOffset=0x01010143; const int R::attr::thumbTextPadding=0x01010372; const int R::attr::thumbnail=0x010102a5; const int R::attr::tileMode=0x01010201; const int R::attr::timePickerStyle=0x010103df; const int R::attr::timeZone=0x010103cc; const int R::attr::tint=0x01010121; const int R::attr::title=0x010101e1; const int R::attr::titleCondensed=0x010101e2; const int R::attr::titleTextStyle=0x010102f8; const int R::attr::toAlpha=0x010101cb; const int R::attr::toDegrees=0x010101b4; const int R::attr::toXDelta=0x010101c7; const int R::attr::toXScale=0x010101c3; const int R::attr::toYDelta=0x010101c9; const int R::attr::toYScale=0x010101c5; const int R::attr::toastFrameBackground=0x010103ea; const int R::attr::top=0x010101ae; const int R::attr::topBright=0x010100cb; const int R::attr::topDark=0x010100c7; const int R::attr::topLeftRadius=0x010101a9; const int R::attr::topOffset=0x01010258; const int R::attr::topRightRadius=0x010101aa; const int R::attr::track=0x0101036f; const int R::attr::transcriptMode=0x01010100; const int R::attr::transformPivotX=0x01010320; const int R::attr::transformPivotY=0x01010321; const int R::attr::translationX=0x01010322; const int R::attr::translationY=0x01010323; const int R::attr::type=0x010101a1; const int R::attr::typeface=0x01010096; const int R::attr::uiOptions=0x01010398; const int R::attr::uncertainGestureColor=0x01010276; const int R::attr::unfocusedMonthDateColor=0x01010344; const int R::attr::unselectedAlpha=0x0101020e; const int R::attr::updatePeriodMillis=0x01010250; const int R::attr::useDefaultMargins=0x01010379; const int R::attr::useIntrinsicSizeAsMinimum=0x01010310; const int R::attr::useLevel=0x0101019f; const int R::attr::userVisible=0x01010291; const int R::attr::value=0x01010024; const int R::attr::valueFrom=0x010102de; const int R::attr::valueTo=0x010102df; const int R::attr::valueType=0x010102e0; const int R::attr::variablePadding=0x01010195; const int R::attr::versionCode=0x0101021b; const int R::attr::versionName=0x0101021c; const int R::attr::verticalCorrection=0x0101023a; const int R::attr::verticalDivider=0x0101012e; const int R::attr::verticalGap=0x01010240; const int R::attr::verticalScrollbarPosition=0x01010334; const int R::attr::verticalSpacing=0x01010115; const int R::attr::vibrationDuration=0x01010432; const int R::attr::virtualButtonPressedDrawable=0x01010420; const int R::attr::visibility=0x010100dc; const int R::attr::visible=0x01010194; const int R::attr::vmSafeMode=0x010102b8; const int R::attr::voiceLanguage=0x01010255; const int R::attr::voiceLanguageModel=0x01010253; const int R::attr::voiceMaxResults=0x01010256; const int R::attr::voicePromptText=0x01010254; const int R::attr::voiceSearchMode=0x01010252; const int R::attr::wallpaperCloseEnterAnimation=0x01010295; const int R::attr::wallpaperCloseExitAnimation=0x01010296; const int R::attr::wallpaperIntraCloseEnterAnimation=0x01010299; const int R::attr::wallpaperIntraCloseExitAnimation=0x0101029a; const int R::attr::wallpaperIntraOpenEnterAnimation=0x01010297; const int R::attr::wallpaperIntraOpenExitAnimation=0x01010298; const int R::attr::wallpaperOpenEnterAnimation=0x01010293; const int R::attr::wallpaperOpenExitAnimation=0x01010294; const int R::attr::waveDrawable=0x01010430; const int R::attr::webTextViewStyle=0x010102b9; const int R::attr::webViewStyle=0x01010085; const int R::attr::weekDayTextAppearance=0x01010348; const int R::attr::weekNumberColor=0x01010345; const int R::attr::weekSeparatorLineColor=0x01010346; const int R::attr::weightSum=0x01010128; const int R::attr::widgetCategory=0x010103c4; const int R::attr::widgetLayout=0x010101eb; const int R::attr::width=0x01010159; const int R::attr::windowActionBar=0x010102cd; const int R::attr::windowActionBarOverlay=0x010102e4; const int R::attr::windowActionModeOverlay=0x010102dd; const int R::attr::windowAnimationStyle=0x010100ae; const int R::attr::windowBackground=0x01010054; const int R::attr::windowCloseOnTouchOutside=0x0101035b; const int R::attr::windowContentOverlay=0x01010059; const int R::attr::windowDisablePreview=0x01010222; const int R::attr::windowEnableSplitTouch=0x01010317; const int R::attr::windowEnterAnimation=0x010100b4; const int R::attr::windowExitAnimation=0x010100b5; const int R::attr::windowFixedHeightMajor=0x010103fe; const int R::attr::windowFixedHeightMinor=0x010103fc; const int R::attr::windowFixedWidthMajor=0x010103fb; const int R::attr::windowFixedWidthMinor=0x010103fd; const int R::attr::windowFrame=0x01010055; const int R::attr::windowFullscreen=0x0101020d; const int R::attr::windowHideAnimation=0x010100b7; const int R::attr::windowIsFloating=0x01010057; const int R::attr::windowIsTranslucent=0x01010058; const int R::attr::windowMinWidthMajor=0x01010356; const int R::attr::windowMinWidthMinor=0x01010357; const int R::attr::windowNoDisplay=0x0101021e; const int R::attr::windowNoTitle=0x01010056; const int R::attr::windowShowAnimation=0x010100b6; const int R::attr::windowShowWallpaper=0x01010292; const int R::attr::windowSoftInputMode=0x0101022b; const int R::attr::windowSplitActionBar=0x010103d5; const int R::attr::windowTitleBackgroundStyle=0x0101005c; const int R::attr::windowTitleSize=0x0101005a; const int R::attr::windowTitleStyle=0x0101005b; const int R::attr::writePermission=0x01010008; const int R::attr::x=0x010100ac; const int R::attr::xlargeScreens=0x010102bf; const int R::attr::y=0x010100ad; const int R::attr::yesNoPreferenceStyle=0x01010090; const int R::attr::zAdjustment=0x010101c1; const int R::bool_::ImsConnectedDefaultValue=0x0111000e; const int R::bool_::action_bar_embed_tabs=0x01110004; const int R::bool_::action_bar_embed_tabs_pre_jb=0x01110005; const int R::bool_::action_bar_expanded_action_views_exclusive=0x01110009; const int R::bool_::config_actionMenuItemAllCaps=0x0111003d; const int R::bool_::config_allowActionMenuItemTextWithIcon=0x0111003e; const int R::bool_::config_allowAllRotations=0x0111001d; const int R::bool_::config_alwaysUseCdmaRssi=0x0111003a; const int R::bool_::config_animateScreenLights=0x0111001b; const int R::bool_::config_annoy_dianne=0x01110019; const int R::bool_::config_automatic_brightness_available=0x01110018; const int R::bool_::config_batterySdCardAccessibility=0x01110022; const int R::bool_::config_bluetooth_adapter_quick_switch=0x0111002e; const int R::bool_::config_bluetooth_address_validation=0x0111002f; const int R::bool_::config_bluetooth_default_profiles=0x01110032; const int R::bool_::config_bluetooth_sco_off_call=0x0111002c; const int R::bool_::config_bluetooth_wide_band_speech=0x0111002d; const int R::bool_::config_built_in_sip_phone=0x01110034; const int R::bool_::config_camera_sound_forced=0x0111004b; const int R::bool_::config_carDockEnablesAccelerometer=0x01110020; const int R::bool_::config_cellBroadcastAppLinks=0x01110045; const int R::bool_::config_closeDialogWhenTouchOutside=0x01110014; const int R::bool_::config_deskDockEnablesAccelerometer=0x0111001f; const int R::bool_::config_disableMenuKeyInLockScreen=0x01110025; const int R::bool_::config_dontPreferApn=0x0111004c; const int R::bool_::config_dreamsActivatedOnDockByDefault=0x01110042; const int R::bool_::config_dreamsActivatedOnSleepByDefault=0x01110043; const int R::bool_::config_dreamsEnabledByDefault=0x01110041; const int R::bool_::config_dreamsSupported=0x01110040; const int R::bool_::config_duplicate_port_omadm_wappush=0x0111003b; const int R::bool_::config_enableLockBeforeUnlockScreen=0x01110026; const int R::bool_::config_enableLockScreenRotation=0x01110027; const int R::bool_::config_enableScreenshotChord=0x0111001c; const int R::bool_::config_enableWallpaperService=0x0111002b; const int R::bool_::config_enableWifiDisplay=0x01110047; const int R::bool_::config_enable_emergency_call_while_sim_locked=0x01110029; const int R::bool_::config_enable_puk_unlock_screen=0x01110028; const int R::bool_::config_intrusiveNotificationLed=0x01110024; const int R::bool_::config_lidControlsSleep=0x01110021; const int R::bool_::config_mms_content_disposition_support=0x01110039; const int R::bool_::config_reverseDefaultRotation=0x0111001e; const int R::bool_::config_safe_media_volume_enabled=0x01110049; const int R::bool_::config_sendAudioBecomingNoisy=0x01110012; const int R::bool_::config_sf_limitedAlpha=0x0111000d; const int R::bool_::config_sf_slowBlur=0x0111000f; const int R::bool_::config_showMenuShortcutsWhenKeyboardPresent=0x01110036; const int R::bool_::config_showNavigationBar=0x0111003c; const int R::bool_::config_sip_wifi_only=0x01110033; const int R::bool_::config_sms_capable=0x01110031; const int R::bool_::config_sms_utf8_support=0x01110038; const int R::bool_::config_storage_notification=0x01110044; const int R::bool_::config_swipeDisambiguation=0x0111002a; const int R::bool_::config_syncstorageengine_masterSyncAutomatically=0x01110046; const int R::bool_::config_telephony_use_own_number_for_voicemail=0x01110037; const int R::bool_::config_ui_enableFadingMarquee=0x01110013; const int R::bool_::config_unplugTurnsOnScreen=0x0111001a; const int R::bool_::config_useDevInputEventForAudioJack=0x01110048; const int R::bool_::config_useMasterVolume=0x01110010; const int R::bool_::config_useVolumeKeySounds=0x01110011; const int R::bool_::config_use_strict_phone_number_comparation=0x01110023; const int R::bool_::config_voice_capable=0x01110030; const int R::bool_::config_wifiDisplaySupportsProtectedBuffers=0x0111004a; const int R::bool_::config_wifi_background_scan_support=0x01110017; const int R::bool_::config_wifi_dual_band_support=0x01110015; const int R::bool_::config_wifi_p2p_support=0x01110016; const int R::bool_::config_wimaxEnabled=0x0111003f; const int R::bool_::kg_center_small_widgets_vertically=0x01110001; const int R::bool_::kg_enable_camera_default_widget=0x01110000; const int R::bool_::kg_share_status_area=0x0111000b; const int R::bool_::kg_show_ime_at_screen_on=0x01110003; const int R::bool_::kg_sim_puk_account_full_screen=0x0111000c; const int R::bool_::kg_top_align_page_shrink_on_bouncer_visible=0x01110002; const int R::bool_::lockscreen_isPortrait=0x0111004d; const int R::bool_::preferences_prefer_dual_pane=0x01110007; const int R::bool_::show_ongoing_ime_switcher=0x01110008; const int R::bool_::skip_restoring_network_selection=0x01110035; const int R::bool_::split_action_bar_is_narrow=0x01110006; const int R::bool_::target_honeycomb_needs_options_menu=0x0111000a; const int R::color::background_dark=0x0106000e; const int R::color::background_holo_dark=0x0106004a; const int R::color::background_holo_light=0x0106004b; const int R::color::background_light=0x0106000f; const int R::color::black=0x0106000c; const int R::color::bright_foreground_dark=0x0106001d; const int R::color::bright_foreground_dark_disabled=0x0106001f; const int R::color::bright_foreground_dark_inverse=0x01060021; const int R::color::bright_foreground_disabled_holo_dark=0x0106004e; const int R::color::bright_foreground_disabled_holo_light=0x0106004f; const int R::color::bright_foreground_holo_dark=0x0106004c; const int R::color::bright_foreground_holo_light=0x0106004d; const int R::color::bright_foreground_inverse_holo_dark=0x01060050; const int R::color::bright_foreground_inverse_holo_light=0x01060051; const int R::color::bright_foreground_light=0x0106001e; const int R::color::bright_foreground_light_disabled=0x01060020; const int R::color::bright_foreground_light_inverse=0x01060022; const int R::color::config_defaultNotificationColor=0x0106006b; const int R::color::darker_gray=0x01060000; const int R::color::dim_foreground_dark=0x01060023; const int R::color::dim_foreground_dark_disabled=0x01060024; const int R::color::dim_foreground_dark_inverse=0x01060025; const int R::color::dim_foreground_dark_inverse_disabled=0x01060026; const int R::color::dim_foreground_disabled_holo_dark=0x01060053; const int R::color::dim_foreground_disabled_holo_light=0x01060058; const int R::color::dim_foreground_holo_dark=0x01060052; const int R::color::dim_foreground_holo_light=0x01060057; const int R::color::dim_foreground_inverse_disabled_holo_dark=0x01060055; const int R::color::dim_foreground_inverse_disabled_holo_light=0x0106005a; const int R::color::dim_foreground_inverse_holo_dark=0x01060054; const int R::color::dim_foreground_inverse_holo_light=0x01060059; const int R::color::dim_foreground_light=0x01060028; const int R::color::dim_foreground_light_disabled=0x01060029; const int R::color::dim_foreground_light_inverse=0x0106002a; const int R::color::dim_foreground_light_inverse_disabled=0x0106002b; const int R::color::facelock_spotlight_mask=0x01060049; const int R::color::group_button_dialog_focused_holo_dark=0x01060061; const int R::color::group_button_dialog_focused_holo_light=0x01060063; const int R::color::group_button_dialog_pressed_holo_dark=0x01060060; const int R::color::group_button_dialog_pressed_holo_light=0x01060062; const int R::color::highlighted_text_dark=0x0106002d; const int R::color::highlighted_text_holo_dark=0x0106005c; const int R::color::highlighted_text_holo_light=0x0106005d; const int R::color::highlighted_text_light=0x0106002e; const int R::color::hint_foreground_dark=0x01060027; const int R::color::hint_foreground_holo_dark=0x01060056; const int R::color::hint_foreground_holo_light=0x0106005b; const int R::color::hint_foreground_light=0x0106002c; const int R::color::holo_blue_bright=0x0106001b; const int R::color::holo_blue_dark=0x01060013; const int R::color::holo_blue_light=0x01060012; const int R::color::holo_green_dark=0x01060015; const int R::color::holo_green_light=0x01060014; const int R::color::holo_orange_dark=0x01060019; const int R::color::holo_orange_light=0x01060018; const int R::color::holo_purple=0x0106001a; const int R::color::holo_red_dark=0x01060017; const int R::color::holo_red_light=0x01060016; const int R::color::keyguard_avatar_frame_color=0x01060067; const int R::color::keyguard_avatar_frame_pressed_color=0x0106006a; const int R::color::keyguard_avatar_frame_shadow_color=0x01060068; const int R::color::keyguard_avatar_nick_color=0x01060069; const int R::color::keyguard_text_color_decline=0x01060041; const int R::color::keyguard_text_color_normal=0x0106003d; const int R::color::keyguard_text_color_soundoff=0x0106003f; const int R::color::keyguard_text_color_soundon=0x01060040; const int R::color::keyguard_text_color_unlock=0x0106003e; const int R::color::kg_multi_user_text_active=0x01060046; const int R::color::kg_multi_user_text_inactive=0x01060047; const int R::color::kg_widget_pager_gradient=0x01060048; const int R::color::legacy_long_pressed_highlight=0x01060066; const int R::color::legacy_pressed_highlight=0x01060064; const int R::color::legacy_selected_highlight=0x01060065; const int R::color::lighter_gray=0x01060032; const int R::color::link_text_dark=0x0106002f; const int R::color::link_text_holo_dark=0x0106005e; const int R::color::link_text_holo_light=0x0106005f; const int R::color::link_text_light=0x01060030; const int R::color::lockscreen_clock_am_pm=0x01060044; const int R::color::lockscreen_clock_background=0x01060042; const int R::color::lockscreen_clock_foreground=0x01060043; const int R::color::lockscreen_owner_info=0x01060045; const int R::color::perms_costs_money=0x01060036; const int R::color::perms_dangerous_grp_color=0x01060033; const int R::color::perms_dangerous_perm_color=0x01060034; const int R::color::primary_text_dark=0x01060001; const int R::color::primary_text_dark_disable_only=0x0106006c; const int R::color::primary_text_dark_focused=0x0106006d; const int R::color::primary_text_dark_nodisable=0x01060002; const int R::color::primary_text_disable_only_holo_dark=0x0106006e; const int R::color::primary_text_disable_only_holo_light=0x0106006f; const int R::color::primary_text_focused_holo_dark=0x01060070; const int R::color::primary_text_holo_dark=0x01060071; const int R::color::primary_text_holo_light=0x01060072; const int R::color::primary_text_light=0x01060003; const int R::color::primary_text_light_disable_only=0x01060073; const int R::color::primary_text_light_nodisable=0x01060004; const int R::color::primary_text_nodisable_holo_dark=0x01060074; const int R::color::primary_text_nodisable_holo_light=0x01060075; const int R::color::safe_mode_text=0x0106001c; const int R::color::search_url_text=0x01060076; const int R::color::search_url_text_holo=0x01060077; const int R::color::search_url_text_normal=0x01060037; const int R::color::search_url_text_pressed=0x01060039; const int R::color::search_url_text_selected=0x01060038; const int R::color::search_widget_corpus_item_background=0x0106003a; const int R::color::secondary_text_dark=0x01060005; const int R::color::secondary_text_dark_nodisable=0x01060006; const int R::color::secondary_text_holo_dark=0x01060078; const int R::color::secondary_text_holo_light=0x01060079; const int R::color::secondary_text_light=0x01060007; const int R::color::secondary_text_light_nodisable=0x01060008; const int R::color::secondary_text_nodisable_holo_dark=0x0106007a; const int R::color::secondary_text_nodisable_holo_light=0x0106007b; const int R::color::secondary_text_nofocus=0x0106007c; const int R::color::shadow=0x01060035; const int R::color::sliding_tab_text_color_active=0x0106003b; const int R::color::sliding_tab_text_color_shadow=0x0106003c; const int R::color::suggestion_highlight_text=0x01060031; const int R::color::tab_indicator_text=0x01060009; const int R::color::tab_indicator_text_v4=0x0106007d; const int R::color::tertiary_text_dark=0x01060010; const int R::color::tertiary_text_holo_dark=0x0106007e; const int R::color::tertiary_text_holo_light=0x0106007f; const int R::color::tertiary_text_light=0x01060011; const int R::color::transparent=0x0106000d; const int R::color::white=0x0106000b; const int R::color::widget_edittext_dark=0x0106000a; const int R::dimen::accessibility_touch_slop=0x0105006b; const int R::dimen::action_bar_default_height=0x0105003a; const int R::dimen::action_bar_icon_vertical_padding=0x0105003b; const int R::dimen::action_bar_stacked_max_height=0x01050053; const int R::dimen::action_bar_stacked_tab_max_width=0x01050054; const int R::dimen::action_bar_subtitle_bottom_margin=0x0105003f; const int R::dimen::action_bar_subtitle_text_size=0x0105003d; const int R::dimen::action_bar_subtitle_top_margin=0x0105003e; const int R::dimen::action_bar_title_text_size=0x0105003c; const int R::dimen::action_button_min_width=0x01050052; const int R::dimen::activity_chooser_popup_min_width=0x01050047; const int R::dimen::alert_dialog_button_bar_height=0x01050039; const int R::dimen::alert_dialog_title_height=0x01050038; const int R::dimen::app_icon_size=0x01050000; const int R::dimen::config_minScalingSpan=0x01050009; const int R::dimen::config_minScalingTouchMajor=0x0105000a; const int R::dimen::config_prefDialogWidth=0x01050007; const int R::dimen::config_viewConfigurationTouchSlop=0x01050008; const int R::dimen::default_app_widget_padding_bottom=0x01050051; const int R::dimen::default_app_widget_padding_left=0x0105004e; const int R::dimen::default_app_widget_padding_right=0x01050050; const int R::dimen::default_app_widget_padding_top=0x0105004f; const int R::dimen::default_gap=0x01050048; const int R::dimen::dialog_fixed_height_major=0x0105002f; const int R::dimen::dialog_fixed_height_minor=0x01050030; const int R::dimen::dialog_fixed_width_major=0x0105002d; const int R::dimen::dialog_fixed_width_minor=0x0105002e; const int R::dimen::dialog_min_width_major=0x01050003; const int R::dimen::dialog_min_width_minor=0x01050004; const int R::dimen::dropdownitem_icon_width=0x0105004b; const int R::dimen::dropdownitem_text_padding_left=0x01050049; const int R::dimen::dropdownitem_text_padding_right=0x0105004a; const int R::dimen::face_unlock_height=0x01050046; const int R::dimen::fastscroll_overlay_size=0x01050015; const int R::dimen::fastscroll_thumb_height=0x01050017; const int R::dimen::fastscroll_thumb_width=0x01050016; const int R::dimen::glowpadview_glow_radius=0x01050020; const int R::dimen::glowpadview_inner_radius=0x01050022; const int R::dimen::glowpadview_snap_margin=0x01050021; const int R::dimen::glowpadview_target_placement_radius=0x0105001f; const int R::dimen::keyguard_avatar_frame_shadow_radius=0x01050071; const int R::dimen::keyguard_avatar_frame_stroke_width=0x01050070; const int R::dimen::keyguard_avatar_name_size=0x01050073; const int R::dimen::keyguard_avatar_size=0x01050072; const int R::dimen::keyguard_lockscreen_clock_font_size=0x01050040; const int R::dimen::keyguard_lockscreen_outerring_diameter=0x0105001e; const int R::dimen::keyguard_lockscreen_pin_margin_left=0x01050045; const int R::dimen::keyguard_lockscreen_status_line_clockfont_bottom_margin=0x01050044; const int R::dimen::keyguard_lockscreen_status_line_clockfont_top_margin=0x01050043; const int R::dimen::keyguard_lockscreen_status_line_font_right_margin=0x01050042; const int R::dimen::keyguard_lockscreen_status_line_font_size=0x01050041; const int R::dimen::keyguard_muliuser_selector_margin=0x0105006f; const int R::dimen::keyguard_pattern_unlock_clock_font_size=0x01050079; const int R::dimen::keyguard_pattern_unlock_status_line_font_size=0x0105007a; const int R::dimen::keyguard_security_height=0x0105006d; const int R::dimen::keyguard_security_view_margin=0x0105006e; const int R::dimen::keyguard_security_width=0x0105006c; const int R::dimen::kg_clock_top_margin=0x01050060; const int R::dimen::kg_edge_swipe_region_size=0x01050074; const int R::dimen::kg_emergency_button_shift=0x01050077; const int R::dimen::kg_key_horizontal_gap=0x01050061; const int R::dimen::kg_key_vertical_gap=0x01050062; const int R::dimen::kg_pin_key_height=0x01050063; const int R::dimen::kg_runway_lights_height=0x01050065; const int R::dimen::kg_runway_lights_top_margin=0x0105006a; const int R::dimen::kg_runway_lights_vertical_padding=0x01050066; const int R::dimen::kg_secure_padding_height=0x01050064; const int R::dimen::kg_security_panel_height=0x01050058; const int R::dimen::kg_security_view_height=0x01050059; const int R::dimen::kg_small_widget_height=0x01050076; const int R::dimen::kg_squashed_layout_threshold=0x01050075; const int R::dimen::kg_status_clock_font_size=0x0105005c; const int R::dimen::kg_status_date_font_size=0x0105005d; const int R::dimen::kg_status_line_font_right_margin=0x0105005f; const int R::dimen::kg_status_line_font_size=0x0105005e; const int R::dimen::kg_widget_pager_bottom_padding=0x01050069; const int R::dimen::kg_widget_pager_horizontal_padding=0x01050067; const int R::dimen::kg_widget_pager_top_padding=0x01050068; const int R::dimen::kg_widget_view_height=0x0105005b; const int R::dimen::kg_widget_view_width=0x0105005a; const int R::dimen::min_xlarge_screen_width=0x01050018; const int R::dimen::navigation_bar_height=0x0105000d; const int R::dimen::navigation_bar_height_landscape=0x0105000e; const int R::dimen::navigation_bar_height_portrait=0x0105007b; const int R::dimen::navigation_bar_width=0x0105000f; const int R::dimen::notification_large_icon_height=0x01050006; const int R::dimen::notification_large_icon_width=0x01050005; const int R::dimen::notification_subtext_size=0x01050057; const int R::dimen::notification_text_size=0x01050055; const int R::dimen::notification_title_text_size=0x01050056; const int R::dimen::password_keyboard_height=0x01050078; const int R::dimen::password_keyboard_horizontalGap=0x0105001c; const int R::dimen::password_keyboard_key_height_alpha=0x01050019; const int R::dimen::password_keyboard_key_height_numeric=0x0105001a; const int R::dimen::password_keyboard_spacebar_vertical_correction=0x0105001b; const int R::dimen::password_keyboard_verticalGap=0x0105001d; const int R::dimen::preference_breadcrumb_paddingLeft=0x0105002a; const int R::dimen::preference_breadcrumb_paddingRight=0x0105002b; const int R::dimen::preference_child_padding_side=0x01050035; const int R::dimen::preference_fragment_padding_bottom=0x01050028; const int R::dimen::preference_fragment_padding_side=0x01050029; const int R::dimen::preference_icon_minWidth=0x0105002c; const int R::dimen::preference_item_padding_inner=0x01050034; const int R::dimen::preference_item_padding_side=0x01050033; const int R::dimen::preference_screen_bottom_margin=0x01050026; const int R::dimen::preference_screen_header_padding_side=0x01050032; const int R::dimen::preference_screen_header_vertical_padding=0x01050031; const int R::dimen::preference_screen_side_margin=0x01050023; const int R::dimen::preference_screen_side_margin_negative=0x01050024; const int R::dimen::preference_screen_top_margin=0x01050025; const int R::dimen::preference_widget_width=0x01050027; const int R::dimen::search_view_preferred_width=0x01050037; const int R::dimen::search_view_text_min_width=0x01050036; const int R::dimen::status_bar_content_number_size=0x01050011; const int R::dimen::status_bar_edge_ignore=0x01050014; const int R::dimen::status_bar_height=0x0105000c; const int R::dimen::status_bar_icon_size=0x01050010; const int R::dimen::system_bar_height=0x01050012; const int R::dimen::system_bar_icon_size=0x01050013; const int R::dimen::textview_error_popup_default_width=0x0105004c; const int R::dimen::thumbnail_height=0x01050001; const int R::dimen::thumbnail_width=0x01050002; const int R::dimen::toast_y_offset=0x0105000b; const int R::dimen::volume_panel_top=0x0105004d; const int R::drawable::ab_bottom_solid_dark_holo=0x0108009e; const int R::drawable::ab_bottom_solid_inverse_holo=0x0108009f; const int R::drawable::ab_bottom_solid_light_holo=0x010800a0; const int R::drawable::ab_bottom_transparent_dark_holo=0x010800a1; const int R::drawable::ab_bottom_transparent_light_holo=0x010800a2; const int R::drawable::ab_share_pack_holo_dark=0x010800a3; const int R::drawable::ab_share_pack_holo_light=0x010800b4; const int R::drawable::ab_solid_dark_holo=0x010800b5; const int R::drawable::ab_solid_light_holo=0x010800b6; const int R::drawable::ab_solid_shadow_holo=0x010800b7; const int R::drawable::ab_stacked_solid_dark_holo=0x010800b8; const int R::drawable::ab_stacked_solid_inverse_holo=0x010800b9; const int R::drawable::ab_stacked_solid_light_holo=0x010800ba; const int R::drawable::ab_stacked_transparent_dark_holo=0x010800bb; const int R::drawable::ab_stacked_transparent_light_holo=0x010800bc; const int R::drawable::ab_transparent_dark_holo=0x010800bd; const int R::drawable::ab_transparent_light_holo=0x010800be; const int R::drawable::action_bar_background=0x010800bf; const int R::drawable::action_bar_divider=0x010800c0; const int R::drawable::activated_background=0x010800c1; const int R::drawable::activated_background_holo_dark=0x010800c2; const int R::drawable::activated_background_holo_light=0x010800c3; const int R::drawable::activated_background_light=0x010800c4; const int R::drawable::activity_picker_bg=0x010800c5; const int R::drawable::activity_picker_bg_activated=0x010800c6; const int R::drawable::activity_picker_bg_focused=0x010800c7; const int R::drawable::activity_title_bar=0x010800c8; const int R::drawable::alert_dark_frame=0x01080000; const int R::drawable::alert_light_frame=0x01080001; const int R::drawable::app_icon_background=0x010800c9; const int R::drawable::arrow_down_float=0x01080002; const int R::drawable::arrow_up_float=0x01080003; const int R::drawable::background_cache_hint_selector_holo_dark=0x010800ca; const int R::drawable::background_cache_hint_selector_holo_light=0x010800cb; const int R::drawable::background_holo_dark=0x010800cc; const int R::drawable::background_holo_light=0x010800cd; const int R::drawable::battery_charge_background=0x010800ce; const int R::drawable::blank_tile=0x010800cf; const int R::drawable::bottom_bar=0x0108009a; const int R::drawable::box=0x010800d0; const int R::drawable::btn_browser_zoom_fit_page=0x010800d1; const int R::drawable::btn_browser_zoom_page_overview=0x010800d2; const int R::drawable::btn_cab_done_default_holo_dark=0x010800d3; const int R::drawable::btn_cab_done_default_holo_light=0x010800d4; const int R::drawable::btn_cab_done_focused_holo_dark=0x010800d5; const int R::drawable::btn_cab_done_focused_holo_light=0x010800d6; const int R::drawable::btn_cab_done_holo_dark=0x010800d7; const int R::drawable::btn_cab_done_holo_light=0x010800d8; const int R::drawable::btn_cab_done_pressed_holo_dark=0x010800d9; const int R::drawable::btn_cab_done_pressed_holo_light=0x010800da; const int R::drawable::btn_check=0x010800db; const int R::drawable::btn_check_buttonless_off=0x010800dc; const int R::drawable::btn_check_buttonless_on=0x010800dd; const int R::drawable::btn_check_holo_dark=0x010800de; const int R::drawable::btn_check_holo_light=0x010800df; const int R::drawable::btn_check_label_background=0x010800e0; const int R::drawable::btn_check_off=0x010800e1; const int R::drawable::btn_check_off_disable=0x010800e2; const int R::drawable::btn_check_off_disable_focused=0x010800e3; const int R::drawable::btn_check_off_disable_focused_holo_dark=0x010800e4; const int R::drawable::btn_check_off_disable_focused_holo_light=0x010800e5; const int R::drawable::btn_check_off_disable_holo_dark=0x010800e6; const int R::drawable::btn_check_off_disable_holo_light=0x010800e7; const int R::drawable::btn_check_off_disabled_focused_holo_dark=0x010800e8; const int R::drawable::btn_check_off_disabled_focused_holo_light=0x010800e9; const int R::drawable::btn_check_off_disabled_holo_dark=0x010800ea; const int R::drawable::btn_check_off_disabled_holo_light=0x010800eb; const int R::drawable::btn_check_off_focused_holo_dark=0x010800ec; const int R::drawable::btn_check_off_focused_holo_light=0x010800ed; const int R::drawable::btn_check_off_holo=0x010800ee; const int R::drawable::btn_check_off_holo_dark=0x010800ef; const int R::drawable::btn_check_off_holo_light=0x010800f0; const int R::drawable::btn_check_off_normal_holo_dark=0x010800f1; const int R::drawable::btn_check_off_normal_holo_light=0x010800f2; const int R::drawable::btn_check_off_pressed=0x010800f3; const int R::drawable::btn_check_off_pressed_holo_dark=0x010800f4; const int R::drawable::btn_check_off_pressed_holo_light=0x010800f5; const int R::drawable::btn_check_off_selected=0x010800f6; const int R::drawable::btn_check_on=0x010800f7; const int R::drawable::btn_check_on_disable=0x010800f8; const int R::drawable::btn_check_on_disable_focused=0x010800f9; const int R::drawable::btn_check_on_disable_focused_holo_light=0x010800fa; const int R::drawable::btn_check_on_disable_holo_dark=0x010800fb; const int R::drawable::btn_check_on_disable_holo_light=0x010800fc; const int R::drawable::btn_check_on_disabled_focused_holo_dark=0x010800fd; const int R::drawable::btn_check_on_disabled_focused_holo_light=0x010800fe; const int R::drawable::btn_check_on_disabled_holo_dark=0x010800ff; const int R::drawable::btn_check_on_disabled_holo_light=0x01080100; const int R::drawable::btn_check_on_focused_holo_dark=0x01080101; const int R::drawable::btn_check_on_focused_holo_light=0x01080102; const int R::drawable::btn_check_on_holo=0x01080103; const int R::drawable::btn_check_on_holo_dark=0x01080104; const int R::drawable::btn_check_on_holo_light=0x01080105; const int R::drawable::btn_check_on_pressed=0x01080106; const int R::drawable::btn_check_on_pressed_holo_dark=0x01080107; const int R::drawable::btn_check_on_pressed_holo_light=0x01080108; const int R::drawable::btn_check_on_selected=0x01080109; const int R::drawable::btn_circle=0x0108010a; const int R::drawable::btn_circle_disable=0x0108010b; const int R::drawable::btn_circle_disable_focused=0x0108010c; const int R::drawable::btn_circle_normal=0x0108010d; const int R::drawable::btn_circle_pressed=0x0108010e; const int R::drawable::btn_circle_selected=0x0108010f; const int R::drawable::btn_close=0x01080110; const int R::drawable::btn_close_normal=0x01080111; const int R::drawable::btn_close_pressed=0x01080112; const int R::drawable::btn_close_selected=0x01080113; const int R::drawable::btn_code_lock_default=0x01080114; const int R::drawable::btn_code_lock_default_holo=0x01080115; const int R::drawable::btn_code_lock_touched=0x01080116; const int R::drawable::btn_code_lock_touched_holo=0x01080117; const int R::drawable::btn_default=0x01080004; const int R::drawable::btn_default_disabled_focused_holo_dark=0x01080118; const int R::drawable::btn_default_disabled_focused_holo_light=0x01080119; const int R::drawable::btn_default_disabled_holo=0x0108011a; const int R::drawable::btn_default_disabled_holo_dark=0x0108011b; const int R::drawable::btn_default_disabled_holo_light=0x0108011c; const int R::drawable::btn_default_focused_holo=0x0108011d; const int R::drawable::btn_default_focused_holo_dark=0x0108011e; const int R::drawable::btn_default_focused_holo_light=0x0108011f; const int R::drawable::btn_default_holo_dark=0x01080120; const int R::drawable::btn_default_holo_light=0x01080121; const int R::drawable::btn_default_normal=0x01080122; const int R::drawable::btn_default_normal_disable=0x01080123; const int R::drawable::btn_default_normal_disable_focused=0x01080124; const int R::drawable::btn_default_normal_holo=0x01080125; const int R::drawable::btn_default_normal_holo_dark=0x01080126; const int R::drawable::btn_default_normal_holo_light=0x01080127; const int R::drawable::btn_default_pressed=0x01080128; const int R::drawable::btn_default_pressed_holo=0x01080129; const int R::drawable::btn_default_pressed_holo_dark=0x0108012a; const int R::drawable::btn_default_pressed_holo_light=0x0108012b; const int R::drawable::btn_default_selected=0x0108012c; const int R::drawable::btn_default_small=0x01080005; const int R::drawable::btn_default_small_normal=0x0108012d; const int R::drawable::btn_default_small_normal_disable=0x0108012e; const int R::drawable::btn_default_small_normal_disable_focused=0x0108012f; const int R::drawable::btn_default_small_pressed=0x01080130; const int R::drawable::btn_default_small_selected=0x01080131; const int R::drawable::btn_default_transparent=0x01080132; const int R::drawable::btn_default_transparent_normal=0x01080133; const int R::drawable::btn_dialog=0x01080017; const int R::drawable::btn_dialog_disable=0x01080134; const int R::drawable::btn_dialog_normal=0x01080135; const int R::drawable::btn_dialog_pressed=0x01080136; const int R::drawable::btn_dialog_selected=0x01080137; const int R::drawable::btn_dropdown=0x01080006; const int R::drawable::btn_dropdown_disabled=0x01080138; const int R::drawable::btn_dropdown_disabled_focused=0x01080139; const int R::drawable::btn_dropdown_normal=0x0108013a; const int R::drawable::btn_dropdown_pressed=0x0108013b; const int R::drawable::btn_dropdown_selected=0x0108013c; const int R::drawable::btn_erase_default=0x0108013d; const int R::drawable::btn_erase_pressed=0x0108013e; const int R::drawable::btn_erase_selected=0x0108013f; const int R::drawable::btn_global_search=0x01080140; const int R::drawable::btn_global_search_normal=0x01080141; const int R::drawable::btn_group_disabled_holo_dark=0x01080142; const int R::drawable::btn_group_disabled_holo_light=0x01080143; const int R::drawable::btn_group_focused_holo_dark=0x01080144; const int R::drawable::btn_group_focused_holo_light=0x01080145; const int R::drawable::btn_group_holo_dark=0x01080146; const int R::drawable::btn_group_holo_light=0x01080147; const int R::drawable::btn_group_normal_holo_dark=0x01080148; const int R::drawable::btn_group_normal_holo_light=0x01080149; const int R::drawable::btn_group_pressed_holo_dark=0x0108014a; const int R::drawable::btn_group_pressed_holo_light=0x0108014b; const int R::drawable::btn_keyboard_key=0x0108014c; const int R::drawable::btn_keyboard_key_dark_normal_holo=0x0108014d; const int R::drawable::btn_keyboard_key_dark_normal_off_holo=0x0108014e; const int R::drawable::btn_keyboard_key_dark_normal_on_holo=0x0108014f; const int R::drawable::btn_keyboard_key_dark_pressed_holo=0x01080150; const int R::drawable::btn_keyboard_key_dark_pressed_off_holo=0x01080151; const int R::drawable::btn_keyboard_key_dark_pressed_on_holo=0x01080152; const int R::drawable::btn_keyboard_key_fulltrans=0x01080153; const int R::drawable::btn_keyboard_key_fulltrans_normal=0x01080154; const int R::drawable::btn_keyboard_key_fulltrans_normal_off=0x01080155; const int R::drawable::btn_keyboard_key_fulltrans_normal_on=0x01080156; const int R::drawable::btn_keyboard_key_fulltrans_pressed=0x01080157; const int R::drawable::btn_keyboard_key_fulltrans_pressed_off=0x01080158; const int R::drawable::btn_keyboard_key_fulltrans_pressed_on=0x01080159; const int R::drawable::btn_keyboard_key_ics=0x0108015a; const int R::drawable::btn_keyboard_key_light_normal_holo=0x0108015b; const int R::drawable::btn_keyboard_key_light_pressed_holo=0x0108015c; const int R::drawable::btn_keyboard_key_normal=0x0108015d; const int R::drawable::btn_keyboard_key_normal_off=0x0108015e; const int R::drawable::btn_keyboard_key_normal_on=0x0108015f; const int R::drawable::btn_keyboard_key_pressed=0x01080160; const int R::drawable::btn_keyboard_key_pressed_off=0x01080161; const int R::drawable::btn_keyboard_key_pressed_on=0x01080162; const int R::drawable::btn_keyboard_key_trans=0x01080163; const int R::drawable::btn_keyboard_key_trans_normal=0x01080164; const int R::drawable::btn_keyboard_key_trans_normal_off=0x01080165; const int R::drawable::btn_keyboard_key_trans_normal_on=0x01080166; const int R::drawable::btn_keyboard_key_trans_pressed=0x01080167; const int R::drawable::btn_keyboard_key_trans_pressed_off=0x01080168; const int R::drawable::btn_keyboard_key_trans_pressed_on=0x01080169; const int R::drawable::btn_keyboard_key_trans_selected=0x0108016a; const int R::drawable::btn_lock_normal=0x0108016b; const int R::drawable::btn_media_player=0x0108016c; const int R::drawable::btn_media_player_disabled=0x0108016d; const int R::drawable::btn_media_player_disabled_selected=0x0108016e; const int R::drawable::btn_media_player_pressed=0x0108016f; const int R::drawable::btn_media_player_selected=0x01080170; const int R::drawable::btn_minus=0x01080007; const int R::drawable::btn_minus_default=0x01080171; const int R::drawable::btn_minus_disable=0x01080172; const int R::drawable::btn_minus_disable_focused=0x01080173; const int R::drawable::btn_minus_pressed=0x01080174; const int R::drawable::btn_minus_selected=0x01080175; const int R::drawable::btn_plus=0x01080008; const int R::drawable::btn_plus_default=0x01080176; const int R::drawable::btn_plus_disable=0x01080177; const int R::drawable::btn_plus_disable_focused=0x01080178; const int R::drawable::btn_plus_pressed=0x01080179; const int R::drawable::btn_plus_selected=0x0108017a; const int R::drawable::btn_radio=0x01080009; const int R::drawable::btn_radio_holo_dark=0x0108017b; const int R::drawable::btn_radio_holo_light=0x0108017c; const int R::drawable::btn_radio_label_background=0x0108017d; const int R::drawable::btn_radio_off=0x0108017e; const int R::drawable::btn_radio_off_disabled_focused_holo_dark=0x0108017f; const int R::drawable::btn_radio_off_disabled_focused_holo_light=0x01080180; const int R::drawable::btn_radio_off_disabled_holo_dark=0x01080181; const int R::drawable::btn_radio_off_disabled_holo_light=0x01080182; const int R::drawable::btn_radio_off_focused_holo_dark=0x01080183; const int R::drawable::btn_radio_off_focused_holo_light=0x01080184; const int R::drawable::btn_radio_off_holo=0x01080185; const int R::drawable::btn_radio_off_holo_dark=0x01080186; const int R::drawable::btn_radio_off_holo_light=0x01080187; const int R::drawable::btn_radio_off_pressed=0x01080188; const int R::drawable::btn_radio_off_pressed_holo_dark=0x01080189; const int R::drawable::btn_radio_off_pressed_holo_light=0x0108018a; const int R::drawable::btn_radio_off_selected=0x0108018b; const int R::drawable::btn_radio_on=0x0108018c; const int R::drawable::btn_radio_on_disabled_focused_holo_dark=0x0108018d; const int R::drawable::btn_radio_on_disabled_focused_holo_light=0x0108018e; const int R::drawable::btn_radio_on_disabled_holo_dark=0x0108018f; const int R::drawable::btn_radio_on_disabled_holo_light=0x01080190; const int R::drawable::btn_radio_on_focused_holo_dark=0x01080191; const int R::drawable::btn_radio_on_focused_holo_light=0x01080192; const int R::drawable::btn_radio_on_holo=0x01080193; const int R::drawable::btn_radio_on_holo_dark=0x01080194; const int R::drawable::btn_radio_on_holo_light=0x01080195; const int R::drawable::btn_radio_on_pressed=0x01080196; const int R::drawable::btn_radio_on_pressed_holo_dark=0x01080197; const int R::drawable::btn_radio_on_pressed_holo_light=0x01080198; const int R::drawable::btn_radio_on_selected=0x01080199; const int R::drawable::btn_rating_star_off_disabled_focused_holo_dark=0x0108019a; const int R::drawable::btn_rating_star_off_disabled_focused_holo_light=0x0108019b; const int R::drawable::btn_rating_star_off_disabled_holo_dark=0x0108019c; const int R::drawable::btn_rating_star_off_disabled_holo_light=0x0108019d; const int R::drawable::btn_rating_star_off_focused_holo_dark=0x0108019e; const int R::drawable::btn_rating_star_off_focused_holo_light=0x0108019f; const int R::drawable::btn_rating_star_off_normal=0x010801a0; const int R::drawable::btn_rating_star_off_normal_holo_dark=0x010801a1; const int R::drawable::btn_rating_star_off_normal_holo_light=0x010801a2; const int R::drawable::btn_rating_star_off_pressed=0x010801a3; const int R::drawable::btn_rating_star_off_pressed_holo_dark=0x010801a4; const int R::drawable::btn_rating_star_off_pressed_holo_light=0x010801a5; const int R::drawable::btn_rating_star_off_selected=0x010801a6; const int R::drawable::btn_rating_star_on_disabled_focused_holo_dark=0x010801a7; const int R::drawable::btn_rating_star_on_disabled_focused_holo_light=0x010801a8; const int R::drawable::btn_rating_star_on_disabled_holo_dark=0x010801a9; const int R::drawable::btn_rating_star_on_disabled_holo_light=0x010801aa; const int R::drawable::btn_rating_star_on_focused_holo_dark=0x010801ab; const int R::drawable::btn_rating_star_on_focused_holo_light=0x010801ac; const int R::drawable::btn_rating_star_on_normal=0x010801ad; const int R::drawable::btn_rating_star_on_normal_holo_dark=0x010801ae; const int R::drawable::btn_rating_star_on_normal_holo_light=0x010801af; const int R::drawable::btn_rating_star_on_pressed=0x010801b0; const int R::drawable::btn_rating_star_on_pressed_holo_dark=0x010801b1; const int R::drawable::btn_rating_star_on_pressed_holo_light=0x010801b2; const int R::drawable::btn_rating_star_on_selected=0x010801b3; const int R::drawable::btn_search_dialog=0x010801b4; const int R::drawable::btn_search_dialog_default=0x010801b5; const int R::drawable::btn_search_dialog_pressed=0x010801b6; const int R::drawable::btn_search_dialog_selected=0x010801b7; const int R::drawable::btn_search_dialog_voice=0x010801b8; const int R::drawable::btn_search_dialog_voice_default=0x010801b9; const int R::drawable::btn_search_dialog_voice_pressed=0x010801ba; const int R::drawable::btn_search_dialog_voice_selected=0x010801bb; const int R::drawable::btn_square_overlay=0x010801bc; const int R::drawable::btn_square_overlay_disabled=0x010801bd; const int R::drawable::btn_square_overlay_disabled_focused=0x010801be; const int R::drawable::btn_square_overlay_normal=0x010801bf; const int R::drawable::btn_square_overlay_pressed=0x010801c0; const int R::drawable::btn_square_overlay_selected=0x010801c1; const int R::drawable::btn_star=0x0108000a; const int R::drawable::btn_star_big_off=0x0108000b; const int R::drawable::btn_star_big_off_disable=0x010801c2; const int R::drawable::btn_star_big_off_disable_focused=0x010801c3; const int R::drawable::btn_star_big_off_pressed=0x010801c4; const int R::drawable::btn_star_big_off_selected=0x010801c5; const int R::drawable::btn_star_big_on=0x0108000c; const int R::drawable::btn_star_big_on_disable=0x010801c6; const int R::drawable::btn_star_big_on_disable_focused=0x010801c7; const int R::drawable::btn_star_big_on_pressed=0x010801c8; const int R::drawable::btn_star_big_on_selected=0x010801c9; const int R::drawable::btn_star_holo_dark=0x010801ca; const int R::drawable::btn_star_holo_light=0x010801cb; const int R::drawable::btn_star_label_background=0x010801cc; const int R::drawable::btn_star_off_disabled_focused_holo_dark=0x010801cd; const int R::drawable::btn_star_off_disabled_focused_holo_light=0x010801ce; const int R::drawable::btn_star_off_disabled_holo_dark=0x010801cf; const int R::drawable::btn_star_off_disabled_holo_light=0x010801d0; const int R::drawable::btn_star_off_focused_holo_dark=0x010801d1; const int R::drawable::btn_star_off_focused_holo_light=0x010801d2; const int R::drawable::btn_star_off_normal_holo_dark=0x010801d3; const int R::drawable::btn_star_off_normal_holo_light=0x010801d4; const int R::drawable::btn_star_off_pressed_holo_dark=0x010801d5; const int R::drawable::btn_star_off_pressed_holo_light=0x010801d6; const int R::drawable::btn_star_on_disabled_focused_holo_dark=0x010801d7; const int R::drawable::btn_star_on_disabled_focused_holo_light=0x010801d8; const int R::drawable::btn_star_on_disabled_holo_dark=0x010801d9; const int R::drawable::btn_star_on_disabled_holo_light=0x010801da; const int R::drawable::btn_star_on_focused_holo_dark=0x010801db; const int R::drawable::btn_star_on_focused_holo_light=0x010801dc; const int R::drawable::btn_star_on_normal_holo_dark=0x010801dd; const int R::drawable::btn_star_on_normal_holo_light=0x010801de; const int R::drawable::btn_star_on_pressed_holo_dark=0x010801df; const int R::drawable::btn_star_on_pressed_holo_light=0x010801e0; const int R::drawable::btn_toggle=0x010801e1; const int R::drawable::btn_toggle_bg=0x010801e2; const int R::drawable::btn_toggle_holo_dark=0x010801e3; const int R::drawable::btn_toggle_holo_light=0x010801e4; const int R::drawable::btn_toggle_off=0x010801e5; const int R::drawable::btn_toggle_off_disabled_focused_holo_dark=0x010801e6; const int R::drawable::btn_toggle_off_disabled_focused_holo_light=0x010801e7; const int R::drawable::btn_toggle_off_disabled_holo_dark=0x010801e8; const int R::drawable::btn_toggle_off_disabled_holo_light=0x010801e9; const int R::drawable::btn_toggle_off_focused_holo_dark=0x010801ea; const int R::drawable::btn_toggle_off_focused_holo_light=0x010801eb; const int R::drawable::btn_toggle_off_normal_holo_dark=0x010801ec; const int R::drawable::btn_toggle_off_normal_holo_light=0x010801ed; const int R::drawable::btn_toggle_off_pressed_holo_dark=0x010801ee; const int R::drawable::btn_toggle_off_pressed_holo_light=0x010801ef; const int R::drawable::btn_toggle_on=0x010801f0; const int R::drawable::btn_toggle_on_disabled_focused_holo_dark=0x010801f1; const int R::drawable::btn_toggle_on_disabled_focused_holo_light=0x010801f2; const int R::drawable::btn_toggle_on_disabled_holo_dark=0x010801f3; const int R::drawable::btn_toggle_on_disabled_holo_light=0x010801f4; const int R::drawable::btn_toggle_on_focused_holo_dark=0x010801f5; const int R::drawable::btn_toggle_on_focused_holo_light=0x010801f6; const int R::drawable::btn_toggle_on_normal_holo_dark=0x010801f7; const int R::drawable::btn_toggle_on_normal_holo_light=0x010801f8; const int R::drawable::btn_toggle_on_pressed_holo_dark=0x010801f9; const int R::drawable::btn_toggle_on_pressed_holo_light=0x010801fa; const int R::drawable::btn_zoom_down=0x010801fb; const int R::drawable::btn_zoom_down_disabled=0x010801fc; const int R::drawable::btn_zoom_down_disabled_focused=0x010801fd; const int R::drawable::btn_zoom_down_normal=0x010801fe; const int R::drawable::btn_zoom_down_pressed=0x010801ff; const int R::drawable::btn_zoom_down_selected=0x01080200; const int R::drawable::btn_zoom_page=0x01080201; const int R::drawable::btn_zoom_page_normal=0x01080202; const int R::drawable::btn_zoom_page_press=0x01080203; const int R::drawable::btn_zoom_up=0x01080204; const int R::drawable::btn_zoom_up_disabled=0x01080205; const int R::drawable::btn_zoom_up_disabled_focused=0x01080206; const int R::drawable::btn_zoom_up_normal=0x01080207; const int R::drawable::btn_zoom_up_pressed=0x01080208; const int R::drawable::btn_zoom_up_selected=0x01080209; const int R::drawable::button_inset=0x0108020a; const int R::drawable::button_onoff_indicator_off=0x0108000e; const int R::drawable::button_onoff_indicator_on=0x0108000d; const int R::drawable::cab_background_bottom_holo_dark=0x0108020b; const int R::drawable::cab_background_bottom_holo_light=0x0108020c; const int R::drawable::cab_background_top_holo_dark=0x0108020d; const int R::drawable::cab_background_top_holo_light=0x0108020e; const int R::drawable::call_contact=0x0108020f; const int R::drawable::checkbox_off_background=0x0108000f; const int R::drawable::checkbox_on_background=0x01080010; const int R::drawable::clock_dial=0x01080210; const int R::drawable::clock_hand_hour=0x01080211; const int R::drawable::clock_hand_minute=0x01080212; const int R::drawable::code_lock_bottom=0x01080213; const int R::drawable::code_lock_left=0x01080214; const int R::drawable::code_lock_top=0x01080215; const int R::drawable::combobox_disabled=0x01080216; const int R::drawable::combobox_nohighlight=0x01080217; const int R::drawable::compass_arrow=0x01080218; const int R::drawable::compass_base=0x01080219; const int R::drawable::contact_header_bg=0x0108021a; const int R::drawable::create_contact=0x0108021b; const int R::drawable::dark_header=0x010800a5; const int R::drawable::dark_header_dither=0x0108021c; const int R::drawable::day_picker_week_view_dayline_holo=0x0108021d; const int R::drawable::default_wallpaper=0x0108021e; const int R::drawable::dialog_bottom_holo_dark=0x0108021f; const int R::drawable::dialog_bottom_holo_light=0x01080220; const int R::drawable::dialog_divider_horizontal_holo_dark=0x01080221; const int R::drawable::dialog_divider_horizontal_holo_light=0x01080222; const int R::drawable::dialog_divider_horizontal_light=0x01080223; const int R::drawable::dialog_frame=0x01080011; const int R::drawable::dialog_full_holo_dark=0x01080224; const int R::drawable::dialog_full_holo_light=0x01080225; const int R::drawable::dialog_holo_dark_frame=0x010800b2; const int R::drawable::dialog_holo_light_frame=0x010800b3; const int R::drawable::dialog_ic_close_focused_holo_dark=0x01080226; const int R::drawable::dialog_ic_close_focused_holo_light=0x01080227; const int R::drawable::dialog_ic_close_normal_holo_dark=0x01080228; const int R::drawable::dialog_ic_close_normal_holo_light=0x01080229; const int R::drawable::dialog_ic_close_pressed_holo_dark=0x0108022a; const int R::drawable::dialog_ic_close_pressed_holo_light=0x0108022b; const int R::drawable::dialog_middle_holo=0x0108022c; const int R::drawable::dialog_middle_holo_dark=0x0108022d; const int R::drawable::dialog_middle_holo_light=0x0108022e; const int R::drawable::dialog_top_holo_dark=0x0108022f; const int R::drawable::dialog_top_holo_light=0x01080230; const int R::drawable::divider_horizontal_bright=0x01080012; const int R::drawable::divider_horizontal_bright_opaque=0x01080231; const int R::drawable::divider_horizontal_dark=0x01080014; const int R::drawable::divider_horizontal_dark_opaque=0x01080232; const int R::drawable::divider_horizontal_dim_dark=0x01080015; const int R::drawable::divider_horizontal_holo_dark=0x01080233; const int R::drawable::divider_horizontal_holo_light=0x01080234; const int R::drawable::divider_horizontal_textfield=0x01080013; const int R::drawable::divider_strong_holo=0x01080235; const int R::drawable::divider_vertical_bright=0x01080236; const int R::drawable::divider_vertical_bright_opaque=0x01080237; const int R::drawable::divider_vertical_dark=0x01080238; const int R::drawable::divider_vertical_dark_opaque=0x01080239; const int R::drawable::divider_vertical_holo_dark=0x0108023a; const int R::drawable::divider_vertical_holo_light=0x0108023b; const int R::drawable::dropdown_disabled_focused_holo_dark=0x0108023c; const int R::drawable::dropdown_disabled_focused_holo_light=0x0108023d; const int R::drawable::dropdown_disabled_holo_dark=0x0108023e; const int R::drawable::dropdown_disabled_holo_light=0x0108023f; const int R::drawable::dropdown_focused_holo_dark=0x01080240; const int R::drawable::dropdown_focused_holo_light=0x01080241; const int R::drawable::dropdown_ic_arrow_disabled_focused_holo_dark=0x01080242; const int R::drawable::dropdown_ic_arrow_disabled_focused_holo_light=0x01080243; const int R::drawable::dropdown_ic_arrow_disabled_holo_dark=0x01080244; const int R::drawable::dropdown_ic_arrow_disabled_holo_light=0x01080245; const int R::drawable::dropdown_ic_arrow_focused_holo_dark=0x01080246; const int R::drawable::dropdown_ic_arrow_focused_holo_light=0x01080247; const int R::drawable::dropdown_ic_arrow_normal_holo_dark=0x01080248; const int R::drawable::dropdown_ic_arrow_normal_holo_light=0x01080249; const int R::drawable::dropdown_ic_arrow_pressed_holo_dark=0x0108024a; const int R::drawable::dropdown_ic_arrow_pressed_holo_light=0x0108024b; const int R::drawable::dropdown_normal_holo_dark=0x0108024c; const int R::drawable::dropdown_normal_holo_light=0x0108024d; const int R::drawable::dropdown_pressed_holo_dark=0x0108024e; const int R::drawable::dropdown_pressed_holo_light=0x0108024f; const int R::drawable::edit_query=0x01080250; const int R::drawable::edit_query_background=0x01080251; const int R::drawable::edit_query_background_normal=0x01080252; const int R::drawable::edit_query_background_pressed=0x01080253; const int R::drawable::edit_query_background_selected=0x01080254; const int R::drawable::edit_text=0x01080016; const int R::drawable::edit_text_holo_dark=0x01080255; const int R::drawable::edit_text_holo_light=0x01080256; const int R::drawable::editbox_background=0x01080018; const int R::drawable::editbox_background_focus_yellow=0x01080257; const int R::drawable::editbox_background_normal=0x01080019; const int R::drawable::editbox_dropdown_background=0x01080258; const int R::drawable::editbox_dropdown_background_dark=0x01080259; const int R::drawable::editbox_dropdown_dark_frame=0x0108001a; const int R::drawable::editbox_dropdown_light_frame=0x0108001b; const int R::drawable::emo_im_angel=0x0108025a; const int R::drawable::emo_im_cool=0x0108025b; const int R::drawable::emo_im_crying=0x0108025c; const int R::drawable::emo_im_embarrassed=0x0108025d; const int R::drawable::emo_im_foot_in_mouth=0x0108025e; const int R::drawable::emo_im_happy=0x0108025f; const int R::drawable::emo_im_kissing=0x01080260; const int R::drawable::emo_im_laughing=0x01080261; const int R::drawable::emo_im_lips_are_sealed=0x01080262; const int R::drawable::emo_im_money_mouth=0x01080263; const int R::drawable::emo_im_sad=0x01080264; const int R::drawable::emo_im_surprised=0x01080265; const int R::drawable::emo_im_tongue_sticking_out=0x01080266; const int R::drawable::emo_im_undecided=0x01080267; const int R::drawable::emo_im_winking=0x01080268; const int R::drawable::emo_im_wtf=0x01080269; const int R::drawable::emo_im_yelling=0x0108026a; const int R::drawable::expander_close_holo_dark=0x0108026b; const int R::drawable::expander_close_holo_light=0x0108026c; const int R::drawable::expander_group=0x0108026d; const int R::drawable::expander_group_holo_dark=0x0108026e; const int R::drawable::expander_group_holo_light=0x0108026f; const int R::drawable::expander_ic_maximized=0x01080270; const int R::drawable::expander_ic_minimized=0x01080271; const int R::drawable::expander_open_holo_dark=0x01080272; const int R::drawable::expander_open_holo_light=0x01080273; const int R::drawable::fastscroll_label_left_holo_dark=0x01080274; const int R::drawable::fastscroll_label_left_holo_light=0x01080275; const int R::drawable::fastscroll_label_right_holo_dark=0x01080276; const int R::drawable::fastscroll_label_right_holo_light=0x01080277; const int R::drawable::fastscroll_thumb_default_holo=0x01080278; const int R::drawable::fastscroll_thumb_holo=0x01080279; const int R::drawable::fastscroll_thumb_pressed_holo=0x0108027a; const int R::drawable::fastscroll_track_default_holo_dark=0x0108027b; const int R::drawable::fastscroll_track_default_holo_light=0x0108027c; const int R::drawable::fastscroll_track_holo_dark=0x0108027d; const int R::drawable::fastscroll_track_holo_light=0x0108027e; const int R::drawable::fastscroll_track_pressed_holo_dark=0x0108027f; const int R::drawable::fastscroll_track_pressed_holo_light=0x01080280; const int R::drawable::focused_application_background_static=0x01080281; const int R::drawable::frame_gallery_thumb=0x01080282; const int R::drawable::frame_gallery_thumb_pressed=0x01080283; const int R::drawable::frame_gallery_thumb_selected=0x01080284; const int R::drawable::gallery_item_background=0x01080285; const int R::drawable::gallery_selected_default=0x01080286; const int R::drawable::gallery_selected_focused=0x01080287; const int R::drawable::gallery_selected_pressed=0x01080288; const int R::drawable::gallery_thumb=0x0108001c; const int R::drawable::gallery_unselected_default=0x01080289; const int R::drawable::gallery_unselected_pressed=0x0108028a; const int R::drawable::grid_selector_background=0x0108028b; const int R::drawable::grid_selector_background_focus=0x0108028c; const int R::drawable::grid_selector_background_pressed=0x0108028d; const int R::drawable::highlight_disabled=0x0108028e; const int R::drawable::highlight_pressed=0x0108028f; const int R::drawable::highlight_selected=0x01080290; const int R::drawable::ic_ab_back_holo_dark=0x01080291; const int R::drawable::ic_ab_back_holo_light=0x01080292; const int R::drawable::ic_action_assist_focused=0x01080293; const int R::drawable::ic_action_assist_generic=0x01080294; const int R::drawable::ic_action_assist_generic_activated=0x01080295; const int R::drawable::ic_action_assist_generic_normal=0x01080296; const int R::drawable::ic_aggregated=0x01080297; const int R::drawable::ic_audio_alarm=0x01080298; const int R::drawable::ic_audio_alarm_mute=0x01080299; const int R::drawable::ic_audio_bt=0x0108029a; const int R::drawable::ic_audio_bt_mute=0x0108029b; const int R::drawable::ic_audio_notification=0x0108029c; const int R::drawable::ic_audio_notification_mute=0x0108029d; const int R::drawable::ic_audio_phone=0x0108029e; const int R::drawable::ic_audio_ring_notif=0x0108029f; const int R::drawable::ic_audio_ring_notif_mute=0x010802a0; const int R::drawable::ic_audio_ring_notif_vibrate=0x010802a1; const int R::drawable::ic_audio_vol=0x010802a2; const int R::drawable::ic_audio_vol_mute=0x010802a3; const int R::drawable::ic_btn_round_more=0x010802a4; const int R::drawable::ic_btn_round_more_disabled=0x010802a5; const int R::drawable::ic_btn_round_more_normal=0x010802a6; const int R::drawable::ic_btn_search=0x010802a7; const int R::drawable::ic_btn_search_go=0x010802a8; const int R::drawable::ic_btn_speak_now=0x010800a4; const int R::drawable::ic_btn_square_browser_zoom_fit_page=0x010802a9; const int R::drawable::ic_btn_square_browser_zoom_fit_page_disabled=0x010802aa; const int R::drawable::ic_btn_square_browser_zoom_fit_page_normal=0x010802ab; const int R::drawable::ic_btn_square_browser_zoom_page_overview=0x010802ac; const int R::drawable::ic_btn_square_browser_zoom_page_overview_disabled=0x010802ad; const int R::drawable::ic_btn_square_browser_zoom_page_overview_normal=0x010802ae; const int R::drawable::ic_bullet_key_permission=0x010802af; const int R::drawable::ic_cab_done_holo=0x010802b0; const int R::drawable::ic_cab_done_holo_dark=0x010802b1; const int R::drawable::ic_cab_done_holo_light=0x010802b2; const int R::drawable::ic_checkmark_holo_light=0x010802b3; const int R::drawable::ic_clear=0x010802b4; const int R::drawable::ic_clear_disabled=0x010802b5; const int R::drawable::ic_clear_holo_light=0x010802b6; const int R::drawable::ic_clear_normal=0x010802b7; const int R::drawable::ic_clear_search_api_disabled_holo_light=0x010802b8; const int R::drawable::ic_clear_search_api_holo_light=0x010802b9; const int R::drawable::ic_coins_s=0x010802ba; const int R::drawable::ic_commit=0x010802bb; const int R::drawable::ic_commit_search_api_holo_dark=0x010802bc; const int R::drawable::ic_commit_search_api_holo_light=0x010802bd; const int R::drawable::ic_contact_picture=0x010802be; const int R::drawable::ic_contact_picture_2=0x010802bf; const int R::drawable::ic_contact_picture_3=0x010802c0; const int R::drawable::ic_delete=0x0108001d; const int R::drawable::ic_dialog_alert=0x01080027; const int R::drawable::ic_dialog_alert_holo_dark=0x010802c1; const int R::drawable::ic_dialog_alert_holo_light=0x010802c2; const int R::drawable::ic_dialog_close_normal_holo=0x010802c3; const int R::drawable::ic_dialog_close_pressed_holo=0x010802c4; const int R::drawable::ic_dialog_dialer=0x01080028; const int R::drawable::ic_dialog_email=0x01080029; const int R::drawable::ic_dialog_focused_holo=0x010802c5; const int R::drawable::ic_dialog_info=0x0108009b; const int R::drawable::ic_dialog_map=0x0108002a; const int R::drawable::ic_dialog_time=0x010802c6; const int R::drawable::ic_dialog_usb=0x010802c7; const int R::drawable::ic_emergency=0x010802c8; const int R::drawable::ic_facial_backup=0x010802c9; const int R::drawable::ic_find_next_holo_dark=0x010802ca; const int R::drawable::ic_find_next_holo_light=0x010802cb; const int R::drawable::ic_find_previous_holo_dark=0x010802cc; const int R::drawable::ic_find_previous_holo_light=0x010802cd; const int R::drawable::ic_go=0x010802ce; const int R::drawable::ic_go_search_api_holo_light=0x010802cf; const int R::drawable::ic_input_add=0x0108002b; const int R::drawable::ic_input_delete=0x0108002c; const int R::drawable::ic_input_get=0x0108002d; const int R::drawable::ic_jog_dial_answer=0x010802d0; const int R::drawable::ic_jog_dial_answer_and_end=0x010802d1; const int R::drawable::ic_jog_dial_answer_and_hold=0x010802d2; const int R::drawable::ic_jog_dial_decline=0x010802d3; const int R::drawable::ic_jog_dial_sound_off=0x010802d4; const int R::drawable::ic_jog_dial_sound_on=0x010802d5; const int R::drawable::ic_jog_dial_unlock=0x010802d6; const int R::drawable::ic_jog_dial_vibrate_on=0x010802d7; const int R::drawable::ic_launcher_android=0x010802d8; const int R::drawable::ic_lock_airplane_mode=0x010802d9; const int R::drawable::ic_lock_airplane_mode_off=0x010802da; const int R::drawable::ic_lock_idle_alarm=0x0108002e; const int R::drawable::ic_lock_idle_charging=0x0108001e; const int R::drawable::ic_lock_idle_lock=0x0108001f; const int R::drawable::ic_lock_idle_low_battery=0x01080020; const int R::drawable::ic_lock_lock=0x0108002f; const int R::drawable::ic_lock_power_off=0x01080030; const int R::drawable::ic_lock_ringer_off=0x010802db; const int R::drawable::ic_lock_ringer_on=0x010802dc; const int R::drawable::ic_lock_silent_mode=0x01080031; const int R::drawable::ic_lock_silent_mode_off=0x01080032; const int R::drawable::ic_lock_silent_mode_vibrate=0x010802dd; const int R::drawable::ic_lockscreen_alarm=0x010802de; const int R::drawable::ic_lockscreen_camera=0x010802df; const int R::drawable::ic_lockscreen_camera_activated=0x010802e0; const int R::drawable::ic_lockscreen_camera_normal=0x010802e1; const int R::drawable::ic_lockscreen_emergencycall_normal=0x010802e2; const int R::drawable::ic_lockscreen_emergencycall_pressed=0x010802e3; const int R::drawable::ic_lockscreen_forgotpassword_normal=0x010802e4; const int R::drawable::ic_lockscreen_forgotpassword_pressed=0x010802e5; const int R::drawable::ic_lockscreen_glowdot=0x010802e6; const int R::drawable::ic_lockscreen_google_activated=0x010802e7; const int R::drawable::ic_lockscreen_google_focused=0x010802e8; const int R::drawable::ic_lockscreen_google_normal=0x010802e9; const int R::drawable::ic_lockscreen_handle=0x010802ea; const int R::drawable::ic_lockscreen_handle_normal=0x010802eb; const int R::drawable::ic_lockscreen_handle_pressed=0x010802ec; const int R::drawable::ic_lockscreen_ime=0x010802ed; const int R::drawable::ic_lockscreen_lock_normal=0x010802ee; const int R::drawable::ic_lockscreen_lock_pressed=0x010802ef; const int R::drawable::ic_lockscreen_outerring=0x010802f0; const int R::drawable::ic_lockscreen_player_background=0x010802f1; const int R::drawable::ic_lockscreen_search_activated=0x010802f2; const int R::drawable::ic_lockscreen_search_normal=0x010802f3; const int R::drawable::ic_lockscreen_silent=0x010802f4; const int R::drawable::ic_lockscreen_silent_activated=0x010802f5; const int R::drawable::ic_lockscreen_silent_focused=0x010802f6; const int R::drawable::ic_lockscreen_silent_normal=0x010802f7; const int R::drawable::ic_lockscreen_sim=0x010802f8; const int R::drawable::ic_lockscreen_soundon=0x010802f9; const int R::drawable::ic_lockscreen_soundon_activated=0x010802fa; const int R::drawable::ic_lockscreen_soundon_focused=0x010802fb; const int R::drawable::ic_lockscreen_soundon_normal=0x010802fc; const int R::drawable::ic_lockscreen_unlock=0x010802fd; const int R::drawable::ic_lockscreen_unlock_activated=0x010802fe; const int R::drawable::ic_lockscreen_unlock_normal=0x010802ff; const int R::drawable::ic_lockscreen_unlock_phantom=0x01080300; const int R::drawable::ic_maps_indicator_current_position=0x01080301; const int R::drawable::ic_maps_indicator_current_position_anim=0x01080302; const int R::drawable::ic_maps_indicator_current_position_anim1=0x01080303; const int R::drawable::ic_maps_indicator_current_position_anim2=0x01080304; const int R::drawable::ic_maps_indicator_current_position_anim3=0x01080305; const int R::drawable::ic_media_embed_play=0x01080306; const int R::drawable::ic_media_ff=0x01080021; const int R::drawable::ic_media_fullscreen=0x01080307; const int R::drawable::ic_media_group_collapse=0x01080308; const int R::drawable::ic_media_group_expand=0x01080309; const int R::drawable::ic_media_next=0x01080022; const int R::drawable::ic_media_pause=0x01080023; const int R::drawable::ic_media_play=0x01080024; const int R::drawable::ic_media_previous=0x01080025; const int R::drawable::ic_media_rew=0x01080026; const int R::drawable::ic_media_route_connecting_holo_dark=0x0108030a; const int R::drawable::ic_media_route_connecting_holo_light=0x0108030b; const int R::drawable::ic_media_route_disabled_holo_dark=0x0108030c; const int R::drawable::ic_media_route_disabled_holo_light=0x0108030d; const int R::drawable::ic_media_route_holo_dark=0x0108030e; const int R::drawable::ic_media_route_holo_light=0x0108030f; const int R::drawable::ic_media_route_off_holo_dark=0x01080310; const int R::drawable::ic_media_route_off_holo_light=0x01080311; const int R::drawable::ic_media_route_on_0_holo_dark=0x01080312; const int R::drawable::ic_media_route_on_0_holo_light=0x01080313; const int R::drawable::ic_media_route_on_1_holo_dark=0x01080314; const int R::drawable::ic_media_route_on_1_holo_light=0x01080315; const int R::drawable::ic_media_route_on_2_holo_dark=0x01080316; const int R::drawable::ic_media_route_on_2_holo_light=0x01080317; const int R::drawable::ic_media_route_on_holo_dark=0x01080318; const int R::drawable::ic_media_route_on_holo_light=0x01080319; const int R::drawable::ic_media_stop=0x0108031a; const int R::drawable::ic_media_video_poster=0x0108031b; const int R::drawable::ic_menu_account_list=0x0108031c; const int R::drawable::ic_menu_add=0x01080033; const int R::drawable::ic_menu_agenda=0x01080034; const int R::drawable::ic_menu_allfriends=0x0108031d; const int R::drawable::ic_menu_always_landscape_portrait=0x01080035; const int R::drawable::ic_menu_archive=0x0108031e; const int R::drawable::ic_menu_attachment=0x0108031f; const int R::drawable::ic_menu_back=0x01080320; const int R::drawable::ic_menu_block=0x01080321; const int R::drawable::ic_menu_blocked_user=0x01080322; const int R::drawable::ic_menu_btn_add=0x01080323; const int R::drawable::ic_menu_call=0x01080036; const int R::drawable::ic_menu_camera=0x01080037; const int R::drawable::ic_menu_cc=0x01080324; const int R::drawable::ic_menu_chat_dashboard=0x01080325; const int R::drawable::ic_menu_clear_playlist=0x01080326; const int R::drawable::ic_menu_close_clear_cancel=0x01080038; const int R::drawable::ic_menu_compass=0x01080039; const int R::drawable::ic_menu_compose=0x01080327; const int R::drawable::ic_menu_copy=0x01080328; const int R::drawable::ic_menu_copy_holo_dark=0x01080329; const int R::drawable::ic_menu_copy_holo_light=0x0108032a; const int R::drawable::ic_menu_crop=0x0108003a; const int R::drawable::ic_menu_cut=0x0108032b; const int R::drawable::ic_menu_cut_holo_dark=0x0108032c; const int R::drawable::ic_menu_cut_holo_light=0x0108032d; const int R::drawable::ic_menu_day=0x0108003b; const int R::drawable::ic_menu_delete=0x0108003c; const int R::drawable::ic_menu_directions=0x0108003d; const int R::drawable::ic_menu_edit=0x0108003e; const int R::drawable::ic_menu_emoticons=0x0108032e; const int R::drawable::ic_menu_end_conversation=0x0108032f; const int R::drawable::ic_menu_find=0x01080330; const int R::drawable::ic_menu_find_holo_dark=0x01080331; const int R::drawable::ic_menu_find_holo_light=0x01080332; const int R::drawable::ic_menu_forward=0x01080333; const int R::drawable::ic_menu_friendslist=0x01080334; const int R::drawable::ic_menu_gallery=0x0108003f; const int R::drawable::ic_menu_goto=0x01080335; const int R::drawable::ic_menu_help=0x01080040; const int R::drawable::ic_menu_help_holo_light=0x01080336; const int R::drawable::ic_menu_home=0x01080337; const int R::drawable::ic_menu_info_details=0x01080041; const int R::drawable::ic_menu_invite=0x01080338; const int R::drawable::ic_menu_login=0x01080339; const int R::drawable::ic_menu_manage=0x01080042; const int R::drawable::ic_menu_mapmode=0x01080043; const int R::drawable::ic_menu_mark=0x0108033a; const int R::drawable::ic_menu_month=0x01080044; const int R::drawable::ic_menu_more=0x01080045; const int R::drawable::ic_menu_moreoverflow=0x0108033b; const int R::drawable::ic_menu_moreoverflow_focused_holo_dark=0x0108033c; const int R::drawable::ic_menu_moreoverflow_focused_holo_light=0x0108033d; const int R::drawable::ic_menu_moreoverflow_holo_dark=0x0108033e; const int R::drawable::ic_menu_moreoverflow_holo_light=0x0108033f; const int R::drawable::ic_menu_moreoverflow_normal_holo_dark=0x01080340; const int R::drawable::ic_menu_moreoverflow_normal_holo_light=0x01080341; const int R::drawable::ic_menu_my_calendar=0x01080046; const int R::drawable::ic_menu_mylocation=0x01080047; const int R::drawable::ic_menu_myplaces=0x01080048; const int R::drawable::ic_menu_notifications=0x01080342; const int R::drawable::ic_menu_paste=0x01080343; const int R::drawable::ic_menu_paste_holo_dark=0x01080344; const int R::drawable::ic_menu_paste_holo_light=0x01080345; const int R::drawable::ic_menu_play_clip=0x01080346; const int R::drawable::ic_menu_preferences=0x01080049; const int R::drawable::ic_menu_recent_history=0x0108004a; const int R::drawable::ic_menu_refresh=0x01080347; const int R::drawable::ic_menu_report_image=0x0108004b; const int R::drawable::ic_menu_revert=0x0108004c; const int R::drawable::ic_menu_rotate=0x0108004d; const int R::drawable::ic_menu_save=0x0108004e; const int R::drawable::ic_menu_search=0x0108004f; const int R::drawable::ic_menu_search_holo_dark=0x01080348; const int R::drawable::ic_menu_search_holo_light=0x01080349; const int R::drawable::ic_menu_selectall_holo_dark=0x0108034a; const int R::drawable::ic_menu_selectall_holo_light=0x0108034b; const int R::drawable::ic_menu_send=0x01080050; const int R::drawable::ic_menu_set_as=0x01080051; const int R::drawable::ic_menu_settings_holo_light=0x0108034c; const int R::drawable::ic_menu_share=0x01080052; const int R::drawable::ic_menu_share_holo_dark=0x0108034d; const int R::drawable::ic_menu_share_holo_light=0x0108034e; const int R::drawable::ic_menu_slideshow=0x01080053; const int R::drawable::ic_menu_sort_alphabetically=0x0108009c; const int R::drawable::ic_menu_sort_by_size=0x0108009d; const int R::drawable::ic_menu_star=0x0108034f; const int R::drawable::ic_menu_start_conversation=0x01080350; const int R::drawable::ic_menu_stop=0x01080351; const int R::drawable::ic_menu_today=0x01080054; const int R::drawable::ic_menu_upload=0x01080055; const int R::drawable::ic_menu_upload_you_tube=0x01080056; const int R::drawable::ic_menu_view=0x01080057; const int R::drawable::ic_menu_week=0x01080058; const int R::drawable::ic_menu_zoom=0x01080059; const int R::drawable::ic_notification_clear_all=0x0108005a; const int R::drawable::ic_notification_ime_default=0x01080352; const int R::drawable::ic_notification_overlay=0x0108005b; const int R::drawable::ic_notify_wifidisplay=0x01080353; const int R::drawable::ic_partial_secure=0x0108005c; const int R::drawable::ic_popup_disk_full=0x0108005d; const int R::drawable::ic_popup_reminder=0x0108005e; const int R::drawable::ic_popup_sync=0x0108005f; const int R::drawable::ic_popup_sync_1=0x01080354; const int R::drawable::ic_popup_sync_2=0x01080355; const int R::drawable::ic_popup_sync_3=0x01080356; const int R::drawable::ic_popup_sync_4=0x01080357; const int R::drawable::ic_popup_sync_5=0x01080358; const int R::drawable::ic_popup_sync_6=0x01080359; const int R::drawable::ic_search=0x0108035a; const int R::drawable::ic_search_api_holo_light=0x0108035b; const int R::drawable::ic_search_category_default=0x01080060; const int R::drawable::ic_secure=0x01080061; const int R::drawable::ic_settings_language=0x0108035c; const int R::drawable::ic_sysbar_quicksettings=0x0108035d; const int R::drawable::ic_text_dot=0x0108035e; const int R::drawable::ic_vibrate=0x0108035f; const int R::drawable::ic_vibrate_small=0x01080360; const int R::drawable::ic_voice_search=0x01080361; const int R::drawable::ic_voice_search_api_holo_light=0x01080362; const int R::drawable::ic_volume=0x01080363; const int R::drawable::ic_volume_bluetooth_ad2p=0x01080364; const int R::drawable::ic_volume_bluetooth_in_call=0x01080365; const int R::drawable::ic_volume_off=0x01080366; const int R::drawable::ic_volume_off_small=0x01080367; const int R::drawable::ic_volume_small=0x01080368; const int R::drawable::icon_highlight_rectangle=0x01080369; const int R::drawable::icon_highlight_square=0x0108036a; const int R::drawable::ime_qwerty=0x0108036b; const int R::drawable::indicator_check_mark_dark=0x0108036c; const int R::drawable::indicator_check_mark_light=0x0108036d; const int R::drawable::indicator_code_lock_drag_direction_green_up=0x0108036e; const int R::drawable::indicator_code_lock_drag_direction_red_up=0x0108036f; const int R::drawable::indicator_code_lock_point_area_default=0x01080370; const int R::drawable::indicator_code_lock_point_area_default_holo=0x01080371; const int R::drawable::indicator_code_lock_point_area_green=0x01080372; const int R::drawable::indicator_code_lock_point_area_green_holo=0x01080373; const int R::drawable::indicator_code_lock_point_area_red=0x01080374; const int R::drawable::indicator_code_lock_point_area_red_holo=0x01080375; const int R::drawable::indicator_input_error=0x01080376; const int R::drawable::input_method_fullscreen_background=0x01080610; const int R::drawable::input_method_fullscreen_background_holo=0x01080611; const int R::drawable::intro_bg=0x01080377; const int R::drawable::item_background=0x01080378; const int R::drawable::item_background_activated_holo_dark=0x01080379; const int R::drawable::item_background_holo_dark=0x0108037a; const int R::drawable::item_background_holo_light=0x0108037b; const int R::drawable::jog_dial_arrow_long_left_green=0x0108037c; const int R::drawable::jog_dial_arrow_long_left_yellow=0x0108037d; const int R::drawable::jog_dial_arrow_long_middle_yellow=0x0108037e; const int R::drawable::jog_dial_arrow_long_right_red=0x0108037f; const int R::drawable::jog_dial_arrow_long_right_yellow=0x01080380; const int R::drawable::jog_dial_arrow_short_left=0x01080381; const int R::drawable::jog_dial_arrow_short_left_and_right=0x01080382; const int R::drawable::jog_dial_arrow_short_right=0x01080383; const int R::drawable::jog_dial_bg=0x01080384; const int R::drawable::jog_dial_dimple=0x01080385; const int R::drawable::jog_dial_dimple_dim=0x01080386; const int R::drawable::jog_tab_bar_left_answer=0x01080387; const int R::drawable::jog_tab_bar_left_end_confirm_gray=0x01080388; const int R::drawable::jog_tab_bar_left_end_confirm_green=0x01080389; const int R::drawable::jog_tab_bar_left_end_confirm_red=0x0108038a; const int R::drawable::jog_tab_bar_left_end_confirm_yellow=0x0108038b; const int R::drawable::jog_tab_bar_left_end_normal=0x0108038c; const int R::drawable::jog_tab_bar_left_end_pressed=0x0108038d; const int R::drawable::jog_tab_bar_left_generic=0x0108038e; const int R::drawable::jog_tab_bar_left_unlock=0x0108038f; const int R::drawable::jog_tab_bar_right_decline=0x01080390; const int R::drawable::jog_tab_bar_right_end_confirm_gray=0x01080391; const int R::drawable::jog_tab_bar_right_end_confirm_green=0x01080392; const int R::drawable::jog_tab_bar_right_end_confirm_red=0x01080393; const int R::drawable::jog_tab_bar_right_end_confirm_yellow=0x01080394; const int R::drawable::jog_tab_bar_right_end_normal=0x01080395; const int R::drawable::jog_tab_bar_right_end_pressed=0x01080396; const int R::drawable::jog_tab_bar_right_generic=0x01080397; const int R::drawable::jog_tab_bar_right_sound_off=0x01080398; const int R::drawable::jog_tab_bar_right_sound_on=0x01080399; const int R::drawable::jog_tab_left_answer=0x0108039a; const int R::drawable::jog_tab_left_confirm_gray=0x0108039b; const int R::drawable::jog_tab_left_confirm_green=0x0108039c; const int R::drawable::jog_tab_left_confirm_red=0x0108039d; const int R::drawable::jog_tab_left_confirm_yellow=0x0108039e; const int R::drawable::jog_tab_left_generic=0x0108039f; const int R::drawable::jog_tab_left_normal=0x010803a0; const int R::drawable::jog_tab_left_pressed=0x010803a1; const int R::drawable::jog_tab_left_unlock=0x010803a2; const int R::drawable::jog_tab_right_confirm_gray=0x010803a3; const int R::drawable::jog_tab_right_confirm_green=0x010803a4; const int R::drawable::jog_tab_right_confirm_red=0x010803a5; const int R::drawable::jog_tab_right_confirm_yellow=0x010803a6; const int R::drawable::jog_tab_right_decline=0x010803a7; const int R::drawable::jog_tab_right_generic=0x010803a8; const int R::drawable::jog_tab_right_normal=0x010803a9; const int R::drawable::jog_tab_right_pressed=0x010803aa; const int R::drawable::jog_tab_right_sound_off=0x010803ab; const int R::drawable::jog_tab_right_sound_on=0x010803ac; const int R::drawable::jog_tab_target_gray=0x010803ad; const int R::drawable::jog_tab_target_green=0x010803ae; const int R::drawable::jog_tab_target_red=0x010803af; const int R::drawable::jog_tab_target_yellow=0x010803b0; const int R::drawable::keyboard_accessory_bg_landscape=0x010803b1; const int R::drawable::keyboard_background=0x010803b2; const int R::drawable::keyboard_key_feedback=0x010803b3; const int R::drawable::keyboard_key_feedback_background=0x010803b4; const int R::drawable::keyboard_key_feedback_more_background=0x010803b5; const int R::drawable::keyboard_popup_panel_background=0x010803b6; const int R::drawable::keyboard_popup_panel_trans_background=0x010803b7; const int R::drawable::keyguard_expand_challenge_handle=0x010803b8; const int R::drawable::kg_add_widget=0x010803b9; const int R::drawable::kg_bouncer_bg_white=0x010803ba; const int R::drawable::kg_security_grip=0x010803bb; const int R::drawable::kg_security_lock=0x010803bc; const int R::drawable::kg_security_lock_focused=0x010803bd; const int R::drawable::kg_security_lock_normal=0x010803be; const int R::drawable::kg_security_lock_pressed=0x010803bf; const int R::drawable::kg_widget_bg_padded=0x010803c0; const int R::drawable::kg_widget_delete_drop_target=0x010803c1; const int R::drawable::light_header=0x010803c2; const int R::drawable::light_header_dither=0x010803c3; const int R::drawable::list_activated_holo=0x010803c4; const int R::drawable::list_divider_holo_dark=0x010803c5; const int R::drawable::list_divider_holo_light=0x010803c6; const int R::drawable::list_divider_horizontal_holo_dark=0x010803c7; const int R::drawable::list_focused_holo=0x010803c8; const int R::drawable::list_highlight=0x010803c9; const int R::drawable::list_highlight_active=0x010803ca; const int R::drawable::list_highlight_inactive=0x010803cb; const int R::drawable::list_longpressed_holo=0x010803cc; const int R::drawable::list_pressed_holo_dark=0x010803cd; const int R::drawable::list_pressed_holo_light=0x010803ce; const int R::drawable::list_section_divider_holo_dark=0x010803cf; const int R::drawable::list_section_divider_holo_light=0x010803d0; const int R::drawable::list_section_header_holo_dark=0x010803d1; const int R::drawable::list_section_header_holo_light=0x010803d2; const int R::drawable::list_selected_background=0x010803d3; const int R::drawable::list_selected_background_light=0x010803d4; const int R::drawable::list_selected_holo_dark=0x010803d5; const int R::drawable::list_selected_holo_light=0x010803d6; const int R::drawable::list_selector_activated_holo_dark=0x010803d7; const int R::drawable::list_selector_activated_holo_light=0x010803d8; const int R::drawable::list_selector_background=0x01080062; const int R::drawable::list_selector_background_default=0x010803d9; const int R::drawable::list_selector_background_default_light=0x010803da; const int R::drawable::list_selector_background_disabled=0x010803db; const int R::drawable::list_selector_background_disabled_light=0x010803dc; const int R::drawable::list_selector_background_focus=0x010803dd; const int R::drawable::list_selector_background_focused=0x010803de; const int R::drawable::list_selector_background_focused_light=0x010803df; const int R::drawable::list_selector_background_focused_selected=0x010803e0; const int R::drawable::list_selector_background_light=0x010803e1; const int R::drawable::list_selector_background_longpress=0x010803e2; const int R::drawable::list_selector_background_longpress_light=0x010803e3; const int R::drawable::list_selector_background_pressed=0x010803e4; const int R::drawable::list_selector_background_pressed_light=0x010803e5; const int R::drawable::list_selector_background_selected=0x010803e6; const int R::drawable::list_selector_background_selected_light=0x010803e7; const int R::drawable::list_selector_background_transition=0x010803e8; const int R::drawable::list_selector_background_transition_holo_dark=0x010803e9; const int R::drawable::list_selector_background_transition_holo_light=0x010803ea; const int R::drawable::list_selector_background_transition_light=0x010803eb; const int R::drawable::list_selector_disabled_holo_dark=0x010803ec; const int R::drawable::list_selector_disabled_holo_light=0x010803ed; const int R::drawable::list_selector_focused_holo_dark=0x010803ee; const int R::drawable::list_selector_focused_holo_light=0x010803ef; const int R::drawable::list_selector_holo_dark=0x010803f0; const int R::drawable::list_selector_holo_light=0x010803f1; const int R::drawable::list_selector_multiselect_holo_dark=0x010803f2; const int R::drawable::list_selector_multiselect_holo_light=0x010803f3; const int R::drawable::list_selector_pressed_holo_dark=0x010803f4; const int R::drawable::list_selector_pressed_holo_light=0x010803f5; const int R::drawable::load_average_background=0x010803f6; const int R::drawable::loading_tile=0x010803f7; const int R::drawable::loading_tile_android=0x010803f8; const int R::drawable::lockscreen_emergency_button=0x010803f9; const int R::drawable::lockscreen_forgot_password_button=0x010803fa; const int R::drawable::lockscreen_password_field_dark=0x010803fb; const int R::drawable::lockscreen_protection_pattern=0x010803fc; const int R::drawable::magnified_region_frame=0x010803fd; const int R::drawable::maps_google_logo=0x010803fe; const int R::drawable::media_button_background=0x010803ff; const int R::drawable::menu_background=0x01080400; const int R::drawable::menu_background_fill_parent_width=0x01080401; const int R::drawable::menu_dropdown_panel_holo_dark=0x01080402; const int R::drawable::menu_dropdown_panel_holo_light=0x01080403; const int R::drawable::menu_frame=0x01080063; const int R::drawable::menu_full_frame=0x01080064; const int R::drawable::menu_hardkey_panel_holo_dark=0x01080404; const int R::drawable::menu_hardkey_panel_holo_light=0x01080405; const int R::drawable::menu_selector=0x01080406; const int R::drawable::menu_separator=0x01080407; const int R::drawable::menu_submenu_background=0x01080408; const int R::drawable::menuitem_background=0x01080065; const int R::drawable::menuitem_background_focus=0x01080409; const int R::drawable::menuitem_background_pressed=0x0108040a; const int R::drawable::menuitem_background_solid=0x0108040b; const int R::drawable::menuitem_background_solid_focused=0x0108040c; const int R::drawable::menuitem_background_solid_pressed=0x0108040d; const int R::drawable::menuitem_checkbox=0x0108040e; const int R::drawable::menuitem_checkbox_on=0x0108040f; const int R::drawable::minitab_lt=0x01080410; const int R::drawable::minitab_lt_focus=0x01080411; const int R::drawable::minitab_lt_press=0x01080412; const int R::drawable::minitab_lt_selected=0x01080413; const int R::drawable::minitab_lt_unselected=0x01080414; const int R::drawable::minitab_lt_unselected_press=0x01080415; const int R::drawable::no_tile_128=0x01080416; const int R::drawable::no_tile_256=0x01080417; const int R::drawable::notification_bg=0x01080418; const int R::drawable::notification_bg_low=0x01080419; const int R::drawable::notification_bg_low_normal=0x0108041a; const int R::drawable::notification_bg_low_pressed=0x0108041b; const int R::drawable::notification_bg_normal=0x0108041c; const int R::drawable::notification_bg_normal_pressed=0x0108041d; const int R::drawable::notification_item_background_color=0x0108060c; const int R::drawable::notification_item_background_color_pressed=0x0108060d; const int R::drawable::notification_template_icon_bg=0x01080615; const int R::drawable::notification_template_icon_low_bg=0x01080616; const int R::drawable::notify_panel_notification_icon_bg=0x0108041e; const int R::drawable::notify_panel_notification_icon_bg_tile=0x0108041f; const int R::drawable::numberpicker_down_btn=0x01080420; const int R::drawable::numberpicker_down_disabled=0x01080421; const int R::drawable::numberpicker_down_disabled_focused=0x01080422; const int R::drawable::numberpicker_down_normal=0x01080423; const int R::drawable::numberpicker_down_pressed=0x01080424; const int R::drawable::numberpicker_down_selected=0x01080425; const int R::drawable::numberpicker_input=0x01080426; const int R::drawable::numberpicker_input_disabled=0x01080427; const int R::drawable::numberpicker_input_normal=0x01080428; const int R::drawable::numberpicker_input_pressed=0x01080429; const int R::drawable::numberpicker_input_selected=0x0108042a; const int R::drawable::numberpicker_selection_divider=0x0108042b; const int R::drawable::numberpicker_up_btn=0x0108042c; const int R::drawable::numberpicker_up_disabled=0x0108042d; const int R::drawable::numberpicker_up_disabled_focused=0x0108042e; const int R::drawable::numberpicker_up_normal=0x0108042f; const int R::drawable::numberpicker_up_pressed=0x01080430; const int R::drawable::numberpicker_up_selected=0x01080431; const int R::drawable::overscroll_edge=0x01080432; const int R::drawable::overscroll_glow=0x01080433; const int R::drawable::panel_background=0x01080434; const int R::drawable::panel_bg_holo_dark=0x01080435; const int R::drawable::panel_bg_holo_light=0x01080436; const int R::drawable::panel_picture_frame_background=0x01080437; const int R::drawable::panel_picture_frame_bg_focus_blue=0x01080438; const int R::drawable::panel_picture_frame_bg_normal=0x01080439; const int R::drawable::panel_picture_frame_bg_pressed_blue=0x0108043a; const int R::drawable::password_field_default=0x0108043b; const int R::drawable::password_keyboard_background_holo=0x0108043c; const int R::drawable::perm_group_accounts=0x0108043d; const int R::drawable::perm_group_affects_battery=0x0108043e; const int R::drawable::perm_group_app_info=0x0108043f; const int R::drawable::perm_group_audio_settings=0x01080440; const int R::drawable::perm_group_bluetooth=0x01080441; const int R::drawable::perm_group_bookmarks=0x01080442; const int R::drawable::perm_group_calendar=0x01080443; const int R::drawable::perm_group_camera=0x01080444; const int R::drawable::perm_group_device_alarms=0x01080445; const int R::drawable::perm_group_display=0x01080446; const int R::drawable::perm_group_location=0x01080447; const int R::drawable::perm_group_messages=0x01080448; const int R::drawable::perm_group_microphone=0x01080449; const int R::drawable::perm_group_network=0x0108044a; const int R::drawable::perm_group_personal_info=0x0108044b; const int R::drawable::perm_group_phone_calls=0x0108044c; const int R::drawable::perm_group_screenlock=0x0108044d; const int R::drawable::perm_group_shortrange_network=0x0108044e; const int R::drawable::perm_group_social_info=0x0108044f; const int R::drawable::perm_group_status_bar=0x01080450; const int R::drawable::perm_group_storage=0x01080451; const int R::drawable::perm_group_sync_settings=0x01080452; const int R::drawable::perm_group_system_clock=0x01080453; const int R::drawable::perm_group_system_tools=0x01080454; const int R::drawable::perm_group_user_dictionary=0x01080455; const int R::drawable::perm_group_user_dictionary_write=0x01080456; const int R::drawable::perm_group_voicemail=0x01080457; const int R::drawable::perm_group_wallpaper=0x01080458; const int R::drawable::picture_emergency=0x01080459; const int R::drawable::picture_frame=0x01080066; const int R::drawable::platlogo=0x0108045a; const int R::drawable::platlogo_alt=0x0108045b; const int R::drawable::pointer_arrow=0x0108045c; const int R::drawable::pointer_arrow_icon=0x0108045d; const int R::drawable::pointer_spot_anchor=0x0108045e; const int R::drawable::pointer_spot_anchor_icon=0x0108045f; const int R::drawable::pointer_spot_hover=0x01080460; const int R::drawable::pointer_spot_hover_icon=0x01080461; const int R::drawable::pointer_spot_touch=0x01080462; const int R::drawable::pointer_spot_touch_icon=0x01080463; const int R::drawable::popup_bottom_bright=0x01080464; const int R::drawable::popup_bottom_dark=0x01080465; const int R::drawable::popup_bottom_medium=0x01080466; const int R::drawable::popup_center_bright=0x01080467; const int R::drawable::popup_center_dark=0x01080468; const int R::drawable::popup_center_medium=0x01080469; const int R::drawable::popup_full_bright=0x0108046a; const int R::drawable::popup_full_dark=0x0108046b; const int R::drawable::popup_inline_error=0x0108046c; const int R::drawable::popup_inline_error_above=0x0108046d; const int R::drawable::popup_inline_error_above_holo_dark=0x0108046e; const int R::drawable::popup_inline_error_above_holo_light=0x0108046f; const int R::drawable::popup_inline_error_holo_dark=0x01080470; const int R::drawable::popup_inline_error_holo_light=0x01080471; const int R::drawable::popup_top_bright=0x01080472; const int R::drawable::popup_top_dark=0x01080473; const int R::drawable::presence_audio_away=0x010800af; const int R::drawable::presence_audio_busy=0x010800b0; const int R::drawable::presence_audio_online=0x010800b1; const int R::drawable::presence_away=0x01080067; const int R::drawable::presence_busy=0x01080068; const int R::drawable::presence_invisible=0x01080069; const int R::drawable::presence_offline=0x0108006a; const int R::drawable::presence_online=0x0108006b; const int R::drawable::presence_video_away=0x010800ac; const int R::drawable::presence_video_busy=0x010800ad; const int R::drawable::presence_video_online=0x010800ae; const int R::drawable::pressed_application_background_static=0x01080474; const int R::drawable::progress_bg_holo_dark=0x01080475; const int R::drawable::progress_bg_holo_light=0x01080476; const int R::drawable::progress_horizontal=0x0108006c; const int R::drawable::progress_horizontal_holo_dark=0x01080477; const int R::drawable::progress_horizontal_holo_light=0x01080478; const int R::drawable::progress_indeterminate_horizontal=0x0108006d; const int R::drawable::progress_indeterminate_horizontal_holo=0x01080479; const int R::drawable::progress_large=0x0108047a; const int R::drawable::progress_large_holo=0x0108047b; const int R::drawable::progress_large_white=0x0108047c; const int R::drawable::progress_medium=0x0108047d; const int R::drawable::progress_medium_holo=0x0108047e; const int R::drawable::progress_medium_white=0x0108047f; const int R::drawable::progress_primary_holo_dark=0x01080480; const int R::drawable::progress_primary_holo_light=0x01080481; const int R::drawable::progress_secondary_holo_dark=0x01080482; const int R::drawable::progress_secondary_holo_light=0x01080483; const int R::drawable::progress_small=0x01080484; const int R::drawable::progress_small_holo=0x01080485; const int R::drawable::progress_small_titlebar=0x01080486; const int R::drawable::progress_small_white=0x01080487; const int R::drawable::progressbar_indeterminate1=0x01080488; const int R::drawable::progressbar_indeterminate2=0x01080489; const int R::drawable::progressbar_indeterminate3=0x0108048a; const int R::drawable::progressbar_indeterminate_holo1=0x0108048b; const int R::drawable::progressbar_indeterminate_holo2=0x0108048c; const int R::drawable::progressbar_indeterminate_holo3=0x0108048d; const int R::drawable::progressbar_indeterminate_holo4=0x0108048e; const int R::drawable::progressbar_indeterminate_holo5=0x0108048f; const int R::drawable::progressbar_indeterminate_holo6=0x01080490; const int R::drawable::progressbar_indeterminate_holo7=0x01080491; const int R::drawable::progressbar_indeterminate_holo8=0x01080492; const int R::drawable::quickactions_arrowdown_left_holo_dark=0x01080493; const int R::drawable::quickactions_arrowdown_left_holo_light=0x01080494; const int R::drawable::quickactions_arrowdown_right_holo_dark=0x01080495; const int R::drawable::quickactions_arrowdown_right_holo_light=0x01080496; const int R::drawable::quickactions_arrowup_left_holo_dark=0x01080497; const int R::drawable::quickactions_arrowup_left_holo_light=0x01080498; const int R::drawable::quickactions_arrowup_left_right_holo_dark=0x01080499; const int R::drawable::quickactions_arrowup_right_holo_light=0x0108049a; const int R::drawable::quickcontact_badge_overlay_dark=0x0108049b; const int R::drawable::quickcontact_badge_overlay_focused_dark=0x0108049c; const int R::drawable::quickcontact_badge_overlay_focused_light=0x0108049d; const int R::drawable::quickcontact_badge_overlay_light=0x0108049e; const int R::drawable::quickcontact_badge_overlay_normal_dark=0x0108049f; const int R::drawable::quickcontact_badge_overlay_normal_light=0x010804a0; const int R::drawable::quickcontact_badge_overlay_pressed_dark=0x010804a1; const int R::drawable::quickcontact_badge_overlay_pressed_light=0x010804a2; const int R::drawable::radiobutton_off_background=0x0108006e; const int R::drawable::radiobutton_on_background=0x0108006f; const int R::drawable::rate_star_big_half=0x010804a3; const int R::drawable::rate_star_big_half_holo_dark=0x010804a4; const int R::drawable::rate_star_big_half_holo_light=0x010804a5; const int R::drawable::rate_star_big_off=0x010804a6; const int R::drawable::rate_star_big_off_holo_dark=0x010804a7; const int R::drawable::rate_star_big_off_holo_light=0x010804a8; const int R::drawable::rate_star_big_on=0x010804a9; const int R::drawable::rate_star_big_on_holo_dark=0x010804aa; const int R::drawable::rate_star_big_on_holo_light=0x010804ab; const int R::drawable::rate_star_med_half=0x010804ac; const int R::drawable::rate_star_med_half_holo_dark=0x010804ad; const int R::drawable::rate_star_med_half_holo_light=0x010804ae; const int R::drawable::rate_star_med_off=0x010804af; const int R::drawable::rate_star_med_off_holo_dark=0x010804b0; const int R::drawable::rate_star_med_off_holo_light=0x010804b1; const int R::drawable::rate_star_med_on=0x010804b2; const int R::drawable::rate_star_med_on_holo_dark=0x010804b3; const int R::drawable::rate_star_med_on_holo_light=0x010804b4; const int R::drawable::rate_star_small_half=0x010804b5; const int R::drawable::rate_star_small_half_holo_dark=0x010804b6; const int R::drawable::rate_star_small_half_holo_light=0x010804b7; const int R::drawable::rate_star_small_off=0x010804b8; const int R::drawable::rate_star_small_off_holo_dark=0x010804b9; const int R::drawable::rate_star_small_off_holo_light=0x010804ba; const int R::drawable::rate_star_small_on=0x010804bb; const int R::drawable::rate_star_small_on_holo_dark=0x010804bc; const int R::drawable::rate_star_small_on_holo_light=0x010804bd; const int R::drawable::ratingbar=0x010804be; const int R::drawable::ratingbar_full=0x010804bf; const int R::drawable::ratingbar_full_empty=0x010804c0; const int R::drawable::ratingbar_full_empty_holo_dark=0x010804c1; const int R::drawable::ratingbar_full_empty_holo_light=0x010804c2; const int R::drawable::ratingbar_full_filled=0x010804c3; const int R::drawable::ratingbar_full_filled_holo_dark=0x010804c4; const int R::drawable::ratingbar_full_filled_holo_light=0x010804c5; const int R::drawable::ratingbar_full_holo_dark=0x010804c6; const int R::drawable::ratingbar_full_holo_light=0x010804c7; const int R::drawable::ratingbar_holo_dark=0x010804c8; const int R::drawable::ratingbar_holo_light=0x010804c9; const int R::drawable::ratingbar_small=0x010804ca; const int R::drawable::ratingbar_small_holo_dark=0x010804cb; const int R::drawable::ratingbar_small_holo_light=0x010804cc; const int R::drawable::recent_dialog_background=0x010804cd; const int R::drawable::reticle=0x010804ce; const int R::drawable::safe_mode_background=0x0108060f; const int R::drawable::screen_background_dark=0x01080098; const int R::drawable::screen_background_dark_transparent=0x010800a9; const int R::drawable::screen_background_holo_dark=0x01080614; const int R::drawable::screen_background_holo_light=0x01080613; const int R::drawable::screen_background_light=0x01080099; const int R::drawable::screen_background_light_transparent=0x010800aa; const int R::drawable::screen_background_selector_dark=0x010804cf; const int R::drawable::screen_background_selector_light=0x010804d0; const int R::drawable::scrollbar_handle_accelerated_anim2=0x010804d1; const int R::drawable::scrollbar_handle_holo_dark=0x010804d2; const int R::drawable::scrollbar_handle_holo_light=0x010804d3; const int R::drawable::scrollbar_handle_horizontal=0x010804d4; const int R::drawable::scrollbar_handle_vertical=0x010804d5; const int R::drawable::scrubber_control_disabled_holo=0x010804d6; const int R::drawable::scrubber_control_focused_holo=0x010804d7; const int R::drawable::scrubber_control_normal_holo=0x010804d8; const int R::drawable::scrubber_control_pressed_holo=0x010804d9; const int R::drawable::scrubber_control_selector_holo=0x010804da; const int R::drawable::scrubber_primary_holo=0x010804db; const int R::drawable::scrubber_progress_horizontal_holo_dark=0x010804dc; const int R::drawable::scrubber_progress_horizontal_holo_light=0x010804dd; const int R::drawable::scrubber_secondary_holo=0x010804de; const int R::drawable::scrubber_track_holo_dark=0x010804df; const int R::drawable::scrubber_track_holo_light=0x010804e0; const int R::drawable::search_bar_default_color=0x0108060e; const int R::drawable::search_dropdown_background=0x010804e1; const int R::drawable::search_dropdown_dark=0x010804e2; const int R::drawable::search_dropdown_light=0x010804e3; const int R::drawable::search_plate=0x010804e4; const int R::drawable::search_plate_global=0x010804e5; const int R::drawable::search_spinner=0x010804e6; const int R::drawable::seek_thumb=0x010804e7; const int R::drawable::seek_thumb_normal=0x010804e8; const int R::drawable::seek_thumb_pressed=0x010804e9; const int R::drawable::seek_thumb_selected=0x010804ea; const int R::drawable::selected_day_background=0x01080612; const int R::drawable::settings_header=0x010804eb; const int R::drawable::settings_header_raw=0x010804ec; const int R::drawable::silent_mode_indicator=0x010804ed; const int R::drawable::spinner_16_inner_holo=0x010804ee; const int R::drawable::spinner_16_outer_holo=0x010804ef; const int R::drawable::spinner_20_inner_holo=0x010804f0; const int R::drawable::spinner_20_outer_holo=0x010804f1; const int R::drawable::spinner_48_inner_holo=0x010804f2; const int R::drawable::spinner_48_outer_holo=0x010804f3; const int R::drawable::spinner_76_inner_holo=0x010804f4; const int R::drawable::spinner_76_outer_holo=0x010804f5; const int R::drawable::spinner_ab_default_holo_dark=0x010804f6; const int R::drawable::spinner_ab_default_holo_light=0x010804f7; const int R::drawable::spinner_ab_disabled_holo_dark=0x010804f8; const int R::drawable::spinner_ab_disabled_holo_light=0x010804f9; const int R::drawable::spinner_ab_focused_holo_dark=0x010804fa; const int R::drawable::spinner_ab_focused_holo_light=0x010804fb; const int R::drawable::spinner_ab_holo_dark=0x010804fc; const int R::drawable::spinner_ab_holo_light=0x010804fd; const int R::drawable::spinner_ab_pressed_holo_dark=0x010804fe; const int R::drawable::spinner_ab_pressed_holo_light=0x010804ff; const int R::drawable::spinner_background=0x01080070; const int R::drawable::spinner_background_holo_dark=0x01080500; const int R::drawable::spinner_background_holo_light=0x01080501; const int R::drawable::spinner_black_16=0x01080502; const int R::drawable::spinner_black_20=0x01080503; const int R::drawable::spinner_black_48=0x01080504; const int R::drawable::spinner_black_76=0x01080505; const int R::drawable::spinner_default_holo_dark=0x01080506; const int R::drawable::spinner_default_holo_light=0x01080507; const int R::drawable::spinner_disabled_holo_dark=0x01080508; const int R::drawable::spinner_disabled_holo_light=0x01080509; const int R::drawable::spinner_dropdown_background=0x01080071; const int R::drawable::spinner_dropdown_background_down=0x0108050a; const int R::drawable::spinner_dropdown_background_up=0x0108050b; const int R::drawable::spinner_focused_holo_dark=0x0108050c; const int R::drawable::spinner_focused_holo_light=0x0108050d; const int R::drawable::spinner_normal=0x0108050e; const int R::drawable::spinner_press=0x0108050f; const int R::drawable::spinner_pressed_holo_dark=0x01080510; const int R::drawable::spinner_pressed_holo_light=0x01080511; const int R::drawable::spinner_select=0x01080512; const int R::drawable::spinner_white_16=0x01080513; const int R::drawable::spinner_white_48=0x01080514; const int R::drawable::spinner_white_76=0x01080515; const int R::drawable::star_big_off=0x01080073; const int R::drawable::star_big_on=0x01080072; const int R::drawable::star_off=0x01080075; const int R::drawable::star_on=0x01080074; const int R::drawable::stat_ecb_mode=0x01080516; const int R::drawable::stat_notify_call_mute=0x01080076; const int R::drawable::stat_notify_car_mode=0x01080517; const int R::drawable::stat_notify_chat=0x01080077; const int R::drawable::stat_notify_disabled=0x01080518; const int R::drawable::stat_notify_disk_full=0x01080519; const int R::drawable::stat_notify_email_generic=0x0108051a; const int R::drawable::stat_notify_error=0x01080078; const int R::drawable::stat_notify_gmail=0x0108051b; const int R::drawable::stat_notify_missed_call=0x0108007f; const int R::drawable::stat_notify_more=0x01080079; const int R::drawable::stat_notify_rssi_in_range=0x0108051c; const int R::drawable::stat_notify_sdcard=0x0108007a; const int R::drawable::stat_notify_sdcard_prepare=0x010800ab; const int R::drawable::stat_notify_sdcard_usb=0x0108007b; const int R::drawable::stat_notify_sim_toolkit=0x0108051d; const int R::drawable::stat_notify_sync=0x0108007c; const int R::drawable::stat_notify_sync_anim0=0x0108051e; const int R::drawable::stat_notify_sync_error=0x0108051f; const int R::drawable::stat_notify_sync_noanim=0x0108007d; const int R::drawable::stat_notify_voicemail=0x0108007e; const int R::drawable::stat_notify_wifi_in_range=0x01080520; const int R::drawable::stat_sys_adb=0x01080521; const int R::drawable::stat_sys_battery=0x01080522; const int R::drawable::stat_sys_battery_0=0x01080523; const int R::drawable::stat_sys_battery_10=0x01080524; const int R::drawable::stat_sys_battery_100=0x01080525; const int R::drawable::stat_sys_battery_15=0x01080526; const int R::drawable::stat_sys_battery_20=0x01080527; const int R::drawable::stat_sys_battery_28=0x01080528; const int R::drawable::stat_sys_battery_40=0x01080529; const int R::drawable::stat_sys_battery_43=0x0108052a; const int R::drawable::stat_sys_battery_57=0x0108052b; const int R::drawable::stat_sys_battery_60=0x0108052c; const int R::drawable::stat_sys_battery_71=0x0108052d; const int R::drawable::stat_sys_battery_80=0x0108052e; const int R::drawable::stat_sys_battery_85=0x0108052f; const int R::drawable::stat_sys_battery_charge=0x01080530; const int R::drawable::stat_sys_battery_charge_anim0=0x01080531; const int R::drawable::stat_sys_battery_charge_anim1=0x01080532; const int R::drawable::stat_sys_battery_charge_anim100=0x01080533; const int R::drawable::stat_sys_battery_charge_anim15=0x01080534; const int R::drawable::stat_sys_battery_charge_anim2=0x01080535; const int R::drawable::stat_sys_battery_charge_anim28=0x01080536; const int R::drawable::stat_sys_battery_charge_anim3=0x01080537; const int R::drawable::stat_sys_battery_charge_anim4=0x01080538; const int R::drawable::stat_sys_battery_charge_anim43=0x01080539; const int R::drawable::stat_sys_battery_charge_anim5=0x0108053a; const int R::drawable::stat_sys_battery_charge_anim57=0x0108053b; const int R::drawable::stat_sys_battery_charge_anim71=0x0108053c; const int R::drawable::stat_sys_battery_charge_anim85=0x0108053d; const int R::drawable::stat_sys_battery_unknown=0x0108053e; const int R::drawable::stat_sys_data_bluetooth=0x01080080; const int R::drawable::stat_sys_data_usb=0x0108053f; const int R::drawable::stat_sys_data_wimax_signal_3_fully=0x01080540; const int R::drawable::stat_sys_data_wimax_signal_disconnected=0x01080541; const int R::drawable::stat_sys_download=0x01080081; const int R::drawable::stat_sys_download_anim0=0x01080542; const int R::drawable::stat_sys_download_anim1=0x01080543; const int R::drawable::stat_sys_download_anim2=0x01080544; const int R::drawable::stat_sys_download_anim3=0x01080545; const int R::drawable::stat_sys_download_anim4=0x01080546; const int R::drawable::stat_sys_download_anim5=0x01080547; const int R::drawable::stat_sys_download_done=0x01080082; const int R::drawable::stat_sys_download_done_static=0x01080548; const int R::drawable::stat_sys_gps_on=0x01080549; const int R::drawable::stat_sys_headset=0x01080083; const int R::drawable::stat_sys_phone_call=0x01080084; const int R::drawable::stat_sys_phone_call_forward=0x01080085; const int R::drawable::stat_sys_phone_call_on_hold=0x01080086; const int R::drawable::stat_sys_r_signal_0_cdma=0x0108054a; const int R::drawable::stat_sys_r_signal_1_cdma=0x0108054b; const int R::drawable::stat_sys_r_signal_2_cdma=0x0108054c; const int R::drawable::stat_sys_r_signal_3_cdma=0x0108054d; const int R::drawable::stat_sys_r_signal_4_cdma=0x0108054e; const int R::drawable::stat_sys_ra_signal_0_cdma=0x0108054f; const int R::drawable::stat_sys_ra_signal_1_cdma=0x01080550; const int R::drawable::stat_sys_ra_signal_2_cdma=0x01080551; const int R::drawable::stat_sys_ra_signal_3_cdma=0x01080552; const int R::drawable::stat_sys_ra_signal_4_cdma=0x01080553; const int R::drawable::stat_sys_secure=0x01080554; const int R::drawable::stat_sys_signal_0_cdma=0x01080555; const int R::drawable::stat_sys_signal_1_cdma=0x01080556; const int R::drawable::stat_sys_signal_2_cdma=0x01080557; const int R::drawable::stat_sys_signal_3_cdma=0x01080558; const int R::drawable::stat_sys_signal_4_cdma=0x01080559; const int R::drawable::stat_sys_signal_evdo_0=0x0108055a; const int R::drawable::stat_sys_signal_evdo_1=0x0108055b; const int R::drawable::stat_sys_signal_evdo_2=0x0108055c; const int R::drawable::stat_sys_signal_evdo_3=0x0108055d; const int R::drawable::stat_sys_signal_evdo_4=0x0108055e; const int R::drawable::stat_sys_speakerphone=0x01080087; const int R::drawable::stat_sys_tether_bluetooth=0x0108055f; const int R::drawable::stat_sys_tether_general=0x01080560; const int R::drawable::stat_sys_tether_usb=0x01080561; const int R::drawable::stat_sys_tether_wifi=0x01080562; const int R::drawable::stat_sys_throttled=0x01080563; const int R::drawable::stat_sys_upload=0x01080088; const int R::drawable::stat_sys_upload_anim0=0x01080564; const int R::drawable::stat_sys_upload_anim1=0x01080565; const int R::drawable::stat_sys_upload_anim2=0x01080566; const int R::drawable::stat_sys_upload_anim3=0x01080567; const int R::drawable::stat_sys_upload_anim4=0x01080568; const int R::drawable::stat_sys_upload_anim5=0x01080569; const int R::drawable::stat_sys_upload_done=0x01080089; const int R::drawable::stat_sys_vp_phone_call=0x010800a7; const int R::drawable::stat_sys_vp_phone_call_on_hold=0x010800a8; const int R::drawable::stat_sys_warning=0x0108008a; const int R::drawable::status_bar_background=0x0108056a; const int R::drawable::status_bar_closed_default_background=0x0108060a; const int R::drawable::status_bar_header_background=0x0108056b; const int R::drawable::status_bar_item_app_background=0x0108008b; const int R::drawable::status_bar_item_app_background_normal=0x0108056c; const int R::drawable::status_bar_item_background=0x0108008c; const int R::drawable::status_bar_item_background_focus=0x0108056d; const int R::drawable::status_bar_item_background_normal=0x0108056e; const int R::drawable::status_bar_item_background_pressed=0x0108056f; const int R::drawable::status_bar_opened_default_background=0x0108060b; const int R::drawable::statusbar_background=0x01080570; const int R::drawable::submenu_arrow=0x01080571; const int R::drawable::submenu_arrow_nofocus=0x01080572; const int R::drawable::switch_bg_disabled_holo_dark=0x01080573; const int R::drawable::switch_bg_disabled_holo_light=0x01080574; const int R::drawable::switch_bg_focused_holo_dark=0x01080575; const int R::drawable::switch_bg_focused_holo_light=0x01080576; const int R::drawable::switch_bg_holo_dark=0x01080577; const int R::drawable::switch_bg_holo_light=0x01080578; const int R::drawable::switch_inner_holo_dark=0x01080579; const int R::drawable::switch_inner_holo_light=0x0108057a; const int R::drawable::switch_thumb_activated_holo_dark=0x0108057b; const int R::drawable::switch_thumb_activated_holo_light=0x0108057c; const int R::drawable::switch_thumb_disabled_holo_dark=0x0108057d; const int R::drawable::switch_thumb_disabled_holo_light=0x0108057e; const int R::drawable::switch_thumb_holo_dark=0x0108057f; const int R::drawable::switch_thumb_holo_light=0x01080580; const int R::drawable::switch_thumb_pressed_holo_dark=0x01080581; const int R::drawable::switch_thumb_pressed_holo_light=0x01080582; const int R::drawable::switch_track_holo_dark=0x01080583; const int R::drawable::switch_track_holo_light=0x01080584; const int R::drawable::sym_action_add=0x01080585; const int R::drawable::sym_action_call=0x0108008d; const int R::drawable::sym_action_chat=0x0108008e; const int R::drawable::sym_action_email=0x0108008f; const int R::drawable::sym_app_on_sd_unavailable_icon=0x01080586; const int R::drawable::sym_call_incoming=0x01080090; const int R::drawable::sym_call_missed=0x01080091; const int R::drawable::sym_call_outgoing=0x01080092; const int R::drawable::sym_contact_card=0x01080094; const int R::drawable::sym_def_app_icon=0x01080093; const int R::drawable::sym_keyboard_delete=0x01080587; const int R::drawable::sym_keyboard_delete_dim=0x01080588; const int R::drawable::sym_keyboard_delete_holo=0x01080589; const int R::drawable::sym_keyboard_enter=0x0108058a; const int R::drawable::sym_keyboard_feedback_delete=0x0108058b; const int R::drawable::sym_keyboard_feedback_ok=0x0108058c; const int R::drawable::sym_keyboard_feedback_return=0x0108058d; const int R::drawable::sym_keyboard_feedback_shift=0x0108058e; const int R::drawable::sym_keyboard_feedback_shift_locked=0x0108058f; const int R::drawable::sym_keyboard_feedback_space=0x01080590; const int R::drawable::sym_keyboard_num0_no_plus=0x01080591; const int R::drawable::sym_keyboard_num1=0x01080592; const int R::drawable::sym_keyboard_num2=0x01080593; const int R::drawable::sym_keyboard_num3=0x01080594; const int R::drawable::sym_keyboard_num4=0x01080595; const int R::drawable::sym_keyboard_num5=0x01080596; const int R::drawable::sym_keyboard_num6=0x01080597; const int R::drawable::sym_keyboard_num7=0x01080598; const int R::drawable::sym_keyboard_num8=0x01080599; const int R::drawable::sym_keyboard_num9=0x0108059a; const int R::drawable::sym_keyboard_ok=0x0108059b; const int R::drawable::sym_keyboard_ok_dim=0x0108059c; const int R::drawable::sym_keyboard_return=0x0108059d; const int R::drawable::sym_keyboard_return_holo=0x0108059e; const int R::drawable::sym_keyboard_shift=0x0108059f; const int R::drawable::sym_keyboard_shift_locked=0x010805a0; const int R::drawable::sym_keyboard_space=0x010805a1; const int R::drawable::tab_bottom_holo=0x010805a2; const int R::drawable::tab_bottom_left=0x010805a3; const int R::drawable::tab_bottom_left_v4=0x010805a4; const int R::drawable::tab_bottom_right=0x010805a5; const int R::drawable::tab_bottom_right_v4=0x010805a6; const int R::drawable::tab_focus=0x010805a7; const int R::drawable::tab_focus_bar_left=0x010805a8; const int R::drawable::tab_focus_bar_right=0x010805a9; const int R::drawable::tab_indicator=0x010805aa; const int R::drawable::tab_indicator_ab_holo=0x010805ab; const int R::drawable::tab_indicator_holo=0x010805ac; const int R::drawable::tab_indicator_v4=0x010805ad; const int R::drawable::tab_press=0x010805ae; const int R::drawable::tab_press_bar_left=0x010805af; const int R::drawable::tab_press_bar_right=0x010805b0; const int R::drawable::tab_pressed_holo=0x010805b1; const int R::drawable::tab_selected=0x010805b2; const int R::drawable::tab_selected_bar_left=0x010805b3; const int R::drawable::tab_selected_bar_left_v4=0x010805b4; const int R::drawable::tab_selected_bar_right=0x010805b5; const int R::drawable::tab_selected_bar_right_v4=0x010805b6; const int R::drawable::tab_selected_focused_holo=0x010805b7; const int R::drawable::tab_selected_holo=0x010805b8; const int R::drawable::tab_selected_pressed_holo=0x010805b9; const int R::drawable::tab_selected_v4=0x010805ba; const int R::drawable::tab_unselected=0x010805bb; const int R::drawable::tab_unselected_focused_holo=0x010805bc; const int R::drawable::tab_unselected_holo=0x010805bd; const int R::drawable::tab_unselected_pressed_holo=0x010805be; const int R::drawable::tab_unselected_v4=0x010805bf; const int R::drawable::text_cursor_holo_dark=0x010805c0; const int R::drawable::text_cursor_holo_light=0x010805c1; const int R::drawable::text_edit_paste_window=0x010805c2; const int R::drawable::text_edit_side_paste_window=0x010805c3; const int R::drawable::text_edit_suggestions_window=0x010805c4; const int R::drawable::text_select_handle_left=0x010805c5; const int R::drawable::text_select_handle_middle=0x010805c6; const int R::drawable::text_select_handle_right=0x010805c7; const int R::drawable::textfield_activated_holo_dark=0x010805c8; const int R::drawable::textfield_activated_holo_light=0x010805c9; const int R::drawable::textfield_bg_activated_holo_dark=0x010805ca; const int R::drawable::textfield_bg_default_holo_dark=0x010805cb; const int R::drawable::textfield_bg_disabled_focused_holo_dark=0x010805cc; const int R::drawable::textfield_bg_disabled_holo_dark=0x010805cd; const int R::drawable::textfield_bg_focused_holo_dark=0x010805ce; const int R::drawable::textfield_default=0x010805cf; const int R::drawable::textfield_default_holo_dark=0x010805d0; const int R::drawable::textfield_default_holo_light=0x010805d1; const int R::drawable::textfield_disabled=0x010805d2; const int R::drawable::textfield_disabled_focused_holo_dark=0x010805d3; const int R::drawable::textfield_disabled_focused_holo_light=0x010805d4; const int R::drawable::textfield_disabled_holo_dark=0x010805d5; const int R::drawable::textfield_disabled_holo_light=0x010805d6; const int R::drawable::textfield_disabled_selected=0x010805d7; const int R::drawable::textfield_focused_holo_dark=0x010805d8; const int R::drawable::textfield_focused_holo_light=0x010805d9; const int R::drawable::textfield_longpress_holo=0x010805da; const int R::drawable::textfield_multiline_activated_holo_dark=0x010805db; const int R::drawable::textfield_multiline_activated_holo_light=0x010805dc; const int R::drawable::textfield_multiline_default_holo_dark=0x010805dd; const int R::drawable::textfield_multiline_default_holo_light=0x010805de; const int R::drawable::textfield_multiline_disabled_focused_holo_dark=0x010805df; const int R::drawable::textfield_multiline_disabled_focused_holo_light=0x010805e0; const int R::drawable::textfield_multiline_disabled_holo_dark=0x010805e1; const int R::drawable::textfield_multiline_disabled_holo_light=0x010805e2; const int R::drawable::textfield_multiline_focused_holo_dark=0x010805e3; const int R::drawable::textfield_multiline_focused_holo_light=0x010805e4; const int R::drawable::textfield_pressed_holo=0x010805e5; const int R::drawable::textfield_search=0x010805e6; const int R::drawable::textfield_search_default=0x010805e7; const int R::drawable::textfield_search_default_holo_dark=0x010805e8; const int R::drawable::textfield_search_default_holo_light=0x010805e9; const int R::drawable::textfield_search_empty=0x010805ea; const int R::drawable::textfield_search_empty_default=0x010805eb; const int R::drawable::textfield_search_empty_pressed=0x010805ec; const int R::drawable::textfield_search_empty_selected=0x010805ed; const int R::drawable::textfield_search_pressed=0x010805ee; const int R::drawable::textfield_search_right_default_holo_dark=0x010805ef; const int R::drawable::textfield_search_right_default_holo_light=0x010805f0; const int R::drawable::textfield_search_right_selected_holo_dark=0x010805f1; const int R::drawable::textfield_search_right_selected_holo_light=0x010805f2; const int R::drawable::textfield_search_selected=0x010805f3; const int R::drawable::textfield_search_selected_holo_dark=0x010805f4; const int R::drawable::textfield_search_selected_holo_light=0x010805f5; const int R::drawable::textfield_searchview_holo_dark=0x010805f6; const int R::drawable::textfield_searchview_holo_light=0x010805f7; const int R::drawable::textfield_searchview_right_holo_dark=0x010805f8; const int R::drawable::textfield_searchview_right_holo_light=0x010805f9; const int R::drawable::textfield_selected=0x010805fa; const int R::drawable::title_bar=0x01080095; const int R::drawable::title_bar_medium=0x010805fb; const int R::drawable::title_bar_portrait=0x010805fc; const int R::drawable::title_bar_shadow=0x010805fd; const int R::drawable::title_bar_tall=0x010800a6; const int R::drawable::toast_frame=0x01080096; const int R::drawable::toast_frame_holo=0x010805fe; const int R::drawable::transportcontrol_bg=0x010805ff; const int R::drawable::unknown_image=0x01080600; const int R::drawable::unlock_default=0x01080601; const int R::drawable::unlock_halo=0x01080602; const int R::drawable::unlock_ring=0x01080603; const int R::drawable::unlock_wave=0x01080604; const int R::drawable::usb_android=0x01080605; const int R::drawable::usb_android_connected=0x01080606; const int R::drawable::view_accessibility_focused=0x01080607; const int R::drawable::vpn_connected=0x01080608; const int R::drawable::vpn_disconnected=0x01080609; const int R::drawable::zoom_plate=0x01080097; const int R::fraction::config_dimBehindFadeDuration=0x01120000; const int R::id::KEYCODE_0=0x0102008f; const int R::id::KEYCODE_1=0x01020090; const int R::id::KEYCODE_2=0x01020091; const int R::id::KEYCODE_3=0x01020092; const int R::id::KEYCODE_3D_MODE=0x01020156; const int R::id::KEYCODE_4=0x01020093; const int R::id::KEYCODE_5=0x01020094; const int R::id::KEYCODE_6=0x01020095; const int R::id::KEYCODE_7=0x01020096; const int R::id::KEYCODE_8=0x01020097; const int R::id::KEYCODE_9=0x01020098; const int R::id::KEYCODE_A=0x010200a5; const int R::id::KEYCODE_ALTERNATE=0x01020174; const int R::id::KEYCODE_ALT_LEFT=0x010200c1; const int R::id::KEYCODE_ALT_RIGHT=0x010200c2; const int R::id::KEYCODE_APOSTROPHE=0x010200d3; const int R::id::KEYCODE_APP_SWITCH=0x01020143; const int R::id::KEYCODE_ASSIST=0x01020163; const int R::id::KEYCODE_AT=0x010200d5; const int R::id::KEYCODE_AVR_INPUT=0x0102013e; const int R::id::KEYCODE_AVR_POWER=0x0102013d; const int R::id::KEYCODE_B=0x010200a6; const int R::id::KEYCODE_BACK=0x0102008c; const int R::id::KEYCODE_BACKSLASH=0x010200d1; const int R::id::KEYCODE_BOOKMARK=0x01020136; const int R::id::KEYCODE_BREAK=0x01020101; const int R::id::KEYCODE_BUTTON_1=0x01020144; const int R::id::KEYCODE_BUTTON_10=0x0102014d; const int R::id::KEYCODE_BUTTON_11=0x0102014e; const int R::id::KEYCODE_BUTTON_12=0x0102014f; const int R::id::KEYCODE_BUTTON_13=0x01020150; const int R::id::KEYCODE_BUTTON_14=0x01020151; const int R::id::KEYCODE_BUTTON_15=0x01020152; const int R::id::KEYCODE_BUTTON_16=0x01020153; const int R::id::KEYCODE_BUTTON_2=0x01020145; const int R::id::KEYCODE_BUTTON_3=0x01020146; const int R::id::KEYCODE_BUTTON_4=0x01020147; const int R::id::KEYCODE_BUTTON_5=0x01020148; const int R::id::KEYCODE_BUTTON_6=0x01020149; const int R::id::KEYCODE_BUTTON_7=0x0102014a; const int R::id::KEYCODE_BUTTON_8=0x0102014b; const int R::id::KEYCODE_BUTTON_9=0x0102014c; const int R::id::KEYCODE_BUTTON_A=0x010200e8; const int R::id::KEYCODE_BUTTON_B=0x010200e9; const int R::id::KEYCODE_BUTTON_C=0x010200ea; const int R::id::KEYCODE_BUTTON_L1=0x010200ee; const int R::id::KEYCODE_BUTTON_L2=0x010200f0; const int R::id::KEYCODE_BUTTON_MODE=0x010200f6; const int R::id::KEYCODE_BUTTON_R1=0x010200ef; const int R::id::KEYCODE_BUTTON_R2=0x010200f1; const int R::id::KEYCODE_BUTTON_SELECT=0x010200f5; const int R::id::KEYCODE_BUTTON_START=0x010200f4; const int R::id::KEYCODE_BUTTON_THUMBL=0x010200f2; const int R::id::KEYCODE_BUTTON_THUMBR=0x010200f3; const int R::id::KEYCODE_BUTTON_X=0x010200eb; const int R::id::KEYCODE_BUTTON_Y=0x010200ec; const int R::id::KEYCODE_BUTTON_Z=0x010200ed; const int R::id::KEYCODE_C=0x010200a7; const int R::id::KEYCODE_CALCULATOR=0x0102015a; const int R::id::KEYCODE_CALENDAR=0x01020158; const int R::id::KEYCODE_CALL=0x0102008d; const int R::id::KEYCODE_CAMERA=0x010200a3; const int R::id::KEYCODE_CAPS_LOCK=0x010200fb; const int R::id::KEYCODE_CAPTIONS=0x01020137; const int R::id::KEYCODE_CHANNEL_DOWN=0x0102012f; const int R::id::KEYCODE_CHANNEL_UP=0x0102012e; const int R::id::KEYCODE_CLEAR=0x010200a4; const int R::id::KEYCODE_COMMA=0x010200bf; const int R::id::KEYCODE_CONTACTS=0x01020157; const int R::id::KEYCODE_CTRL_LEFT=0x010200f9; const int R::id::KEYCODE_CTRL_RIGHT=0x010200fa; const int R::id::KEYCODE_D=0x010200a8; const int R::id::KEYCODE_DEL=0x010200cb; const int R::id::KEYCODE_DPAD_CENTER=0x0102009f; const int R::id::KEYCODE_DPAD_DOWN=0x0102009c; const int R::id::KEYCODE_DPAD_LEFT=0x0102009d; const int R::id::KEYCODE_DPAD_RIGHT=0x0102009e; const int R::id::KEYCODE_DPAD_UP=0x0102009b; const int R::id::KEYCODE_DVR=0x01020135; const int R::id::KEYCODE_E=0x010200a9; const int R::id::KEYCODE_EARLY_POWER=0x0102016b; const int R::id::KEYCODE_EISU=0x0102015c; const int R::id::KEYCODE_ENDCALL=0x0102008e; const int R::id::KEYCODE_ENTER=0x010200ca; const int R::id::KEYCODE_ENVELOPE=0x010200c9; const int R::id::KEYCODE_EQUALS=0x010200ce; const int R::id::KEYCODE_ESCAPE=0x010200f7; const int R::id::KEYCODE_EXPLORER=0x010200c8; const int R::id::KEYCODE_F=0x010200aa; const int R::id::KEYCODE_F1=0x0102010b; const int R::id::KEYCODE_F10=0x01020114; const int R::id::KEYCODE_F11=0x01020115; const int R::id::KEYCODE_F12=0x01020116; const int R::id::KEYCODE_F2=0x0102010c; const int R::id::KEYCODE_F3=0x0102010d; const int R::id::KEYCODE_F4=0x0102010e; const int R::id::KEYCODE_F5=0x0102010f; const int R::id::KEYCODE_F6=0x01020110; const int R::id::KEYCODE_F7=0x01020111; const int R::id::KEYCODE_F8=0x01020112; const int R::id::KEYCODE_F9=0x01020113; const int R::id::KEYCODE_FOCUS=0x010200d8; const int R::id::KEYCODE_FORWARD=0x01020105; const int R::id::KEYCODE_FORWARD_DEL=0x010200f8; const int R::id::KEYCODE_FUNCTION=0x010200ff; const int R::id::KEYCODE_G=0x010200ab; const int R::id::KEYCODE_GRAVE=0x010200cc; const int R::id::KEYCODE_GUIDE=0x01020134; const int R::id::KEYCODE_H=0x010200ac; const int R::id::KEYCODE_HEADSETHOOK=0x010200d7; const int R::id::KEYCODE_HENKAN=0x0102015e; const int R::id::KEYCODE_HOME=0x0102008b; const int R::id::KEYCODE_I=0x010200ad; const int R::id::KEYCODE_INFO=0x0102012d; const int R::id::KEYCODE_INSERT=0x01020104; const int R::id::KEYCODE_J=0x010200ae; const int R::id::KEYCODE_K=0x010200af; const int R::id::KEYCODE_KANA=0x01020162; const int R::id::KEYCODE_KATAKANA_HIRAGANA=0x0102015f; const int R::id::KEYCODE_L=0x010200b0; const int R::id::KEYCODE_LANGUAGE_SWITCH=0x01020154; const int R::id::KEYCODE_LEFT_BRACKET=0x010200cf; const int R::id::KEYCODE_M=0x010200b1; const int R::id::KEYCODE_MANNER_MODE=0x01020155; const int R::id::KEYCODE_MEDIA_CLOSE=0x01020108; const int R::id::KEYCODE_MEDIA_EJECT=0x01020109; const int R::id::KEYCODE_MEDIA_FAST_FORWARD=0x010200e2; const int R::id::KEYCODE_MEDIA_NEXT=0x010200df; const int R::id::KEYCODE_MEDIA_PAUSE=0x01020107; const int R::id::KEYCODE_MEDIA_PLAY=0x01020106; const int R::id::KEYCODE_MEDIA_PLAY_PAUSE=0x010200dd; const int R::id::KEYCODE_MEDIA_PREVIOUS=0x010200e0; const int R::id::KEYCODE_MEDIA_RECORD=0x0102010a; const int R::id::KEYCODE_MEDIA_REWIND=0x010200e1; const int R::id::KEYCODE_MEDIA_STOP=0x010200de; const int R::id::KEYCODE_MENU=0x010200da; const int R::id::KEYCODE_META_LEFT=0x010200fd; const int R::id::KEYCODE_META_RIGHT=0x010200fe; const int R::id::KEYCODE_MINUS=0x010200cd; const int R::id::KEYCODE_MOVE_END=0x01020103; const int R::id::KEYCODE_MOVE_HOME=0x01020102; const int R::id::KEYCODE_MUHENKAN=0x0102015d; const int R::id::KEYCODE_MUSIC=0x01020159; const int R::id::KEYCODE_MUTE=0x010200e3; const int R::id::KEYCODE_N=0x010200b2; const int R::id::KEYCODE_NOTIFICATION=0x010200db; const int R::id::KEYCODE_NUM=0x010200d6; const int R::id::KEYCODE_NUMPAD_0=0x01020118; const int R::id::KEYCODE_NUMPAD_1=0x01020119; const int R::id::KEYCODE_NUMPAD_2=0x0102011a; const int R::id::KEYCODE_NUMPAD_3=0x0102011b; const int R::id::KEYCODE_NUMPAD_4=0x0102011c; const int R::id::KEYCODE_NUMPAD_5=0x0102011d; const int R::id::KEYCODE_NUMPAD_6=0x0102011e; const int R::id::KEYCODE_NUMPAD_7=0x0102011f; const int R::id::KEYCODE_NUMPAD_8=0x01020120; const int R::id::KEYCODE_NUMPAD_9=0x01020121; const int R::id::KEYCODE_NUMPAD_ADD=0x01020125; const int R::id::KEYCODE_NUMPAD_COMMA=0x01020127; const int R::id::KEYCODE_NUMPAD_DIVIDE=0x01020122; const int R::id::KEYCODE_NUMPAD_DOT=0x01020126; const int R::id::KEYCODE_NUMPAD_ENTER=0x01020128; const int R::id::KEYCODE_NUMPAD_EQUALS=0x01020129; const int R::id::KEYCODE_NUMPAD_LEFT_PAREN=0x0102012a; const int R::id::KEYCODE_NUMPAD_MULTIPLY=0x01020123; const int R::id::KEYCODE_NUMPAD_RIGHT_PAREN=0x0102012b; const int R::id::KEYCODE_NUMPAD_SUBTRACT=0x01020124; const int R::id::KEYCODE_NUM_LOCK=0x01020117; const int R::id::KEYCODE_O=0x010200b3; const int R::id::KEYCODE_P=0x010200b4; const int R::id::KEYCODE_PAGE_DOWN=0x010200e5; const int R::id::KEYCODE_PAGE_UP=0x010200e4; const int R::id::KEYCODE_PERIOD=0x010200c0; const int R::id::KEYCODE_PICTSYMBOLS=0x010200e6; const int R::id::KEYCODE_PLUS=0x010200d9; const int R::id::KEYCODE_POUND=0x0102009a; const int R::id::KEYCODE_POWER=0x010200a2; const int R::id::KEYCODE_PROG_BLUE=0x01020142; const int R::id::KEYCODE_PROG_GRED=0x0102013f; const int R::id::KEYCODE_PROG_GREEN=0x01020140; const int R::id::KEYCODE_PROG_YELLOW=0x01020141; const int R::id::KEYCODE_Q=0x010200b5; const int R::id::KEYCODE_R=0x010200b6; const int R::id::KEYCODE_RIGHT_BRACKET=0x010200d0; const int R::id::KEYCODE_RO=0x01020161; const int R::id::KEYCODE_S=0x010200b7; const int R::id::KEYCODE_SCROLL_LOCK=0x010200fc; const int R::id::KEYCODE_SEARCH=0x010200dc; const int R::id::KEYCODE_SEMICOLON=0x010200d2; const int R::id::KEYCODE_SETTINGS=0x01020138; const int R::id::KEYCODE_SHIFT_LEFT=0x010200c3; const int R::id::KEYCODE_SHIFT_RIGHT=0x010200c4; const int R::id::KEYCODE_SLASH=0x010200d4; const int R::id::KEYCODE_SOFT_LEFT=0x01020089; const int R::id::KEYCODE_SOFT_RIGHT=0x0102008a; const int R::id::KEYCODE_SPACE=0x010200c6; const int R::id::KEYCODE_STAR=0x01020099; const int R::id::KEYCODE_STB_INPUT=0x0102013c; const int R::id::KEYCODE_STB_POWER=0x0102013b; const int R::id::KEYCODE_SWITCH_CHARSET=0x010200e7; const int R::id::KEYCODE_SYM=0x010200c7; const int R::id::KEYCODE_SYSRQ=0x01020100; const int R::id::KEYCODE_T=0x010200b8; const int R::id::KEYCODE_TAB=0x010200c5; const int R::id::KEYCODE_TV=0x01020132; const int R::id::KEYCODE_TV_BROWSER=0x01020173; const int R::id::KEYCODE_TV_INPUT=0x0102013a; const int R::id::KEYCODE_TV_POWER=0x01020139; const int R::id::KEYCODE_TV_REPEAT=0x0102016e; const int R::id::KEYCODE_TV_SHORTCUTKEY_3DMODE=0x01020166; const int R::id::KEYCODE_TV_SHORTCUTKEY_DISPAYMODE=0x01020167; const int R::id::KEYCODE_TV_SHORTCUTKEY_GLOBALSETUP=0x01020164; const int R::id::KEYCODE_TV_SHORTCUTKEY_SOURCE_LIST=0x01020165; const int R::id::KEYCODE_TV_SHORTCUTKEY_TVINFO=0x0102016a; const int R::id::KEYCODE_TV_SHORTCUTKEY_VIEWMODE=0x01020168; const int R::id::KEYCODE_TV_SHORTCUTKEY_VOICEMODE=0x01020169; const int R::id::KEYCODE_TV_SLEEP=0x0102016c; const int R::id::KEYCODE_TV_SOUND_CHANNEL=0x0102016d; const int R::id::KEYCODE_TV_SUBTITLE=0x0102016f; const int R::id::KEYCODE_TV_SWITCH=0x01020170; const int R::id::KEYCODE_TV_VTION=0x01020172; const int R::id::KEYCODE_TV_WASU=0x01020171; const int R::id::KEYCODE_U=0x010200b9; const int R::id::KEYCODE_UNKNOWN=0x01020088; const int R::id::KEYCODE_V=0x010200ba; const int R::id::KEYCODE_VOLUME_DOWN=0x010200a1; const int R::id::KEYCODE_VOLUME_MUTE=0x0102012c; const int R::id::KEYCODE_VOLUME_UP=0x010200a0; const int R::id::KEYCODE_W=0x010200bb; const int R::id::KEYCODE_WINDOW=0x01020133; const int R::id::KEYCODE_X=0x010200bc; const int R::id::KEYCODE_Y=0x010200bd; const int R::id::KEYCODE_YEN=0x01020160; const int R::id::KEYCODE_Z=0x010200be; const int R::id::KEYCODE_ZENKAKU_HANKAKU=0x0102015b; const int R::id::KEYCODE_ZOOM_IN=0x01020130; const int R::id::KEYCODE_ZOOM_OUT=0x01020131; const int R::id::accountPreferences=0x01020254; const int R::id::account_name=0x0102029c; const int R::id::account_row_icon=0x01020287; const int R::id::account_row_text=0x01020288; const int R::id::account_type=0x0102029b; const int R::id::action0=0x01020331; const int R::id::action1=0x01020333; const int R::id::action2=0x01020334; const int R::id::actionDone=0x0102006b; const int R::id::actionGo=0x01020067; const int R::id::actionNext=0x0102006a; const int R::id::actionNone=0x01020066; const int R::id::actionPrevious=0x0102006c; const int R::id::actionSearch=0x01020068; const int R::id::actionSend=0x01020069; const int R::id::actionUnspecified=0x01020065; const int R::id::action_bar=0x0102036c; const int R::id::action_bar_container=0x0102036b; const int R::id::action_bar_overlay_layout=0x0102036f; const int R::id::action_bar_subtitle=0x01020260; const int R::id::action_bar_title=0x0102025f; const int R::id::action_context_bar=0x0102036d; const int R::id::action_divider=0x0102033b; const int R::id::action_menu_divider=0x01020259; const int R::id::action_menu_presenter=0x0102025c; const int R::id::action_mode_bar=0x01020367; const int R::id::action_mode_bar_stub=0x01020366; const int R::id::action_mode_close_button=0x01020261; const int R::id::actions=0x01020332; const int R::id::activity_chooser_view_content=0x01020262; const int R::id::addToDictionary=0x0102002a; const int R::id::adjustNothing=0x01020037; const int R::id::adjustPan=0x01020036; const int R::id::adjustResize=0x01020035; const int R::id::adjustUnspecified=0x01020034; const int R::id::afterDescendants=0x01020195; const int R::id::alarm=0x01020201; const int R::id::alarm_status=0x010202f5; const int R::id::albumart=0x01020316; const int R::id::alertTitle=0x0102026a; const int R::id::alignBounds=0x01020086; const int R::id::alignMargins=0x01020087; const int R::id::all=0x01020083; const int R::id::allow_button=0x010202a1; const int R::id::alternative=0x010201fb; const int R::id::always=0x0102017f; const int R::id::alwaysScroll=0x010201b2; const int R::id::alwaysUse=0x01020275; const int R::id::amPm=0x010203a4; const int R::id::animation=0x01020192; const int R::id::anyRtl=0x0102018a; const int R::id::app_widget_container=0x010202c5; const int R::id::ask_checkbox=0x01020278; const int R::id::atThumb=0x01020039; const int R::id::authtoken_type=0x0102029d; const int R::id::auto_=0x0102017c; const int R::id::auto_fit=0x010201b9; const int R::id::back_button=0x01020356; const int R::id::background=0x01020000; const int R::id::backspace=0x010202ff; const int R::id::banner=0x010203b2; const int R::id::batteryInfo=0x010202e9; const int R::id::batteryInfoIcon=0x010202ea; const int R::id::batteryInfoSpacer=0x010202ec; const int R::id::batteryInfoText=0x010202eb; const int R::id::beforeDescendants=0x01020194; const int R::id::beginning=0x010201c1; const int R::id::behind=0x01020225; const int R::id::big_picture=0x0102033c; const int R::id::big_text=0x0102033a; const int R::id::blocksDescendants=0x01020196; const int R::id::body=0x0102035b; const int R::id::bold=0x0102003f; const int R::id::bottom=0x01020075; const int R::id::bottom_to_top=0x010201ea; const int R::id::breadcrumb_section=0x01020282; const int R::id::btn_next=0x01020319; const int R::id::btn_play=0x01020318; const int R::id::btn_prev=0x01020317; const int R::id::button0=0x0102035d; const int R::id::button1=0x01020019; const int R::id::button2=0x0102001a; const int R::id::button3=0x0102001b; const int R::id::button4=0x0102035e; const int R::id::button5=0x0102035f; const int R::id::button6=0x01020360; const int R::id::button7=0x01020361; const int R::id::buttonPanel=0x0102026c; const int R::id::button_always=0x01020364; const int R::id::button_bar=0x0102028a; const int R::id::button_once=0x01020365; const int R::id::buttons=0x0102029f; const int R::id::by_common=0x01020393; const int R::id::by_common_header=0x01020392; const int R::id::by_org=0x01020395; const int R::id::by_org_header=0x01020394; const int R::id::by_org_unit=0x01020397; const int R::id::by_org_unit_header=0x01020396; const int R::id::calendar_view=0x0102028f; const int R::id::cancel=0x01020286; const int R::id::cancel_button=0x010202fa; const int R::id::candidatesArea=0x0102001d; const int R::id::carrier=0x010202f7; const int R::id::center=0x0102007c; const int R::id::centerCrop=0x010201bf; const int R::id::centerInside=0x010201c0; const int R::id::center_horizontal=0x0102007a; const int R::id::center_vertical=0x01020078; const int R::id::challenge=0x01020212; const int R::id::characterPicker=0x01020285; const int R::id::characters=0x010201cb; const int R::id::check=0x0102032f; const int R::id::checkbox=0x01020001; const int R::id::chronometer=0x01020337; const int R::id::clamp=0x010201e1; const int R::id::clearDefaultHint=0x01020276; const int R::id::clip_horizontal=0x0102007f; const int R::id::clip_vertical=0x0102007e; const int R::id::clock_text=0x01020314; const int R::id::clock_view=0x01020313; const int R::id::closeButton=0x01020027; const int R::id::collapseActionView=0x010201fe; const int R::id::collapsing=0x010201d0; const int R::id::column=0x010201eb; const int R::id::columnWidth=0x010201b7; const int R::id::compat_checkbox=0x01020277; const int R::id::container=0x010201f8; const int R::id::content=0x01020002; const int R::id::contentPanel=0x0102026f; const int R::id::copy=0x01020021; const int R::id::copyUrl=0x01020023; const int R::id::costsMoney=0x0102021d; const int R::id::custom=0x0102002b; const int R::id::customPanel=0x01020271; const int R::id::cut=0x01020020; const int R::id::cycle=0x010201c3; const int R::id::dangerous=0x01020218; const int R::id::date=0x01020063; const int R::id::datePicker=0x01020290; const int R::id::datetime=0x01020062; const int R::id::day=0x0102028d; const int R::id::day_names=0x01020284; const int R::id::decimal=0x010201c8; const int R::id::decrement=0x01020349; const int R::id::defaultPosition=0x01020182; const int R::id::default_activity_button=0x01020265; const int R::id::default_loading_view=0x01020362; const int R::id::delete_button=0x010202d5; const int R::id::deny_button=0x010202a0; const int R::id::description=0x01020289; const int R::id::development=0x0102021b; const int R::id::dialog=0x010201cd; const int R::id::disableHome=0x0102020e; const int R::id::disabled=0x010201b1; const int R::id::divider=0x010203a6; const int R::id::dpad=0x01020242; const int R::id::dropdown=0x010201ce; const int R::id::edit=0x01020003; const int R::id::edit_query=0x01020374; const int R::id::editable=0x010201c5; const int R::id::edittext_container=0x01020351; const int R::id::eight=0x010203ae; const int R::id::email=0x01020081; const int R::id::emergencyCallButton=0x010202e1; const int R::id::emergency_call_button=0x010202b9; const int R::id::empty=0x01020004; const int R::id::end=0x01020044; const int R::id::enter_pin=0x01020304; const int R::id::enter_pin_section=0x010203bc; const int R::id::enter_puk=0x01020303; const int R::id::expandChallengeHandle=0x01020216; const int R::id::expand_activities_button=0x01020263; const int R::id::expand_button=0x0102032e; const int R::id::expand_button_divider=0x010203b7; const int R::id::expanded_menu=0x01020293; const int R::id::expires_on=0x0102039c; const int R::id::expires_on_header=0x0102039b; const int R::id::extended_settings=0x0102032d; const int R::id::extractArea=0x0102001c; const int R::id::face_unlock_area_view=0x010202bd; const int R::id::face_unlock_cancel_button=0x010202bf; const int R::id::feedbackAllMask=0x010201ad; const int R::id::feedbackAudible=0x010201aa; const int R::id::feedbackGeneric=0x010201ac; const int R::id::feedbackHaptic=0x010201a9; const int R::id::feedbackSpoken=0x010201a8; const int R::id::feedbackVisual=0x010201ab; const int R::id::ffwd=0x01020327; const int R::id::fill=0x0102007d; const int R::id::fillInIntent=0x01020256; const int R::id::fill_horizontal=0x0102007b; const int R::id::fill_parent=0x01020197; const int R::id::fill_vertical=0x01020079; const int R::id::find=0x010203c8; const int R::id::find_next=0x010203cb; const int R::id::find_prev=0x010203ca; const int R::id::finger=0x0102023d; const int R::id::fingerprints=0x0102039d; const int R::id::firstStrong=0x01020189; const int R::id::fitCenter=0x010201bd; const int R::id::fitEnd=0x010201be; const int R::id::fitStart=0x010201bc; const int R::id::fitXY=0x010201bb; const int R::id::five=0x010203ab; const int R::id::flagDefault=0x010201ae; const int R::id::flagForceAscii=0x01020073; const int R::id::flagIncludeNotImportantViews=0x010201af; const int R::id::flagNavigateNext=0x0102006f; const int R::id::flagNavigatePrevious=0x0102006e; const int R::id::flagNoAccessoryAction=0x01020071; const int R::id::flagNoEnterAction=0x01020072; const int R::id::flagNoExtractUi=0x01020070; const int R::id::flagNoFullscreen=0x0102006d; const int R::id::flagRequestTouchExplorationMode=0x010201b0; const int R::id::floatType=0x010201ed; const int R::id::floating=0x01020038; const int R::id::fontScale=0x01020239; const int R::id::forgotPatternButton=0x0102030a; const int R::id::forgot_password_button=0x010202ba; const int R::id::four=0x010203aa; const int R::id::fullSensor=0x0102022c; const int R::id::fullscreenArea=0x010202ab; const int R::id::glow_pad_view=0x010202c1; const int R::id::gone=0x01020177; const int R::id::grant_credentials_permission_message_footer=0x0102029e; const int R::id::grant_credentials_permission_message_header=0x01020298; const int R::id::gravity=0x0102018b; const int R::id::hard_keyboard_section=0x010202af; const int R::id::hard_keyboard_switch=0x010202b0; const int R::id::hardware=0x01020184; const int R::id::hdpi=0x0102024d; const int R::id::headerSimBad1=0x010202e7; const int R::id::headerSimBad2=0x010202e8; const int R::id::headerSimOk1=0x010202e5; const int R::id::headerSimOk2=0x010202e6; const int R::id::headerText=0x010202fc; const int R::id::headers=0x01020352; const int R::id::high=0x0102017e; const int R::id::hint=0x01020005; const int R::id::home=0x0102002c; const int R::id::homeAsUp=0x0102020b; const int R::id::home_screen=0x01020204; const int R::id::horizontal=0x01020084; const int R::id::hour=0x010203a2; const int R::id::icon=0x01020006; const int R::id::icon1=0x01020007; const int R::id::icon2=0x01020008; const int R::id::icon_menu=0x010202aa; const int R::id::icon_menu_presenter=0x0102025a; const int R::id::ifContentScrolls=0x01020180; const int R::id::ifRoom=0x010201fc; const int R::id::image=0x01020264; const int R::id::inbox_end_pad=0x01020346; const int R::id::inbox_more=0x01020345; const int R::id::inbox_text0=0x0102033e; const int R::id::inbox_text1=0x0102033f; const int R::id::inbox_text2=0x01020340; const int R::id::inbox_text3=0x01020341; const int R::id::inbox_text4=0x01020342; const int R::id::inbox_text5=0x01020343; const int R::id::inbox_text6=0x01020344; const int R::id::increment=0x01020347; const int R::id::index=0x01020330; const int R::id::infinite=0x010201e3; const int R::id::info=0x01020339; const int R::id::inherit=0x01020187; const int R::id::input=0x01020009; const int R::id::inputArea=0x0102001e; const int R::id::inputExtractAccessories=0x010202ac; const int R::id::inputExtractAction=0x010202ad; const int R::id::inputExtractEditButton=0x010202ae; const int R::id::inputExtractEditText=0x01020025; const int R::id::insideInset=0x01020179; const int R::id::insideOverlay=0x01020178; const int R::id::instructions=0x010202e4; const int R::id::intType=0x010201ee; const int R::id::integer=0x010201c6; const int R::id::internalEmpty=0x01020321; const int R::id::internalOnly=0x01020245; const int R::id::invisible=0x01020176; const int R::id::issued_on=0x0102039a; const int R::id::issued_on_header=0x01020399; const int R::id::issued_to_header=0x01020389; const int R::id::italic=0x01020040; const int R::id::key0=0x010202df; const int R::id::key1=0x010202d6; const int R::id::key2=0x010202d7; const int R::id::key3=0x010202d8; const int R::id::key4=0x010202d9; const int R::id::key5=0x010202da; const int R::id::key6=0x010202db; const int R::id::key7=0x010202dc; const int R::id::key8=0x010202dd; const int R::id::key9=0x010202de; const int R::id::keyPad=0x01020301; const int R::id::key_enter=0x010202e0; const int R::id::keyboard=0x01020230; const int R::id::keyboardHidden=0x01020231; const int R::id::keyboardView=0x01020026; const int R::id::keyguard=0x01020205; const int R::id::keyguard_account_view=0x010202b3; const int R::id::keyguard_add_widget=0x010202b7; const int R::id::keyguard_add_widget_view=0x010202b8; const int R::id::keyguard_bouncer_frame=0x010202bc; const int R::id::keyguard_click_area=0x01020291; const int R::id::keyguard_face_unlock_view=0x010202bb; const int R::id::keyguard_host_view=0x010202c2; const int R::id::keyguard_message_area=0x01020292; const int R::id::keyguard_multi_user_selector=0x010202cd; const int R::id::keyguard_password_view=0x010202ce; const int R::id::keyguard_pattern_view=0x010202d1; const int R::id::keyguard_pin_view=0x010202d3; const int R::id::keyguard_security_container=0x010202c6; const int R::id::keyguard_selector_fade_container=0x010202c0; const int R::id::keyguard_selector_view=0x0102030c; const int R::id::keyguard_selector_view_frame=0x0102030d; const int R::id::keyguard_sim_pin_view=0x0102030e; const int R::id::keyguard_sim_puk_view=0x0102030f; const int R::id::keyguard_status_area=0x01020310; const int R::id::keyguard_status_view=0x01020311; const int R::id::keyguard_status_view_face_palm=0x01020312; const int R::id::keyguard_transport_control=0x0102031a; const int R::id::keyguard_user_avatar=0x010202c9; const int R::id::keyguard_user_name=0x010202ca; const int R::id::keyguard_user_selector=0x010202cb; const int R::id::keyguard_users_grid=0x010202cc; const int R::id::keyguard_widget_pager_delete_target=0x010202c4; const int R::id::label=0x010202b2; const int R::id::landscape=0x01020223; const int R::id::large=0x01020249; const int R::id::launchRecognizer=0x010201f7; const int R::id::launchWebSearch=0x010201f6; const int R::id::layoutDirection=0x01020238; const int R::id::ldpi=0x0102024b; const int R::id::left=0x01020076; const int R::id::leftSpacer=0x0102026d; const int R::id::left_icon=0x0102024f; const int R::id::left_to_right=0x010201e7; const int R::id::line=0x010201d9; const int R::id::line1=0x01020336; const int R::id::line3=0x01020338; const int R::id::linear=0x010201db; const int R::id::list=0x0102000a; const int R::id::listContainer=0x01020320; const int R::id::listMode=0x01020207; const int R::id::list_footer=0x01020353; const int R::id::list_item=0x01020266; const int R::id::list_menu_presenter=0x0102025b; const int R::id::liveAudio=0x0102020f; const int R::id::locale=0x01020188; const int R::id::lockInstructions=0x010202f1; const int R::id::lockPattern=0x0102030b; const int R::id::lockPatternView=0x010202d2; const int R::id::lock_screen=0x01020253; const int R::id::login=0x010202b4; const int R::id::low=0x0102017d; const int R::id::ltr=0x01020185; const int R::id::main=0x010203b1; const int R::id::map=0x01020082; const int R::id::marquee=0x01020045; const int R::id::marquee_forever=0x010201cc; const int R::id::match_parent=0x01020198; const int R::id::matches=0x010203bb; const int R::id::matrix=0x010201ba; const int R::id::mcc=0x0102022d; const int R::id::mdpi=0x0102024c; const int R::id::mediacontroller_progress=0x0102032a; const int R::id::menu=0x01020250; const int R::id::message=0x0102000b; const int R::id::middle=0x01020043; const int R::id::minute=0x010203a3; const int R::id::mirror=0x010201e2; const int R::id::mnc=0x0102022e; const int R::id::modeLarge=0x010201d6; const int R::id::modeMedium=0x010201d5; const int R::id::modeSmall=0x010201d4; const int R::id::mode_normal=0x010203c5; const int R::id::monospace=0x0102003e; const int R::id::month=0x0102028c; const int R::id::month_name=0x01020283; const int R::id::mount_button=0x010203b3; const int R::id::multi_pane_challenge=0x010202c3; const int R::id::multiple=0x010201d3; const int R::id::multipleChoice=0x010201b4; const int R::id::multipleChoiceModal=0x010201b5; const int R::id::music=0x01020203; const int R::id::name=0x010203be; const int R::id::navigation=0x01020232; const int R::id::never=0x01020181; const int R::id::new_app_action=0x010202a8; const int R::id::new_app_description=0x010202a9; const int R::id::new_app_icon=0x010202a7; const int R::id::next=0x01020328; const int R::id::nextAlarmInfo=0x010202ed; const int R::id::nextAlarmSpacer=0x010202ef; const int R::id::nextAlarmText=0x010202ee; const int R::id::next_button=0x01020358; const int R::id::nine=0x010203af; const int R::id::no=0x01020191; const int R::id::no_applications_message=0x0102035c; const int R::id::no_permissions=0x01020280; const int R::id::nokeys=0x0102023e; const int R::id::nonav=0x01020241; const int R::id::none=0x01020041; const int R::id::normal=0x0102003b; const int R::id::nosensor=0x01020227; const int R::id::notification=0x01020200; const int R::id::notouch=0x0102023b; const int R::id::number=0x0102005d; const int R::id::numberDecimal=0x0102005f; const int R::id::numberPassword=0x01020060; const int R::id::numberSigned=0x0102005e; const int R::id::numberpicker_input=0x01020348; const int R::id::off=0x0102034e; const int R::id::ok=0x010202b6; const int R::id::old_app_action=0x010202a4; const int R::id::old_app_description=0x010202a5; const int R::id::old_app_icon=0x010202a3; const int R::id::one=0x010203a7; const int R::id::oneLine=0x010201cf; const int R::id::opaque=0x010201de; const int R::id::option1=0x01020295; const int R::id::option2=0x01020296; const int R::id::option3=0x01020297; const int R::id::orientation=0x01020233; const int R::id::original_app_icon=0x0102031d; const int R::id::original_message=0x0102031e; const int R::id::outsideInset=0x0102017b; const int R::id::outsideOverlay=0x0102017a; const int R::id::oval=0x010201d8; const int R::id::overflow_divider=0x0102033d; const int R::id::overflow_menu_presenter=0x0102025d; const int R::id::overlay_display_window_texture=0x0102034a; const int R::id::overlay_display_window_title=0x0102034b; const int R::id::owner_info=0x01020307; const int R::id::package_icon=0x0102034c; const int R::id::package_label=0x0102034d; const int R::id::packages_list=0x01020299; const int R::id::pageDeleteDropTarget=0x01020217; const int R::id::parentPanel=0x01020267; const int R::id::password=0x010202b5; const int R::id::passwordEntry=0x010202cf; const int R::id::paste=0x01020022; const int R::id::pause=0x01020326; const int R::id::perm_icon=0x0102027a; const int R::id::perm_money_icon=0x0102027c; const int R::id::perm_money_label=0x0102027d; const int R::id::perm_name=0x0102027b; const int R::id::permission_group=0x0102027e; const int R::id::permission_icon=0x0102029a; const int R::id::permission_list=0x0102027f; const int R::id::perms_list=0x01020281; const int R::id::personalInfo=0x0102021c; const int R::id::phone=0x01020061; const int R::id::pickers=0x0102028b; const int R::id::pinDel=0x010202f8; const int R::id::pinDisplay=0x010202fe; const int R::id::pinDisplayGroup=0x010202fd; const int R::id::pinEntry=0x010202d4; const int R::id::placeholder=0x01020387; const int R::id::popup_submenu_presenter=0x0102025e; const int R::id::portrait=0x01020224; const int R::id::preferExternal=0x01020246; const int R::id::prefs=0x01020355; const int R::id::prefs_frame=0x01020354; const int R::id::prev=0x01020324; const int R::id::primary=0x0102000c; const int R::id::progress=0x0102000d; const int R::id::progressContainer=0x0102031f; const int R::id::progress_circular=0x01020369; const int R::id::progress_horizontal=0x0102036a; const int R::id::progress_number=0x01020274; const int R::id::progress_percent=0x01020273; const int R::id::pukDel=0x01020306; const int R::id::pukDisplay=0x01020305; const int R::id::queryRewriteFromData=0x010201f3; const int R::id::queryRewriteFromText=0x010201f4; const int R::id::qwerty=0x0102023f; const int R::id::radial=0x010201dc; const int R::id::radio=0x01020323; const int R::id::radio_power=0x01020350; const int R::id::random=0x010201e6; const int R::id::reask_hint=0x01020279; const int R::id::rectangle=0x010201d7; const int R::id::repeat=0x010201c2; const int R::id::replace_app_icon=0x0102031b; const int R::id::replace_message=0x0102031c; const int R::id::resolver_grid=0x01020363; const int R::id::restart=0x010201e4; const int R::id::reverse=0x010201e5; const int R::id::reverseLandscape=0x0102022a; const int R::id::reversePortrait=0x0102022b; const int R::id::rew=0x01020325; const int R::id::right=0x01020077; const int R::id::rightSpacer=0x0102026e; const int R::id::right_container=0x01020368; const int R::id::right_icon=0x01020251; const int R::id::right_to_left=0x010201e8; const int R::id::ring=0x010201da; const int R::id::ringtone=0x010201ff; const int R::id::root=0x010202f2; const int R::id::row=0x010201ec; const int R::id::rowTypeId=0x01020257; const int R::id::rtl=0x01020186; const int R::id::sans=0x0102003c; const int R::id::screenLayout=0x01020234; const int R::id::screenLocked=0x01020309; const int R::id::screenLockedInfo=0x010202f0; const int R::id::screenSize=0x01020236; const int R::id::scrim=0x01020214; const int R::id::scrollView=0x01020270; const int R::id::scrolling=0x01020193; const int R::id::search_app_icon=0x01020372; const int R::id::search_badge=0x01020375; const int R::id::search_bar=0x01020371; const int R::id::search_button=0x01020376; const int R::id::search_close_btn=0x0102037b; const int R::id::search_edit_frame=0x01020377; const int R::id::search_go_btn=0x0102037d; const int R::id::search_mag_icon=0x01020378; const int R::id::search_plate=0x01020379; const int R::id::search_src_text=0x0102037a; const int R::id::search_view=0x01020373; const int R::id::search_voice_btn=0x0102037e; const int R::id::secondary=0x010201fa; const int R::id::secondaryProgress=0x0102000f; const int R::id::seekbar=0x01020359; const int R::id::selectAll=0x0102001f; const int R::id::selectTextMode=0x0102002d; const int R::id::select_all=0x010203c6; const int R::id::select_dialog_listview=0x0102037f; const int R::id::selectedIcon=0x0102000e; const int R::id::sensor=0x01020226; const int R::id::sensorLandscape=0x01020228; const int R::id::sensorPortrait=0x01020229; const int R::id::sentences=0x010201c9; const int R::id::sequentially=0x010201f0; const int R::id::serial_number=0x01020391; const int R::id::serial_number_header=0x01020390; const int R::id::serif=0x0102003d; const int R::id::seven=0x010203ad; const int R::id::sha1_fingerprint=0x010203a1; const int R::id::sha1_fingerprint_header=0x010203a0; const int R::id::sha256_fingerprint=0x0102039f; const int R::id::sha256_fingerprint_header=0x0102039e; const int R::id::share=0x010203c7; const int R::id::shortcut=0x01020322; const int R::id::showCustom=0x0102020d; const int R::id::showHome=0x0102020a; const int R::id::showSearchIconAsBadge=0x010201f2; const int R::id::showSearchLabelAsBadge=0x010201f1; const int R::id::showTitle=0x0102020c; const int R::id::showVoiceSearchButton=0x010201f5; const int R::id::signature=0x01020219; const int R::id::signatureOrSystem=0x0102021a; const int R::id::signed_=0x010201c7; const int R::id::silent=0x0102034f; const int R::id::single=0x010201d2; const int R::id::singleChoice=0x010201b3; const int R::id::singleInstance=0x01020221; const int R::id::singleTask=0x01020220; const int R::id::singleTop=0x0102021f; const int R::id::six=0x010203ac; const int R::id::skip_button=0x01020357; const int R::id::slider_group=0x010203b6; const int R::id::sliding_layout=0x010202c8; const int R::id::small=0x01020248; const int R::id::smallIcon=0x01020255; const int R::id::smallestScreenSize=0x01020237; const int R::id::sms_short_code_coins_icon=0x01020382; const int R::id::sms_short_code_confirm_message=0x01020380; const int R::id::sms_short_code_detail_layout=0x01020381; const int R::id::sms_short_code_detail_message=0x01020383; const int R::id::sms_short_code_remember_choice_checkbox=0x01020384; const int R::id::sms_short_code_remember_choice_text=0x01020385; const int R::id::sms_short_code_remember_undo_instruction=0x01020386; const int R::id::software=0x01020183; const int R::id::spacerBottom=0x01020302; const int R::id::spacerTop=0x010202e3; const int R::id::spacingWidth=0x010201b6; const int R::id::spacingWidthUniform=0x010201b8; const int R::id::spannable=0x010201c4; const int R::id::splashscreen=0x010203ba; const int R::id::splitActionBarWhenNarrow=0x01020247; const int R::id::split_action_bar=0x0102036e; const int R::id::spotlightMask=0x010202be; const int R::id::standard=0x0102021e; const int R::id::start=0x01020042; const int R::id::startSelectingText=0x01020028; const int R::id::stateAlwaysHidden=0x01020031; const int R::id::stateAlwaysVisible=0x01020033; const int R::id::stateHidden=0x01020030; const int R::id::stateUnchanged=0x0102002f; const int R::id::stateUnspecified=0x0102002e; const int R::id::stateVisible=0x01020032; const int R::id::status=0x01020294; const int R::id::status1=0x010202f6; const int R::id::status_bar_latest_event_content=0x01020335; const int R::id::stopSelectingText=0x01020029; const int R::id::stream_icon=0x010203b8; const int R::id::stylus=0x0102023c; const int R::id::submit_area=0x0102037c; const int R::id::summary=0x01020010; const int R::id::sweep=0x010201dd; const int R::id::switchInputMethod=0x01020024; const int R::id::switchWidget=0x0102035a; const int R::id::switch_ime_button=0x010202d0; const int R::id::switch_new=0x010202a6; const int R::id::switch_old=0x010202a2; const int R::id::system=0x010201f9; const int R::id::tabMode=0x01020208; const int R::id::tabcontent=0x01020011; const int R::id::tabhost=0x01020012; const int R::id::tabs=0x01020013; const int R::id::text=0x01020046; const int R::id::text1=0x01020014; const int R::id::text2=0x01020015; const int R::id::textAutoComplete=0x0102004b; const int R::id::textAutoCorrect=0x0102004a; const int R::id::textCapCharacters=0x01020047; const int R::id::textCapSentences=0x01020049; const int R::id::textCapWords=0x01020048; const int R::id::textEmailAddress=0x01020050; const int R::id::textEmailSubject=0x01020051; const int R::id::textEnd=0x0102018d; const int R::id::textFilter=0x01020059; const int R::id::textImeMultiLine=0x0102004d; const int R::id::textLongMessage=0x01020053; const int R::id::textMultiLine=0x0102004c; const int R::id::textNoSuggestions=0x0102004e; const int R::id::textPassword=0x01020056; const int R::id::textPersonName=0x01020054; const int R::id::textPhonetic=0x0102005a; const int R::id::textPostalAddress=0x01020055; const int R::id::textShortMessage=0x01020052; const int R::id::textStart=0x0102018c; const int R::id::textUri=0x0102004f; const int R::id::textVisiblePassword=0x01020057; const int R::id::textWebEditText=0x01020058; const int R::id::textWebEmailAddress=0x0102005b; const int R::id::textWebPassword=0x0102005c; const int R::id::three=0x010203a9; const int R::id::time=0x01020064; const int R::id::timeDisplayBackground=0x010202f3; const int R::id::timeDisplayForeground=0x010202f4; const int R::id::timePicker=0x010203a5; const int R::id::time_current=0x01020329; const int R::id::title=0x01020016; const int R::id::titleDivider=0x0102026b; const int R::id::titleDividerTop=0x01020272; const int R::id::title_container=0x01020252; const int R::id::title_separator=0x01020388; const int R::id::title_template=0x01020269; const int R::id::to_common=0x0102038b; const int R::id::to_common_header=0x0102038a; const int R::id::to_org=0x0102038d; const int R::id::to_org_header=0x0102038c; const int R::id::to_org_unit=0x0102038f; const int R::id::to_org_unit_header=0x0102038e; const int R::id::together=0x010201ef; const int R::id::toggle=0x01020017; const int R::id::top=0x01020074; const int R::id::topDisplayGroup=0x01020300; const int R::id::topHeader=0x010202e2; const int R::id::topPanel=0x01020268; const int R::id::top_action_bar=0x01020370; const int R::id::top_to_bottom=0x010201e9; const int R::id::touchscreen=0x0102022f; const int R::id::trackball=0x01020243; const int R::id::translucent=0x010201e0; const int R::id::transparent=0x010201df; const int R::id::transport=0x010202f9; const int R::id::transport_bg_protect=0x010202fb; const int R::id::transport_controls=0x01020315; const int R::id::twelvekey=0x01020240; const int R::id::two=0x010203a8; const int R::id::twoLine=0x010201d1; const int R::id::typeAllMask=0x010201a7; const int R::id::typeNotificationStateChanged=0x0102019f; const int R::id::typeTouchExplorationGestureEnd=0x010201a3; const int R::id::typeTouchExplorationGestureStart=0x010201a2; const int R::id::typeViewClicked=0x01020199; const int R::id::typeViewFocused=0x0102019c; const int R::id::typeViewHoverEnter=0x010201a0; const int R::id::typeViewHoverExit=0x010201a1; const int R::id::typeViewLongClicked=0x0102019a; const int R::id::typeViewScrolled=0x010201a5; const int R::id::typeViewSelected=0x0102019b; const int R::id::typeViewTextChanged=0x0102019d; const int R::id::typeViewTextSelectionChanged=0x010201a6; const int R::id::typeWindowContentChanged=0x010201a4; const int R::id::typeWindowStateChanged=0x0102019e; const int R::id::uiMode=0x01020235; const int R::id::unbounded=0x01020206; const int R::id::undefined=0x0102023a; const int R::id::unlock_widget=0x01020308; const int R::id::unmount_button=0x010203b4; const int R::id::unspecified=0x01020222; const int R::id::up=0x01020258; const int R::id::useLogo=0x01020209; const int R::id::user=0x01020210; const int R::id::userSwitcher=0x01020213; const int R::id::validity_header=0x01020398; const int R::id::value=0x010202b1; const int R::id::vertical=0x01020085; const int R::id::viewEnd=0x0102018f; const int R::id::viewStart=0x0102018e; const int R::id::view_flipper=0x010202c7; const int R::id::visible=0x01020175; const int R::id::visible_panel=0x010203b5; const int R::id::voice=0x01020202; const int R::id::volume_icon=0x0102032b; const int R::id::volume_slider=0x0102032c; const int R::id::web=0x01020080; const int R::id::websearch=0x010203c9; const int R::id::webview=0x010203b9; const int R::id::wheel=0x01020244; const int R::id::widget=0x01020211; const int R::id::widget_frame=0x01020018; const int R::id::widgets=0x01020215; const int R::id::wifi_p2p_wps_pin=0x010203bd; const int R::id::withText=0x010201fd; const int R::id::words=0x010201ca; const int R::id::wrap_content=0x0102003a; const int R::id::xhdpi=0x0102024e; const int R::id::xlarge=0x0102024a; const int R::id::year=0x0102028e; const int R::id::yes=0x01020190; const int R::id::zero=0x010203b0; const int R::id::zoomControls=0x010203c1; const int R::id::zoomIn=0x010203c3; const int R::id::zoomMagnify=0x010203c4; const int R::id::zoomOut=0x010203c2; const int R::id::zoom_fit_page=0x010203bf; const int R::id::zoom_page_overview=0x010203c0; const int R::integer::config_MaxConcurrentDownloadsAllowed=0x010e0032; const int R::integer::config_activityDefaultDur=0x010e0007; const int R::integer::config_activityShortDur=0x010e0006; const int R::integer::config_carDockKeepsScreenOn=0x010e0014; const int R::integer::config_carDockRotation=0x010e0011; const int R::integer::config_criticalBatteryWarningLevel=0x010e0018; const int R::integer::config_cursorWindowSize=0x010e0034; const int R::integer::config_datause_notification_type=0x010e002d; const int R::integer::config_datause_polling_period_sec=0x010e002a; const int R::integer::config_datause_threshold_bytes=0x010e002b; const int R::integer::config_datause_throttle_kbitsps=0x010e002c; const int R::integer::config_defaultNotificationLedOff=0x010e001d; const int R::integer::config_defaultNotificationLedOn=0x010e001c; const int R::integer::config_defaultUiModeType=0x010e0012; const int R::integer::config_defaultWallPaper_height=0x010e0039; const int R::integer::config_defaultWallPaper_width=0x010e0038; const int R::integer::config_deskDockKeepsScreenOn=0x010e0013; const int R::integer::config_deskDockRotation=0x010e0010; const int R::integer::config_downloadDataDirLowSpaceThreshold=0x010e0033; const int R::integer::config_downloadDataDirSize=0x010e0031; const int R::integer::config_lidKeyboardAccessibility=0x010e0015; const int R::integer::config_lidNavigationAccessibility=0x010e0016; const int R::integer::config_lidOpenRotation=0x010e000f; const int R::integer::config_lightSensorWarmupTime=0x010e0028; const int R::integer::config_lockSoundVolumeDb=0x010e0005; const int R::integer::config_longAnimTime=0x010e0002; const int R::integer::config_longPressOnHomeBehavior=0x010e0023; const int R::integer::config_longPressOnPowerBehavior=0x010e0017; const int R::integer::config_lowBatteryCloseWarningLevel=0x010e001b; const int R::integer::config_lowBatteryWarningLevel=0x010e001a; const int R::integer::config_maxResolverActivityColumns=0x010e0037; const int R::integer::config_max_pan_devices=0x010e000a; const int R::integer::config_mediumAnimTime=0x010e0001; const int R::integer::config_multiuserMaximumUsers=0x010e003a; const int R::integer::config_networkPolicyDefaultWarning=0x010e0036; const int R::integer::config_networkTransitionTimeout=0x010e0009; const int R::integer::config_notificationsBatteryFullARGB=0x010e0020; const int R::integer::config_notificationsBatteryLedOff=0x010e0022; const int R::integer::config_notificationsBatteryLedOn=0x010e0021; const int R::integer::config_notificationsBatteryLowARGB=0x010e001e; const int R::integer::config_notificationsBatteryMediumARGB=0x010e001f; const int R::integer::config_ntpTimeout=0x010e0035; const int R::integer::config_radioScanningTimeout=0x010e0008; const int R::integer::config_safe_media_volume_index=0x010e003b; const int R::integer::config_screenBrightnessDim=0x010e0027; const int R::integer::config_screenBrightnessSettingDefault=0x010e0026; const int R::integer::config_screenBrightnessSettingMaximum=0x010e0025; const int R::integer::config_screenBrightnessSettingMinimum=0x010e0024; const int R::integer::config_shortAnimTime=0x010e0000; const int R::integer::config_shutdownBatteryTemperature=0x010e0019; const int R::integer::config_soundEffectVolumeDb=0x010e0004; const int R::integer::config_virtualKeyQuietTimeMillis=0x010e0029; const int R::integer::config_wifi_driver_stop_delay=0x010e000e; const int R::integer::config_wifi_framework_scan_interval=0x010e000d; const int R::integer::config_wifi_scan_interval_p2p_connected=0x010e000c; const int R::integer::config_wifi_supplicant_scan_interval=0x010e000b; const int R::integer::db_connection_pool_size=0x010e002e; const int R::integer::db_journal_size_limit=0x010e002f; const int R::integer::db_wal_autocheckpoint=0x010e0030; const int R::integer::kg_carousel_angle=0x010e0041; const int R::integer::kg_glowpad_rotation_offset=0x010e0044; const int R::integer::kg_security_fade_duration=0x010e0043; const int R::integer::kg_security_flip_duration=0x010e0042; const int R::integer::kg_security_flipper_weight=0x010e0047; const int R::integer::kg_selector_gravity=0x010e0045; const int R::integer::kg_widget_region_weight=0x010e0046; const int R::integer::max_action_buttons=0x010e003c; const int R::integer::preference_fragment_scrollbarStyle=0x010e0040; const int R::integer::preference_screen_header_scrollbarStyle=0x010e003f; const int R::integer::preferences_left_pane_weight=0x010e003d; const int R::integer::preferences_right_pane_weight=0x010e003e; const int R::integer::status_bar_notification_info_maxnum=0x010e0003; const int R::interpolator::accelerate_cubic=0x010c0002; const int R::interpolator::accelerate_decelerate=0x010c0006; const int R::interpolator::accelerate_quad=0x010c0000; const int R::interpolator::accelerate_quint=0x010c0004; const int R::interpolator::anticipate=0x010c0007; const int R::interpolator::anticipate_overshoot=0x010c0009; const int R::interpolator::bounce=0x010c000a; const int R::interpolator::cycle=0x010c000c; const int R::interpolator::decelerate_cubic=0x010c0003; const int R::interpolator::decelerate_quad=0x010c0001; const int R::interpolator::decelerate_quint=0x010c0005; const int R::interpolator::linear=0x010c000b; const int R::interpolator::overshoot=0x010c0008; const int R::layout::action_bar_home=0x01090018; const int R::layout::action_bar_title_item=0x01090019; const int R::layout::action_menu_item_layout=0x0109001a; const int R::layout::action_menu_layout=0x0109001b; const int R::layout::action_mode_bar=0x0109001c; const int R::layout::action_mode_close_item=0x0109001d; const int R::layout::activity_chooser_view=0x0109001e; const int R::layout::activity_chooser_view_list_item=0x0109001f; const int R::layout::activity_list=0x01090020; const int R::layout::activity_list_item=0x01090000; const int R::layout::activity_list_item_2=0x01090021; const int R::layout::adaptive_notification_wrapper=0x01090022; const int R::layout::alert_dialog=0x01090023; const int R::layout::alert_dialog_holo=0x01090024; const int R::layout::alert_dialog_progress=0x01090025; const int R::layout::alert_dialog_progress_holo=0x01090026; const int R::layout::always_use_checkbox=0x01090027; const int R::layout::am_compat_mode_dialog=0x01090028; const int R::layout::app_permission_item=0x01090029; const int R::layout::app_permission_item_money=0x0109002a; const int R::layout::app_permission_item_old=0x0109002b; const int R::layout::app_perms_summary=0x0109002c; const int R::layout::auto_complete_list=0x0109002d; const int R::layout::breadcrumbs_in_fragment=0x0109002e; const int R::layout::browser_link_context_header=0x0109000e; const int R::layout::calendar_view=0x0109002f; const int R::layout::character_picker=0x01090030; const int R::layout::character_picker_button=0x01090031; const int R::layout::choose_account=0x01090032; const int R::layout::choose_account_row=0x01090033; const int R::layout::choose_account_type=0x01090034; const int R::layout::choose_type_and_account=0x01090035; const int R::layout::date_picker=0x01090036; const int R::layout::date_picker_dialog=0x01090037; const int R::layout::date_picker_holo=0x01090038; const int R::layout::default_navigation=0x01090039; const int R::layout::dialog_custom_title=0x0109003a; const int R::layout::dialog_custom_title_holo=0x0109003b; const int R::layout::dialog_title=0x0109003c; const int R::layout::dialog_title_holo=0x0109003d; const int R::layout::dialog_title_icons=0x0109003e; const int R::layout::dialog_title_icons_holo=0x0109003f; const int R::layout::expandable_list_content=0x01090001; const int R::layout::expanded_menu_layout=0x01090040; const int R::layout::fragment_bread_crumb_item=0x01090041; const int R::layout::fragment_bread_crumbs=0x01090042; const int R::layout::global_actions_item=0x01090043; const int R::layout::global_actions_silent_mode=0x01090044; const int R::layout::grant_credentials_permission=0x01090045; const int R::layout::heavy_weight_switcher=0x01090046; const int R::layout::icon_menu_item_layout=0x01090047; const int R::layout::icon_menu_layout=0x01090048; const int R::layout::input_method=0x01090049; const int R::layout::input_method_extract_view=0x0109004a; const int R::layout::input_method_switch_dialog_title=0x0109004b; const int R::layout::js_prompt=0x0109004c; const int R::layout::keyboard_key_preview=0x0109004d; const int R::layout::keyboard_popup_keyboard=0x0109004e; const int R::layout::keyguard=0x0109004f; const int R::layout::keyguard_account_view=0x01090050; const int R::layout::keyguard_add_widget=0x01090051; const int R::layout::keyguard_eca=0x010900ee; const int R::layout::keyguard_emergency_carrier_area=0x01090052; const int R::layout::keyguard_emergency_carrier_area_empty=0x01090053; const int R::layout::keyguard_face_unlock_view=0x01090054; const int R::layout::keyguard_glow_pad_container=0x01090055; const int R::layout::keyguard_glow_pad_view=0x01090056; const int R::layout::keyguard_host_view=0x01090057; const int R::layout::keyguard_message_area=0x01090058; const int R::layout::keyguard_message_area_large=0x01090059; const int R::layout::keyguard_multi_user_avatar=0x0109005a; const int R::layout::keyguard_multi_user_selector=0x0109005b; const int R::layout::keyguard_multi_user_selector_widget=0x0109005c; const int R::layout::keyguard_navigation=0x0109005d; const int R::layout::keyguard_password_view=0x0109005e; const int R::layout::keyguard_pattern_view=0x0109005f; const int R::layout::keyguard_pin_view=0x01090060; const int R::layout::keyguard_screen_glogin_unlock=0x01090061; const int R::layout::keyguard_screen_lock=0x01090062; const int R::layout::keyguard_screen_password_landscape=0x01090063; const int R::layout::keyguard_screen_password_portrait=0x01090064; const int R::layout::keyguard_screen_sim_pin_landscape=0x01090065; const int R::layout::keyguard_screen_sim_pin_portrait=0x01090066; const int R::layout::keyguard_screen_sim_puk_landscape=0x01090067; const int R::layout::keyguard_screen_sim_puk_portrait=0x01090068; const int R::layout::keyguard_screen_status_land=0x01090069; const int R::layout::keyguard_screen_status_port=0x0109006a; const int R::layout::keyguard_screen_tab_unlock=0x0109006b; const int R::layout::keyguard_screen_tab_unlock_land=0x0109006c; const int R::layout::keyguard_screen_unlock_landscape=0x0109006d; const int R::layout::keyguard_screen_unlock_portrait=0x0109006e; const int R::layout::keyguard_selector_view=0x0109006f; const int R::layout::keyguard_sim_pin_view=0x01090070; const int R::layout::keyguard_sim_puk_pin_account_navigation=0x01090071; const int R::layout::keyguard_sim_puk_pin_navigation=0x01090072; const int R::layout::keyguard_sim_puk_view=0x01090073; const int R::layout::keyguard_status_area=0x01090074; const int R::layout::keyguard_status_view=0x01090075; const int R::layout::keyguard_transport_control=0x01090076; const int R::layout::keyguard_transport_control_view=0x01090077; const int R::layout::keyguard_widget_pager=0x01090078; const int R::layout::keyguard_widget_remove_drop_target=0x01090079; const int R::layout::launch_warning=0x0109007a; const int R::layout::list_content=0x01090014; const int R::layout::list_content_simple=0x0109007b; const int R::layout::list_gestures_overlay=0x0109007c; const int R::layout::list_menu_item_checkbox=0x0109007d; const int R::layout::list_menu_item_icon=0x0109007e; const int R::layout::list_menu_item_layout=0x0109007f; const int R::layout::list_menu_item_radio=0x01090080; const int R::layout::locale_picker_item=0x01090081; const int R::layout::media_controller=0x01090082; const int R::layout::media_route_chooser_layout=0x01090083; const int R::layout::media_route_list_item=0x01090084; const int R::layout::media_route_list_item_checkable=0x01090085; const int R::layout::media_route_list_item_collapse_group=0x01090086; const int R::layout::media_route_list_item_section_header=0x01090087; const int R::layout::media_route_list_item_top_header=0x01090088; const int R::layout::menu_item=0x01090089; const int R::layout::notification_action=0x0109008a; const int R::layout::notification_action_list=0x0109008b; const int R::layout::notification_action_tombstone=0x0109008c; const int R::layout::notification_intruder_content=0x0109008d; const int R::layout::notification_template_base=0x0109008e; const int R::layout::notification_template_big_base=0x0109008f; const int R::layout::notification_template_big_picture=0x01090090; const int R::layout::notification_template_big_text=0x01090091; const int R::layout::notification_template_inbox=0x01090092; const int R::layout::notification_template_part_chronometer=0x01090093; const int R::layout::notification_template_part_time=0x01090094; const int R::layout::number_picker=0x01090095; const int R::layout::number_picker_with_selector_wheel=0x01090096; const int R::layout::overlay_display_window=0x01090097; const int R::layout::permissions_account_and_authtokentype=0x01090098; const int R::layout::permissions_package_list_item=0x01090099; const int R::layout::popup_menu_item_layout=0x0109009a; const int R::layout::power_dialog=0x0109009b; const int R::layout::preference=0x0109009c; const int R::layout::preference_category=0x01090002; const int R::layout::preference_category_holo=0x0109009d; const int R::layout::preference_child=0x0109009e; const int R::layout::preference_child_holo=0x0109009f; const int R::layout::preference_dialog_edittext=0x010900a0; const int R::layout::preference_header_item=0x010900a1; const int R::layout::preference_holo=0x010900a2; const int R::layout::preference_information=0x010900a3; const int R::layout::preference_information_holo=0x010900a4; const int R::layout::preference_list_content=0x010900a5; const int R::layout::preference_list_content_single=0x010900a6; const int R::layout::preference_list_fragment=0x010900a7; const int R::layout::preference_widget_checkbox=0x010900a8; const int R::layout::preference_widget_seekbar=0x010900a9; const int R::layout::preference_widget_switch=0x010900aa; const int R::layout::preferences=0x010900ab; const int R::layout::progress_dialog=0x010900ac; const int R::layout::progress_dialog_holo=0x010900ad; const int R::layout::recent_apps_dialog=0x010900ae; const int R::layout::recent_apps_icon=0x010900af; const int R::layout::remote_views_adapter_default_loading_view=0x010900b0; const int R::layout::resolve_list_item=0x010900b1; const int R::layout::resolver_grid=0x010900b2; const int R::layout::safe_mode=0x010900b3; const int R::layout::screen=0x010900b4; const int R::layout::screen_action_bar=0x010900b5; const int R::layout::screen_action_bar_overlay=0x010900b6; const int R::layout::screen_custom_title=0x010900b7; const int R::layout::screen_progress=0x010900b8; const int R::layout::screen_simple=0x010900b9; const int R::layout::screen_simple_overlay_action_mode=0x010900ba; const int R::layout::screen_title=0x010900bb; const int R::layout::screen_title_icons=0x010900bc; const int R::layout::search_bar=0x010900bd; const int R::layout::search_dropdown_item_1line=0x010900be; const int R::layout::search_dropdown_item_icons_2line=0x010900bf; const int R::layout::search_view=0x010900c0; const int R::layout::seekbar_dialog=0x010900c1; const int R::layout::select_dialog=0x010900c2; const int R::layout::select_dialog_holo=0x010900c3; const int R::layout::select_dialog_item=0x01090011; const int R::layout::select_dialog_item_holo=0x010900c4; const int R::layout::select_dialog_multichoice=0x01090013; const int R::layout::select_dialog_multichoice_holo=0x010900c5; const int R::layout::select_dialog_singlechoice=0x01090012; const int R::layout::select_dialog_singlechoice_holo=0x010900c6; const int R::layout::simple_dropdown_hint=0x010900c7; const int R::layout::simple_dropdown_item_1line=0x0109000a; const int R::layout::simple_dropdown_item_2line=0x010900c8; const int R::layout::simple_expandable_list_item_1=0x01090006; const int R::layout::simple_expandable_list_item_2=0x01090007; const int R::layout::simple_gallery_item=0x0109000b; const int R::layout::simple_list_item_1=0x01090003; const int R::layout::simple_list_item_2=0x01090004; const int R::layout::simple_list_item_2_single_choice=0x010900c9; const int R::layout::simple_list_item_activated_1=0x01090016; const int R::layout::simple_list_item_activated_2=0x01090017; const int R::layout::simple_list_item_checked=0x01090005; const int R::layout::simple_list_item_multiple_choice=0x01090010; const int R::layout::simple_list_item_single_choice=0x0109000f; const int R::layout::simple_selectable_list_item=0x01090015; const int R::layout::simple_spinner_dropdown_item=0x01090009; const int R::layout::simple_spinner_item=0x01090008; const int R::layout::sms_short_code_confirmation_dialog=0x010900ca; const int R::layout::ssl_certificate=0x010900cb; const int R::layout::status_bar_latest_event_content=0x010900cc; const int R::layout::status_bar_latest_event_ticker=0x010900cd; const int R::layout::status_bar_latest_event_ticker_large_icon=0x010900ce; const int R::layout::tab_content=0x010900cf; const int R::layout::tab_indicator=0x010900d0; const int R::layout::tab_indicator_holo=0x010900d1; const int R::layout::test_list_item=0x0109000c; const int R::layout::text_drag_thumbnail=0x010900d2; const int R::layout::text_edit_action_popup_text=0x010900d3; const int R::layout::text_edit_no_paste_window=0x010900d4; const int R::layout::text_edit_paste_window=0x010900d5; const int R::layout::text_edit_side_no_paste_window=0x010900d6; const int R::layout::text_edit_side_paste_window=0x010900d7; const int R::layout::text_edit_suggestion_item=0x010900d8; const int R::layout::text_edit_suggestions_window=0x010900d9; const int R::layout::textview_hint=0x010900da; const int R::layout::time_picker=0x010900db; const int R::layout::time_picker_dialog=0x010900dc; const int R::layout::time_picker_holo=0x010900dd; const int R::layout::transient_notification=0x010900de; const int R::layout::twelve_key_entry=0x010900df; const int R::layout::two_line_list_item=0x0109000d; const int R::layout::typing_filter=0x010900e0; const int R::layout::usb_storage_activity=0x010900e1; const int R::layout::volume_adjust=0x010900e2; const int R::layout::volume_adjust_item=0x010900e3; const int R::layout::web_runtime=0x010900e4; const int R::layout::web_text_view_dropdown=0x010900e5; const int R::layout::webview_find=0x010900e6; const int R::layout::webview_select_singlechoice=0x010900e7; const int R::layout::wifi_p2p_dialog=0x010900e8; const int R::layout::wifi_p2p_dialog_row=0x010900e9; const int R::layout::zoom_browser_accessory_buttons=0x010900ea; const int R::layout::zoom_container=0x010900eb; const int R::layout::zoom_controls=0x010900ec; const int R::layout::zoom_magnify=0x010900ed; const int R::menu::webview_copy=0x01140000; const int R::menu::webview_find=0x01140001; const int R::mipmap::sym_app_on_sd_unavailable_icon=0x010d0001; const int R::mipmap::sym_def_app_icon=0x010d0000; const int R::plurals::abbrev_in_num_days=0x01130010; const int R::plurals::abbrev_in_num_hours=0x0113000f; const int R::plurals::abbrev_in_num_minutes=0x0113000e; const int R::plurals::abbrev_in_num_seconds=0x0113000d; const int R::plurals::abbrev_num_days_ago=0x0113000c; const int R::plurals::abbrev_num_hours_ago=0x0113000b; const int R::plurals::abbrev_num_minutes_ago=0x0113000a; const int R::plurals::abbrev_num_seconds_ago=0x01130009; const int R::plurals::in_num_days=0x01130008; const int R::plurals::in_num_hours=0x01130007; const int R::plurals::in_num_minutes=0x01130006; const int R::plurals::in_num_seconds=0x01130005; const int R::plurals::last_num_days=0x01130003; const int R::plurals::matches_found=0x01130013; const int R::plurals::num_days_ago=0x01130004; const int R::plurals::num_hours_ago=0x01130002; const int R::plurals::num_minutes_ago=0x01130001; const int R::plurals::num_seconds_ago=0x01130000; const int R::plurals::wifi_available=0x01130011; const int R::plurals::wifi_available_detailed=0x01130012; const int R::raw::accessibility_gestures=0x01100000; const int R::raw::fallbackring=0x01100001; const int R::raw::incognito_mode_start_page=0x01100002; const int R::raw::loaderror=0x01100003; const int R::raw::nodomain=0x01100004; const int R::string::BaMmi=0x0104008b; const int R::string::CLIRDefaultOffNextCallOff=0x01040097; const int R::string::CLIRDefaultOffNextCallOn=0x01040096; const int R::string::CLIRDefaultOnNextCallOff=0x01040095; const int R::string::CLIRDefaultOnNextCallOn=0x01040094; const int R::string::CLIRPermanent=0x01040099; const int R::string::CfMmi=0x01040089; const int R::string::ClipMmi=0x01040087; const int R::string::ClirMmi=0x01040088; const int R::string::CndMmi=0x01040092; const int R::string::CnipMmi=0x0104008e; const int R::string::CnirMmi=0x0104008f; const int R::string::CwMmi=0x0104008a; const int R::string::DndMmi=0x01040093; const int R::string::Midnight=0x010403be; const int R::string::Noon=0x010403bc; const int R::string::PinMmi=0x0104008d; const int R::string::PwdMmi=0x0104008c; const int R::string::RestrictedChangedTitle=0x0104009a; const int R::string::RestrictedOnAll=0x010400a2; const int R::string::RestrictedOnAllVoice=0x0104009e; const int R::string::RestrictedOnData=0x0104009b; const int R::string::RestrictedOnEmergency=0x0104009c; const int R::string::RestrictedOnNormal=0x0104009d; const int R::string::RestrictedOnSms=0x0104009f; const int R::string::RestrictedOnVoiceData=0x010400a0; const int R::string::RestrictedOnVoiceSms=0x010400a1; const int R::string::RuacMmi=0x01040091; const int R::string::SetupCallDefault=0x0104052c; const int R::string::ThreeWCMmi=0x01040090; const int R::string::VideoView_error_button=0x01040010; const int R::string::VideoView_error_text_invalid_progressive_playback=0x01040015; const int R::string::VideoView_error_text_unknown=0x01040011; const int R::string::VideoView_error_title=0x01040012; const int R::string::abbrev_month=0x0104003f; const int R::string::abbrev_month_day=0x0104003e; const int R::string::abbrev_month_day_year=0x0104003a; const int R::string::abbrev_month_year=0x01040040; const int R::string::abbrev_wday_month_day_no_year=0x01040063; const int R::string::abbrev_wday_month_day_year=0x01040064; const int R::string::accept=0x01040412; const int R::string::accessibility_binding_label=0x010404a3; const int R::string::accessibility_enabled=0x01040567; const int R::string::action_bar_home_description=0x01040502; const int R::string::action_bar_up_description=0x01040503; const int R::string::action_menu_overflow_description=0x01040504; const int R::string::action_mode_done=0x010404c0; const int R::string::activity_chooser_view_dialog_title_default=0x01040526; const int R::string::activity_chooser_view_see_all=0x01040525; const int R::string::activity_list_empty=0x01040488; const int R::string::activity_resolver_use_always=0x0104052d; const int R::string::activity_resolver_use_once=0x0104052e; const int R::string::activitychooserview_choose_application=0x010404f2; const int R::string::adb_active_notification_message=0x01040455; const int R::string::adb_active_notification_title=0x01040454; const int R::string::addToDictionary=0x010403c4; const int R::string::add_account_button_label=0x010404da; const int R::string::add_account_label=0x010404d9; const int R::string::aerr_application=0x010403d4; const int R::string::aerr_process=0x010403d5; const int R::string::aerr_title=0x010403d3; const int R::string::allow=0x0104049d; const int R::string::alternate_eri_file=0x010404a6; const int R::string::alwaysUse=0x010403ce; const int R::string::android_system_label=0x010400f1; const int R::string::android_upgrading_apk=0x010403e8; const int R::string::android_upgrading_complete=0x010403ea; const int R::string::android_upgrading_starting_apps=0x010403e9; const int R::string::android_upgrading_title=0x010403e7; const int R::string::anr_activity_application=0x010403d7; const int R::string::anr_activity_process=0x010403d8; const int R::string::anr_application_process=0x010403d9; const int R::string::anr_process=0x010403da; const int R::string::anr_title=0x010403d6; const int R::string::autofill_address_line_1_label_re=0x01040350; const int R::string::autofill_address_line_1_re=0x0104034f; const int R::string::autofill_address_line_2_re=0x01040351; const int R::string::autofill_address_line_3_re=0x01040352; const int R::string::autofill_address_name_separator=0x01040348; const int R::string::autofill_address_summary_format=0x0104034b; const int R::string::autofill_address_summary_name_format=0x01040349; const int R::string::autofill_address_summary_separator=0x0104034a; const int R::string::autofill_address_type_same_as_re=0x01040358; const int R::string::autofill_address_type_use_my_re=0x01040359; const int R::string::autofill_area=0x0104037f; const int R::string::autofill_area_code_notext_re=0x01040372; const int R::string::autofill_area_code_re=0x01040365; const int R::string::autofill_attention_ignored_re=0x0104034c; const int R::string::autofill_billing_designator_re=0x0104035a; const int R::string::autofill_card_cvc_re=0x0104036b; const int R::string::autofill_card_ignored_re=0x0104036f; const int R::string::autofill_card_number_re=0x0104036c; const int R::string::autofill_city_re=0x01040356; const int R::string::autofill_company_re=0x0104034e; const int R::string::autofill_country_code_re=0x01040371; const int R::string::autofill_country_re=0x01040353; const int R::string::autofill_county=0x01040379; const int R::string::autofill_department=0x0104037c; const int R::string::autofill_district=0x0104037b; const int R::string::autofill_email_re=0x0104035c; const int R::string::autofill_emirate=0x01040380; const int R::string::autofill_expiration_date_re=0x0104036e; const int R::string::autofill_expiration_month_re=0x0104036d; const int R::string::autofill_fax_re=0x01040370; const int R::string::autofill_first_name_re=0x01040360; const int R::string::autofill_island=0x0104037a; const int R::string::autofill_last_name_re=0x01040363; const int R::string::autofill_middle_initial_re=0x01040361; const int R::string::autofill_middle_name_re=0x01040362; const int R::string::autofill_name_on_card_contextual_re=0x0104036a; const int R::string::autofill_name_on_card_re=0x01040369; const int R::string::autofill_name_re=0x0104035e; const int R::string::autofill_name_specific_re=0x0104035f; const int R::string::autofill_parish=0x0104037e; const int R::string::autofill_phone_extension_re=0x01040368; const int R::string::autofill_phone_prefix_re=0x01040366; const int R::string::autofill_phone_prefix_separator_re=0x01040373; const int R::string::autofill_phone_re=0x01040364; const int R::string::autofill_phone_suffix_re=0x01040367; const int R::string::autofill_phone_suffix_separator_re=0x01040374; const int R::string::autofill_postal_code=0x01040376; const int R::string::autofill_prefecture=0x0104037d; const int R::string::autofill_province=0x01040375; const int R::string::autofill_region_ignored_re=0x0104034d; const int R::string::autofill_shipping_designator_re=0x0104035b; const int R::string::autofill_state=0x01040377; const int R::string::autofill_state_re=0x01040357; const int R::string::autofill_this_form=0x01040346; const int R::string::autofill_username_re=0x0104035d; const int R::string::autofill_zip_4_re=0x01040355; const int R::string::autofill_zip_code=0x01040378; const int R::string::autofill_zip_code_re=0x01040354; const int R::string::back_button_label=0x010404b7; const int R::string::badPin=0x0104007e; const int R::string::badPuk=0x0104007f; const int R::string::beforeOneMonthDurationPast=0x010403a8; const int R::string::bluetooth_a2dp_audio_route_name=0x01040534; const int R::string::bugreport_message=0x010400e9; const int R::string::bugreport_title=0x010400e8; const int R::string::byteShort=0x0104006c; const int R::string::cancel=0x01040000; const int R::string::candidates_style=0x0104045f; const int R::string::capital_off=0x010403cc; const int R::string::capital_on=0x010403cb; const int R::string::car_mode_disable_notification_message=0x010404b4; const int R::string::car_mode_disable_notification_title=0x010404b3; const int R::string::cfTemplateForwarded=0x010400ba; const int R::string::cfTemplateForwardedTime=0x010400bb; const int R::string::cfTemplateNotForwarded=0x010400b9; const int R::string::cfTemplateRegistered=0x010400bc; const int R::string::cfTemplateRegisteredTime=0x010400bd; const int R::string::chooseActivity=0x010403d0; const int R::string::chooseUsbActivity=0x010403d1; const int R::string::choose_account_label=0x010404d8; const int R::string::chooser_wallpaper=0x010404a5; const int R::string::clearDefaultHintMsg=0x010403cf; const int R::string::common_last_name_prefixes=0x01040067; const int R::string::common_name=0x0104051a; const int R::string::common_name_conjunctions=0x01040068; const int R::string::common_name_prefixes=0x01040065; const int R::string::common_name_suffixes=0x01040066; const int R::string::config_datause_iface=0x0104001e; const int R::string::config_default_dns_server=0x0104001f; const int R::string::config_dreamsDefaultComponent=0x0104002c; const int R::string::config_ethernet_iface_regex=0x01040018; const int R::string::config_isoImagePath=0x01040025; const int R::string::config_ntpServer=0x01040026; const int R::string::config_tether_apndata=0x01040019; const int R::string::config_useragentprofile_url=0x01040024; const int R::string::config_wifi_p2p_device_type=0x0104001a; const int R::string::config_wimaxManagerClassname=0x01040029; const int R::string::config_wimaxNativeLibLocation=0x01040028; const int R::string::config_wimaxServiceClassname=0x0104002a; const int R::string::config_wimaxServiceJarLocation=0x01040027; const int R::string::config_wimaxStateTrackerClassname=0x0104002b; const int R::string::configure_input_methods=0x01040458; const int R::string::contentServiceSync=0x010400cf; const int R::string::contentServiceSyncNotificationTitle=0x010400d0; const int R::string::contentServiceTooManyDeletesNotificationDesc=0x010400d1; const int R::string::content_description_sliding_handle=0x010404f5; const int R::string::continue_to_enable_accessibility=0x01040566; const int R::string::copy=0x01040001; const int R::string::copyUrl=0x01040002; const int R::string::create_contact_using=0x01040499; const int R::string::cut=0x01040003; const int R::string::data_usage_3g_limit_snoozed_title=0x01040510; const int R::string::data_usage_3g_limit_title=0x0104050b; const int R::string::data_usage_4g_limit_snoozed_title=0x01040511; const int R::string::data_usage_4g_limit_title=0x0104050c; const int R::string::data_usage_limit_body=0x0104050f; const int R::string::data_usage_limit_snoozed_body=0x01040514; const int R::string::data_usage_mobile_limit_snoozed_title=0x01040512; const int R::string::data_usage_mobile_limit_title=0x0104050d; const int R::string::data_usage_restricted_body=0x01040516; const int R::string::data_usage_restricted_title=0x01040515; const int R::string::data_usage_warning_body=0x0104050a; const int R::string::data_usage_warning_title=0x01040509; const int R::string::data_usage_wifi_limit_snoozed_title=0x01040513; const int R::string::data_usage_wifi_limit_title=0x0104050e; const int R::string::date1_date2=0x01040042; const int R::string::date1_time1_date2_time2=0x0104004d; const int R::string::date_and_time=0x01040037; const int R::string::date_picker_decrement_day_button=0x010404e8; const int R::string::date_picker_decrement_month_button=0x010404e6; const int R::string::date_picker_decrement_year_button=0x010404ea; const int R::string::date_picker_dialog_title=0x01040430; const int R::string::date_picker_increment_day_button=0x010404e7; const int R::string::date_picker_increment_month_button=0x010404e5; const int R::string::date_picker_increment_year_button=0x010404e9; const int R::string::date_time=0x01040038; const int R::string::date_time_done=0x01040432; const int R::string::date_time_set=0x01040431; const int R::string::day=0x010403ae; const int R::string::days=0x010403af; const int R::string::db_default_journal_mode=0x01040021; const int R::string::db_default_sync_mode=0x01040022; const int R::string::db_wal_sync_mode=0x01040023; const int R::string::decline=0x01040413; const int R::string::defaultMsisdnAlphaTag=0x01040005; const int R::string::defaultVoiceMailAlphaTag=0x01040004; const int R::string::default_audio_route_category_name=0x01040533; const int R::string::default_audio_route_name=0x0104052f; const int R::string::default_audio_route_name_dock_speakers=0x01040531; const int R::string::default_audio_route_name_headphones=0x01040530; const int R::string::default_media_route_name_hdmi=0x01040532; const int R::string::default_text_encoding=0x01040069; const int R::string::default_wallpaper_component=0x0104001d; const int R::string::delete_=0x010403c2; const int R::string::deleteText=0x010403c5; const int R::string::deny=0x0104049e; const int R::string::description_direction_down=0x010404f7; const int R::string::description_direction_left=0x010404f8; const int R::string::description_direction_right=0x010404f9; const int R::string::description_direction_up=0x010404f6; const int R::string::description_target_camera=0x010404fb; const int R::string::description_target_search=0x010404fe; const int R::string::description_target_silent=0x010404fc; const int R::string::description_target_soundon=0x010404fd; const int R::string::description_target_unlock=0x010404fa; const int R::string::description_target_unlock_tablet=0x010404ff; const int R::string::dial_number_using=0x01040498; const int R::string::dialog_alert_title=0x01040014; const int R::string::display_manager_built_in_display_name=0x0104053b; const int R::string::display_manager_hdmi_display_name=0x0104053c; const int R::string::display_manager_overlay_display_name=0x0104053d; const int R::string::display_manager_overlay_display_title=0x0104053e; const int R::string::dlg_confirm_kill_storage_users_text=0x01040449; const int R::string::dlg_confirm_kill_storage_users_title=0x01040448; const int R::string::dlg_error_title=0x0104044a; const int R::string::dlg_ok=0x0104044b; const int R::string::double_tap_toast=0x01040345; const int R::string::editTextMenuTitle=0x010403c7; const int R::string::elapsed_time_short_format_h_mm_ss=0x010403c0; const int R::string::elapsed_time_short_format_mm_ss=0x010403bf; const int R::string::ellipsis=0x01040073; const int R::string::ellipsis_two_dots=0x01040074; const int R::string::emailTypeCustom=0x010402af; const int R::string::emailTypeHome=0x010402b0; const int R::string::emailTypeMobile=0x010402b3; const int R::string::emailTypeOther=0x010402b2; const int R::string::emailTypeWork=0x010402b1; const int R::string::emergency_call_dialog_number_for_display=0x010402e5; const int R::string::emergency_calls_only=0x01040300; const int R::string::emptyPhoneNumber=0x01040006; const int R::string::enable_accessibility_canceled=0x01040568; const int R::string::enable_explore_by_touch_warning_message=0x010403a6; const int R::string::enable_explore_by_touch_warning_title=0x010403a5; const int R::string::eventTypeAnniversary=0x010402ad; const int R::string::eventTypeBirthday=0x010402ac; const int R::string::eventTypeCustom=0x010402ab; const int R::string::eventTypeOther=0x010402ae; const int R::string::expires_on=0x01040520; const int R::string::ext2_media_badremoval_notification_message=0x0104047a; const int R::string::ext2_media_badremoval_notification_title=0x01040477; const int R::string::ext2_media_checking_notification_message=0x01040465; const int R::string::ext2_media_checking_notification_title=0x01040461; const int R::string::ext2_media_nofs_notification_message=0x0104046b; const int R::string::ext2_media_nofs_notification_title=0x01040467; const int R::string::ext2_media_nomedia_notification_message=0x01040486; const int R::string::ext2_media_nomedia_notification_title=0x01040483; const int R::string::ext2_media_safe_unmount_notification_message=0x01040480; const int R::string::ext2_media_safe_unmount_notification_title=0x0104047d; const int R::string::ext2_media_unmountable_notification_message=0x01040473; const int R::string::ext2_media_unmountable_notification_title=0x0104046f; const int R::string::ext_media_badremoval_notification_message=0x01040479; const int R::string::ext_media_badremoval_notification_title=0x01040476; const int R::string::ext_media_checking_notification_message=0x01040464; const int R::string::ext_media_checking_notification_title=0x01040460; const int R::string::ext_media_nofs_notification_message=0x0104046a; const int R::string::ext_media_nofs_notification_title=0x01040466; const int R::string::ext_media_nomedia_notification_message=0x01040485; const int R::string::ext_media_nomedia_notification_title=0x01040482; const int R::string::ext_media_safe_unmount_notification_message=0x0104047f; const int R::string::ext_media_safe_unmount_notification_title=0x0104047c; const int R::string::ext_media_unmountable_notification_message=0x01040472; const int R::string::ext_media_unmountable_notification_title=0x0104046e; const int R::string::external_storage_unplug_notification_message=0x01040443; const int R::string::external_storage_unplug_notification_title=0x01040442; const int R::string::extmedia_format_button_format=0x01040453; const int R::string::extmedia_format_message=0x01040452; const int R::string::extmedia_format_title=0x01040451; const int R::string::extract_edit_menu_button=0x01040508; const int R::string::faceunlock_multiple_failures=0x010402f0; const int R::string::factorytest_failed=0x0104033b; const int R::string::factorytest_no_action=0x0104033d; const int R::string::factorytest_not_system=0x0104033c; const int R::string::factorytest_reboot=0x0104033e; const int R::string::fast_scroll_alphabet=0x0104045d; const int R::string::fast_scroll_numeric_alphabet=0x0104045e; const int R::string::fcComplete=0x010400be; const int R::string::fcError=0x010400bf; const int R::string::fileSizeSuffix=0x01040072; const int R::string::find=0x010404ca; const int R::string::find_next=0x010404cc; const int R::string::find_on_page=0x010404bf; const int R::string::find_previous=0x010404cd; const int R::string::fingerprints=0x01040522; const int R::string::force_close=0x010403db; const int R::string::format_error=0x010404c3; const int R::string::full_wday_month_day_no_year=0x01040062; const int R::string::gadget_host_error_inflating=0x01040490; const int R::string::gigabyteShort=0x0104006f; const int R::string::global_action_bug_report=0x010400e7; const int R::string::global_action_lock=0x010400e5; const int R::string::global_action_power_off=0x010400e6; const int R::string::global_action_silent_mode_off_status=0x010400ec; const int R::string::global_action_silent_mode_on_status=0x010400eb; const int R::string::global_action_toggle_silent_mode=0x010400ea; const int R::string::global_actions=0x010400e4; const int R::string::global_actions_airplane_mode_off_status=0x010400ef; const int R::string::global_actions_airplane_mode_on_status=0x010400ee; const int R::string::global_actions_toggle_airplane_mode=0x010400ed; const int R::string::gpsNotifMessage=0x010404d0; const int R::string::gpsNotifTicker=0x010404ce; const int R::string::gpsNotifTitle=0x010404cf; const int R::string::gpsVerifNo=0x010404d2; const int R::string::gpsVerifYes=0x010404d1; const int R::string::grant_credentials_permission_message_footer=0x0104049b; const int R::string::grant_credentials_permission_message_header=0x0104049a; const int R::string::grant_permissions_header_text=0x0104049c; const int R::string::granularity_label_character=0x01040335; const int R::string::granularity_label_line=0x01040338; const int R::string::granularity_label_link=0x01040337; const int R::string::granularity_label_word=0x01040336; const int R::string::gsm_alphabet_default_charset=0x01040020; const int R::string::hardware=0x0104045a; const int R::string::heavy_weight_notification=0x010403eb; const int R::string::heavy_weight_notification_detail=0x010403ec; const int R::string::heavy_weight_switcher_text=0x010403ee; const int R::string::heavy_weight_switcher_title=0x010403ed; const int R::string::hour=0x010403b0; const int R::string::hour_ampm=0x01040339; const int R::string::hour_cap_ampm=0x0104033a; const int R::string::hour_minute_24=0x0104002d; const int R::string::hour_minute_ampm=0x0104002e; const int R::string::hour_minute_cap_ampm=0x0104002f; const int R::string::hours=0x010403b1; const int R::string::httpError=0x010400c1; const int R::string::httpErrorAuth=0x010400c4; const int R::string::httpErrorBadUrl=0x01040007; const int R::string::httpErrorConnect=0x010400c6; const int R::string::httpErrorFailedSslHandshake=0x010400ca; const int R::string::httpErrorFile=0x010400cb; const int R::string::httpErrorFileNotFound=0x010400cc; const int R::string::httpErrorIO=0x010400c7; const int R::string::httpErrorLookup=0x010400c2; const int R::string::httpErrorOk=0x010400c0; const int R::string::httpErrorProxyAuth=0x010400c5; const int R::string::httpErrorRedirectLoop=0x010400c9; const int R::string::httpErrorTimeout=0x010400c8; const int R::string::httpErrorTooManyRequests=0x010400cd; const int R::string::httpErrorUnsupportedAuthScheme=0x010400c3; const int R::string::httpErrorUnsupportedScheme=0x01040008; const int R::string::imProtocolAim=0x010402bd; const int R::string::imProtocolCustom=0x010402bc; const int R::string::imProtocolGoogleTalk=0x010402c2; const int R::string::imProtocolIcq=0x010402c3; const int R::string::imProtocolJabber=0x010402c4; const int R::string::imProtocolMsn=0x010402be; const int R::string::imProtocolNetMeeting=0x010402c5; const int R::string::imProtocolQq=0x010402c1; const int R::string::imProtocolSkype=0x010402c0; const int R::string::imProtocolYahoo=0x010402bf; const int R::string::imTypeCustom=0x010402b8; const int R::string::imTypeHome=0x010402b9; const int R::string::imTypeOther=0x010402bb; const int R::string::imTypeWork=0x010402ba; const int R::string::ime_action_default=0x01040497; const int R::string::ime_action_done=0x01040495; const int R::string::ime_action_go=0x01040491; const int R::string::ime_action_next=0x01040494; const int R::string::ime_action_previous=0x01040496; const int R::string::ime_action_search=0x01040492; const int R::string::ime_action_send=0x01040493; const int R::string::imei=0x01040085; const int R::string::inputMethod=0x010403c6; const int R::string::input_method_binding_label=0x010404a1; const int R::string::int_media_checking_notification_title=0x01040462; const int R::string::int_media_nofs_notification_message=0x0104046c; const int R::string::int_media_nofs_notification_title=0x01040468; const int R::string::int_media_unmountable_notification_message=0x01040474; const int R::string::int_media_unmountable_notification_title=0x01040470; const int R::string::invalidPin=0x01040081; const int R::string::invalidPuk=0x01040082; const int R::string::issued_by=0x0104051d; const int R::string::issued_on=0x0104051f; const int R::string::issued_to=0x01040519; const int R::string::js_dialog_before_unload=0x01040343; const int R::string::js_dialog_title=0x01040341; const int R::string::js_dialog_title_default=0x01040342; const int R::string::keyboard_headset_required_to_hear_password=0x01040500; const int R::string::keyboard_password_character_no_headset=0x01040501; const int R::string::keyboardview_keycode_alt=0x010404eb; const int R::string::keyboardview_keycode_cancel=0x010404ec; const int R::string::keyboardview_keycode_delete=0x010404ed; const int R::string::keyboardview_keycode_done=0x010404ee; const int R::string::keyboardview_keycode_enter=0x010404f1; const int R::string::keyboardview_keycode_mode_change=0x010404ef; const int R::string::keyboardview_keycode_shift=0x010404f0; const int R::string::keygaurd_accessibility_media_controls=0x01040326; const int R::string::keyguard_accessibility_add_widget=0x0104031e; const int R::string::keyguard_accessibility_camera=0x01040325; const int R::string::keyguard_accessibility_expand_lock_area=0x0104032a; const int R::string::keyguard_accessibility_face_unlock=0x0104032d; const int R::string::keyguard_accessibility_password_unlock=0x0104032f; const int R::string::keyguard_accessibility_pattern_area=0x01040330; const int R::string::keyguard_accessibility_pattern_unlock=0x0104032c; const int R::string::keyguard_accessibility_pin_unlock=0x0104032e; const int R::string::keyguard_accessibility_slide_area=0x01040331; const int R::string::keyguard_accessibility_slide_unlock=0x0104032b; const int R::string::keyguard_accessibility_status=0x01040324; const int R::string::keyguard_accessibility_unlock_area_collapsed=0x01040321; const int R::string::keyguard_accessibility_unlock_area_expanded=0x01040320; const int R::string::keyguard_accessibility_user_selector=0x01040323; const int R::string::keyguard_accessibility_widget=0x01040322; const int R::string::keyguard_accessibility_widget_deleted=0x01040329; const int R::string::keyguard_accessibility_widget_empty_slot=0x0104031f; const int R::string::keyguard_accessibility_widget_reorder_end=0x01040328; const int R::string::keyguard_accessibility_widget_reorder_start=0x01040327; const int R::string::keyguard_label_text=0x010402e4; const int R::string::keyguard_password_enter_password_code=0x010402e1; const int R::string::keyguard_password_enter_pin_code=0x010402dc; const int R::string::keyguard_password_enter_pin_password_code=0x010402e2; const int R::string::keyguard_password_enter_pin_prompt=0x010402df; const int R::string::keyguard_password_enter_puk_code=0x010402dd; const int R::string::keyguard_password_enter_puk_prompt=0x010402de; const int R::string::keyguard_password_entry_touch_hint=0x010402e0; const int R::string::keyguard_password_wrong_pin_code=0x010402e3; const int R::string::kg_emergency_call_label=0x01040542; const int R::string::kg_enter_confirm_pin_hint=0x0104054e; const int R::string::kg_failed_attempts_almost_at_login=0x01040562; const int R::string::kg_failed_attempts_almost_at_wipe=0x01040560; const int R::string::kg_failed_attempts_now_wiping=0x01040561; const int R::string::kg_forgot_pattern_button_text=0x01040543; const int R::string::kg_invalid_confirm_pin_hint=0x01040554; const int R::string::kg_invalid_puk=0x01040553; const int R::string::kg_invalid_sim_pin_hint=0x01040551; const int R::string::kg_invalid_sim_puk_hint=0x01040552; const int R::string::kg_login_account_recovery_hint=0x0104055b; const int R::string::kg_login_checking_password=0x0104055c; const int R::string::kg_login_instructions=0x01040556; const int R::string::kg_login_invalid_input=0x0104055a; const int R::string::kg_login_password_hint=0x01040558; const int R::string::kg_login_submit_button=0x01040559; const int R::string::kg_login_too_many_attempts=0x01040555; const int R::string::kg_login_username_hint=0x01040557; const int R::string::kg_password_instructions=0x0104054b; const int R::string::kg_password_wrong_pin_code=0x01040550; const int R::string::kg_pattern_instructions=0x01040548; const int R::string::kg_pin_instructions=0x0104054a; const int R::string::kg_puk_enter_pin_hint=0x0104054d; const int R::string::kg_puk_enter_puk_hint=0x0104054c; const int R::string::kg_reordering_delete_drop_target_text=0x01040564; const int R::string::kg_sim_pin_instructions=0x01040549; const int R::string::kg_sim_unlock_progress_dialog_message=0x0104054f; const int R::string::kg_text_message_separator=0x01040563; const int R::string::kg_too_many_failed_attempts_countdown=0x01040547; const int R::string::kg_too_many_failed_password_attempts_dialog_message=0x0104055e; const int R::string::kg_too_many_failed_pattern_attempts_dialog_message=0x0104055f; const int R::string::kg_too_many_failed_pin_attempts_dialog_message=0x0104055d; const int R::string::kg_wrong_password=0x01040545; const int R::string::kg_wrong_pattern=0x01040544; const int R::string::kg_wrong_pin=0x01040546; const int R::string::kilobyteShort=0x0104006d; const int R::string::last_month=0x010403a9; const int R::string::launchBrowserDefault=0x0104052b; const int R::string::launch_warning_original=0x010403e1; const int R::string::launch_warning_replace=0x010403e0; const int R::string::launch_warning_title=0x010403df; const int R::string::list_delimeter=0x01040529; const int R::string::loading=0x010403ca; const int R::string::locale_replacement=0x01040456; const int R::string::lock_pattern_view_aspect=0x0104006a; const int R::string::lockscreen_access_pattern_cell_added=0x0104031c; const int R::string::lockscreen_access_pattern_cleared=0x0104031b; const int R::string::lockscreen_access_pattern_detected=0x0104031d; const int R::string::lockscreen_access_pattern_start=0x0104031a; const int R::string::lockscreen_battery_short=0x010402f3; const int R::string::lockscreen_carrier_default=0x010402e6; const int R::string::lockscreen_charged=0x010402f2; const int R::string::lockscreen_emergency_call=0x010402eb; const int R::string::lockscreen_failed_attempts_almost_at_wipe=0x0104030a; const int R::string::lockscreen_failed_attempts_almost_glogin=0x01040309; const int R::string::lockscreen_failed_attempts_now_wiping=0x0104030b; const int R::string::lockscreen_forgot_pattern_button_text=0x0104030d; const int R::string::lockscreen_glogin_account_recovery_hint=0x01040315; const int R::string::lockscreen_glogin_checking_password=0x01040316; const int R::string::lockscreen_glogin_forgot_pattern=0x0104030e; const int R::string::lockscreen_glogin_instructions=0x01040310; const int R::string::lockscreen_glogin_invalid_input=0x01040314; const int R::string::lockscreen_glogin_password_hint=0x01040312; const int R::string::lockscreen_glogin_submit_button=0x01040313; const int R::string::lockscreen_glogin_too_many_attempts=0x0104030f; const int R::string::lockscreen_glogin_username_hint=0x01040311; const int R::string::lockscreen_instructions_when_pattern_disabled=0x010402e9; const int R::string::lockscreen_instructions_when_pattern_enabled=0x010402e8; const int R::string::lockscreen_low_battery=0x010402f4; const int R::string::lockscreen_missing_sim_instructions=0x010402f7; const int R::string::lockscreen_missing_sim_instructions_long=0x010402f8; const int R::string::lockscreen_missing_sim_message=0x010402f6; const int R::string::lockscreen_missing_sim_message_short=0x010402f5; const int R::string::lockscreen_network_locked_message=0x01040301; const int R::string::lockscreen_password_wrong=0x010402ef; const int R::string::lockscreen_pattern_correct=0x010402ed; const int R::string::lockscreen_pattern_instructions=0x010402ea; const int R::string::lockscreen_pattern_wrong=0x010402ee; const int R::string::lockscreen_permanent_disabled_sim_instructions=0x010402fa; const int R::string::lockscreen_permanent_disabled_sim_message_short=0x010402f9; const int R::string::lockscreen_plugged_in=0x010402f1; const int R::string::lockscreen_return_to_call=0x010402ec; const int R::string::lockscreen_screen_locked=0x010402e7; const int R::string::lockscreen_sim_locked_message=0x01040304; const int R::string::lockscreen_sim_puk_locked_instructions=0x01040303; const int R::string::lockscreen_sim_puk_locked_message=0x01040302; const int R::string::lockscreen_sim_unlock_progress_dialog_message=0x01040305; const int R::string::lockscreen_sound_off_label=0x01040319; const int R::string::lockscreen_sound_on_label=0x01040318; const int R::string::lockscreen_too_many_failed_attempts_countdown=0x0104030c; const int R::string::lockscreen_too_many_failed_attempts_dialog_message=0x01040306; const int R::string::lockscreen_too_many_failed_password_attempts_dialog_message=0x01040307; const int R::string::lockscreen_too_many_failed_pin_attempts_dialog_message=0x01040308; const int R::string::lockscreen_transport_next_description=0x010402fc; const int R::string::lockscreen_transport_pause_description=0x010402fd; const int R::string::lockscreen_transport_play_description=0x010402fe; const int R::string::lockscreen_transport_prev_description=0x010402fb; const int R::string::lockscreen_transport_stop_description=0x010402ff; const int R::string::lockscreen_unlock_label=0x01040317; const int R::string::low_internal_storage_view_text=0x010403c9; const int R::string::low_internal_storage_view_title=0x010403c8; const int R::string::low_memory=0x010400d2; const int R::string::me=0x010400d3; const int R::string::media_bad_removal=0x010404c4; const int R::string::media_checking=0x010404c5; const int R::string::media_removed=0x010404c6; const int R::string::media_route_button_content_description=0x01040536; const int R::string::media_route_chooser_grouping_done=0x01040535; const int R::string::media_route_status_available=0x01040539; const int R::string::media_route_status_connecting=0x01040538; const int R::string::media_route_status_not_available=0x0104053a; const int R::string::media_route_status_scanning=0x01040537; const int R::string::media_shared=0x010404c7; const int R::string::media_unknown_state=0x010404c8; const int R::string::megabyteShort=0x0104006e; const int R::string::meid=0x01040086; const int R::string::menu_delete_shortcut_label=0x0104039f; const int R::string::menu_enter_shortcut_label=0x0104039e; const int R::string::menu_space_shortcut_label=0x0104039d; const int R::string::midnight=0x010403bd; const int R::string::minute=0x010403b2; const int R::string::minutes=0x010403b3; const int R::string::mismatchPin=0x01040080; const int R::string::mmiComplete=0x0104007d; const int R::string::mmiError=0x01040075; const int R::string::mmiFdnError=0x01040076; const int R::string::month=0x0104003c; const int R::string::month_day=0x0104003b; const int R::string::month_day_year=0x01040035; const int R::string::month_year=0x0104003d; const int R::string::more_item_label=0x0104039b; const int R::string::needPuk=0x01040083; const int R::string::needPuk2=0x01040084; const int R::string::network_available_sign_in=0x01040408; const int R::string::network_available_sign_in_detailed=0x01040409; const int R::string::new_app_action=0x010403f1; const int R::string::new_app_description=0x010403f2; const int R::string::next_button_label=0x010404b8; const int R::string::no=0x01040009; const int R::string::noApplications=0x010403d2; const int R::string::no_file_chosen=0x010404b0; const int R::string::no_matches=0x010404be; const int R::string::no_permissions=0x01040435; const int R::string::no_recent_tasks=0x010400e3; const int R::string::noon=0x010403bb; const int R::string::notification_title=0x010400ce; const int R::string::number_picker_decrement_button=0x010404dc; const int R::string::number_picker_increment_button=0x010404db; const int R::string::number_picker_increment_scroll_action=0x010404de; const int R::string::number_picker_increment_scroll_mode=0x010404dd; const int R::string::numeric_date=0x01040032; const int R::string::numeric_date_format=0x01040033; const int R::string::numeric_date_template=0x01040034; const int R::string::numeric_md1_md2=0x01040043; const int R::string::numeric_md1_time1_md2_time2=0x01040048; const int R::string::numeric_mdy1_mdy2=0x01040045; const int R::string::numeric_mdy1_time1_mdy2_time2=0x0104004a; const int R::string::numeric_wday1_md1_time1_wday2_md2_time2=0x01040049; const int R::string::numeric_wday1_md1_wday2_md2=0x01040044; const int R::string::numeric_wday1_mdy1_time1_wday2_mdy2_time2=0x01040047; const int R::string::numeric_wday1_mdy1_wday2_mdy2=0x01040046; const int R::string::ok=0x0104000a; const int R::string::old_app_action=0x010403ef; const int R::string::old_app_description=0x010403f0; const int R::string::older=0x010403aa; const int R::string::oneMonthDurationPast=0x010403a7; const int R::string::open_permission_deny=0x01040399; const int R::string::orgTypeCustom=0x010402c8; const int R::string::orgTypeOther=0x010402c7; const int R::string::orgTypeWork=0x010402c6; const int R::string::org_name=0x0104051b; const int R::string::org_unit=0x0104051c; const int R::string::other_ext_media_badremoval_notification_message=0x0104047b; const int R::string::other_ext_media_badremoval_notification_title=0x01040478; const int R::string::other_ext_media_checking_notification_title=0x01040463; const int R::string::other_ext_media_nofs_notification_message=0x0104046d; const int R::string::other_ext_media_nofs_notification_title=0x01040469; const int R::string::other_ext_media_nomedia_notification_message=0x01040487; const int R::string::other_ext_media_nomedia_notification_title=0x01040484; const int R::string::other_ext_media_safe_unmount_notification_message=0x01040481; const int R::string::other_ext_media_safe_unmount_notification_title=0x0104047e; const int R::string::other_ext_media_unmountable_notification_message=0x01040475; const int R::string::other_ext_media_unmountable_notification_title=0x01040471; const int R::string::owner_name=0x0104056a; const int R::string::passwordIncorrect=0x0104007c; const int R::string::password_keyboard_label_alpha_key=0x01040333; const int R::string::password_keyboard_label_alt_key=0x01040334; const int R::string::password_keyboard_label_symbol_key=0x01040332; const int R::string::paste=0x0104000b; const int R::string::perm_costs_money=0x01040436; const int R::string::permdesc_accessCoarseLocation=0x010401ef; const int R::string::permdesc_accessContentProvidersExternally=0x01040392; const int R::string::permdesc_accessFineLocation=0x010401ed; const int R::string::permdesc_accessLocationExtraCommands=0x010401e9; const int R::string::permdesc_accessMockLocation=0x010401e7; const int R::string::permdesc_accessMtp=0x01040217; const int R::string::permdesc_accessNetworkState=0x01040245; const int R::string::permdesc_accessSurfaceFlinger=0x010401f1; const int R::string::permdesc_accessWifiState=0x01040251; const int R::string::permdesc_accessWimaxState=0x01040259; const int R::string::permdesc_accountManagerService=0x0104023b; const int R::string::permdesc_addVoicemail=0x01040388; const int R::string::permdesc_anyCodecForPlayback=0x010401bf; const int R::string::permdesc_asec_access=0x01040207; const int R::string::permdesc_asec_create=0x01040209; const int R::string::permdesc_asec_destroy=0x0104020b; const int R::string::permdesc_asec_mount_unmount=0x0104020d; const int R::string::permdesc_asec_rename=0x0104020f; const int R::string::permdesc_authenticateAccounts=0x0104023f; const int R::string::permdesc_backup=0x01040185; const int R::string::permdesc_batteryStats=0x01040181; const int R::string::permdesc_bindAccessibilityService=0x01040199; const int R::string::permdesc_bindDeviceAdmin=0x010401a3; const int R::string::permdesc_bindGadget=0x01040225; const int R::string::permdesc_bindInputMethod=0x01040197; const int R::string::permdesc_bindPackageVerifier=0x0104038e; const int R::string::permdesc_bindRemoteViews=0x010401a1; const int R::string::permdesc_bindTextService=0x0104019b; const int R::string::permdesc_bindVpnService=0x0104019d; const int R::string::permdesc_bindWallpaper=0x0104019f; const int R::string::permdesc_bluetooth=0x0104025d; const int R::string::permdesc_bluetoothAdmin=0x01040257; const int R::string::permdesc_brick=0x010401ff; const int R::string::permdesc_broadcastPackageRemoved=0x01040177; const int R::string::permdesc_broadcastSmsReceived=0x01040179; const int R::string::permdesc_broadcastSticky=0x010401d1; const int R::string::permdesc_broadcastWapPush=0x0104017b; const int R::string::permdesc_cache_filesystem=0x01040279; const int R::string::permdesc_callPhone=0x0104021b; const int R::string::permdesc_callPrivileged=0x0104021d; const int R::string::permdesc_camera=0x010401fd; const int R::string::permdesc_changeBackgroundDataSetting=0x0104024f; const int R::string::permdesc_changeComponentState=0x010401c3; const int R::string::permdesc_changeConfiguration=0x0104015b; const int R::string::permdesc_changeNetworkState=0x0104024b; const int R::string::permdesc_changeTetherState=0x0104024d; const int R::string::permdesc_changeWifiMulticastState=0x01040255; const int R::string::permdesc_changeWifiState=0x01040253; const int R::string::permdesc_changeWimaxState=0x0104025b; const int R::string::permdesc_checkinProperties=0x01040223; const int R::string::permdesc_clearAppCache=0x010401b9; const int R::string::permdesc_clearAppUserData=0x010401b1; const int R::string::permdesc_configureWifiDisplay=0x010401f5; const int R::string::permdesc_confirm_full_backup=0x01040187; const int R::string::permdesc_controlWifiDisplay=0x010401f7; const int R::string::permdesc_copyProtectedData=0x0104048c; const int R::string::permdesc_createNetworkSockets=0x01040247; const int R::string::permdesc_deleteCacheFiles=0x010401b3; const int R::string::permdesc_deletePackages=0x010401af; const int R::string::permdesc_devicePower=0x0104022d; const int R::string::permdesc_diagnostic=0x010401c1; const int R::string::permdesc_disableKeyguard=0x01040261; const int R::string::permdesc_dump=0x01040165; const int R::string::permdesc_enableCarMode=0x0104015d; const int R::string::permdesc_expandStatusBar=0x01040131; const int R::string::permdesc_factoryTest=0x0104022f; const int R::string::permdesc_filter_events=0x0104016d; const int R::string::permdesc_flashlight=0x01040213; const int R::string::permdesc_forceBack=0x01040163; const int R::string::permdesc_forceStopPackages=0x01040161; const int R::string::permdesc_freezeScreen=0x01040191; const int R::string::permdesc_getAccounts=0x0104023d; const int R::string::permdesc_getDetailedTasks=0x0104014f; const int R::string::permdesc_getPackageSize=0x010401b5; const int R::string::permdesc_getTasks=0x01040147; const int R::string::permdesc_grantRevokePermissions=0x010401c5; const int R::string::permdesc_hardware_test=0x01040219; const int R::string::permdesc_injectEvents=0x01040193; const int R::string::permdesc_installLocationProvider=0x010401eb; const int R::string::permdesc_installPackages=0x010401b7; const int R::string::permdesc_interactAcrossUsers=0x01040149; const int R::string::permdesc_interactAcrossUsersFull=0x0104014b; const int R::string::permdesc_internalSystemWindow=0x01040189; const int R::string::permdesc_killBackgroundProcesses=0x0104015f; const int R::string::permdesc_locationUpdates=0x01040221; const int R::string::permdesc_magnify_display=0x0104016f; const int R::string::permdesc_manageAccounts=0x01040241; const int R::string::permdesc_manageAppTokens=0x0104018f; const int R::string::permdesc_manageNetworkPolicy=0x0104027f; const int R::string::permdesc_manageUsb=0x01040215; const int R::string::permdesc_manageUsers=0x0104014d; const int R::string::permdesc_masterClear=0x01040235; const int R::string::permdesc_mediaStorageWrite=0x01040275; const int R::string::permdesc_modifyAudioSettings=0x010401f9; const int R::string::permdesc_modifyNetworkAccounting=0x01040281; const int R::string::permdesc_modifyPhoneState=0x01040227; const int R::string::permdesc_mount_format_filesystems=0x01040205; const int R::string::permdesc_mount_unmount_filesystems=0x01040203; const int R::string::permdesc_movePackage=0x010401bb; const int R::string::permdesc_nfc=0x0104025f; const int R::string::permdesc_packageVerificationAgent=0x0104038c; const int R::string::permdesc_performCdmaProvisioning=0x0104021f; const int R::string::permdesc_persistentActivity=0x010401ad; const int R::string::permdesc_pkgUsageStats=0x0104048a; const int R::string::permdesc_processOutgoingCalls=0x01040133; const int R::string::permdesc_readCalendar=0x010401e3; const int R::string::permdesc_readCallLog=0x010401d7; const int R::string::permdesc_readCellBroadcasts=0x0104013b; const int R::string::permdesc_readContacts=0x010401d3; const int R::string::permdesc_readDictionary=0x0104026d; const int R::string::permdesc_readFrameBuffer=0x010401f3; const int R::string::permdesc_readHistoryBookmarks=0x01040382; const int R::string::permdesc_readInputState=0x01040195; const int R::string::permdesc_readLogs=0x010401bd; const int R::string::permdesc_readNetworkUsageHistory=0x0104027d; const int R::string::permdesc_readPhoneState=0x01040229; const int R::string::permdesc_readProfile=0x010401db; const int R::string::permdesc_readSms=0x01040141; const int R::string::permdesc_readSocialStream=0x010401df; const int R::string::permdesc_readSyncSettings=0x01040263; const int R::string::permdesc_readSyncStats=0x01040267; const int R::string::permdesc_reboot=0x01040201; const int R::string::permdesc_receiveBootCompleted=0x010401cf; const int R::string::permdesc_receiveEmergencyBroadcast=0x01040139; const int R::string::permdesc_receiveMms=0x01040137; const int R::string::permdesc_receiveSms=0x01040135; const int R::string::permdesc_receiveWapPush=0x01040145; const int R::string::permdesc_recordAudio=0x010401fb; const int R::string::permdesc_removeTasks=0x01040153; const int R::string::permdesc_reorderTasks=0x01040151; const int R::string::permdesc_retrieve_window_content=0x01040167; const int R::string::permdesc_retrieve_window_info=0x0104016b; const int R::string::permdesc_route_media_output=0x0104048e; const int R::string::permdesc_runSetActivityWatcher=0x01040175; const int R::string::permdesc_sdcardAccessAll=0x01040277; const int R::string::permdesc_sdcardRead=0x01040271; const int R::string::permdesc_sdcardWrite=0x01040273; const int R::string::permdesc_sendSms=0x0104013d; const int R::string::permdesc_sendSmsNoConfirmation=0x0104013f; const int R::string::permdesc_serialPort=0x01040390; const int R::string::permdesc_setAlarm=0x01040386; const int R::string::permdesc_setAlwaysFinish=0x0104017f; const int R::string::permdesc_setAnimationScale=0x0104018d; const int R::string::permdesc_setDebugApp=0x01040159; const int R::string::permdesc_setKeyboardLayout=0x010401a9; const int R::string::permdesc_setOrientation=0x010401a5; const int R::string::permdesc_setPointerSpeed=0x010401a7; const int R::string::permdesc_setPreferredApplications=0x010401c7; const int R::string::permdesc_setProcessLimit=0x0104017d; const int R::string::permdesc_setScreenCompatibility=0x01040157; const int R::string::permdesc_setTime=0x01040237; const int R::string::permdesc_setTimeZone=0x01040239; const int R::string::permdesc_setWallpaper=0x01040231; const int R::string::permdesc_setWallpaperHints=0x01040233; const int R::string::permdesc_shutdown=0x01040171; const int R::string::permdesc_signalPersistentProcesses=0x010401ab; const int R::string::permdesc_startAnyActivity=0x01040155; const int R::string::permdesc_statusBar=0x0104012d; const int R::string::permdesc_statusBarService=0x0104012f; const int R::string::permdesc_stopAppSwitches=0x01040173; const int R::string::permdesc_subscribedFeedsRead=0x01040269; const int R::string::permdesc_subscribedFeedsWrite=0x0104026b; const int R::string::permdesc_systemAlertWindow=0x0104018b; const int R::string::permdesc_temporary_enable_accessibility=0x01040169; const int R::string::permdesc_updateBatteryStats=0x01040183; const int R::string::permdesc_updateLock=0x01040394; const int R::string::permdesc_useCredentials=0x01040243; const int R::string::permdesc_use_sip=0x0104027b; const int R::string::permdesc_vibrate=0x01040211; const int R::string::permdesc_wakeLock=0x0104022b; const int R::string::permdesc_writeApnSettings=0x01040249; const int R::string::permdesc_writeCalendar=0x010401e5; const int R::string::permdesc_writeCallLog=0x010401d9; const int R::string::permdesc_writeContacts=0x010401d5; const int R::string::permdesc_writeDictionary=0x0104026f; const int R::string::permdesc_writeGeolocationPermissions=0x0104038a; const int R::string::permdesc_writeGservices=0x010401cd; const int R::string::permdesc_writeHistoryBookmarks=0x01040384; const int R::string::permdesc_writeProfile=0x010401dd; const int R::string::permdesc_writeSecureSettings=0x010401cb; const int R::string::permdesc_writeSettings=0x010401c9; const int R::string::permdesc_writeSms=0x01040143; const int R::string::permdesc_writeSocialStream=0x010401e1; const int R::string::permdesc_writeSyncSettings=0x01040265; const int R::string::permgroupdesc_accounts=0x0104011f; const int R::string::permgroupdesc_affectsBattery=0x01040103; const int R::string::permgroupdesc_appInfo=0x01040115; const int R::string::permgroupdesc_audioSettings=0x01040101; const int R::string::permgroupdesc_bluetoothNetwork=0x010400ff; const int R::string::permgroupdesc_bookmarks=0x0104010b; const int R::string::permgroupdesc_calendar=0x01040105; const int R::string::permgroupdesc_camera=0x01040113; const int R::string::permgroupdesc_costMoney=0x010400f3; const int R::string::permgroupdesc_developmentTools=0x01040127; const int R::string::permgroupdesc_deviceAlarms=0x0104010d; const int R::string::permgroupdesc_dictionary=0x01040107; const int R::string::permgroupdesc_display=0x01040129; const int R::string::permgroupdesc_hardwareControls=0x01040121; const int R::string::permgroupdesc_location=0x010400fb; const int R::string::permgroupdesc_messages=0x010400f5; const int R::string::permgroupdesc_microphone=0x01040111; const int R::string::permgroupdesc_network=0x010400fd; const int R::string::permgroupdesc_personalInfo=0x010400f7; const int R::string::permgroupdesc_phoneCalls=0x01040123; const int R::string::permgroupdesc_socialInfo=0x010400f9; const int R::string::permgroupdesc_statusBar=0x0104011b; const int R::string::permgroupdesc_storage=0x0104012b; const int R::string::permgroupdesc_syncSettings=0x0104011d; const int R::string::permgroupdesc_systemClock=0x01040119; const int R::string::permgroupdesc_systemTools=0x01040125; const int R::string::permgroupdesc_voicemail=0x0104010f; const int R::string::permgroupdesc_wallpaper=0x01040117; const int R::string::permgroupdesc_writeDictionary=0x01040109; const int R::string::permgrouplab_accounts=0x0104011e; const int R::string::permgrouplab_affectsBattery=0x01040102; const int R::string::permgrouplab_appInfo=0x01040114; const int R::string::permgrouplab_audioSettings=0x01040100; const int R::string::permgrouplab_bluetoothNetwork=0x010400fe; const int R::string::permgrouplab_bookmarks=0x0104010a; const int R::string::permgrouplab_calendar=0x01040104; const int R::string::permgrouplab_camera=0x01040112; const int R::string::permgrouplab_costMoney=0x010400f2; const int R::string::permgrouplab_developmentTools=0x01040126; const int R::string::permgrouplab_deviceAlarms=0x0104010c; const int R::string::permgrouplab_dictionary=0x01040106; const int R::string::permgrouplab_display=0x01040128; const int R::string::permgrouplab_hardwareControls=0x01040120; const int R::string::permgrouplab_location=0x010400fa; const int R::string::permgrouplab_messages=0x010400f4; const int R::string::permgrouplab_microphone=0x01040110; const int R::string::permgrouplab_network=0x010400fc; const int R::string::permgrouplab_personalInfo=0x010400f6; const int R::string::permgrouplab_phoneCalls=0x01040122; const int R::string::permgrouplab_socialInfo=0x010400f8; const int R::string::permgrouplab_statusBar=0x0104011a; const int R::string::permgrouplab_storage=0x0104012a; const int R::string::permgrouplab_syncSettings=0x0104011c; const int R::string::permgrouplab_systemClock=0x01040118; const int R::string::permgrouplab_systemTools=0x01040124; const int R::string::permgrouplab_voicemail=0x0104010e; const int R::string::permgrouplab_wallpaper=0x01040116; const int R::string::permgrouplab_writeDictionary=0x01040108; const int R::string::permission_request_notification_title=0x0104049f; const int R::string::permission_request_notification_with_subtitle=0x010404a0; const int R::string::permlab_accessCoarseLocation=0x010401ee; const int R::string::permlab_accessContentProvidersExternally=0x01040391; const int R::string::permlab_accessFineLocation=0x010401ec; const int R::string::permlab_accessLocationExtraCommands=0x010401e8; const int R::string::permlab_accessMockLocation=0x010401e6; const int R::string::permlab_accessMtp=0x01040216; const int R::string::permlab_accessNetworkState=0x01040244; const int R::string::permlab_accessSurfaceFlinger=0x010401f0; const int R::string::permlab_accessWifiState=0x01040250; const int R::string::permlab_accessWimaxState=0x01040258; const int R::string::permlab_accountManagerService=0x0104023a; const int R::string::permlab_addVoicemail=0x01040387; const int R::string::permlab_anyCodecForPlayback=0x010401be; const int R::string::permlab_asec_access=0x01040206; const int R::string::permlab_asec_create=0x01040208; const int R::string::permlab_asec_destroy=0x0104020a; const int R::string::permlab_asec_mount_unmount=0x0104020c; const int R::string::permlab_asec_rename=0x0104020e; const int R::string::permlab_authenticateAccounts=0x0104023e; const int R::string::permlab_backup=0x01040184; const int R::string::permlab_batteryStats=0x01040180; const int R::string::permlab_bindAccessibilityService=0x01040198; const int R::string::permlab_bindDeviceAdmin=0x010401a2; const int R::string::permlab_bindGadget=0x01040224; const int R::string::permlab_bindInputMethod=0x01040196; const int R::string::permlab_bindPackageVerifier=0x0104038d; const int R::string::permlab_bindRemoteViews=0x010401a0; const int R::string::permlab_bindTextService=0x0104019a; const int R::string::permlab_bindVpnService=0x0104019c; const int R::string::permlab_bindWallpaper=0x0104019e; const int R::string::permlab_bluetooth=0x0104025c; const int R::string::permlab_bluetoothAdmin=0x01040256; const int R::string::permlab_brick=0x010401fe; const int R::string::permlab_broadcastPackageRemoved=0x01040176; const int R::string::permlab_broadcastSmsReceived=0x01040178; const int R::string::permlab_broadcastSticky=0x010401d0; const int R::string::permlab_broadcastWapPush=0x0104017a; const int R::string::permlab_cache_filesystem=0x01040278; const int R::string::permlab_callPhone=0x0104021a; const int R::string::permlab_callPrivileged=0x0104021c; const int R::string::permlab_camera=0x010401fc; const int R::string::permlab_changeBackgroundDataSetting=0x0104024e; const int R::string::permlab_changeComponentState=0x010401c2; const int R::string::permlab_changeConfiguration=0x0104015a; const int R::string::permlab_changeNetworkState=0x0104024a; const int R::string::permlab_changeTetherState=0x0104024c; const int R::string::permlab_changeWifiMulticastState=0x01040254; const int R::string::permlab_changeWifiState=0x01040252; const int R::string::permlab_changeWimaxState=0x0104025a; const int R::string::permlab_checkinProperties=0x01040222; const int R::string::permlab_clearAppCache=0x010401b8; const int R::string::permlab_clearAppUserData=0x010401b0; const int R::string::permlab_configureWifiDisplay=0x010401f4; const int R::string::permlab_confirm_full_backup=0x01040186; const int R::string::permlab_controlWifiDisplay=0x010401f6; const int R::string::permlab_copyProtectedData=0x0104048b; const int R::string::permlab_createNetworkSockets=0x01040246; const int R::string::permlab_deleteCacheFiles=0x010401b2; const int R::string::permlab_deletePackages=0x010401ae; const int R::string::permlab_devicePower=0x0104022c; const int R::string::permlab_diagnostic=0x010401c0; const int R::string::permlab_disableKeyguard=0x01040260; const int R::string::permlab_dump=0x01040164; const int R::string::permlab_enableCarMode=0x0104015c; const int R::string::permlab_expandStatusBar=0x01040130; const int R::string::permlab_factoryTest=0x0104022e; const int R::string::permlab_filter_events=0x0104016c; const int R::string::permlab_flashlight=0x01040212; const int R::string::permlab_forceBack=0x01040162; const int R::string::permlab_forceStopPackages=0x01040160; const int R::string::permlab_freezeScreen=0x01040190; const int R::string::permlab_getAccounts=0x0104023c; const int R::string::permlab_getDetailedTasks=0x0104014e; const int R::string::permlab_getPackageSize=0x010401b4; const int R::string::permlab_getTasks=0x01040146; const int R::string::permlab_grantRevokePermissions=0x010401c4; const int R::string::permlab_hardware_test=0x01040218; const int R::string::permlab_injectEvents=0x01040192; const int R::string::permlab_installLocationProvider=0x010401ea; const int R::string::permlab_installPackages=0x010401b6; const int R::string::permlab_interactAcrossUsers=0x01040148; const int R::string::permlab_interactAcrossUsersFull=0x0104014a; const int R::string::permlab_internalSystemWindow=0x01040188; const int R::string::permlab_killBackgroundProcesses=0x0104015e; const int R::string::permlab_locationUpdates=0x01040220; const int R::string::permlab_magnify_display=0x0104016e; const int R::string::permlab_manageAccounts=0x01040240; const int R::string::permlab_manageAppTokens=0x0104018e; const int R::string::permlab_manageNetworkPolicy=0x0104027e; const int R::string::permlab_manageUsb=0x01040214; const int R::string::permlab_manageUsers=0x0104014c; const int R::string::permlab_masterClear=0x01040234; const int R::string::permlab_mediaStorageWrite=0x01040274; const int R::string::permlab_modifyAudioSettings=0x010401f8; const int R::string::permlab_modifyNetworkAccounting=0x01040280; const int R::string::permlab_modifyPhoneState=0x01040226; const int R::string::permlab_mount_format_filesystems=0x01040204; const int R::string::permlab_mount_unmount_filesystems=0x01040202; const int R::string::permlab_movePackage=0x010401ba; const int R::string::permlab_nfc=0x0104025e; const int R::string::permlab_packageVerificationAgent=0x0104038b; const int R::string::permlab_performCdmaProvisioning=0x0104021e; const int R::string::permlab_persistentActivity=0x010401ac; const int R::string::permlab_pkgUsageStats=0x01040489; const int R::string::permlab_processOutgoingCalls=0x01040132; const int R::string::permlab_readCalendar=0x010401e2; const int R::string::permlab_readCallLog=0x010401d6; const int R::string::permlab_readCellBroadcasts=0x0104013a; const int R::string::permlab_readContacts=0x010401d2; const int R::string::permlab_readDictionary=0x0104026c; const int R::string::permlab_readFrameBuffer=0x010401f2; const int R::string::permlab_readHistoryBookmarks=0x01040381; const int R::string::permlab_readInputState=0x01040194; const int R::string::permlab_readLogs=0x010401bc; const int R::string::permlab_readNetworkUsageHistory=0x0104027c; const int R::string::permlab_readPhoneState=0x01040228; const int R::string::permlab_readProfile=0x010401da; const int R::string::permlab_readSms=0x01040140; const int R::string::permlab_readSocialStream=0x010401de; const int R::string::permlab_readSyncSettings=0x01040262; const int R::string::permlab_readSyncStats=0x01040266; const int R::string::permlab_reboot=0x01040200; const int R::string::permlab_receiveBootCompleted=0x010401ce; const int R::string::permlab_receiveEmergencyBroadcast=0x01040138; const int R::string::permlab_receiveMms=0x01040136; const int R::string::permlab_receiveSms=0x01040134; const int R::string::permlab_receiveWapPush=0x01040144; const int R::string::permlab_recordAudio=0x010401fa; const int R::string::permlab_removeTasks=0x01040152; const int R::string::permlab_reorderTasks=0x01040150; const int R::string::permlab_retrieve_window_content=0x01040166; const int R::string::permlab_retrieve_window_info=0x0104016a; const int R::string::permlab_route_media_output=0x0104048d; const int R::string::permlab_runSetActivityWatcher=0x01040174; const int R::string::permlab_sdcardAccessAll=0x01040276; const int R::string::permlab_sdcardRead=0x01040270; const int R::string::permlab_sdcardWrite=0x01040272; const int R::string::permlab_sendSms=0x0104013c; const int R::string::permlab_sendSmsNoConfirmation=0x0104013e; const int R::string::permlab_serialPort=0x0104038f; const int R::string::permlab_setAlarm=0x01040385; const int R::string::permlab_setAlwaysFinish=0x0104017e; const int R::string::permlab_setAnimationScale=0x0104018c; const int R::string::permlab_setDebugApp=0x01040158; const int R::string::permlab_setKeyboardLayout=0x010401a8; const int R::string::permlab_setOrientation=0x010401a4; const int R::string::permlab_setPointerSpeed=0x010401a6; const int R::string::permlab_setPreferredApplications=0x010401c6; const int R::string::permlab_setProcessLimit=0x0104017c; const int R::string::permlab_setScreenCompatibility=0x01040156; const int R::string::permlab_setTime=0x01040236; const int R::string::permlab_setTimeZone=0x01040238; const int R::string::permlab_setWallpaper=0x01040230; const int R::string::permlab_setWallpaperHints=0x01040232; const int R::string::permlab_shutdown=0x01040170; const int R::string::permlab_signalPersistentProcesses=0x010401aa; const int R::string::permlab_startAnyActivity=0x01040154; const int R::string::permlab_statusBar=0x0104012c; const int R::string::permlab_statusBarService=0x0104012e; const int R::string::permlab_stopAppSwitches=0x01040172; const int R::string::permlab_subscribedFeedsRead=0x01040268; const int R::string::permlab_subscribedFeedsWrite=0x0104026a; const int R::string::permlab_systemAlertWindow=0x0104018a; const int R::string::permlab_temporary_enable_accessibility=0x01040168; const int R::string::permlab_updateBatteryStats=0x01040182; const int R::string::permlab_updateLock=0x01040393; const int R::string::permlab_useCredentials=0x01040242; const int R::string::permlab_use_sip=0x0104027a; const int R::string::permlab_vibrate=0x01040210; const int R::string::permlab_wakeLock=0x0104022a; const int R::string::permlab_writeApnSettings=0x01040248; const int R::string::permlab_writeCalendar=0x010401e4; const int R::string::permlab_writeCallLog=0x010401d8; const int R::string::permlab_writeContacts=0x010401d4; const int R::string::permlab_writeDictionary=0x0104026e; const int R::string::permlab_writeGeolocationPermissions=0x01040389; const int R::string::permlab_writeGservices=0x010401cc; const int R::string::permlab_writeHistoryBookmarks=0x01040383; const int R::string::permlab_writeProfile=0x010401dc; const int R::string::permlab_writeSecureSettings=0x010401ca; const int R::string::permlab_writeSettings=0x010401c8; const int R::string::permlab_writeSms=0x01040142; const int R::string::permlab_writeSocialStream=0x010401e0; const int R::string::permlab_writeSyncSettings=0x01040264; const int R::string::perms_description_app=0x01040434; const int R::string::perms_new_perm_prefix=0x01040433; const int R::string::petabyteShort=0x01040071; const int R::string::phoneTypeAssistant=0x010402a9; const int R::string::phoneTypeCallback=0x0104029e; const int R::string::phoneTypeCar=0x0104029f; const int R::string::phoneTypeCompanyMain=0x010402a0; const int R::string::phoneTypeCustom=0x01040296; const int R::string::phoneTypeFaxHome=0x0104029b; const int R::string::phoneTypeFaxWork=0x0104029a; const int R::string::phoneTypeHome=0x01040297; const int R::string::phoneTypeIsdn=0x010402a1; const int R::string::phoneTypeMain=0x010402a2; const int R::string::phoneTypeMms=0x010402aa; const int R::string::phoneTypeMobile=0x01040298; const int R::string::phoneTypeOther=0x0104029d; const int R::string::phoneTypeOtherFax=0x010402a3; const int R::string::phoneTypePager=0x0104029c; const int R::string::phoneTypeRadio=0x010402a4; const int R::string::phoneTypeTelex=0x010402a5; const int R::string::phoneTypeTtyTdd=0x010402a6; const int R::string::phoneTypeWork=0x01040299; const int R::string::phoneTypeWorkMobile=0x010402a7; const int R::string::phoneTypeWorkPager=0x010402a8; const int R::string::policydesc_disableCamera=0x01040293; const int R::string::policydesc_disableKeyguardFeatures=0x01040295; const int R::string::policydesc_encryptedStorage=0x01040291; const int R::string::policydesc_expirePassword=0x0104028f; const int R::string::policydesc_forceLock=0x01040289; const int R::string::policydesc_limitPassword=0x01040283; const int R::string::policydesc_resetPassword=0x01040287; const int R::string::policydesc_setGlobalProxy=0x0104028d; const int R::string::policydesc_watchLogin=0x01040285; const int R::string::policydesc_wipeData=0x0104028b; const int R::string::policylab_disableCamera=0x01040292; const int R::string::policylab_disableKeyguardFeatures=0x01040294; const int R::string::policylab_encryptedStorage=0x01040290; const int R::string::policylab_expirePassword=0x0104028e; const int R::string::policylab_forceLock=0x01040288; const int R::string::policylab_limitPassword=0x01040282; const int R::string::policylab_resetPassword=0x01040286; const int R::string::policylab_setGlobalProxy=0x0104028c; const int R::string::policylab_watchLogin=0x01040284; const int R::string::policylab_wipeData=0x0104028a; const int R::string::postalTypeCustom=0x010402b4; const int R::string::postalTypeHome=0x010402b5; const int R::string::postalTypeOther=0x010402b7; const int R::string::postalTypeWork=0x010402b6; const int R::string::power_dialog=0x010400d4; const int R::string::power_off=0x010400d9; const int R::string::prepend_shortcut_label=0x0104039c; const int R::string::preposition_for_date=0x010403ab; const int R::string::preposition_for_time=0x010403ac; const int R::string::preposition_for_year=0x010403ad; const int R::string::progress_erasing=0x010404c2; const int R::string::progress_unmounting=0x010404c1; const int R::string::reboot_safemode_confirm=0x010400e1; const int R::string::reboot_safemode_title=0x010400e0; const int R::string::recent_tasks_title=0x010400e2; const int R::string::relationTypeAssistant=0x010402ca; const int R::string::relationTypeBrother=0x010402cb; const int R::string::relationTypeChild=0x010402cc; const int R::string::relationTypeCustom=0x010402c9; const int R::string::relationTypeDomesticPartner=0x010402cd; const int R::string::relationTypeFather=0x010402ce; const int R::string::relationTypeFriend=0x010402cf; const int R::string::relationTypeManager=0x010402d0; const int R::string::relationTypeMother=0x010402d1; const int R::string::relationTypeParent=0x010402d2; const int R::string::relationTypePartner=0x010402d3; const int R::string::relationTypeReferredBy=0x010402d4; const int R::string::relationTypeRelative=0x010402d5; const int R::string::relationTypeSister=0x010402d6; const int R::string::relationTypeSpouse=0x010402d7; const int R::string::relative_time=0x010403ba; const int R::string::replace=0x010403c1; const int R::string::report=0x010403dc; const int R::string::reset=0x010404b1; const int R::string::ringtone_default=0x01040402; const int R::string::ringtone_default_with_actual=0x01040403; const int R::string::ringtone_picker_title=0x01040405; const int R::string::ringtone_silent=0x01040404; const int R::string::ringtone_unknown=0x01040406; const int R::string::roamingText0=0x010400ab; const int R::string::roamingText1=0x010400ac; const int R::string::roamingText10=0x010400b5; const int R::string::roamingText11=0x010400b6; const int R::string::roamingText12=0x010400b7; const int R::string::roamingText2=0x010400ad; const int R::string::roamingText3=0x010400ae; const int R::string::roamingText4=0x010400af; const int R::string::roamingText5=0x010400b0; const int R::string::roamingText6=0x010400b1; const int R::string::roamingText7=0x010400b2; const int R::string::roamingText8=0x010400b3; const int R::string::roamingText9=0x010400b4; const int R::string::roamingTextSearching=0x010400b8; const int R::string::safeMode=0x010400f0; const int R::string::safe_media_volume_warning=0x01040565; const int R::string::same_month_md1_md2=0x0104005c; const int R::string::same_month_md1_time1_md2_time2=0x01040054; const int R::string::same_month_mdy1_mdy2=0x0104005f; const int R::string::same_month_mdy1_time1_mdy2_time2=0x01040058; const int R::string::same_month_wday1_md1_time1_wday2_md2_time2=0x01040056; const int R::string::same_month_wday1_md1_wday2_md2=0x0104005d; const int R::string::same_month_wday1_mdy1_time1_wday2_mdy2_time2=0x0104005a; const int R::string::same_month_wday1_mdy1_wday2_mdy2=0x0104005b; const int R::string::same_year_md1_md2=0x01040051; const int R::string::same_year_md1_time1_md2_time2=0x01040053; const int R::string::same_year_mdy1_mdy2=0x0104005e; const int R::string::same_year_mdy1_time1_mdy2_time2=0x01040057; const int R::string::same_year_wday1_md1_time1_wday2_md2_time2=0x01040055; const int R::string::same_year_wday1_md1_wday2_md2=0x01040052; const int R::string::same_year_wday1_mdy1_time1_wday2_mdy2_time2=0x01040059; const int R::string::same_year_wday1_mdy1_wday2_mdy2=0x01040060; const int R::string::save_password_label=0x01040344; const int R::string::save_password_message=0x01040395; const int R::string::save_password_never=0x01040398; const int R::string::save_password_notnow=0x01040396; const int R::string::save_password_remember=0x01040397; const int R::string::screen_compat_mode_hint=0x010403e4; const int R::string::screen_compat_mode_scale=0x010403e2; const int R::string::screen_compat_mode_show=0x010403e3; const int R::string::screen_lock=0x010400d8; const int R::string::search_go=0x0104000c; const int R::string::searchview_description_clear=0x010403a2; const int R::string::searchview_description_query=0x010403a1; const int R::string::searchview_description_search=0x010403a0; const int R::string::searchview_description_submit=0x010403a3; const int R::string::searchview_description_voice=0x010403a4; const int R::string::second=0x010403b4; const int R::string::seconds=0x010403b5; const int R::string::selectAll=0x0104000d; const int R::string::selectTextMode=0x01040016; const int R::string::select_character=0x0104041b; const int R::string::select_input_method=0x01040457; const int R::string::select_keyboard_layout_notification_message=0x0104045c; const int R::string::select_keyboard_layout_notification_title=0x0104045b; const int R::string::sendText=0x010403f3; const int R::string::sending=0x0104052a; const int R::string::serial_number=0x01040521; const int R::string::serviceClassData=0x010400a4; const int R::string::serviceClassDataAsync=0x010400a7; const int R::string::serviceClassDataSync=0x010400a8; const int R::string::serviceClassFAX=0x010400a5; const int R::string::serviceClassPAD=0x010400aa; const int R::string::serviceClassPacket=0x010400a9; const int R::string::serviceClassSMS=0x010400a6; const int R::string::serviceClassVoice=0x010400a3; const int R::string::serviceDisabled=0x01040079; const int R::string::serviceEnabled=0x01040077; const int R::string::serviceEnabledFor=0x01040078; const int R::string::serviceErased=0x0104007b; const int R::string::serviceNotProvisioned=0x01040098; const int R::string::serviceRegistered=0x0104007a; const int R::string::setup_autofill=0x01040347; const int R::string::sha1_fingerprint=0x01040524; const int R::string::sha256_fingerprint=0x01040523; const int R::string::share=0x010404c9; const int R::string::share_action_provider_share_with=0x01040527; const int R::string::shareactionprovider_share_with=0x010404f3; const int R::string::shareactionprovider_share_with_application=0x010404f4; const int R::string::short_format_month=0x01040061; const int R::string::shutdown_confirm=0x010400de; const int R::string::shutdown_confirm_question=0x010400df; const int R::string::shutdown_progress=0x010400dd; const int R::string::silent_mode=0x010400d5; const int R::string::silent_mode_ring=0x010400dc; const int R::string::silent_mode_silent=0x010400da; const int R::string::silent_mode_vibrate=0x010400db; const int R::string::sim_added_message=0x0104042d; const int R::string::sim_added_title=0x0104042c; const int R::string::sim_done_button=0x0104042b; const int R::string::sim_removed_message=0x0104042a; const int R::string::sim_removed_title=0x01040429; const int R::string::sim_restart_button=0x0104042e; const int R::string::sipAddressTypeCustom=0x010402d8; const int R::string::sipAddressTypeHome=0x010402d9; const int R::string::sipAddressTypeOther=0x010402db; const int R::string::sipAddressTypeWork=0x010402da; const int R::string::skip_button_label=0x010404b9; const int R::string::sms_control_message=0x0104041d; const int R::string::sms_control_no=0x0104041f; const int R::string::sms_control_title=0x0104041c; const int R::string::sms_control_yes=0x0104041e; const int R::string::sms_premium_short_code_details=0x01040422; const int R::string::sms_short_code_confirm_allow=0x01040423; const int R::string::sms_short_code_confirm_always_allow=0x01040427; const int R::string::sms_short_code_confirm_deny=0x01040424; const int R::string::sms_short_code_confirm_message=0x01040420; const int R::string::sms_short_code_confirm_never_allow=0x01040428; const int R::string::sms_short_code_details=0x01040421; const int R::string::sms_short_code_remember_choice=0x01040425; const int R::string::sms_short_code_remember_undo_instruction=0x01040426; const int R::string::smv_application=0x010403e5; const int R::string::smv_process=0x010403e6; const int R::string::ssl_certificate=0x01040517; const int R::string::ssl_certificate_is_valid=0x01040518; const int R::string::status_bar_device_locked=0x01040528; const int R::string::status_bar_notification_info_overflow=0x01040017; const int R::string::storage_internal=0x01040505; const int R::string::storage_sd_card=0x01040506; const int R::string::storage_usb=0x01040507; const int R::string::submit=0x010404b2; const int R::string::sync_binding_label=0x010404a2; const int R::string::sync_do_nothing=0x010404d7; const int R::string::sync_really_delete=0x010404d5; const int R::string::sync_too_many_deletes=0x010404d3; const int R::string::sync_too_many_deletes_desc=0x010404d4; const int R::string::sync_undo_deletes=0x010404d6; const int R::string::terabyteShort=0x01040070; const int R::string::tethered_notification_message=0x010404b6; const int R::string::tethered_notification_title=0x010404b5; const int R::string::textSelectionCABTitle=0x010403c3; const int R::string::text_copied=0x0104039a; const int R::string::throttle_warning_notification_message=0x010404bb; const int R::string::throttle_warning_notification_title=0x010404ba; const int R::string::throttled_notification_message=0x010404bd; const int R::string::throttled_notification_title=0x010404bc; const int R::string::time1_time2=0x01040041; const int R::string::time_date=0x01040039; const int R::string::time_of_day=0x01040036; const int R::string::time_picker_decrement_hour_button=0x010404e2; const int R::string::time_picker_decrement_minute_button=0x010404e0; const int R::string::time_picker_decrement_set_am_button=0x010404e4; const int R::string::time_picker_dialog_title=0x0104042f; const int R::string::time_picker_increment_hour_button=0x010404e1; const int R::string::time_picker_increment_minute_button=0x010404df; const int R::string::time_picker_increment_set_pm_button=0x010404e3; const int R::string::time_picker_separator=0x0104006b; const int R::string::time_wday=0x01040050; const int R::string::time_wday_date=0x0104004e; const int R::string::turn_off_radio=0x010400d7; const int R::string::turn_on_radio=0x010400d6; const int R::string::tutorial_double_tap_to_zoom_message_short=0x0104048f; const int R::string::twelve_hour_time_format=0x01040030; const int R::string::twenty_four_hour_time_format=0x01040031; const int R::string::unknownName=0x0104000e; const int R::string::untitled=0x0104000f; const int R::string::upload_file=0x010404af; const int R::string::usb_accessory_notification_title=0x0104044f; const int R::string::usb_cd_installer_notification_title=0x0104044e; const int R::string::usb_mtp_notification_title=0x0104044c; const int R::string::usb_notification_message=0x01040450; const int R::string::usb_ptp_notification_title=0x0104044d; const int R::string::usb_storage_activity_title=0x01040437; const int R::string::usb_storage_button_mount=0x0104043a; const int R::string::usb_storage_disconnect_notification_message=0x01040441; const int R::string::usb_storage_disconnect_notification_title=0x01040440; const int R::string::usb_storage_error_message=0x0104043b; const int R::string::usb_storage_message=0x01040439; const int R::string::usb_storage_notification_message=0x0104043d; const int R::string::usb_storage_notification_title=0x0104043c; const int R::string::usb_storage_stop_button_mount=0x01040446; const int R::string::usb_storage_stop_error_message=0x01040447; const int R::string::usb_storage_stop_message=0x01040445; const int R::string::usb_storage_stop_notification_message=0x0104043f; const int R::string::usb_storage_stop_notification_title=0x0104043e; const int R::string::usb_storage_stop_title=0x01040444; const int R::string::usb_storage_title=0x01040438; const int R::string::use_physical_keyboard=0x01040459; const int R::string::user_switched=0x01040569; const int R::string::validity_period=0x0104051e; const int R::string::volume_alarm=0x010403fa; const int R::string::volume_bluetooth_call=0x010403f9; const int R::string::volume_call=0x010403f8; const int R::string::volume_icon_description_bluetooth=0x010403fd; const int R::string::volume_icon_description_incall=0x010403ff; const int R::string::volume_icon_description_media=0x01040400; const int R::string::volume_icon_description_notification=0x01040401; const int R::string::volume_icon_description_ringer=0x010403fe; const int R::string::volume_music=0x010403f5; const int R::string::volume_music_hint_playing_through_bluetooth=0x010403f6; const int R::string::volume_music_hint_silent_ringtone_selected=0x010403f7; const int R::string::volume_notification=0x010403fb; const int R::string::volume_ringtone=0x010403f4; const int R::string::volume_unknown=0x010403fc; const int R::string::vpn_lockdown_connected=0x010404ac; const int R::string::vpn_lockdown_connecting=0x010404ab; const int R::string::vpn_lockdown_error=0x010404ad; const int R::string::vpn_lockdown_reset=0x010404ae; const int R::string::vpn_text=0x010404a9; const int R::string::vpn_text_long=0x010404aa; const int R::string::vpn_title=0x010404a7; const int R::string::vpn_title_long=0x010404a8; const int R::string::wait=0x010403dd; const int R::string::wallpaper_binding_label=0x010404a4; const int R::string::wday1_date1_time1_wday2_date2_time2=0x0104004b; const int R::string::wday1_date1_wday2_date2=0x0104004c; const int R::string::wday_date=0x0104004f; const int R::string::web_user_agent=0x0104033f; const int R::string::web_user_agent_target_content=0x01040340; const int R::string::webpage_unresponsive=0x010403de; const int R::string::websearch=0x010404cb; const int R::string::week=0x010403b6; const int R::string::weeks=0x010403b7; const int R::string::whichApplication=0x010403cd; const int R::string::widget_default_class_name=0x0104001c; const int R::string::widget_default_package_name=0x0104001b; const int R::string::wifi_available_sign_in=0x01040407; const int R::string::wifi_display_notification_disconnect=0x01040541; const int R::string::wifi_display_notification_message=0x01040540; const int R::string::wifi_display_notification_title=0x0104053f; const int R::string::wifi_p2p_dialog_title=0x0104040d; const int R::string::wifi_p2p_enabled_notification_message=0x01040411; const int R::string::wifi_p2p_enabled_notification_title=0x01040410; const int R::string::wifi_p2p_enter_pin_message=0x01040418; const int R::string::wifi_p2p_failed_message=0x0104040f; const int R::string::wifi_p2p_frequency_conflict_message=0x0104041a; const int R::string::wifi_p2p_from_message=0x01040416; const int R::string::wifi_p2p_invitation_sent_title=0x01040414; const int R::string::wifi_p2p_invitation_to_connect_title=0x01040415; const int R::string::wifi_p2p_show_pin_message=0x01040419; const int R::string::wifi_p2p_to_message=0x01040417; const int R::string::wifi_p2p_turnon_message=0x0104040e; const int R::string::wifi_tether_configure_ssid_default=0x0104040c; const int R::string::wifi_watchdog_network_disabled=0x0104040a; const int R::string::wifi_watchdog_network_disabled_detailed=0x0104040b; const int R::string::year=0x010403b8; const int R::string::years=0x010403b9; const int R::string::yes=0x01040013; const int R::style::ActiveWallpaperSettings=0x010302ef; const int R::style::AlertDialog=0x010301e0; const int R::style::AlertDialog_DeviceDefault=0x010302e7; const int R::style::AlertDialog_DeviceDefault_Light=0x010302e8; const int R::style::AlertDialog_Holo=0x01030297; const int R::style::AlertDialog_Holo_Light=0x01030298; const int R::style::Animation=0x01030000; const int R::style::Animation_Activity=0x01030001; const int R::style::Animation_DeviceDefault_Activity=0x010302e9; const int R::style::Animation_DeviceDefault_Dialog=0x010302ea; const int R::style::Animation_Dialog=0x01030002; const int R::style::Animation_Dream=0x010301f1; const int R::style::Animation_DropDownDown=0x010301e7; const int R::style::Animation_DropDownUp=0x010301e8; const int R::style::Animation_Holo=0x01030294; const int R::style::Animation_Holo_Activity=0x01030295; const int R::style::Animation_Holo_Dialog=0x01030296; const int R::style::Animation_InputMethod=0x01030056; const int R::style::Animation_InputMethodFancy=0x010301e9; const int R::style::Animation_LockScreen=0x010301e2; const int R::style::Animation_OptionsPanel=0x010301e3; const int R::style::Animation_PopupWindow=0x010301ee; const int R::style::Animation_PopupWindow_ActionMode=0x010301ef; const int R::style::Animation_RecentApplications=0x010301ed; const int R::style::Animation_SearchBar=0x010301ea; const int R::style::Animation_SubMenuPanel=0x010301e4; const int R::style::Animation_TextSelectHandle=0x01030236; const int R::style::Animation_Toast=0x01030004; const int R::style::Animation_Translucent=0x01030003; const int R::style::Animation_TypingFilter=0x010301e5; const int R::style::Animation_TypingFilterRestore=0x010301e6; const int R::style::Animation_VolumePanel=0x010301f0; const int R::style::Animation_Wallpaper=0x010301ec; const int R::style::Animation_ZoomButtons=0x010301eb; const int R::style::ButtonBar=0x01030058; const int R::style::DeviceDefault_ButtonBar=0x010301cf; const int R::style::DeviceDefault_ButtonBar_AlertDialog=0x010301d0; const int R::style::DeviceDefault_Light_ButtonBar=0x010301d2; const int R::style::DeviceDefault_Light_ButtonBar_AlertDialog=0x010301d3; const int R::style::DeviceDefault_Light_SegmentedButton=0x010301d4; const int R::style::DeviceDefault_SegmentedButton=0x010301d1; const int R::style::DialogWindowTitle=0x010301df; const int R::style::DialogWindowTitle_DeviceDefault=0x010302eb; const int R::style::DialogWindowTitle_DeviceDefault_Light=0x010302ec; const int R::style::DialogWindowTitle_Holo=0x0103029b; const int R::style::DialogWindowTitle_Holo_Light=0x0103029c; const int R::style::Holo=0x0103025a; const int R::style::Holo_ButtonBar=0x010300e5; const int R::style::Holo_ButtonBar_AlertDialog=0x010300e7; const int R::style::Holo_Light=0x0103025b; const int R::style::Holo_Light_ButtonBar=0x010300e6; const int R::style::Holo_Light_ButtonBar_AlertDialog=0x010300e8; const int R::style::Holo_Light_SegmentedButton=0x010300ea; const int R::style::Holo_SegmentedButton=0x010300e9; const int R::style::MediaButton=0x01030037; const int R::style::MediaButton_Ffwd=0x0103003b; const int R::style::MediaButton_Next=0x01030039; const int R::style::MediaButton_Pause=0x0103003d; const int R::style::MediaButton_Play=0x0103003a; const int R::style::MediaButton_Previous=0x01030038; const int R::style::MediaButton_Rew=0x0103003c; const int R::style::Pointer=0x0103029e; const int R::style::Preference=0x0103021b; const int R::style::Preference_Category=0x0103021e; const int R::style::Preference_CheckBoxPreference=0x0103021f; const int R::style::Preference_DeviceDefault=0x010302dd; const int R::style::Preference_DeviceDefault_Category=0x010302de; const int R::style::Preference_DeviceDefault_CheckBoxPreference=0x010302df; const int R::style::Preference_DeviceDefault_DialogPreference=0x010302e0; const int R::style::Preference_DeviceDefault_DialogPreference_EditTextPreference=0x010302e1; const int R::style::Preference_DeviceDefault_DialogPreference_YesNoPreference=0x010302e2; const int R::style::Preference_DeviceDefault_Information=0x010302e3; const int R::style::Preference_DeviceDefault_PreferenceScreen=0x010302e4; const int R::style::Preference_DeviceDefault_RingtonePreference=0x010302e5; const int R::style::Preference_DeviceDefault_SwitchPreference=0x010302e6; const int R::style::Preference_DialogPreference=0x01030222; const int R::style::Preference_DialogPreference_EditTextPreference=0x01030224; const int R::style::Preference_DialogPreference_YesNoPreference=0x01030223; const int R::style::Preference_Holo=0x01030226; const int R::style::Preference_Holo_Category=0x01030229; const int R::style::Preference_Holo_CheckBoxPreference=0x0103022a; const int R::style::Preference_Holo_DialogPreference=0x0103022d; const int R::style::Preference_Holo_DialogPreference_EditTextPreference=0x0103022f; const int R::style::Preference_Holo_DialogPreference_YesNoPreference=0x0103022e; const int R::style::Preference_Holo_Information=0x01030228; const int R::style::Preference_Holo_PreferenceScreen=0x0103022c; const int R::style::Preference_Holo_RingtonePreference=0x01030230; const int R::style::Preference_Holo_SwitchPreference=0x0103022b; const int R::style::Preference_Information=0x0103021d; const int R::style::Preference_PreferenceScreen=0x01030221; const int R::style::Preference_RingtonePreference=0x01030225; const int R::style::Preference_SwitchPreference=0x01030220; const int R::style::PreferenceFragment=0x0103021c; const int R::style::PreferenceFragment_Holo=0x01030227; const int R::style::PreferencePanel=0x01030231; const int R::style::PreferencePanel_Dialog=0x01030232; const int R::style::PreviewWallpaperSettings=0x010302f0; const int R::style::SegmentedButton=0x01030234; const int R::style::TextAppearance=0x0103003e; const int R::style::TextAppearance_AutoCorrectionSuggestion=0x010301fc; const int R::style::TextAppearance_DeviceDefault=0x010301ad; const int R::style::TextAppearance_DeviceDefault_DialogWindowTitle=0x010301b8; const int R::style::TextAppearance_DeviceDefault_Inverse=0x010301ae; const int R::style::TextAppearance_DeviceDefault_Large=0x010301af; const int R::style::TextAppearance_DeviceDefault_Large_Inverse=0x010301b0; const int R::style::TextAppearance_DeviceDefault_Light=0x010302d0; const int R::style::TextAppearance_DeviceDefault_Light_Inverse=0x010302d1; const int R::style::TextAppearance_DeviceDefault_Light_Large=0x010302d2; const int R::style::TextAppearance_DeviceDefault_Light_Large_Inverse=0x010302d3; const int R::style::TextAppearance_DeviceDefault_Light_Medium=0x010302d4; const int R::style::TextAppearance_DeviceDefault_Light_Medium_Inverse=0x010302d5; const int R::style::TextAppearance_DeviceDefault_Light_SearchResult_Subtitle=0x010302d6; const int R::style::TextAppearance_DeviceDefault_Light_SearchResult_Title=0x010302d7; const int R::style::TextAppearance_DeviceDefault_Light_Small=0x010302d8; const int R::style::TextAppearance_DeviceDefault_Light_Small_Inverse=0x010302d9; const int R::style::TextAppearance_DeviceDefault_Light_Widget_Button=0x010302da; const int R::style::TextAppearance_DeviceDefault_Light_Widget_PopupMenu_Large=0x010302db; const int R::style::TextAppearance_DeviceDefault_Light_Widget_PopupMenu_Small=0x010302dc; const int R::style::TextAppearance_DeviceDefault_Medium=0x010301b1; const int R::style::TextAppearance_DeviceDefault_Medium_Inverse=0x010301b2; const int R::style::TextAppearance_DeviceDefault_SearchResult_Subtitle=0x010301b6; const int R::style::TextAppearance_DeviceDefault_SearchResult_Title=0x010301b5; const int R::style::TextAppearance_DeviceDefault_Small=0x010301b3; const int R::style::TextAppearance_DeviceDefault_Small_Inverse=0x010301b4; const int R::style::TextAppearance_DeviceDefault_Widget=0x010301b9; const int R::style::TextAppearance_DeviceDefault_Widget_ActionBar_Menu=0x010301ce; const int R::style::TextAppearance_DeviceDefault_Widget_ActionBar_Subtitle=0x010301c7; const int R::style::TextAppearance_DeviceDefault_Widget_ActionBar_Subtitle_Inverse=0x010301cb; const int R::style::TextAppearance_DeviceDefault_Widget_ActionBar_Title=0x010301c6; const int R::style::TextAppearance_DeviceDefault_Widget_ActionBar_Title_Inverse=0x010301ca; const int R::style::TextAppearance_DeviceDefault_Widget_ActionMode_Subtitle=0x010301c9; const int R::style::TextAppearance_DeviceDefault_Widget_ActionMode_Subtitle_Inverse=0x010301cd; const int R::style::TextAppearance_DeviceDefault_Widget_ActionMode_Title=0x010301c8; const int R::style::TextAppearance_DeviceDefault_Widget_ActionMode_Title_Inverse=0x010301cc; const int R::style::TextAppearance_DeviceDefault_Widget_Button=0x010301ba; const int R::style::TextAppearance_DeviceDefault_Widget_DropDownHint=0x010301bf; const int R::style::TextAppearance_DeviceDefault_Widget_DropDownItem=0x010301c0; const int R::style::TextAppearance_DeviceDefault_Widget_EditText=0x010301c2; const int R::style::TextAppearance_DeviceDefault_Widget_IconMenu_Item=0x010301bb; const int R::style::TextAppearance_DeviceDefault_Widget_PopupMenu=0x010301c3; const int R::style::TextAppearance_DeviceDefault_Widget_PopupMenu_Large=0x010301c4; const int R::style::TextAppearance_DeviceDefault_Widget_PopupMenu_Small=0x010301c5; const int R::style::TextAppearance_DeviceDefault_Widget_TabWidget=0x010301bc; const int R::style::TextAppearance_DeviceDefault_Widget_TextView=0x010301bd; const int R::style::TextAppearance_DeviceDefault_Widget_TextView_PopupMenu=0x010301be; const int R::style::TextAppearance_DeviceDefault_Widget_TextView_SpinnerItem=0x010301c1; const int R::style::TextAppearance_DeviceDefault_WindowTitle=0x010301b7; const int R::style::TextAppearance_DialogWindowTitle=0x01030041; const int R::style::TextAppearance_EasyCorrectSuggestion=0x010301fa; const int R::style::TextAppearance_Holo=0x010300fb; const int R::style::TextAppearance_Holo_CalendarViewWeekDayView=0x01030242; const int R::style::TextAppearance_Holo_DialogWindowTitle=0x01030117; const int R::style::TextAppearance_Holo_Inverse=0x010300fc; const int R::style::TextAppearance_Holo_Large=0x010300fd; const int R::style::TextAppearance_Holo_Large_Inverse=0x010300fe; const int R::style::TextAppearance_Holo_Light=0x01030243; const int R::style::TextAppearance_Holo_Light_CalendarViewWeekDayView=0x01030259; const int R::style::TextAppearance_Holo_Light_DialogWindowTitle=0x01030258; const int R::style::TextAppearance_Holo_Light_Inverse=0x01030244; const int R::style::TextAppearance_Holo_Light_Large=0x01030245; const int R::style::TextAppearance_Holo_Light_Large_Inverse=0x01030248; const int R::style::TextAppearance_Holo_Light_Medium=0x01030246; const int R::style::TextAppearance_Holo_Light_Medium_Inverse=0x01030249; const int R::style::TextAppearance_Holo_Light_SearchResult=0x0103024b; const int R::style::TextAppearance_Holo_Light_SearchResult_Subtitle=0x0103024d; const int R::style::TextAppearance_Holo_Light_SearchResult_Title=0x0103024c; const int R::style::TextAppearance_Holo_Light_Small=0x01030247; const int R::style::TextAppearance_Holo_Light_Small_Inverse=0x0103024a; const int R::style::TextAppearance_Holo_Light_Widget=0x0103024e; const int R::style::TextAppearance_Holo_Light_Widget_ActionMode_Subtitle=0x01030256; const int R::style::TextAppearance_Holo_Light_Widget_ActionMode_Title=0x01030255; const int R::style::TextAppearance_Holo_Light_Widget_Button=0x0103024f; const int R::style::TextAppearance_Holo_Light_Widget_DropDownHint=0x01030254; const int R::style::TextAppearance_Holo_Light_Widget_EditText=0x01030250; const int R::style::TextAppearance_Holo_Light_Widget_PopupMenu=0x01030251; const int R::style::TextAppearance_Holo_Light_Widget_PopupMenu_Large=0x01030252; const int R::style::TextAppearance_Holo_Light_Widget_PopupMenu_Small=0x01030253; const int R::style::TextAppearance_Holo_Light_Widget_Switch=0x01030241; const int R::style::TextAppearance_Holo_Light_WindowTitle=0x01030257; const int R::style::TextAppearance_Holo_Medium=0x010300ff; const int R::style::TextAppearance_Holo_Medium_Inverse=0x01030100; const int R::style::TextAppearance_Holo_SearchResult=0x0103023e; const int R::style::TextAppearance_Holo_SearchResult_Subtitle=0x01030104; const int R::style::TextAppearance_Holo_SearchResult_Title=0x01030103; const int R::style::TextAppearance_Holo_Small=0x01030101; const int R::style::TextAppearance_Holo_Small_Inverse=0x01030102; const int R::style::TextAppearance_Holo_Widget=0x01030105; const int R::style::TextAppearance_Holo_Widget_ActionBar_Menu=0x01030120; const int R::style::TextAppearance_Holo_Widget_ActionBar_Subtitle=0x01030113; const int R::style::TextAppearance_Holo_Widget_ActionBar_Subtitle_Inverse=0x0103011d; const int R::style::TextAppearance_Holo_Widget_ActionBar_Title=0x01030112; const int R::style::TextAppearance_Holo_Widget_ActionBar_Title_Inverse=0x0103011c; const int R::style::TextAppearance_Holo_Widget_ActionMode=0x0103023f; const int R::style::TextAppearance_Holo_Widget_ActionMode_Subtitle=0x01030115; const int R::style::TextAppearance_Holo_Widget_ActionMode_Subtitle_Inverse=0x0103011f; const int R::style::TextAppearance_Holo_Widget_ActionMode_Title=0x01030114; const int R::style::TextAppearance_Holo_Widget_ActionMode_Title_Inverse=0x0103011e; const int R::style::TextAppearance_Holo_Widget_Button=0x01030106; const int R::style::TextAppearance_Holo_Widget_DropDownHint=0x0103010b; const int R::style::TextAppearance_Holo_Widget_DropDownItem=0x0103010c; const int R::style::TextAppearance_Holo_Widget_EditText=0x0103010e; const int R::style::TextAppearance_Holo_Widget_IconMenu_Item=0x01030107; const int R::style::TextAppearance_Holo_Widget_PopupMenu=0x0103010f; const int R::style::TextAppearance_Holo_Widget_PopupMenu_Large=0x01030110; const int R::style::TextAppearance_Holo_Widget_PopupMenu_Small=0x01030111; const int R::style::TextAppearance_Holo_Widget_Switch=0x01030240; const int R::style::TextAppearance_Holo_Widget_TabWidget=0x01030108; const int R::style::TextAppearance_Holo_Widget_TextView=0x01030109; const int R::style::TextAppearance_Holo_Widget_TextView_PopupMenu=0x0103010a; const int R::style::TextAppearance_Holo_Widget_TextView_SpinnerItem=0x0103010d; const int R::style::TextAppearance_Holo_WindowTitle=0x01030116; const int R::style::TextAppearance_Inverse=0x0103003f; const int R::style::TextAppearance_Large=0x01030042; const int R::style::TextAppearance_Large_Inverse=0x01030043; const int R::style::TextAppearance_Large_Inverse_NumberPickerInputText=0x01030219; const int R::style::TextAppearance_Medium=0x01030044; const int R::style::TextAppearance_Medium_Inverse=0x01030045; const int R::style::TextAppearance_MisspelledSuggestion=0x010301fb; const int R::style::TextAppearance_NumPadKey=0x010302a4; const int R::style::TextAppearance_NumPadKey_Klondike=0x010302a5; const int R::style::TextAppearance_SearchResult=0x01030218; const int R::style::TextAppearance_SearchResult_Subtitle=0x01030064; const int R::style::TextAppearance_SearchResult_Title=0x01030063; const int R::style::TextAppearance_SlidingTabActive=0x01030217; const int R::style::TextAppearance_SlidingTabNormal=0x01030216; const int R::style::TextAppearance_Small=0x01030046; const int R::style::TextAppearance_Small_CalendarViewWeekDayView=0x010301f8; const int R::style::TextAppearance_Small_Inverse=0x01030047; const int R::style::TextAppearance_StatusBar=0x010301f2; const int R::style::TextAppearance_StatusBar_EventContent=0x01030067; const int R::style::TextAppearance_StatusBar_EventContent_Emphasis=0x010301f7; const int R::style::TextAppearance_StatusBar_EventContent_Info=0x010301f5; const int R::style::TextAppearance_StatusBar_EventContent_Line2=0x010301f4; const int R::style::TextAppearance_StatusBar_EventContent_Time=0x010301f6; const int R::style::TextAppearance_StatusBar_EventContent_Title=0x01030068; const int R::style::TextAppearance_StatusBar_Icon=0x01030066; const int R::style::TextAppearance_StatusBar_Ticker=0x010301f3; const int R::style::TextAppearance_StatusBar_Title=0x01030065; const int R::style::TextAppearance_Suggestion=0x010301f9; const int R::style::TextAppearance_SuggestionHighlight=0x01030118; const int R::style::TextAppearance_Theme=0x01030040; const int R::style::TextAppearance_Theme_Dialog=0x01030048; const int R::style::TextAppearance_Theme_Dialog_AppError=0x01030215; const int R::style::TextAppearance_Widget=0x01030049; const int R::style::TextAppearance_Widget_ActionBar_Subtitle=0x0103023a; const int R::style::TextAppearance_Widget_ActionBar_Title=0x01030239; const int R::style::TextAppearance_Widget_ActionMode_Subtitle=0x0103023c; const int R::style::TextAppearance_Widget_ActionMode_Title=0x0103023b; const int R::style::TextAppearance_Widget_Button=0x0103004a; const int R::style::TextAppearance_Widget_DropDownHint=0x01030050; const int R::style::TextAppearance_Widget_DropDownItem=0x01030051; const int R::style::TextAppearance_Widget_EditText=0x0103004c; const int R::style::TextAppearance_Widget_IconMenu_Item=0x0103004b; const int R::style::TextAppearance_Widget_PopupMenu=0x0103023d; const int R::style::TextAppearance_Widget_PopupMenu_Large=0x01030080; const int R::style::TextAppearance_Widget_PopupMenu_Small=0x01030081; const int R::style::TextAppearance_Widget_TabWidget=0x0103004d; const int R::style::TextAppearance_Widget_TextView=0x0103004e; const int R::style::TextAppearance_Widget_TextView_PopupMenu=0x0103004f; const int R::style::TextAppearance_Widget_TextView_SpinnerItem=0x01030052; const int R::style::TextAppearance_WindowTitle=0x01030053; const int R::style::Theme=0x01030005; const int R::style::Theme_Black=0x01030008; const int R::style::Theme_Black_NoTitleBar=0x01030009; const int R::style::Theme_Black_NoTitleBar_Fullscreen=0x0103000a; const int R::style::Theme_DeviceDefault=0x01030128; const int R::style::Theme_DeviceDefault_Dialog=0x0103012e; const int R::style::Theme_DeviceDefault_Dialog_Alert=0x0103030e; const int R::style::Theme_DeviceDefault_Dialog_FixedSize=0x01030308; const int R::style::Theme_DeviceDefault_Dialog_MinWidth=0x0103012f; const int R::style::Theme_DeviceDefault_Dialog_NoActionBar=0x01030130; const int R::style::Theme_DeviceDefault_Dialog_NoActionBar_FixedSize=0x01030309; const int R::style::Theme_DeviceDefault_Dialog_NoActionBar_MinWidth=0x01030131; const int R::style::Theme_DeviceDefault_Dialog_NoFrame=0x01030312; const int R::style::Theme_DeviceDefault_Dialog_Presentation=0x0103030c; const int R::style::Theme_DeviceDefault_DialogWhenLarge=0x01030136; const int R::style::Theme_DeviceDefault_DialogWhenLarge_NoActionBar=0x01030137; const int R::style::Theme_DeviceDefault_InputMethod=0x0103013e; const int R::style::Theme_DeviceDefault_Light=0x0103012b; const int R::style::Theme_DeviceDefault_Light_DarkActionBar=0x0103013f; const int R::style::Theme_DeviceDefault_Light_Dialog=0x01030132; const int R::style::Theme_DeviceDefault_Light_Dialog_Alert=0x0103030f; const int R::style::Theme_DeviceDefault_Light_Dialog_FixedSize=0x0103030a; const int R::style::Theme_DeviceDefault_Light_Dialog_MinWidth=0x01030133; const int R::style::Theme_DeviceDefault_Light_Dialog_NoActionBar=0x01030134; const int R::style::Theme_DeviceDefault_Light_Dialog_NoActionBar_FixedSize=0x0103030b; const int R::style::Theme_DeviceDefault_Light_Dialog_NoActionBar_MinWidth=0x01030135; const int R::style::Theme_DeviceDefault_Light_Dialog_Presentation=0x0103030d; const int R::style::Theme_DeviceDefault_Light_DialogWhenLarge=0x01030138; const int R::style::Theme_DeviceDefault_Light_DialogWhenLarge_NoActionBar=0x01030139; const int R::style::Theme_DeviceDefault_Light_NoActionBar=0x0103012c; const int R::style::Theme_DeviceDefault_Light_NoActionBar_Fullscreen=0x0103012d; const int R::style::Theme_DeviceDefault_Light_Panel=0x0103013b; const int R::style::Theme_DeviceDefault_Light_SearchBar=0x01030311; const int R::style::Theme_DeviceDefault_NoActionBar=0x01030129; const int R::style::Theme_DeviceDefault_NoActionBar_Fullscreen=0x0103012a; const int R::style::Theme_DeviceDefault_Panel=0x0103013a; const int R::style::Theme_DeviceDefault_SearchBar=0x01030310; const int R::style::Theme_DeviceDefault_Wallpaper=0x0103013c; const int R::style::Theme_DeviceDefault_Wallpaper_NoTitleBar=0x0103013d; const int R::style::Theme_Dialog=0x0103000b; const int R::style::Theme_Dialog_Alert=0x010302f2; const int R::style::Theme_Dialog_AppError=0x010302fb; const int R::style::Theme_Dialog_NoFrame=0x010302f1; const int R::style::Theme_Dialog_RecentApplications=0x010302fc; const int R::style::Theme_ExpandedMenu=0x010302f8; const int R::style::Theme_GlobalSearchBar=0x010302f6; const int R::style::Theme_Holo=0x0103006b; const int R::style::Theme_Holo_CompactMenu=0x010302f9; const int R::style::Theme_Holo_Dialog=0x0103006f; const int R::style::Theme_Holo_Dialog_Alert=0x01030302; const int R::style::Theme_Holo_Dialog_FixedSize=0x010302ff; const int R::style::Theme_Holo_Dialog_MinWidth=0x01030070; const int R::style::Theme_Holo_Dialog_NoActionBar=0x01030071; const int R::style::Theme_Holo_Dialog_NoActionBar_FixedSize=0x01030300; const int R::style::Theme_Holo_Dialog_NoActionBar_MinWidth=0x01030072; const int R::style::Theme_Holo_Dialog_NoFrame=0x01030301; const int R::style::Theme_Holo_Dialog_Presentation=0x01030303; const int R::style::Theme_Holo_DialogWhenLarge=0x01030077; const int R::style::Theme_Holo_DialogWhenLarge_NoActionBar=0x01030078; const int R::style::Theme_Holo_InputMethod=0x0103007f; const int R::style::Theme_Holo_Light=0x0103006e; const int R::style::Theme_Holo_Light_CompactMenu=0x010302fa; const int R::style::Theme_Holo_Light_DarkActionBar=0x01030119; const int R::style::Theme_Holo_Light_Dialog=0x01030073; const int R::style::Theme_Holo_Light_Dialog_Alert=0x01030306; const int R::style::Theme_Holo_Light_Dialog_FixedSize=0x01030304; const int R::style::Theme_Holo_Light_Dialog_MinWidth=0x01030074; const int R::style::Theme_Holo_Light_Dialog_NoActionBar=0x01030075; const int R::style::Theme_Holo_Light_Dialog_NoActionBar_FixedSize=0x01030305; const int R::style::Theme_Holo_Light_Dialog_NoActionBar_MinWidth=0x01030076; const int R::style::Theme_Holo_Light_Dialog_Presentation=0x01030307; const int R::style::Theme_Holo_Light_DialogWhenLarge=0x01030079; const int R::style::Theme_Holo_Light_DialogWhenLarge_NoActionBar=0x0103007a; const int R::style::Theme_Holo_Light_NoActionBar=0x010300f0; const int R::style::Theme_Holo_Light_NoActionBar_Fullscreen=0x010300f1; const int R::style::Theme_Holo_Light_Panel=0x0103007c; const int R::style::Theme_Holo_Light_SearchBar=0x010302f5; const int R::style::Theme_Holo_NoActionBar=0x0103006c; const int R::style::Theme_Holo_NoActionBar_Fullscreen=0x0103006d; const int R::style::Theme_Holo_Panel=0x0103007b; const int R::style::Theme_Holo_SearchBar=0x010302f4; const int R::style::Theme_Holo_Wallpaper=0x0103007d; const int R::style::Theme_Holo_Wallpaper_NoTitleBar=0x0103007e; const int R::style::Theme_IconMenu=0x010302f7; const int R::style::Theme_InputMethod=0x01030054; const int R::style::Theme_Light=0x0103000c; const int R::style::Theme_Light_NoTitleBar=0x0103000d; const int R::style::Theme_Light_NoTitleBar_Fullscreen=0x0103000e; const int R::style::Theme_Light_Panel=0x0103005a; const int R::style::Theme_Light_WallpaperSettings=0x01030062; const int R::style::Theme_NoDisplay=0x01030055; const int R::style::Theme_NoTitleBar=0x01030006; const int R::style::Theme_NoTitleBar_Fullscreen=0x01030007; const int R::style::Theme_NoTitleBar_OverlayActionModes=0x0103006a; const int R::style::Theme_Panel=0x01030059; const int R::style::Theme_Panel_Volume=0x010302fe; const int R::style::Theme_SearchBar=0x010302f3; const int R::style::Theme_Toast=0x010302fd; const int R::style::Theme_Translucent=0x0103000f; const int R::style::Theme_Translucent_NoTitleBar=0x01030010; const int R::style::Theme_Translucent_NoTitleBar_Fullscreen=0x01030011; const int R::style::Theme_Wallpaper=0x0103005e; const int R::style::Theme_Wallpaper_NoTitleBar=0x0103005f; const int R::style::Theme_Wallpaper_NoTitleBar_Fullscreen=0x01030060; const int R::style::Theme_WallpaperSettings=0x01030061; const int R::style::Theme_WithActionBar=0x01030069; const int R::style::Widget=0x01030012; const int R::style::Widget_AbsListView=0x01030013; const int R::style::Widget_ActionBar=0x01030082; const int R::style::Widget_ActionBar_TabBar=0x010300f4; const int R::style::Widget_ActionBar_TabText=0x010300f3; const int R::style::Widget_ActionBar_TabView=0x010300f2; const int R::style::Widget_ActionButton=0x01030084; const int R::style::Widget_ActionButton_CloseMode=0x01030088; const int R::style::Widget_ActionButton_Overflow=0x01030087; const int R::style::Widget_ActionMode=0x01030238; const int R::style::Widget_ActivityChooserView=0x0103021a; const int R::style::Widget_AutoCompleteTextView=0x01030027; const int R::style::Widget_Button=0x01030014; const int R::style::Widget_Button_Inset=0x01030015; const int R::style::Widget_Button_NumPadKey=0x010302a3; const int R::style::Widget_Button_Small=0x01030016; const int R::style::Widget_Button_Toggle=0x01030017; const int R::style::Widget_Button_Transparent=0x010301ff; const int R::style::Widget_CalendarView=0x010300eb; const int R::style::Widget_CheckedTextView=0x01030203; const int R::style::Widget_CompoundButton=0x01030018; const int R::style::Widget_CompoundButton_CheckBox=0x01030019; const int R::style::Widget_CompoundButton_RadioButton=0x0103001a; const int R::style::Widget_CompoundButton_Star=0x0103001b; const int R::style::Widget_CompoundButton_Switch=0x01030214; const int R::style::Widget_DatePicker=0x010300ee; const int R::style::Widget_DeviceDefault=0x01030140; const int R::style::Widget_DeviceDefault_AbsListView=0x010302a6; const int R::style::Widget_DeviceDefault_ActionBar=0x0103016b; const int R::style::Widget_DeviceDefault_ActionBar_Solid=0x01030173; const int R::style::Widget_DeviceDefault_ActionBar_TabBar=0x01030172; const int R::style::Widget_DeviceDefault_ActionBar_TabText=0x01030171; const int R::style::Widget_DeviceDefault_ActionBar_TabView=0x01030170; const int R::style::Widget_DeviceDefault_ActionButton=0x01030166; const int R::style::Widget_DeviceDefault_ActionButton_CloseMode=0x0103016a; const int R::style::Widget_DeviceDefault_ActionButton_Overflow=0x01030167; const int R::style::Widget_DeviceDefault_ActionButton_TextButton=0x01030168; const int R::style::Widget_DeviceDefault_ActionMode=0x01030169; const int R::style::Widget_DeviceDefault_AutoCompleteTextView=0x01030147; const int R::style::Widget_DeviceDefault_Button=0x01030141; const int R::style::Widget_DeviceDefault_Button_Borderless=0x0103016c; const int R::style::Widget_DeviceDefault_Button_Borderless_Small=0x01030145; const int R::style::Widget_DeviceDefault_Button_Inset=0x01030143; const int R::style::Widget_DeviceDefault_Button_Small=0x01030142; const int R::style::Widget_DeviceDefault_Button_Toggle=0x01030144; const int R::style::Widget_DeviceDefault_CalendarView=0x0103016e; const int R::style::Widget_DeviceDefault_CheckedTextView=0x010301db; const int R::style::Widget_DeviceDefault_CompoundButton_CheckBox=0x01030148; const int R::style::Widget_DeviceDefault_CompoundButton_RadioButton=0x01030159; const int R::style::Widget_DeviceDefault_CompoundButton_Star=0x0103015d; const int R::style::Widget_DeviceDefault_CompoundButton_Switch=0x010302a9; const int R::style::Widget_DeviceDefault_DatePicker=0x0103016f; const int R::style::Widget_DeviceDefault_DropDownItem=0x01030161; const int R::style::Widget_DeviceDefault_DropDownItem_Spinner=0x01030162; const int R::style::Widget_DeviceDefault_EditText=0x0103014a; const int R::style::Widget_DeviceDefault_ExpandableListView=0x0103014b; const int R::style::Widget_DeviceDefault_ExpandableListView_White=0x010302aa; const int R::style::Widget_DeviceDefault_Gallery=0x010302ab; const int R::style::Widget_DeviceDefault_GestureOverlayView=0x010302ac; const int R::style::Widget_DeviceDefault_GridView=0x0103014c; const int R::style::Widget_DeviceDefault_HorizontalScrollView=0x0103015b; const int R::style::Widget_DeviceDefault_ImageButton=0x0103014d; const int R::style::Widget_DeviceDefault_ImageWell=0x010302ad; const int R::style::Widget_DeviceDefault_KeyboardView=0x010302ae; const int R::style::Widget_DeviceDefault_Light=0x01030174; const int R::style::Widget_DeviceDefault_Light_AbsListView=0x010302c1; const int R::style::Widget_DeviceDefault_Light_ActionBar=0x010301a3; const int R::style::Widget_DeviceDefault_Light_ActionBar_Solid=0x010301a7; const int R::style::Widget_DeviceDefault_Light_ActionBar_Solid_Inverse=0x010301a8; const int R::style::Widget_DeviceDefault_Light_ActionBar_TabBar=0x010301a6; const int R::style::Widget_DeviceDefault_Light_ActionBar_TabBar_Inverse=0x010301a9; const int R::style::Widget_DeviceDefault_Light_ActionBar_TabText=0x010301a5; const int R::style::Widget_DeviceDefault_Light_ActionBar_TabText_Inverse=0x010301ab; const int R::style::Widget_DeviceDefault_Light_ActionBar_TabView=0x010301a4; const int R::style::Widget_DeviceDefault_Light_ActionBar_TabView_Inverse=0x010301aa; const int R::style::Widget_DeviceDefault_Light_ActionButton=0x0103019f; const int R::style::Widget_DeviceDefault_Light_ActionButton_CloseMode=0x010301a2; const int R::style::Widget_DeviceDefault_Light_ActionButton_Overflow=0x010301a0; const int R::style::Widget_DeviceDefault_Light_ActionMode=0x010301a1; const int R::style::Widget_DeviceDefault_Light_ActionMode_Inverse=0x010301ac; const int R::style::Widget_DeviceDefault_Light_AutoCompleteTextView=0x0103017b; const int R::style::Widget_DeviceDefault_Light_Button=0x01030175; const int R::style::Widget_DeviceDefault_Light_Button_Borderless=0x010302c4; const int R::style::Widget_DeviceDefault_Light_Button_Borderless_Small=0x01030179; const int R::style::Widget_DeviceDefault_Light_Button_Inset=0x01030177; const int R::style::Widget_DeviceDefault_Light_Button_Small=0x01030176; const int R::style::Widget_DeviceDefault_Light_Button_Toggle=0x01030178; const int R::style::Widget_DeviceDefault_Light_CalendarView=0x0103019e; const int R::style::Widget_DeviceDefault_Light_CheckedTextView=0x010301dc; const int R::style::Widget_DeviceDefault_Light_CompoundButton_CheckBox=0x0103017c; const int R::style::Widget_DeviceDefault_Light_CompoundButton_RadioButton=0x01030190; const int R::style::Widget_DeviceDefault_Light_CompoundButton_Star=0x01030194; const int R::style::Widget_DeviceDefault_Light_DatePicker=0x010302c5; const int R::style::Widget_DeviceDefault_Light_DropDownItem=0x01030198; const int R::style::Widget_DeviceDefault_Light_DropDownItem_Spinner=0x01030199; const int R::style::Widget_DeviceDefault_Light_EditText=0x0103017e; const int R::style::Widget_DeviceDefault_Light_ExpandableListView=0x0103017f; const int R::style::Widget_DeviceDefault_Light_ExpandableListView_White=0x010302c6; const int R::style::Widget_DeviceDefault_Light_Gallery=0x010302c7; const int R::style::Widget_DeviceDefault_Light_GestureOverlayView=0x010302c8; const int R::style::Widget_DeviceDefault_Light_GridView=0x01030180; const int R::style::Widget_DeviceDefault_Light_HorizontalScrollView=0x01030192; const int R::style::Widget_DeviceDefault_Light_ImageButton=0x01030181; const int R::style::Widget_DeviceDefault_Light_ImageWell=0x010302c9; const int R::style::Widget_DeviceDefault_Light_ListPopupWindow=0x0103019b; const int R::style::Widget_DeviceDefault_Light_ListView=0x01030182; const int R::style::Widget_DeviceDefault_Light_ListView_DropDown=0x0103017d; const int R::style::Widget_DeviceDefault_Light_ListView_White=0x010302ca; const int R::style::Widget_DeviceDefault_Light_MediaRouteButton=0x010301d8; const int R::style::Widget_DeviceDefault_Light_NumberPicker=0x010302cb; const int R::style::Widget_DeviceDefault_Light_PopupMenu=0x0103019c; const int R::style::Widget_DeviceDefault_Light_PopupWindow=0x01030183; const int R::style::Widget_DeviceDefault_Light_PopupWindow_ActionMode=0x010302c3; const int R::style::Widget_DeviceDefault_Light_ProgressBar=0x01030184; const int R::style::Widget_DeviceDefault_Light_ProgressBar_Horizontal=0x01030185; const int R::style::Widget_DeviceDefault_Light_ProgressBar_Inverse=0x01030189; const int R::style::Widget_DeviceDefault_Light_ProgressBar_Large=0x01030188; const int R::style::Widget_DeviceDefault_Light_ProgressBar_Large_Inverse=0x0103018b; const int R::style::Widget_DeviceDefault_Light_ProgressBar_Small=0x01030186; const int R::style::Widget_DeviceDefault_Light_ProgressBar_Small_Inverse=0x0103018a; const int R::style::Widget_DeviceDefault_Light_ProgressBar_Small_Title=0x01030187; const int R::style::Widget_DeviceDefault_Light_RatingBar=0x0103018d; const int R::style::Widget_DeviceDefault_Light_RatingBar_Indicator=0x0103018e; const int R::style::Widget_DeviceDefault_Light_RatingBar_Small=0x0103018f; const int R::style::Widget_DeviceDefault_Light_ScrollView=0x01030191; const int R::style::Widget_DeviceDefault_Light_SeekBar=0x0103018c; const int R::style::Widget_DeviceDefault_Light_Spinner=0x01030193; const int R::style::Widget_DeviceDefault_Light_Spinner_DropDown=0x010302cc; const int R::style::Widget_DeviceDefault_Light_Spinner_DropDown_ActionBar=0x010302c2; const int R::style::Widget_DeviceDefault_Light_Tab=0x0103019d; const int R::style::Widget_DeviceDefault_Light_TabWidget=0x01030195; const int R::style::Widget_DeviceDefault_Light_TextSuggestionsPopupWindow=0x010302cf; const int R::style::Widget_DeviceDefault_Light_TextView=0x0103017a; const int R::style::Widget_DeviceDefault_Light_TextView_ListSeparator=0x010302cd; const int R::style::Widget_DeviceDefault_Light_TextView_SpinnerItem=0x0103019a; const int R::style::Widget_DeviceDefault_Light_TimePicker=0x010302ce; const int R::style::Widget_DeviceDefault_Light_WebTextView=0x01030196; const int R::style::Widget_DeviceDefault_Light_WebView=0x01030197; const int R::style::Widget_DeviceDefault_ListPopupWindow=0x01030164; const int R::style::Widget_DeviceDefault_ListView=0x0103014e; const int R::style::Widget_DeviceDefault_ListView_DropDown=0x01030149; const int R::style::Widget_DeviceDefault_ListView_White=0x010302af; const int R::style::Widget_DeviceDefault_MediaRouteButton=0x010301d7; const int R::style::Widget_DeviceDefault_NumberPicker=0x010302b0; const int R::style::Widget_DeviceDefault_PopupMenu=0x01030165; const int R::style::Widget_DeviceDefault_PopupWindow=0x0103014f; const int R::style::Widget_DeviceDefault_PopupWindow_ActionMode=0x010302a8; const int R::style::Widget_DeviceDefault_PreferenceFrameLayout=0x010302b1; const int R::style::Widget_DeviceDefault_ProgressBar=0x01030150; const int R::style::Widget_DeviceDefault_ProgressBar_Horizontal=0x01030151; const int R::style::Widget_DeviceDefault_ProgressBar_Inverse=0x010302b2; const int R::style::Widget_DeviceDefault_ProgressBar_Large=0x01030154; const int R::style::Widget_DeviceDefault_ProgressBar_Large_Inverse=0x010302b3; const int R::style::Widget_DeviceDefault_ProgressBar_Small=0x01030152; const int R::style::Widget_DeviceDefault_ProgressBar_Small_Inverse=0x010302b4; const int R::style::Widget_DeviceDefault_ProgressBar_Small_Title=0x01030153; const int R::style::Widget_DeviceDefault_QuickContactBadge_WindowLarge=0x010302b5; const int R::style::Widget_DeviceDefault_QuickContactBadge_WindowMedium=0x010302b6; const int R::style::Widget_DeviceDefault_QuickContactBadge_WindowSmall=0x010302b7; const int R::style::Widget_DeviceDefault_QuickContactBadgeSmall_WindowLarge=0x010302b8; const int R::style::Widget_DeviceDefault_QuickContactBadgeSmall_WindowMedium=0x010302b9; const int R::style::Widget_DeviceDefault_QuickContactBadgeSmall_WindowSmall=0x010302ba; const int R::style::Widget_DeviceDefault_RatingBar=0x01030156; const int R::style::Widget_DeviceDefault_RatingBar_Indicator=0x01030157; const int R::style::Widget_DeviceDefault_RatingBar_Small=0x01030158; const int R::style::Widget_DeviceDefault_ScrollView=0x0103015a; const int R::style::Widget_DeviceDefault_SeekBar=0x01030155; const int R::style::Widget_DeviceDefault_Spinner=0x0103015c; const int R::style::Widget_DeviceDefault_Spinner_DropDown=0x010302bb; const int R::style::Widget_DeviceDefault_Spinner_DropDown_ActionBar=0x010302a7; const int R::style::Widget_DeviceDefault_StackView=0x010302bc; const int R::style::Widget_DeviceDefault_Tab=0x0103016d; const int R::style::Widget_DeviceDefault_TabWidget=0x0103015e; const int R::style::Widget_DeviceDefault_TextSelectHandle=0x010302bd; const int R::style::Widget_DeviceDefault_TextSuggestionsPopupWindow=0x010302be; const int R::style::Widget_DeviceDefault_TextView=0x01030146; const int R::style::Widget_DeviceDefault_TextView_ListSeparator=0x010302bf; const int R::style::Widget_DeviceDefault_TextView_SpinnerItem=0x01030163; const int R::style::Widget_DeviceDefault_TimePicker=0x010302c0; const int R::style::Widget_DeviceDefault_WebTextView=0x0103015f; const int R::style::Widget_DeviceDefault_WebView=0x01030160; const int R::style::Widget_DropDownItem=0x0103002b; const int R::style::Widget_DropDownItem_Spinner=0x0103002c; const int R::style::Widget_EditText=0x01030023; const int R::style::Widget_ExpandableListView=0x01030024; const int R::style::Widget_ExpandableListView_White=0x01030206; const int R::style::Widget_FragmentBreadCrumbs=0x01030089; const int R::style::Widget_Gallery=0x01030035; const int R::style::Widget_GenericQuickContactBadge=0x0103020b; const int R::style::Widget_GestureOverlayView=0x010301fd; const int R::style::Widget_GestureOverlayView_White=0x010301fe; const int R::style::Widget_GridView=0x01030032; const int R::style::Widget_Holo=0x0103008a; const int R::style::Widget_Holo_AbsListView=0x01030260; const int R::style::Widget_Holo_ActionBar=0x010300b4; const int R::style::Widget_Holo_ActionBar_Solid=0x01030121; const int R::style::Widget_Holo_ActionBar_TabBar=0x010300f7; const int R::style::Widget_Holo_ActionBar_TabText=0x010300f6; const int R::style::Widget_Holo_ActionBar_TabView=0x010300f5; const int R::style::Widget_Holo_ActionButton=0x010300af; const int R::style::Widget_Holo_ActionButton_CloseMode=0x010300b3; const int R::style::Widget_Holo_ActionButton_Overflow=0x010300b0; const int R::style::Widget_Holo_ActionButton_TextButton=0x010300b1; const int R::style::Widget_Holo_ActionMode=0x010300b2; const int R::style::Widget_Holo_ActivityChooserView=0x01030267; const int R::style::Widget_Holo_AutoCompleteTextView=0x01030090; const int R::style::Widget_Holo_Button=0x0103008b; const int R::style::Widget_Holo_Button_Borderless=0x010300e2; const int R::style::Widget_Holo_Button_Borderless_Small=0x0103011a; const int R::style::Widget_Holo_Button_Inset=0x0103008d; const int R::style::Widget_Holo_Button_Small=0x0103008c; const int R::style::Widget_Holo_Button_Toggle=0x0103008e; const int R::style::Widget_Holo_ButtonBar=0x01030278; const int R::style::Widget_Holo_ButtonBar_Button=0x01030279; const int R::style::Widget_Holo_CalendarView=0x010300ec; const int R::style::Widget_Holo_CheckedTextView=0x010301d9; const int R::style::Widget_Holo_CompoundButton=0x01030261; const int R::style::Widget_Holo_CompoundButton_CheckBox=0x01030091; const int R::style::Widget_Holo_CompoundButton_RadioButton=0x010300a2; const int R::style::Widget_Holo_CompoundButton_Star=0x010300a6; const int R::style::Widget_Holo_CompoundButton_Switch=0x0103027a; const int R::style::Widget_Holo_DatePicker=0x010300ef; const int R::style::Widget_Holo_DropDownItem=0x010300aa; const int R::style::Widget_Holo_DropDownItem_Spinner=0x010300ab; const int R::style::Widget_Holo_EditText=0x01030093; const int R::style::Widget_Holo_ExpandableListView=0x01030094; const int R::style::Widget_Holo_ExpandableListView_White=0x01030262; const int R::style::Widget_Holo_Gallery=0x01030263; const int R::style::Widget_Holo_GestureOverlayView=0x01030264; const int R::style::Widget_Holo_GridView=0x01030095; const int R::style::Widget_Holo_HorizontalScrollView=0x010300a4; const int R::style::Widget_Holo_ImageButton=0x01030096; const int R::style::Widget_Holo_ImageWell=0x01030268; const int R::style::Widget_Holo_KeyboardView=0x01030271; const int R::style::Widget_Holo_Light=0x010300b5; const int R::style::Widget_Holo_Light_AbsListView=0x0103027f; const int R::style::Widget_Holo_Light_ActionBar=0x010300e1; const int R::style::Widget_Holo_Light_ActionBar_Solid=0x01030122; const int R::style::Widget_Holo_Light_ActionBar_Solid_Inverse=0x01030123; const int R::style::Widget_Holo_Light_ActionBar_TabBar=0x010300fa; const int R::style::Widget_Holo_Light_ActionBar_TabBar_Inverse=0x01030124; const int R::style::Widget_Holo_Light_ActionBar_TabText=0x010300f9; const int R::style::Widget_Holo_Light_ActionBar_TabText_Inverse=0x01030126; const int R::style::Widget_Holo_Light_ActionBar_TabView=0x010300f8; const int R::style::Widget_Holo_Light_ActionBar_TabView_Inverse=0x01030125; const int R::style::Widget_Holo_Light_ActionButton=0x010300dd; const int R::style::Widget_Holo_Light_ActionButton_CloseMode=0x010300e0; const int R::style::Widget_Holo_Light_ActionButton_Overflow=0x010300de; const int R::style::Widget_Holo_Light_ActionMode=0x010300df; const int R::style::Widget_Holo_Light_ActionMode_Inverse=0x01030127; const int R::style::Widget_Holo_Light_ActivityChooserView=0x01030286; const int R::style::Widget_Holo_Light_AutoCompleteTextView=0x010300bb; const int R::style::Widget_Holo_Light_Button=0x010300b6; const int R::style::Widget_Holo_Light_Button_Borderless=0x0103027b; const int R::style::Widget_Holo_Light_Button_Borderless_Small=0x0103011b; const int R::style::Widget_Holo_Light_Button_Inset=0x010300b8; const int R::style::Widget_Holo_Light_Button_Small=0x010300b7; const int R::style::Widget_Holo_Light_Button_Toggle=0x010300b9; const int R::style::Widget_Holo_Light_CalendarView=0x010300ed; const int R::style::Widget_Holo_Light_CheckedTextView=0x010301da; const int R::style::Widget_Holo_Light_CompoundButton_CheckBox=0x010300bc; const int R::style::Widget_Holo_Light_CompoundButton_RadioButton=0x010300d0; const int R::style::Widget_Holo_Light_CompoundButton_Star=0x010300d4; const int R::style::Widget_Holo_Light_CompoundButton_Switch=0x01030293; const int R::style::Widget_Holo_Light_DatePicker=0x01030285; const int R::style::Widget_Holo_Light_DropDownItem=0x010300d8; const int R::style::Widget_Holo_Light_DropDownItem_Spinner=0x010300d9; const int R::style::Widget_Holo_Light_EditText=0x010300be; const int R::style::Widget_Holo_Light_ExpandableListView=0x010300bf; const int R::style::Widget_Holo_Light_ExpandableListView_White=0x01030280; const int R::style::Widget_Holo_Light_Gallery=0x01030281; const int R::style::Widget_Holo_Light_GestureOverlayView=0x01030282; const int R::style::Widget_Holo_Light_GridView=0x010300c0; const int R::style::Widget_Holo_Light_HorizontalScrollView=0x010300d2; const int R::style::Widget_Holo_Light_ImageButton=0x010300c1; const int R::style::Widget_Holo_Light_ImageWell=0x01030287; const int R::style::Widget_Holo_Light_KeyboardView=0x0103028c; const int R::style::Widget_Holo_Light_ListPopupWindow=0x010300db; const int R::style::Widget_Holo_Light_ListView=0x010300c2; const int R::style::Widget_Holo_Light_ListView_DropDown=0x010300bd; const int R::style::Widget_Holo_Light_ListView_White=0x01030288; const int R::style::Widget_Holo_Light_MediaRouteButton=0x010301d6; const int R::style::Widget_Holo_Light_NumberPicker=0x01030283; const int R::style::Widget_Holo_Light_PopupMenu=0x010300dc; const int R::style::Widget_Holo_Light_PopupWindow=0x010300c3; const int R::style::Widget_Holo_Light_PopupWindow_ActionMode=0x01030289; const int R::style::Widget_Holo_Light_ProgressBar=0x010300c4; const int R::style::Widget_Holo_Light_ProgressBar_Horizontal=0x010300c5; const int R::style::Widget_Holo_Light_ProgressBar_Inverse=0x010300c9; const int R::style::Widget_Holo_Light_ProgressBar_Large=0x010300c8; const int R::style::Widget_Holo_Light_ProgressBar_Large_Inverse=0x010300cb; const int R::style::Widget_Holo_Light_ProgressBar_Small=0x010300c6; const int R::style::Widget_Holo_Light_ProgressBar_Small_Inverse=0x010300ca; const int R::style::Widget_Holo_Light_ProgressBar_Small_Title=0x010300c7; const int R::style::Widget_Holo_Light_QuickContactBadge_WindowLarge=0x0103028f; const int R::style::Widget_Holo_Light_QuickContactBadge_WindowMedium=0x0103028e; const int R::style::Widget_Holo_Light_QuickContactBadge_WindowSmall=0x0103028d; const int R::style::Widget_Holo_Light_QuickContactBadgeSmall_WindowLarge=0x01030292; const int R::style::Widget_Holo_Light_QuickContactBadgeSmall_WindowMedium=0x01030291; const int R::style::Widget_Holo_Light_QuickContactBadgeSmall_WindowSmall=0x01030290; const int R::style::Widget_Holo_Light_RatingBar=0x010300cd; const int R::style::Widget_Holo_Light_RatingBar_Indicator=0x010300ce; const int R::style::Widget_Holo_Light_RatingBar_Small=0x010300cf; const int R::style::Widget_Holo_Light_ScrollView=0x010300d1; const int R::style::Widget_Holo_Light_SeekBar=0x010300cc; const int R::style::Widget_Holo_Light_Spinner=0x010300d3; const int R::style::Widget_Holo_Light_Spinner_DropDown=0x0103028a; const int R::style::Widget_Holo_Light_Spinner_DropDown_ActionBar=0x0103028b; const int R::style::Widget_Holo_Light_Tab=0x010300e4; const int R::style::Widget_Holo_Light_TabWidget=0x010300d5; const int R::style::Widget_Holo_Light_TextSelectHandle=0x0103027d; const int R::style::Widget_Holo_Light_TextSuggestionsPopupWindow=0x0103027e; const int R::style::Widget_Holo_Light_TextView=0x010300ba; const int R::style::Widget_Holo_Light_TextView_ListSeparator=0x0103027c; const int R::style::Widget_Holo_Light_TextView_SpinnerItem=0x010300da; const int R::style::Widget_Holo_Light_TimePicker=0x01030284; const int R::style::Widget_Holo_Light_WebTextView=0x010300d6; const int R::style::Widget_Holo_Light_WebView=0x010300d7; const int R::style::Widget_Holo_ListPopupWindow=0x010300ad; const int R::style::Widget_Holo_ListView=0x01030097; const int R::style::Widget_Holo_ListView_DropDown=0x01030092; const int R::style::Widget_Holo_ListView_White=0x01030269; const int R::style::Widget_Holo_MediaRouteButton=0x010301d5; const int R::style::Widget_Holo_NumberPicker=0x01030265; const int R::style::Widget_Holo_PopupMenu=0x010300ae; const int R::style::Widget_Holo_PopupWindow=0x01030098; const int R::style::Widget_Holo_PopupWindow_ActionMode=0x0103026a; const int R::style::Widget_Holo_PreferenceFrameLayout=0x0103029d; const int R::style::Widget_Holo_ProgressBar=0x01030099; const int R::style::Widget_Holo_ProgressBar_Horizontal=0x0103009a; const int R::style::Widget_Holo_ProgressBar_Inverse=0x0103026b; const int R::style::Widget_Holo_ProgressBar_Large=0x0103009d; const int R::style::Widget_Holo_ProgressBar_Large_Inverse=0x0103026d; const int R::style::Widget_Holo_ProgressBar_Small=0x0103009b; const int R::style::Widget_Holo_ProgressBar_Small_Inverse=0x0103026c; const int R::style::Widget_Holo_ProgressBar_Small_Title=0x0103009c; const int R::style::Widget_Holo_QuickContactBadge_WindowLarge=0x01030274; const int R::style::Widget_Holo_QuickContactBadge_WindowMedium=0x01030273; const int R::style::Widget_Holo_QuickContactBadge_WindowSmall=0x01030272; const int R::style::Widget_Holo_QuickContactBadgeSmall_WindowLarge=0x01030277; const int R::style::Widget_Holo_QuickContactBadgeSmall_WindowMedium=0x01030276; const int R::style::Widget_Holo_QuickContactBadgeSmall_WindowSmall=0x01030275; const int R::style::Widget_Holo_RatingBar=0x0103009f; const int R::style::Widget_Holo_RatingBar_Indicator=0x010300a0; const int R::style::Widget_Holo_RatingBar_Small=0x010300a1; const int R::style::Widget_Holo_ScrollView=0x010300a3; const int R::style::Widget_Holo_SeekBar=0x0103009e; const int R::style::Widget_Holo_Spinner=0x010300a5; const int R::style::Widget_Holo_Spinner_DropDown=0x0103026e; const int R::style::Widget_Holo_Spinner_DropDown_ActionBar=0x0103026f; const int R::style::Widget_Holo_StackView=0x0103025c; const int R::style::Widget_Holo_Tab=0x010300e3; const int R::style::Widget_Holo_TabText=0x01030270; const int R::style::Widget_Holo_TabWidget=0x010300a7; const int R::style::Widget_Holo_TextSelectHandle=0x0103025e; const int R::style::Widget_Holo_TextSuggestionsPopupWindow=0x0103025f; const int R::style::Widget_Holo_TextView=0x0103008f; const int R::style::Widget_Holo_TextView_ListSeparator=0x0103025d; const int R::style::Widget_Holo_TextView_SpinnerItem=0x010300ac; const int R::style::Widget_Holo_TimePicker=0x01030266; const int R::style::Widget_Holo_WebTextView=0x010300a8; const int R::style::Widget_Holo_WebView=0x010300a9; const int R::style::Widget_HorizontalScrollView=0x01030209; const int R::style::Widget_ImageButton=0x01030026; const int R::style::Widget_ImageWell=0x01030025; const int R::style::Widget_KeyboardView=0x01030057; const int R::style::Widget_ListPopupWindow=0x01030085; const int R::style::Widget_ListView=0x0103002e; const int R::style::Widget_ListView_DropDown=0x01030030; const int R::style::Widget_ListView_Menu=0x01030031; const int R::style::Widget_ListView_White=0x0103002f; const int R::style::Widget_NumberPicker=0x01030207; const int R::style::Widget_PopupMenu=0x01030086; const int R::style::Widget_PopupWindow=0x01030036; const int R::style::Widget_PreferenceFrameLayout=0x010301e1; const int R::style::Widget_ProgressBar=0x0103001c; const int R::style::Widget_ProgressBar_Horizontal=0x0103001f; const int R::style::Widget_ProgressBar_Inverse=0x0103005b; const int R::style::Widget_ProgressBar_Large=0x0103001d; const int R::style::Widget_ProgressBar_Large_Inverse=0x0103005c; const int R::style::Widget_ProgressBar_Small=0x0103001e; const int R::style::Widget_ProgressBar_Small_Inverse=0x0103005d; const int R::style::Widget_ProgressBar_Small_Title=0x01030200; const int R::style::Widget_QuickContactBadge=0x0103020c; const int R::style::Widget_QuickContactBadge_WindowLarge=0x01030210; const int R::style::Widget_QuickContactBadge_WindowMedium=0x0103020f; const int R::style::Widget_QuickContactBadge_WindowSmall=0x0103020e; const int R::style::Widget_QuickContactBadgeSmall=0x0103020d; const int R::style::Widget_QuickContactBadgeSmall_WindowLarge=0x01030213; const int R::style::Widget_QuickContactBadgeSmall_WindowMedium=0x01030212; const int R::style::Widget_QuickContactBadgeSmall_WindowSmall=0x01030211; const int R::style::Widget_RatingBar=0x01030021; const int R::style::Widget_RatingBar_Indicator=0x01030201; const int R::style::Widget_RatingBar_Small=0x01030202; const int R::style::Widget_ScrollView=0x0103002d; const int R::style::Widget_SeekBar=0x01030020; const int R::style::Widget_Spinner=0x01030028; const int R::style::Widget_Spinner_DropDown=0x01030083; const int R::style::Widget_TabWidget=0x01030034; const int R::style::Widget_TextSelectHandle=0x01030235; const int R::style::Widget_TextSuggestionsPopupWindow=0x01030237; const int R::style::Widget_TextView=0x01030022; const int R::style::Widget_TextView_ListSeparator=0x01030204; const int R::style::Widget_TextView_ListSeparator_White=0x01030205; const int R::style::Widget_TextView_PopupMenu=0x01030029; const int R::style::Widget_TextView_SpinnerItem=0x0103002a; const int R::style::Widget_TimePicker=0x01030208; const int R::style::Widget_WebTextView=0x0103020a; const int R::style::Widget_WebView=0x01030033; const int R::style::WindowTitle=0x010301de; const int R::style::WindowTitle_DeviceDefault=0x010302ed; const int R::style::WindowTitle_Holo=0x0103029a; const int R::style::WindowTitleBackground=0x010301dd; const int R::style::WindowTitleBackground_DeviceDefault=0x010302ee; const int R::style::WindowTitleBackground_Holo=0x01030299; const int R::style::ZoomControls=0x01030233; const int R::style::wifi_item=0x0103029f; const int R::style::wifi_item_content=0x010302a1; const int R::style::wifi_item_label=0x010302a0; const int R::style::wifi_section=0x010302a2; const int R::xml::apns=0x010f0000; const int R::xml::autotext=0x010f0001; const int R::xml::eri=0x010f0002; const int R::xml::kg_password_kbd_numeric=0x010f0003; const int R::xml::password_kbd_extension=0x010f0004; const int R::xml::password_kbd_numeric=0x010f0005; const int R::xml::password_kbd_popup_template=0x010f0006; const int R::xml::password_kbd_qwerty=0x010f0007; const int R::xml::password_kbd_qwerty_shifted=0x010f0008; const int R::xml::password_kbd_symbols=0x010f0009; const int R::xml::password_kbd_symbols_shift=0x010f000a; const int R::xml::power_profile=0x010f000b; const int R::xml::preferred_time_zones=0x010f000c; const int R::xml::sms_short_codes=0x010f000d; const int R::xml::storage_list=0x010f000e; const int R::xml::time_zones_by_country=0x010f000f; const int R::styleable::AbsListView[] = { 0x010100fb, 0x010100fc, 0x010100fd, 0x010100fe, 0x010100ff, 0x01010100, 0x01010101, 0x0101012b, 0x01010226, 0x01010231, 0x01010335 }; const int R::AbsListView_cacheColorHint = 6; const int R::AbsListView_choiceMode = 7; const int R::AbsListView_drawSelectorOnTop = 1; const int R::AbsListView_fastScrollAlwaysVisible = 10; const int R::AbsListView_fastScrollEnabled = 8; const int R::AbsListView_listSelector = 0; const int R::AbsListView_scrollingCache = 3; const int R::AbsListView_smoothScrollbar = 9; const int R::AbsListView_stackFromBottom = 2; const int R::AbsListView_textFilterEnabled = 4; const int R::AbsListView_transcriptMode = 5; const int R::styleable::AbsSpinner[] = { 0x010100b2 }; const int R::AbsSpinner_entries = 0; const int R::styleable::AbsoluteLayout_Layout[] = { 0x0101017f, 0x01010180 }; const int R::AbsoluteLayout_Layout_layout_x = 0; const int R::AbsoluteLayout_Layout_layout_y = 1; const int R::styleable::AccelerateInterpolator[] = { 0x010101d3 }; const int R::AccelerateInterpolator_factor = 0; const int R::styleable::AccessibilityService[] = { 0x01010020, 0x01010225, 0x01010380, 0x01010381, 0x01010382, 0x01010383, 0x01010384, 0x01010385 }; const int R::AccessibilityService_accessibilityEventTypes = 2; const int R::AccessibilityService_accessibilityFeedbackType = 4; const int R::AccessibilityService_accessibilityFlags = 6; const int R::AccessibilityService_canRetrieveWindowContent = 7; const int R::AccessibilityService_description = 0; const int R::AccessibilityService_notificationTimeout = 5; const int R::AccessibilityService_packageNames = 3; const int R::AccessibilityService_settingsActivity = 1; const int R::styleable::AccountAuthenticator[] = { 0x01010001, 0x01010002, 0x0101028f, 0x0101029e, 0x0101029f, 0x0101033b }; const int R::AccountAuthenticator_accountPreferences = 4; const int R::AccountAuthenticator_accountType = 2; const int R::AccountAuthenticator_customTokens = 5; const int R::AccountAuthenticator_icon = 1; const int R::AccountAuthenticator_label = 0; const int R::AccountAuthenticator_smallIcon = 3; const int R::styleable::ActionBar[] = { 0x01010002, 0x01010077, 0x010100d4, 0x01010129, 0x01010155, 0x010101e1, 0x010102be, 0x010102cf, 0x010102d0, 0x010102d1, 0x010102d2, 0x010102f8, 0x010102f9, 0x01010318, 0x01010319, 0x0101031d, 0x0101032d, 0x0101038a, 0x0101038b }; const int R::ActionBar_background = 2; const int R::ActionBar_backgroundSplit = 18; const int R::ActionBar_backgroundStacked = 17; const int R::ActionBar_customNavigationLayout = 10; const int R::ActionBar_displayOptions = 8; const int R::ActionBar_divider = 3; const int R::ActionBar_height = 4; const int R::ActionBar_homeLayout = 15; const int R::ActionBar_icon = 0; const int R::ActionBar_indeterminateProgressStyle = 13; const int R::ActionBar_itemPadding = 16; const int R::ActionBar_logo = 6; const int R::ActionBar_navigationMode = 7; const int R::ActionBar_progressBarPadding = 14; const int R::ActionBar_progressBarStyle = 1; const int R::ActionBar_subtitle = 9; const int R::ActionBar_subtitleTextStyle = 12; const int R::ActionBar_title = 5; const int R::ActionBar_titleTextStyle = 11; const int R::styleable::ActionBar_LayoutParams[] = { 0x010100b3 }; const int R::ActionBar_LayoutParams_layout_gravity = 0; const int R::styleable::ActionMenuItemView[] = { 0x0101013f }; const int R::ActionMenuItemView_minWidth = 0; const int R::styleable::ActionMode[] = { 0x010100d4, 0x01010155, 0x010102f8, 0x010102f9, 0x0101038b }; const int R::ActionMode_background = 0; const int R::ActionMode_backgroundSplit = 4; const int R::ActionMode_height = 1; const int R::ActionMode_subtitleTextStyle = 3; const int R::ActionMode_titleTextStyle = 2; const int R::styleable::ActivityChooserView[] = { 0x01010424, 0x01010425 }; const int R::ActivityChooserView_expandActivityOverflowButtonDrawable = 1; const int R::ActivityChooserView_initialActivityCount = 0; const int R::styleable::AdapterViewAnimator[] = { 0x01010177, 0x01010178, 0x010102d5, 0x01010307 }; const int R::AdapterViewAnimator_animateFirstView = 2; const int R::AdapterViewAnimator_inAnimation = 0; const int R::AdapterViewAnimator_loopViews = 3; const int R::AdapterViewAnimator_outAnimation = 1; const int R::styleable::AdapterViewFlipper[] = { 0x01010179, 0x010102b5 }; const int R::AdapterViewFlipper_autoStart = 1; const int R::AdapterViewFlipper_flipInterval = 0; const int R::styleable::AlertDialog[] = { 0x010100c6, 0x010100c7, 0x010100c8, 0x010100c9, 0x010100ca, 0x010100cb, 0x010100cc, 0x010100cd, 0x010100ce, 0x010100cf, 0x010100f2, 0x010103ff, 0x01010400, 0x01010401, 0x01010402, 0x01010403, 0x01010404 }; const int R::AlertDialog_bottomBright = 7; const int R::AlertDialog_bottomDark = 3; const int R::AlertDialog_bottomMedium = 8; const int R::AlertDialog_centerBright = 6; const int R::AlertDialog_centerDark = 2; const int R::AlertDialog_centerMedium = 9; const int R::AlertDialog_fullBright = 4; const int R::AlertDialog_fullDark = 0; const int R::AlertDialog_horizontalProgressLayout = 16; const int R::AlertDialog_layout = 10; const int R::AlertDialog_listItemLayout = 14; const int R::AlertDialog_listLayout = 11; const int R::AlertDialog_multiChoiceItemLayout = 12; const int R::AlertDialog_progressLayout = 15; const int R::AlertDialog_singleChoiceItemLayout = 13; const int R::AlertDialog_topBright = 5; const int R::AlertDialog_topDark = 1; const int R::styleable::AlphaAnimation[] = { 0x010101ca, 0x010101cb }; const int R::AlphaAnimation_fromAlpha = 0; const int R::AlphaAnimation_toAlpha = 1; const int R::styleable::AnalogClock[] = { 0x01010102, 0x01010103, 0x01010104 }; const int R::AnalogClock_dial = 0; const int R::AnalogClock_hand_hour = 1; const int R::AnalogClock_hand_minute = 2; const int R::styleable::AndroidManifest[] = { 0x0101000b, 0x0101021b, 0x0101021c, 0x01010261, 0x010102b7 }; const int R::AndroidManifest_installLocation = 4; const int R::AndroidManifest_sharedUserId = 0; const int R::AndroidManifest_sharedUserLabel = 3; const int R::AndroidManifest_versionCode = 1; const int R::AndroidManifest_versionName = 2; const int R::styleable::AndroidManifestAction[] = { 0x01010003 }; const int R::AndroidManifestAction_name = 0; const int R::styleable::AndroidManifestActivity[] = { 0x01010000, 0x01010001, 0x01010002, 0x01010003, 0x01010006, 0x0101000e, 0x01010010, 0x01010011, 0x01010012, 0x01010013, 0x01010014, 0x01010015, 0x01010016, 0x01010017, 0x0101001d, 0x0101001e, 0x0101001f, 0x01010020, 0x01010203, 0x01010204, 0x0101022b, 0x0101022d, 0x010102a7, 0x010102be, 0x010102c0, 0x010102d3, 0x01010398, 0x010103a7, 0x010103bf, 0x010103c9, 0x01010457 }; const int R::AndroidManifestActivity_allowTaskReparenting = 19; const int R::AndroidManifestActivity_alwaysRetainTaskState = 18; const int R::AndroidManifestActivity_clearTaskOnLaunch = 11; const int R::AndroidManifestActivity_configChanges = 16; const int R::AndroidManifestActivity_description = 17; const int R::AndroidManifestActivity_enabled = 5; const int R::AndroidManifestActivity_excludeFromRecents = 13; const int R::AndroidManifestActivity_exported = 6; const int R::AndroidManifestActivity_finishOnCloseSystemDialogs = 22; const int R::AndroidManifestActivity_finishOnTaskLaunch = 10; const int R::AndroidManifestActivity_hardwareAccelerated = 25; const int R::AndroidManifestActivity_icon = 2; const int R::AndroidManifestActivity_immersive = 24; const int R::AndroidManifestActivity_label = 1; const int R::AndroidManifestActivity_launchMode = 14; const int R::AndroidManifestActivity_logo = 23; const int R::AndroidManifestActivity_multiprocess = 9; const int R::AndroidManifestActivity_name = 3; const int R::AndroidManifestActivity_noHistory = 21; const int R::AndroidManifestActivity_parentActivityName = 27; const int R::AndroidManifestActivity_permission = 4; const int R::AndroidManifestActivity_primaryUserOnly = 30; const int R::AndroidManifestActivity_process = 7; const int R::AndroidManifestActivity_screenOrientation = 15; const int R::AndroidManifestActivity_showOnLockScreen = 29; const int R::AndroidManifestActivity_singleUser = 28; const int R::AndroidManifestActivity_stateNotNeeded = 12; const int R::AndroidManifestActivity_taskAffinity = 8; const int R::AndroidManifestActivity_theme = 0; const int R::AndroidManifestActivity_uiOptions = 26; const int R::AndroidManifestActivity_windowSoftInputMode = 20; const int R::styleable::AndroidManifestActivityAlias[] = { 0x01010001, 0x01010002, 0x01010003, 0x01010006, 0x0101000e, 0x01010010, 0x01010020, 0x01010202, 0x010102be, 0x010103a7 }; const int R::AndroidManifestActivityAlias_description = 6; const int R::AndroidManifestActivityAlias_enabled = 4; const int R::AndroidManifestActivityAlias_exported = 5; const int R::AndroidManifestActivityAlias_icon = 1; const int R::AndroidManifestActivityAlias_label = 0; const int R::AndroidManifestActivityAlias_logo = 8; const int R::AndroidManifestActivityAlias_name = 2; const int R::AndroidManifestActivityAlias_parentActivityName = 9; const int R::AndroidManifestActivityAlias_permission = 3; const int R::AndroidManifestActivityAlias_targetActivity = 7; const int R::styleable::AndroidManifestApplication[] = { 0x01010000, 0x01010001, 0x01010002, 0x01010003, 0x01010004, 0x01010005, 0x01010006, 0x0101000c, 0x0101000d, 0x0101000e, 0x0101000f, 0x01010011, 0x01010012, 0x01010020, 0x01010204, 0x01010272, 0x0101027f, 0x01010280, 0x0101029c, 0x0101029d, 0x010102b8, 0x010102ba, 0x010102be, 0x010102d3, 0x0101035a, 0x01010398, 0x010103af, 0x01010455, 0x01010456 }; const int R::AndroidManifestApplication_allowBackup = 17; const int R::AndroidManifestApplication_allowClearUserData = 5; const int R::AndroidManifestApplication_allowTaskReparenting = 14; const int R::AndroidManifestApplication_backupAgent = 16; const int R::AndroidManifestApplication_cantSaveState = 28; const int R::AndroidManifestApplication_debuggable = 10; const int R::AndroidManifestApplication_description = 13; const int R::AndroidManifestApplication_enabled = 9; const int R::AndroidManifestApplication_hardwareAccelerated = 23; const int R::AndroidManifestApplication_hasCode = 7; const int R::AndroidManifestApplication_icon = 2; const int R::AndroidManifestApplication_killAfterRestore = 18; const int R::AndroidManifestApplication_label = 1; const int R::AndroidManifestApplication_largeHeap = 24; const int R::AndroidManifestApplication_logo = 22; const int R::AndroidManifestApplication_manageSpaceActivity = 4; const int R::AndroidManifestApplication_name = 3; const int R::AndroidManifestApplication_neverEncrypt = 27; const int R::AndroidManifestApplication_permission = 6; const int R::AndroidManifestApplication_persistent = 8; const int R::AndroidManifestApplication_process = 11; const int R::AndroidManifestApplication_restoreAnyVersion = 21; const int R::AndroidManifestApplication_restoreNeedsApplication = 19; const int R::AndroidManifestApplication_supportsRtl = 26; const int R::AndroidManifestApplication_taskAffinity = 12; const int R::AndroidManifestApplication_testOnly = 15; const int R::AndroidManifestApplication_theme = 0; const int R::AndroidManifestApplication_uiOptions = 25; const int R::AndroidManifestApplication_vmSafeMode = 20; const int R::styleable::AndroidManifestCategory[] = { 0x01010003 }; const int R::AndroidManifestCategory_name = 0; const int R::styleable::AndroidManifestCompatibleScreensScreen[] = { 0x010102ca, 0x010102cb }; const int R::AndroidManifestCompatibleScreensScreen_screenDensity = 1; const int R::AndroidManifestCompatibleScreensScreen_screenSize = 0; const int R::styleable::AndroidManifestData[] = { 0x01010026, 0x01010027, 0x01010028, 0x01010029, 0x0101002a, 0x0101002b, 0x0101002c }; const int R::AndroidManifestData_host = 2; const int R::AndroidManifestData_mimeType = 0; const int R::AndroidManifestData_path = 4; const int R::AndroidManifestData_pathPattern = 6; const int R::AndroidManifestData_pathPrefix = 5; const int R::AndroidManifestData_port = 3; const int R::AndroidManifestData_scheme = 1; const int R::styleable::AndroidManifestGrantUriPermission[] = { 0x0101002a, 0x0101002b, 0x0101002c }; const int R::AndroidManifestGrantUriPermission_path = 0; const int R::AndroidManifestGrantUriPermission_pathPattern = 2; const int R::AndroidManifestGrantUriPermission_pathPrefix = 1; const int R::styleable::AndroidManifestInstrumentation[] = { 0x01010001, 0x01010002, 0x01010003, 0x01010021, 0x01010022, 0x01010023, 0x010102be }; const int R::AndroidManifestInstrumentation_functionalTest = 5; const int R::AndroidManifestInstrumentation_handleProfiling = 4; const int R::AndroidManifestInstrumentation_icon = 1; const int R::AndroidManifestInstrumentation_label = 0; const int R::AndroidManifestInstrumentation_logo = 6; const int R::AndroidManifestInstrumentation_name = 2; const int R::AndroidManifestInstrumentation_targetPackage = 3; const int R::styleable::AndroidManifestIntentFilter[] = { 0x01010001, 0x01010002, 0x0101001c, 0x010102be }; const int R::AndroidManifestIntentFilter_icon = 1; const int R::AndroidManifestIntentFilter_label = 0; const int R::AndroidManifestIntentFilter_logo = 3; const int R::AndroidManifestIntentFilter_priority = 2; const int R::styleable::AndroidManifestMetaData[] = { 0x01010003, 0x01010024, 0x01010025 }; const int R::AndroidManifestMetaData_name = 0; const int R::AndroidManifestMetaData_resource = 2; const int R::AndroidManifestMetaData_value = 1; const int R::styleable::AndroidManifestOriginalPackage[] = { 0x01010003 }; const int R::AndroidManifestOriginalPackage_name = 0; const int R::styleable::AndroidManifestPackageVerifier[] = { 0x01010003, 0x010103a6 }; const int R::AndroidManifestPackageVerifier_name = 0; const int R::AndroidManifestPackageVerifier_publicKey = 1; const int R::styleable::AndroidManifestPathPermission[] = { 0x01010006, 0x01010007, 0x01010008, 0x0101002a, 0x0101002b, 0x0101002c }; const int R::AndroidManifestPathPermission_path = 3; const int R::AndroidManifestPathPermission_pathPattern = 5; const int R::AndroidManifestPathPermission_pathPrefix = 4; const int R::AndroidManifestPathPermission_permission = 0; const int R::AndroidManifestPathPermission_readPermission = 1; const int R::AndroidManifestPathPermission_writePermission = 2; const int R::styleable::AndroidManifestPermission[] = { 0x01010001, 0x01010002, 0x01010003, 0x01010009, 0x0101000a, 0x01010020, 0x010102be, 0x010103c7 }; const int R::AndroidManifestPermission_description = 5; const int R::AndroidManifestPermission_icon = 1; const int R::AndroidManifestPermission_label = 0; const int R::AndroidManifestPermission_logo = 6; const int R::AndroidManifestPermission_name = 2; const int R::AndroidManifestPermission_permissionFlags = 7; const int R::AndroidManifestPermission_permissionGroup = 4; const int R::AndroidManifestPermission_protectionLevel = 3; const int R::styleable::AndroidManifestPermissionGroup[] = { 0x01010001, 0x01010002, 0x01010003, 0x0101001c, 0x01010020, 0x010102be, 0x010103c5 }; const int R::AndroidManifestPermissionGroup_description = 4; const int R::AndroidManifestPermissionGroup_icon = 1; const int R::AndroidManifestPermissionGroup_label = 0; const int R::AndroidManifestPermissionGroup_logo = 5; const int R::AndroidManifestPermissionGroup_name = 2; const int R::AndroidManifestPermissionGroup_permissionGroupFlags = 6; const int R::AndroidManifestPermissionGroup_priority = 3; const int R::styleable::AndroidManifestPermissionTree[] = { 0x01010001, 0x01010002, 0x01010003, 0x010102be }; const int R::AndroidManifestPermissionTree_icon = 1; const int R::AndroidManifestPermissionTree_label = 0; const int R::AndroidManifestPermissionTree_logo = 3; const int R::AndroidManifestPermissionTree_name = 2; const int R::styleable::AndroidManifestProtectedBroadcast[] = { 0x01010003 }; const int R::AndroidManifestProtectedBroadcast_name = 0; const int R::styleable::AndroidManifestProvider[] = { 0x01010001, 0x01010002, 0x01010003, 0x01010006, 0x01010007, 0x01010008, 0x0101000e, 0x01010010, 0x01010011, 0x01010013, 0x01010018, 0x01010019, 0x0101001a, 0x0101001b, 0x01010020, 0x010102be, 0x010103bf }; const int R::AndroidManifestProvider_authorities = 10; const int R::AndroidManifestProvider_description = 14; const int R::AndroidManifestProvider_enabled = 6; const int R::AndroidManifestProvider_exported = 7; const int R::AndroidManifestProvider_grantUriPermissions = 13; const int R::AndroidManifestProvider_icon = 1; const int R::AndroidManifestProvider_initOrder = 12; const int R::AndroidManifestProvider_label = 0; const int R::AndroidManifestProvider_logo = 15; const int R::AndroidManifestProvider_multiprocess = 9; const int R::AndroidManifestProvider_name = 2; const int R::AndroidManifestProvider_permission = 3; const int R::AndroidManifestProvider_process = 8; const int R::AndroidManifestProvider_readPermission = 4; const int R::AndroidManifestProvider_singleUser = 16; const int R::AndroidManifestProvider_syncable = 11; const int R::AndroidManifestProvider_writePermission = 5; const int R::styleable::AndroidManifestReceiver[] = { 0x01010001, 0x01010002, 0x01010003, 0x01010006, 0x0101000e, 0x01010010, 0x01010011, 0x01010020, 0x010102be, 0x010103bf }; const int R::AndroidManifestReceiver_description = 7; const int R::AndroidManifestReceiver_enabled = 4; const int R::AndroidManifestReceiver_exported = 5; const int R::AndroidManifestReceiver_icon = 1; const int R::AndroidManifestReceiver_label = 0; const int R::AndroidManifestReceiver_logo = 8; const int R::AndroidManifestReceiver_name = 2; const int R::AndroidManifestReceiver_permission = 3; const int R::AndroidManifestReceiver_process = 6; const int R::AndroidManifestReceiver_singleUser = 9; const int R::styleable::AndroidManifestService[] = { 0x01010001, 0x01010002, 0x01010003, 0x01010006, 0x0101000e, 0x01010010, 0x01010011, 0x01010020, 0x010102be, 0x0101036a, 0x010103a9, 0x010103bf }; const int R::AndroidManifestService_description = 7; const int R::AndroidManifestService_enabled = 4; const int R::AndroidManifestService_exported = 5; const int R::AndroidManifestService_icon = 1; const int R::AndroidManifestService_isolatedProcess = 10; const int R::AndroidManifestService_label = 0; const int R::AndroidManifestService_logo = 8; const int R::AndroidManifestService_name = 2; const int R::AndroidManifestService_permission = 3; const int R::AndroidManifestService_process = 6; const int R::AndroidManifestService_singleUser = 11; const int R::AndroidManifestService_stopWithTask = 9; const int R::styleable::AndroidManifestSupportsScreens[] = { 0x0101026c, 0x01010284, 0x01010285, 0x01010286, 0x0101028d, 0x010102bf, 0x01010364, 0x01010365, 0x01010366 }; const int R::AndroidManifestSupportsScreens_anyDensity = 0; const int R::AndroidManifestSupportsScreens_compatibleWidthLimitDp = 7; const int R::AndroidManifestSupportsScreens_largeScreens = 3; const int R::AndroidManifestSupportsScreens_largestWidthLimitDp = 8; const int R::AndroidManifestSupportsScreens_normalScreens = 2; const int R::AndroidManifestSupportsScreens_requiresSmallestWidthDp = 6; const int R::AndroidManifestSupportsScreens_resizeable = 4; const int R::AndroidManifestSupportsScreens_smallScreens = 1; const int R::AndroidManifestSupportsScreens_xlargeScreens = 5; const int R::styleable::AndroidManifestUsesConfiguration[] = { 0x01010227, 0x01010228, 0x01010229, 0x0101022a, 0x01010232 }; const int R::AndroidManifestUsesConfiguration_reqFiveWayNav = 4; const int R::AndroidManifestUsesConfiguration_reqHardKeyboard = 2; const int R::AndroidManifestUsesConfiguration_reqKeyboardType = 1; const int R::AndroidManifestUsesConfiguration_reqNavigation = 3; const int R::AndroidManifestUsesConfiguration_reqTouchScreen = 0; const int R::styleable::AndroidManifestUsesFeature[] = { 0x01010003, 0x01010281, 0x0101028e }; const int R::AndroidManifestUsesFeature_glEsVersion = 1; const int R::AndroidManifestUsesFeature_name = 0; const int R::AndroidManifestUsesFeature_required = 2; const int R::styleable::AndroidManifestUsesLibrary[] = { 0x01010003, 0x0101028e }; const int R::AndroidManifestUsesLibrary_name = 0; const int R::AndroidManifestUsesLibrary_required = 1; const int R::styleable::AndroidManifestUsesPermission[] = { 0x01010003 }; const int R::AndroidManifestUsesPermission_name = 0; const int R::styleable::AndroidManifestUsesSdk[] = { 0x0101020c, 0x01010270, 0x01010271 }; const int R::AndroidManifestUsesSdk_maxSdkVersion = 2; const int R::AndroidManifestUsesSdk_minSdkVersion = 0; const int R::AndroidManifestUsesSdk_targetSdkVersion = 1; const int R::styleable::AnimatedRotateDrawable[] = { 0x01010194, 0x01010199, 0x010101b5, 0x010101b6, 0x01010421, 0x01010422 }; const int R::AnimatedRotateDrawable_drawable = 1; const int R::AnimatedRotateDrawable_frameDuration = 4; const int R::AnimatedRotateDrawable_framesCount = 5; const int R::AnimatedRotateDrawable_pivotX = 2; const int R::AnimatedRotateDrawable_pivotY = 3; const int R::AnimatedRotateDrawable_visible = 0; const int R::styleable::Animation[] = { 0x010100d4, 0x01010141, 0x01010198, 0x010101bc, 0x010101bd, 0x010101be, 0x010101bf, 0x010101c0, 0x010101c1, 0x0101024f, 0x010102a6 }; const int R::Animation_background = 0; const int R::Animation_detachWallpaper = 10; const int R::Animation_duration = 2; const int R::Animation_fillAfter = 4; const int R::Animation_fillBefore = 3; const int R::Animation_fillEnabled = 9; const int R::Animation_interpolator = 1; const int R::Animation_repeatCount = 6; const int R::Animation_repeatMode = 7; const int R::Animation_startOffset = 5; const int R::Animation_zAdjustment = 8; const int R::styleable::AnimationDrawable[] = { 0x01010194, 0x01010195, 0x01010197 }; const int R::AnimationDrawable_oneshot = 2; const int R::AnimationDrawable_variablePadding = 1; const int R::AnimationDrawable_visible = 0; const int R::styleable::AnimationDrawableItem[] = { 0x01010198, 0x01010199 }; const int R::AnimationDrawableItem_drawable = 1; const int R::AnimationDrawableItem_duration = 0; const int R::styleable::AnimationSet[] = { 0x01010198, 0x010101bb, 0x010101bc, 0x010101bd, 0x010101be, 0x010101c0 }; const int R::AnimationSet_duration = 0; const int R::AnimationSet_fillAfter = 3; const int R::AnimationSet_fillBefore = 2; const int R::AnimationSet_repeatMode = 5; const int R::AnimationSet_shareInterpolator = 1; const int R::AnimationSet_startOffset = 4; const int R::styleable::Animator[] = { 0x01010141, 0x01010198, 0x010101be, 0x010101bf, 0x010101c0, 0x010102de, 0x010102df, 0x010102e0 }; const int R::Animator_duration = 1; const int R::Animator_interpolator = 0; const int R::Animator_repeatCount = 3; const int R::Animator_repeatMode = 4; const int R::Animator_startOffset = 2; const int R::Animator_valueFrom = 5; const int R::Animator_valueTo = 6; const int R::Animator_valueType = 7; const int R::styleable::AnimatorSet[] = { 0x010102e2 }; const int R::AnimatorSet_ordering = 0; const int R::styleable::AnticipateInterpolator[] = { 0x0101026a }; const int R::AnticipateInterpolator_tension = 0; const int R::styleable::AnticipateOvershootInterpolator[] = { 0x0101026a, 0x0101026b }; const int R::AnticipateOvershootInterpolator_extraTension = 1; const int R::AnticipateOvershootInterpolator_tension = 0; const int R::styleable::AppWidgetProviderInfo[] = { 0x0101013f, 0x01010140, 0x01010250, 0x01010251, 0x0101025d, 0x010102da, 0x0101030f, 0x01010363, 0x01010395, 0x01010396, 0x010103c2, 0x010103c4 }; const int R::AppWidgetProviderInfo_autoAdvanceViewId = 6; const int R::AppWidgetProviderInfo_configure = 4; const int R::AppWidgetProviderInfo_initialKeyguardLayout = 10; const int R::AppWidgetProviderInfo_initialLayout = 3; const int R::AppWidgetProviderInfo_minHeight = 1; const int R::AppWidgetProviderInfo_minResizeHeight = 9; const int R::AppWidgetProviderInfo_minResizeWidth = 8; const int R::AppWidgetProviderInfo_minWidth = 0; const int R::AppWidgetProviderInfo_previewImage = 5; const int R::AppWidgetProviderInfo_resizeMode = 7; const int R::AppWidgetProviderInfo_updatePeriodMillis = 2; const int R::AppWidgetProviderInfo_widgetCategory = 11; const int R::styleable::AutoCompleteTextView[] = { 0x01010172, 0x01010173, 0x01010174, 0x01010175, 0x01010220, 0x01010262, 0x01010263, 0x01010283, 0x010102ac, 0x010102ad }; const int R::AutoCompleteTextView_completionHint = 0; const int R::AutoCompleteTextView_completionHintView = 1; const int R::AutoCompleteTextView_completionThreshold = 2; const int R::AutoCompleteTextView_dropDownAnchor = 6; const int R::AutoCompleteTextView_dropDownHeight = 7; const int R::AutoCompleteTextView_dropDownHorizontalOffset = 8; const int R::AutoCompleteTextView_dropDownSelector = 3; const int R::AutoCompleteTextView_dropDownVerticalOffset = 9; const int R::AutoCompleteTextView_dropDownWidth = 5; const int R::AutoCompleteTextView_inputType = 4; const int R::styleable::BitmapDrawable[] = { 0x010100af, 0x01010119, 0x0101011a, 0x0101011b, 0x0101011c, 0x01010201 }; const int R::BitmapDrawable_antialias = 2; const int R::BitmapDrawable_dither = 4; const int R::BitmapDrawable_filter = 3; const int R::BitmapDrawable_gravity = 0; const int R::BitmapDrawable_src = 1; const int R::BitmapDrawable_tileMode = 5; const int R::styleable::Button[] = { }; const int R::styleable::CalendarView[] = { 0x0101033d, 0x0101033e, 0x0101033f, 0x01010340, 0x01010341, 0x01010342, 0x01010343, 0x01010344, 0x01010345, 0x01010346, 0x01010347, 0x01010348, 0x01010349 }; const int R::CalendarView_dateTextAppearance = 12; const int R::CalendarView_firstDayOfWeek = 0; const int R::CalendarView_focusedMonthDateColor = 6; const int R::CalendarView_maxDate = 3; const int R::CalendarView_minDate = 2; const int R::CalendarView_selectedDateVerticalBar = 10; const int R::CalendarView_selectedWeekBackgroundColor = 5; const int R::CalendarView_showWeekNumber = 1; const int R::CalendarView_shownWeekCount = 4; const int R::CalendarView_unfocusedMonthDateColor = 7; const int R::CalendarView_weekDayTextAppearance = 11; const int R::CalendarView_weekNumberColor = 8; const int R::CalendarView_weekSeparatorLineColor = 9; const int R::styleable::CheckBoxPreference[] = { 0x010101ef, 0x010101f0, 0x010101f1 }; const int R::CheckBoxPreference_disableDependentsState = 2; const int R::CheckBoxPreference_summaryOff = 1; const int R::CheckBoxPreference_summaryOn = 0; const int R::styleable::CheckedTextView[] = { 0x01010106, 0x01010108 }; const int R::CheckedTextView_checkMark = 1; const int R::CheckedTextView_checked = 0; const int R::styleable::Chronometer[] = { 0x01010105 }; const int R::Chronometer_format = 0; const int R::styleable::ClipDrawable[] = { 0x010100af, 0x01010199, 0x0101020a }; const int R::ClipDrawable_clipOrientation = 2; const int R::ClipDrawable_drawable = 1; const int R::ClipDrawable_gravity = 0; const int R::styleable::ColorDrawable[] = { 0x010101a5 }; const int R::ColorDrawable_color = 0; const int R::styleable::CompoundButton[] = { 0x01010106, 0x01010107 }; const int R::CompoundButton_button = 1; const int R::CompoundButton_checked = 0; const int R::styleable::ContactsDataKind[] = { 0x01010002, 0x01010026, 0x010102a2, 0x010102a3, 0x010102a4, 0x010102cc }; const int R::ContactsDataKind_allContactsName = 5; const int R::ContactsDataKind_detailColumn = 3; const int R::ContactsDataKind_detailSocialSummary = 4; const int R::ContactsDataKind_icon = 0; const int R::ContactsDataKind_mimeType = 1; const int R::ContactsDataKind_summaryColumn = 2; const int R::styleable::CycleInterpolator[] = { 0x010101d4 }; const int R::CycleInterpolator_cycles = 0; const int R::styleable::DatePicker[] = { 0x0101017c, 0x0101017d, 0x0101033f, 0x01010340, 0x0101034b, 0x0101034c, 0x01010413 }; const int R::DatePicker_calendarViewShown = 5; const int R::DatePicker_endYear = 1; const int R::DatePicker_internalLayout = 6; const int R::DatePicker_maxDate = 3; const int R::DatePicker_minDate = 2; const int R::DatePicker_spinnersShown = 4; const int R::DatePicker_startYear = 0; const int R::styleable::DecelerateInterpolator[] = { 0x010101d3 }; const int R::DecelerateInterpolator_factor = 0; const int R::styleable::DeviceAdmin[] = { 0x01010194 }; const int R::DeviceAdmin_visible = 0; const int R::styleable::DialogPreference[] = { 0x010101f2, 0x010101f3, 0x010101f4, 0x010101f5, 0x010101f6, 0x010101f7 }; const int R::DialogPreference_dialogIcon = 2; const int R::DialogPreference_dialogLayout = 5; const int R::DialogPreference_dialogMessage = 1; const int R::DialogPreference_dialogTitle = 0; const int R::DialogPreference_negativeButtonText = 4; const int R::DialogPreference_positiveButtonText = 3; const int R::styleable::Drawable[] = { 0x01010194 }; const int R::Drawable_visible = 0; const int R::styleable::DrawableCorners[] = { 0x010101a8, 0x010101a9, 0x010101aa, 0x010101ab, 0x010101ac }; const int R::DrawableCorners_bottomLeftRadius = 3; const int R::DrawableCorners_bottomRightRadius = 4; const int R::DrawableCorners_radius = 0; const int R::DrawableCorners_topLeftRadius = 1; const int R::DrawableCorners_topRightRadius = 2; const int R::styleable::DrawableStates[] = { 0x0101009c, 0x0101009d, 0x0101009e, 0x0101009f, 0x010100a0, 0x010100a1, 0x010100a2, 0x010100a3, 0x010100a4, 0x010100a5, 0x010100a6, 0x010100a7, 0x010102fe, 0x0101031b, 0x01010367, 0x01010368, 0x01010369, 0x01010423 }; const int R::DrawableStates_state_accelerated = 13; const int R::DrawableStates_state_accessibility_focused = 17; const int R::DrawableStates_state_activated = 12; const int R::DrawableStates_state_active = 6; const int R::DrawableStates_state_checkable = 3; const int R::DrawableStates_state_checked = 4; const int R::DrawableStates_state_drag_can_accept = 15; const int R::DrawableStates_state_drag_hovered = 16; const int R::DrawableStates_state_enabled = 2; const int R::DrawableStates_state_first = 8; const int R::DrawableStates_state_focused = 0; const int R::DrawableStates_state_hovered = 14; const int R::DrawableStates_state_last = 10; const int R::DrawableStates_state_middle = 9; const int R::DrawableStates_state_pressed = 11; const int R::DrawableStates_state_selected = 5; const int R::DrawableStates_state_single = 7; const int R::DrawableStates_state_window_focused = 1; const int R::styleable::Dream[] = { 0x01010225 }; const int R::Dream_settingsActivity = 0; const int R::styleable::EditText[] = { }; const int R::styleable::ExpandableListChildIndicatorState[] = { 0x010100a6 }; const int R::ExpandableListChildIndicatorState_state_last = 0; const int R::styleable::ExpandableListGroupIndicatorState[] = { 0x010100a8, 0x010100a9 }; const int R::ExpandableListGroupIndicatorState_state_empty = 1; const int R::ExpandableListGroupIndicatorState_state_expanded = 0; const int R::styleable::ExpandableListView[] = { 0x0101010b, 0x0101010c, 0x0101010d, 0x0101010e, 0x0101010f, 0x01010110, 0x01010111 }; const int R::ExpandableListView_childDivider = 6; const int R::ExpandableListView_childIndicator = 1; const int R::ExpandableListView_childIndicatorLeft = 4; const int R::ExpandableListView_childIndicatorRight = 5; const int R::ExpandableListView_groupIndicator = 0; const int R::ExpandableListView_indicatorLeft = 2; const int R::ExpandableListView_indicatorRight = 3; const int R::styleable::Extra[] = { 0x01010003, 0x01010024 }; const int R::Extra_name = 0; const int R::Extra_value = 1; const int R::styleable::Fragment[] = { 0x01010003, 0x010100d0, 0x010100d1 }; const int R::Fragment_id = 1; const int R::Fragment_name = 0; const int R::Fragment_tag = 2; const int R::styleable::FragmentAnimation[] = { 0x010102e5, 0x010102e6, 0x010102e7, 0x010102e8, 0x010102e9, 0x010102ea }; const int R::FragmentAnimation_fragmentCloseEnterAnimation = 2; const int R::FragmentAnimation_fragmentCloseExitAnimation = 3; const int R::FragmentAnimation_fragmentFadeEnterAnimation = 4; const int R::FragmentAnimation_fragmentFadeExitAnimation = 5; const int R::FragmentAnimation_fragmentOpenEnterAnimation = 0; const int R::FragmentAnimation_fragmentOpenExitAnimation = 1; const int R::styleable::FragmentBreadCrumbs[] = { 0x010100af }; const int R::FragmentBreadCrumbs_gravity = 0; const int R::styleable::FrameLayout[] = { 0x01010109, 0x0101010a, 0x01010200, 0x01010405 }; const int R::FrameLayout_foreground = 0; const int R::FrameLayout_foregroundGravity = 2; const int R::FrameLayout_foregroundInsidePadding = 3; const int R::FrameLayout_measureAllChildren = 1; const int R::styleable::FrameLayout_Layout[] = { 0x010100b3 }; const int R::FrameLayout_Layout_layout_gravity = 0; const int R::styleable::Gallery[] = { 0x010100af, 0x01010112, 0x01010113, 0x0101020e }; const int R::Gallery_animationDuration = 1; const int R::Gallery_gravity = 0; const int R::Gallery_spacing = 2; const int R::Gallery_unselectedAlpha = 3; const int R::styleable::GestureOverlayView[] = { 0x010100c4, 0x01010274, 0x01010275, 0x01010276, 0x01010277, 0x01010278, 0x01010279, 0x0101027a, 0x0101027b, 0x0101027c, 0x0101027d, 0x0101027e }; const int R::GestureOverlayView_eventsInterceptionEnabled = 10; const int R::GestureOverlayView_fadeDuration = 5; const int R::GestureOverlayView_fadeEnabled = 11; const int R::GestureOverlayView_fadeOffset = 4; const int R::GestureOverlayView_gestureColor = 2; const int R::GestureOverlayView_gestureStrokeAngleThreshold = 9; const int R::GestureOverlayView_gestureStrokeLengthThreshold = 7; const int R::GestureOverlayView_gestureStrokeSquarenessThreshold = 8; const int R::GestureOverlayView_gestureStrokeType = 6; const int R::GestureOverlayView_gestureStrokeWidth = 1; const int R::GestureOverlayView_orientation = 0; const int R::GestureOverlayView_uncertainGestureColor = 3; const int R::styleable::GlowPadView[] = { 0x010100af, 0x0101025f, 0x010103a0, 0x010103a1, 0x01010427, 0x01010428, 0x01010429, 0x0101042a, 0x0101042b, 0x0101042c, 0x0101042d, 0x0101042e, 0x01010431, 0x01010432, 0x01010433, 0x01010434, 0x01010435 }; const int R::GlowPadView_allowScaling = 9; const int R::GlowPadView_alwaysTrackFinger = 16; const int R::GlowPadView_directionDescriptions = 3; const int R::GlowPadView_feedbackCount = 15; const int R::GlowPadView_firstItemOffset = 7; const int R::GlowPadView_glowRadius = 6; const int R::GlowPadView_gravity = 0; const int R::GlowPadView_handleDrawable = 11; const int R::GlowPadView_innerRadius = 1; const int R::GlowPadView_magneticTargets = 8; const int R::GlowPadView_outerRadius = 12; const int R::GlowPadView_outerRingDrawable = 4; const int R::GlowPadView_pointDrawable = 5; const int R::GlowPadView_snapMargin = 14; const int R::GlowPadView_targetDescriptions = 2; const int R::GlowPadView_targetDrawables = 10; const int R::GlowPadView_vibrationDuration = 13; const int R::styleable::GradientDrawable[] = { 0x0101011c, 0x01010194, 0x0101019a, 0x0101019b, 0x0101019c, 0x0101019f, 0x0101025f, 0x01010260 }; const int R::GradientDrawable_dither = 0; const int R::GradientDrawable_innerRadius = 6; const int R::GradientDrawable_innerRadiusRatio = 3; const int R::GradientDrawable_shape = 2; const int R::GradientDrawable_thickness = 7; const int R::GradientDrawable_thicknessRatio = 4; const int R::GradientDrawable_useLevel = 5; const int R::GradientDrawable_visible = 1; const int R::styleable::GradientDrawableGradient[] = { 0x0101019d, 0x0101019e, 0x0101019f, 0x010101a0, 0x010101a1, 0x010101a2, 0x010101a3, 0x010101a4, 0x0101020b }; const int R::GradientDrawableGradient_angle = 3; const int R::GradientDrawableGradient_centerColor = 8; const int R::GradientDrawableGradient_centerX = 5; const int R::GradientDrawableGradient_centerY = 6; const int R::GradientDrawableGradient_endColor = 1; const int R::GradientDrawableGradient_gradientRadius = 7; const int R::GradientDrawableGradient_startColor = 0; const int R::GradientDrawableGradient_type = 4; const int R::GradientDrawableGradient_useLevel = 2; const int R::styleable::GradientDrawablePadding[] = { 0x010101ad, 0x010101ae, 0x010101af, 0x010101b0 }; const int R::GradientDrawablePadding_bottom = 3; const int R::GradientDrawablePadding_left = 0; const int R::GradientDrawablePadding_right = 2; const int R::GradientDrawablePadding_top = 1; const int R::styleable::GradientDrawableSize[] = { 0x01010155, 0x01010159 }; const int R::GradientDrawableSize_height = 0; const int R::GradientDrawableSize_width = 1; const int R::styleable::GradientDrawableSolid[] = { 0x010101a5 }; const int R::GradientDrawableSolid_color = 0; const int R::styleable::GradientDrawableStroke[] = { 0x01010159, 0x010101a5, 0x010101a6, 0x010101a7 }; const int R::GradientDrawableStroke_color = 1; const int R::GradientDrawableStroke_dashGap = 3; const int R::GradientDrawableStroke_dashWidth = 2; const int R::GradientDrawableStroke_width = 0; const int R::styleable::GridLayout[] = { 0x010100c4, 0x01010375, 0x01010376, 0x01010377, 0x01010378, 0x01010379, 0x0101037a }; const int R::GridLayout_alignmentMode = 6; const int R::GridLayout_columnCount = 3; const int R::GridLayout_columnOrderPreserved = 4; const int R::GridLayout_orientation = 0; const int R::GridLayout_rowCount = 1; const int R::GridLayout_rowOrderPreserved = 2; const int R::GridLayout_useDefaultMargins = 5; const int R::styleable::GridLayoutAnimation[] = { 0x010101cf, 0x010101d0, 0x010101d1, 0x010101d2 }; const int R::GridLayoutAnimation_columnDelay = 0; const int R::GridLayoutAnimation_direction = 2; const int R::GridLayoutAnimation_directionPriority = 3; const int R::GridLayoutAnimation_rowDelay = 1; const int R::styleable::GridLayout_Layout[] = { 0x010100b3, 0x0101014c, 0x0101037b, 0x0101037c, 0x0101037d }; const int R::GridLayout_Layout_layout_column = 1; const int R::GridLayout_Layout_layout_columnSpan = 4; const int R::GridLayout_Layout_layout_gravity = 0; const int R::GridLayout_Layout_layout_row = 2; const int R::GridLayout_Layout_layout_rowSpan = 3; const int R::styleable::GridView[] = { 0x010100af, 0x01010114, 0x01010115, 0x01010116, 0x01010117, 0x01010118 }; const int R::GridView_columnWidth = 4; const int R::GridView_gravity = 0; const int R::GridView_horizontalSpacing = 1; const int R::GridView_numColumns = 5; const int R::GridView_stretchMode = 3; const int R::GridView_verticalSpacing = 2; const int R::styleable::HorizontalScrollView[] = { 0x0101017a }; const int R::HorizontalScrollView_fillViewport = 0; const int R::styleable::Icon[] = { 0x01010002, 0x01010026 }; const int R::Icon_icon = 0; const int R::Icon_mimeType = 1; const int R::styleable::IconDefault[] = { 0x01010002 }; const int R::IconDefault_icon = 0; const int R::styleable::IconMenuView[] = { 0x01010132, 0x01010133, 0x01010134, 0x01010135, 0x0101040d }; const int R::IconMenuView_maxItems = 4; const int R::IconMenuView_maxItemsPerRow = 2; const int R::IconMenuView_maxRows = 1; const int R::IconMenuView_moreIcon = 3; const int R::IconMenuView_rowHeight = 0; const int R::styleable::ImageSwitcher[] = { }; const int R::styleable::ImageView[] = { 0x01010119, 0x0101011d, 0x0101011e, 0x0101011f, 0x01010120, 0x01010121, 0x01010122, 0x01010123, 0x0101031c, 0x01010406 }; const int R::ImageView_adjustViewBounds = 2; const int R::ImageView_baseline = 8; const int R::ImageView_baselineAlignBottom = 6; const int R::ImageView_cropToPadding = 7; const int R::ImageView_drawableAlpha = 9; const int R::ImageView_maxHeight = 4; const int R::ImageView_maxWidth = 3; const int R::ImageView_scaleType = 1; const int R::ImageView_src = 0; const int R::ImageView_tint = 5; const int R::styleable::InputExtras[] = { }; const int R::styleable::InputMethod[] = { 0x01010221, 0x01010225 }; const int R::InputMethod_isDefault = 0; const int R::InputMethod_settingsActivity = 1; const int R::styleable::InputMethodService[] = { 0x0101022c, 0x01010268, 0x01010269 }; const int R::InputMethodService_imeExtractEnterAnimation = 1; const int R::InputMethodService_imeExtractExitAnimation = 2; const int R::InputMethodService_imeFullscreenBackground = 0; const int R::styleable::InputMethod_Subtype[] = { 0x01010001, 0x01010002, 0x010102ec, 0x010102ed, 0x010102ee, 0x0101037f, 0x010103a2, 0x010103c1 }; const int R::InputMethod_Subtype_icon = 1; const int R::InputMethod_Subtype_imeSubtypeExtraValue = 4; const int R::InputMethod_Subtype_imeSubtypeLocale = 2; const int R::InputMethod_Subtype_imeSubtypeMode = 3; const int R::InputMethod_Subtype_isAuxiliary = 5; const int R::InputMethod_Subtype_label = 0; const int R::InputMethod_Subtype_overridesImplicitlyEnabledSubtype = 6; const int R::InputMethod_Subtype_subtypeId = 7; const int R::styleable::InsetDrawable[] = { 0x01010194, 0x01010199, 0x010101b7, 0x010101b8, 0x010101b9, 0x010101ba }; const int R::InsetDrawable_drawable = 1; const int R::InsetDrawable_insetBottom = 5; const int R::InsetDrawable_insetLeft = 2; const int R::InsetDrawable_insetRight = 3; const int R::InsetDrawable_insetTop = 4; const int R::InsetDrawable_visible = 0; const int R::styleable::Intent[] = { 0x01010021, 0x01010026, 0x0101002d, 0x0101002e, 0x0101002f }; const int R::Intent_action = 2; const int R::Intent_data = 3; const int R::Intent_mimeType = 1; const int R::Intent_targetClass = 4; const int R::Intent_targetPackage = 0; const int R::styleable::IntentCategory[] = { 0x01010003 }; const int R::IntentCategory_name = 0; const int R::styleable::Keyboard[] = { 0x0101023d, 0x0101023e, 0x0101023f, 0x01010240 }; const int R::Keyboard_horizontalGap = 2; const int R::Keyboard_keyHeight = 1; const int R::Keyboard_keyWidth = 0; const int R::Keyboard_verticalGap = 3; const int R::styleable::KeyboardLayout[] = { 0x01010001, 0x01010003, 0x010103ab }; const int R::KeyboardLayout_keyboardLayout = 2; const int R::KeyboardLayout_label = 0; const int R::KeyboardLayout_name = 1; const int R::styleable::KeyboardView[] = { 0x01010161, 0x01010164, 0x01010233, 0x01010234, 0x01010235, 0x01010236, 0x01010237, 0x01010238, 0x01010239, 0x0101023a, 0x0101023b, 0x01010426 }; const int R::KeyboardView_keyBackground = 2; const int R::KeyboardView_keyPreviewHeight = 8; const int R::KeyboardView_keyPreviewLayout = 6; const int R::KeyboardView_keyPreviewOffset = 7; const int R::KeyboardView_keyTextColor = 5; const int R::KeyboardView_keyTextSize = 3; const int R::KeyboardView_keyboardViewStyle = 11; const int R::KeyboardView_labelTextSize = 4; const int R::KeyboardView_popupLayout = 10; const int R::KeyboardView_shadowColor = 0; const int R::KeyboardView_shadowRadius = 1; const int R::KeyboardView_verticalCorrection = 9; const int R::styleable::KeyboardViewPreviewState[] = { 0x0101023c }; const int R::KeyboardViewPreviewState_state_long_pressable = 0; const int R::styleable::Keyboard_Key[] = { 0x01010242, 0x01010243, 0x01010244, 0x01010245, 0x01010246, 0x01010247, 0x01010248, 0x01010249, 0x0101024a, 0x0101024b, 0x0101024c, 0x0101024d }; const int R::Keyboard_Key_codes = 0; const int R::Keyboard_Key_iconPreview = 7; const int R::Keyboard_Key_isModifier = 4; const int R::Keyboard_Key_isRepeatable = 6; const int R::Keyboard_Key_isSticky = 5; const int R::Keyboard_Key_keyEdgeFlags = 3; const int R::Keyboard_Key_keyIcon = 10; const int R::Keyboard_Key_keyLabel = 9; const int R::Keyboard_Key_keyOutputText = 8; const int R::Keyboard_Key_keyboardMode = 11; const int R::Keyboard_Key_popupCharacters = 2; const int R::Keyboard_Key_popupKeyboard = 1; const int R::styleable::Keyboard_Row[] = { 0x01010241, 0x0101024d }; const int R::Keyboard_Row_keyboardMode = 1; const int R::Keyboard_Row_rowEdgeFlags = 0; const int R::styleable::KeyguardGlowStripView[] = { 0x0101044c, 0x0101044d, 0x0101044e, 0x0101044f }; const int R::KeyguardGlowStripView_dotSize = 0; const int R::KeyguardGlowStripView_glowDot = 2; const int R::KeyguardGlowStripView_leftToRight = 3; const int R::KeyguardGlowStripView_numDots = 1; const int R::styleable::KeyguardSecurityViewFlipper_Layout[] = { 0x01010436, 0x01010452 }; const int R::KeyguardSecurityViewFlipper_Layout_layout_maxHeight = 0; const int R::KeyguardSecurityViewFlipper_Layout_layout_maxWidth = 1; const int R::styleable::LayerDrawable[] = { 0x0101031e }; const int R::LayerDrawable_opacity = 0; const int R::styleable::LayerDrawableItem[] = { 0x010100d0, 0x01010199, 0x010101ad, 0x010101ae, 0x010101af, 0x010101b0 }; const int R::LayerDrawableItem_bottom = 5; const int R::LayerDrawableItem_drawable = 1; const int R::LayerDrawableItem_id = 0; const int R::LayerDrawableItem_left = 2; const int R::LayerDrawableItem_right = 4; const int R::LayerDrawableItem_top = 3; const int R::styleable::LayoutAnimation[] = { 0x01010141, 0x010101cc, 0x010101cd, 0x010101ce }; const int R::LayoutAnimation_animation = 2; const int R::LayoutAnimation_animationOrder = 3; const int R::LayoutAnimation_delay = 1; const int R::LayoutAnimation_interpolator = 0; const int R::styleable::LevelListDrawableItem[] = { 0x01010199, 0x010101b1, 0x010101b2 }; const int R::LevelListDrawableItem_drawable = 0; const int R::LevelListDrawableItem_maxLevel = 2; const int R::LevelListDrawableItem_minLevel = 1; const int R::styleable::LinearLayout[] = { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x01010129, 0x010102d4, 0x01010329, 0x0101032a }; const int R::LinearLayout_baselineAligned = 2; const int R::LinearLayout_baselineAlignedChildIndex = 3; const int R::LinearLayout_divider = 5; const int R::LinearLayout_dividerPadding = 8; const int R::LinearLayout_gravity = 0; const int R::LinearLayout_measureWithLargestChild = 6; const int R::LinearLayout_orientation = 1; const int R::LinearLayout_showDividers = 7; const int R::LinearLayout_weightSum = 4; const int R::styleable::LinearLayout_Layout[] = { 0x010100b3, 0x010100f4, 0x010100f5, 0x01010181 }; const int R::LinearLayout_Layout_layout_gravity = 0; const int R::LinearLayout_Layout_layout_height = 2; const int R::LinearLayout_Layout_layout_weight = 3; const int R::LinearLayout_Layout_layout_width = 1; const int R::styleable::ListPreference[] = { 0x010100b2, 0x010101f8 }; const int R::ListPreference_entries = 0; const int R::ListPreference_entryValues = 1; const int R::styleable::ListView[] = { 0x010100b2, 0x01010129, 0x0101012a, 0x0101022e, 0x0101022f, 0x010102c2, 0x010102c3 }; const int R::ListView_divider = 1; const int R::ListView_dividerHeight = 2; const int R::ListView_entries = 0; const int R::ListView_footerDividersEnabled = 4; const int R::ListView_headerDividersEnabled = 3; const int R::ListView_overScrollFooter = 6; const int R::ListView_overScrollHeader = 5; const int R::styleable::LockPatternView[] = { 0x01010438 }; const int R::LockPatternView_aspect = 0; const int R::styleable::MapView[] = { 0x01010211 }; const int R::MapView_apiKey = 0; const int R::styleable::MediaRouteButton[] = { 0x0101013f, 0x01010140, 0x010103ae, 0x01010448 }; const int R::MediaRouteButton_externalRouteEnabledDrawable = 3; const int R::MediaRouteButton_mediaRouteTypes = 2; const int R::MediaRouteButton_minHeight = 1; const int R::MediaRouteButton_minWidth = 0; const int R::styleable::Menu[] = { }; const int R::styleable::MenuGroup[] = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 }; const int R::MenuGroup_checkableBehavior = 5; const int R::MenuGroup_enabled = 0; const int R::MenuGroup_id = 1; const int R::MenuGroup_menuCategory = 3; const int R::MenuGroup_orderInCategory = 4; const int R::MenuGroup_visible = 2; const int R::styleable::MenuItem[] = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x010102d9, 0x010102fb, 0x010102fc, 0x01010389 }; const int R::MenuItem_actionLayout = 14; const int R::MenuItem_actionProviderClass = 16; const int R::MenuItem_actionViewClass = 15; const int R::MenuItem_alphabeticShortcut = 9; const int R::MenuItem_checkable = 11; const int R::MenuItem_checked = 3; const int R::MenuItem_enabled = 1; const int R::MenuItem_icon = 0; const int R::MenuItem_id = 2; const int R::MenuItem_menuCategory = 5; const int R::MenuItem_numericShortcut = 10; const int R::MenuItem_onClick = 12; const int R::MenuItem_orderInCategory = 6; const int R::MenuItem_showAsAction = 13; const int R::MenuItem_title = 7; const int R::MenuItem_titleCondensed = 8; const int R::MenuItem_visible = 4; const int R::styleable::MenuItemCheckedFocusedState[] = { 0x0101009c, 0x0101009f, 0x010100a0 }; const int R::MenuItemCheckedFocusedState_state_checkable = 1; const int R::MenuItemCheckedFocusedState_state_checked = 2; const int R::MenuItemCheckedFocusedState_state_focused = 0; const int R::styleable::MenuItemCheckedState[] = { 0x0101009f, 0x010100a0 }; const int R::MenuItemCheckedState_state_checkable = 0; const int R::MenuItemCheckedState_state_checked = 1; const int R::styleable::MenuItemUncheckedFocusedState[] = { 0x0101009c, 0x0101009f }; const int R::MenuItemUncheckedFocusedState_state_checkable = 1; const int R::MenuItemUncheckedFocusedState_state_focused = 0; const int R::styleable::MenuItemUncheckedState[] = { 0x0101009f }; const int R::MenuItemUncheckedState_state_checkable = 0; const int R::styleable::MenuView[] = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x0101040c }; const int R::MenuView_headerBackground = 4; const int R::MenuView_horizontalDivider = 2; const int R::MenuView_itemBackground = 5; const int R::MenuView_itemIconDisabledAlpha = 6; const int R::MenuView_itemTextAppearance = 1; const int R::MenuView_preserveIconSpacing = 7; const int R::MenuView_verticalDivider = 3; const int R::MenuView_windowAnimationStyle = 0; const int R::styleable::MipmapDrawableItem[] = { 0x01010199 }; const int R::MipmapDrawableItem_drawable = 0; const int R::styleable::MultiPaneChallengeLayout[] = { 0x010100c4 }; const int R::MultiPaneChallengeLayout_orientation = 0; const int R::styleable::MultiPaneChallengeLayout_Layout[] = { 0x010100b3, 0x01010436, 0x01010450, 0x01010451, 0x01010452 }; const int R::MultiPaneChallengeLayout_Layout_layout_centerWithinArea = 3; const int R::MultiPaneChallengeLayout_Layout_layout_childType = 2; const int R::MultiPaneChallengeLayout_Layout_layout_gravity = 0; const int R::MultiPaneChallengeLayout_Layout_layout_maxHeight = 1; const int R::MultiPaneChallengeLayout_Layout_layout_maxWidth = 4; const int R::styleable::MultiSelectListPreference[] = { 0x010100b2, 0x010101f8 }; const int R::MultiSelectListPreference_entries = 0; const int R::MultiSelectListPreference_entryValues = 1; const int R::styleable::MultiWaveView[] = { 0x010103a0, 0x010103a1, 0x0101042d, 0x0101042e, 0x0101042f, 0x01010430, 0x01010431, 0x01010432, 0x01010433, 0x01010434, 0x01010435 }; const int R::MultiWaveView_alwaysTrackFinger = 10; const int R::MultiWaveView_chevronDrawables = 4; const int R::MultiWaveView_directionDescriptions = 1; const int R::MultiWaveView_feedbackCount = 9; const int R::MultiWaveView_handleDrawable = 3; const int R::MultiWaveView_outerRadius = 6; const int R::MultiWaveView_snapMargin = 8; const int R::MultiWaveView_targetDescriptions = 0; const int R::MultiWaveView_targetDrawables = 2; const int R::MultiWaveView_vibrationDuration = 7; const int R::MultiWaveView_waveDrawable = 5; const int R::styleable::NinePatchDrawable[] = { 0x01010119, 0x0101011c }; const int R::NinePatchDrawable_dither = 1; const int R::NinePatchDrawable_src = 0; const int R::styleable::NumPadKey[] = { 0x01010453, 0x01010454 }; const int R::NumPadKey_digit = 0; const int R::NumPadKey_textView = 1; const int R::styleable::NumberPicker[] = { 0x0101034a, 0x01010413, 0x01010419, 0x0101041a, 0x0101041b, 0x0101041c, 0x0101041d, 0x0101041e, 0x0101041f, 0x01010420 }; const int R::NumberPicker_internalLayout = 1; const int R::NumberPicker_internalMaxHeight = 6; const int R::NumberPicker_internalMaxWidth = 8; const int R::NumberPicker_internalMinHeight = 5; const int R::NumberPicker_internalMinWidth = 7; const int R::NumberPicker_selectionDivider = 2; const int R::NumberPicker_selectionDividerHeight = 3; const int R::NumberPicker_selectionDividersDistance = 4; const int R::NumberPicker_solidColor = 0; const int R::NumberPicker_virtualButtonPressedDrawable = 9; const int R::styleable::OvershootInterpolator[] = { 0x0101026a }; const int R::OvershootInterpolator_tension = 0; const int R::styleable::PagedView[] = { 0x01010449, 0x0101044a, 0x0101044b }; const int R::PagedView_pageSpacing = 0; const int R::PagedView_scrollIndicatorPaddingLeft = 1; const int R::PagedView_scrollIndicatorPaddingRight = 2; const int R::styleable::Pointer[] = { 0x01010439, 0x0101043a, 0x0101043b, 0x0101043c }; const int R::Pointer_pointerIconArrow = 0; const int R::Pointer_pointerIconSpotAnchor = 3; const int R::Pointer_pointerIconSpotHover = 1; const int R::Pointer_pointerIconSpotTouch = 2; const int R::styleable::PointerIcon[] = { 0x0101043d, 0x0101043e, 0x0101043f }; const int R::PointerIcon_bitmap = 0; const int R::PointerIcon_hotSpotX = 1; const int R::PointerIcon_hotSpotY = 2; const int R::styleable::PopupWindow[] = { 0x01010176, 0x010102c9 }; const int R::PopupWindow_popupAnimationStyle = 1; const int R::PopupWindow_popupBackground = 0; const int R::styleable::PopupWindowBackgroundState[] = { 0x010100aa }; const int R::PopupWindowBackgroundState_state_above_anchor = 0; const int R::styleable::Preference[] = { 0x01010002, 0x0101000d, 0x0101000e, 0x010100f2, 0x010101e1, 0x010101e6, 0x010101e8, 0x010101e9, 0x010101ea, 0x010101eb, 0x010101ec, 0x010101ed, 0x010101ee, 0x010102e3 }; const int R::Preference_defaultValue = 11; const int R::Preference_dependency = 10; const int R::Preference_enabled = 2; const int R::Preference_fragment = 13; const int R::Preference_icon = 0; const int R::Preference_key = 6; const int R::Preference_layout = 3; const int R::Preference_order = 8; const int R::Preference_persistent = 1; const int R::Preference_selectable = 5; const int R::Preference_shouldDisableView = 12; const int R::Preference_summary = 7; const int R::Preference_title = 4; const int R::Preference_widgetLayout = 9; const int R::styleable::PreferenceFrameLayout[] = { 0x01010407, 0x01010408, 0x01010409, 0x0101040a }; const int R::PreferenceFrameLayout_borderBottom = 1; const int R::PreferenceFrameLayout_borderLeft = 2; const int R::PreferenceFrameLayout_borderRight = 3; const int R::PreferenceFrameLayout_borderTop = 0; const int R::styleable::PreferenceFrameLayout_Layout[] = { 0x0101040b }; const int R::PreferenceFrameLayout_Layout_layout_removeBorders = 0; const int R::styleable::PreferenceGroup[] = { 0x010101e7 }; const int R::PreferenceGroup_orderingFromXml = 0; const int R::styleable::PreferenceHeader[] = { 0x01010002, 0x010100d0, 0x010101e1, 0x010101e9, 0x010102e3, 0x01010303, 0x01010304 }; const int R::PreferenceHeader_breadCrumbShortTitle = 6; const int R::PreferenceHeader_breadCrumbTitle = 5; const int R::PreferenceHeader_fragment = 4; const int R::PreferenceHeader_icon = 0; const int R::PreferenceHeader_id = 1; const int R::PreferenceHeader_summary = 3; const int R::PreferenceHeader_title = 2; const int R::styleable::ProgressBar[] = { 0x0101011f, 0x01010120, 0x01010136, 0x01010137, 0x01010138, 0x01010139, 0x0101013a, 0x0101013b, 0x0101013c, 0x0101013d, 0x0101013e, 0x0101013f, 0x01010140, 0x01010141, 0x0101031a }; const int R::ProgressBar_animationResolution = 14; const int R::ProgressBar_indeterminate = 5; const int R::ProgressBar_indeterminateBehavior = 10; const int R::ProgressBar_indeterminateDrawable = 7; const int R::ProgressBar_indeterminateDuration = 9; const int R::ProgressBar_indeterminateOnly = 6; const int R::ProgressBar_interpolator = 13; const int R::ProgressBar_max = 2; const int R::ProgressBar_maxHeight = 1; const int R::ProgressBar_maxWidth = 0; const int R::ProgressBar_minHeight = 12; const int R::ProgressBar_minWidth = 11; const int R::ProgressBar_progress = 3; const int R::ProgressBar_progressDrawable = 8; const int R::ProgressBar_secondaryProgress = 4; const int R::styleable::PropertyAnimator[] = { 0x010102e1 }; const int R::PropertyAnimator_propertyName = 0; const int R::styleable::QuickContactBadge[] = { 0x01010414 }; const int R::QuickContactBadge_quickContactWindowSize = 0; const int R::styleable::RadioGroup[] = { 0x010100c4, 0x01010148 }; const int R::RadioGroup_checkedButton = 1; const int R::RadioGroup_orientation = 0; const int R::styleable::RatingBar[] = { 0x01010144, 0x01010145, 0x01010146, 0x01010147 }; const int R::RatingBar_isIndicator = 3; const int R::RatingBar_numStars = 0; const int R::RatingBar_rating = 1; const int R::RatingBar_stepSize = 2; const int R::styleable::RecognitionService[] = { 0x01010225 }; const int R::RecognitionService_settingsActivity = 0; const int R::styleable::RelativeLayout[] = { 0x010100af, 0x010101ff }; const int R::RelativeLayout_gravity = 0; const int R::RelativeLayout_ignoreGravity = 1; const int R::styleable::RelativeLayout_Layout[] = { 0x01010182, 0x01010183, 0x01010184, 0x01010185, 0x01010186, 0x01010187, 0x01010188, 0x01010189, 0x0101018a, 0x0101018b, 0x0101018c, 0x0101018d, 0x0101018e, 0x0101018f, 0x01010190, 0x01010191, 0x01010192, 0x010103b7, 0x010103b8, 0x010103b9, 0x010103ba, 0x010103bb, 0x010103bc }; const int R::RelativeLayout_Layout_layout_above = 2; const int R::RelativeLayout_Layout_layout_alignBaseline = 4; const int R::RelativeLayout_Layout_layout_alignBottom = 8; const int R::RelativeLayout_Layout_layout_alignEnd = 20; const int R::RelativeLayout_Layout_layout_alignLeft = 5; const int R::RelativeLayout_Layout_layout_alignParentBottom = 12; const int R::RelativeLayout_Layout_layout_alignParentEnd = 22; const int R::RelativeLayout_Layout_layout_alignParentLeft = 9; const int R::RelativeLayout_Layout_layout_alignParentRight = 11; const int R::RelativeLayout_Layout_layout_alignParentStart = 21; const int R::RelativeLayout_Layout_layout_alignParentTop = 10; const int R::RelativeLayout_Layout_layout_alignRight = 7; const int R::RelativeLayout_Layout_layout_alignStart = 19; const int R::RelativeLayout_Layout_layout_alignTop = 6; const int R::RelativeLayout_Layout_layout_alignWithParentIfMissing = 16; const int R::RelativeLayout_Layout_layout_below = 3; const int R::RelativeLayout_Layout_layout_centerHorizontal = 14; const int R::RelativeLayout_Layout_layout_centerInParent = 13; const int R::RelativeLayout_Layout_layout_centerVertical = 15; const int R::RelativeLayout_Layout_layout_toEndOf = 18; const int R::RelativeLayout_Layout_layout_toLeftOf = 0; const int R::RelativeLayout_Layout_layout_toRightOf = 1; const int R::RelativeLayout_Layout_layout_toStartOf = 17; const int R::styleable::RingtonePreference[] = { 0x010101f9, 0x010101fa, 0x010101fb }; const int R::RingtonePreference_ringtoneType = 0; const int R::RingtonePreference_showDefault = 1; const int R::RingtonePreference_showSilent = 2; const int R::styleable::RotarySelector[] = { 0x010100c4 }; const int R::RotarySelector_orientation = 0; const int R::styleable::RotateAnimation[] = { 0x010101b3, 0x010101b4, 0x010101b5, 0x010101b6 }; const int R::RotateAnimation_fromDegrees = 0; const int R::RotateAnimation_pivotX = 2; const int R::RotateAnimation_pivotY = 3; const int R::RotateAnimation_toDegrees = 1; const int R::styleable::RotateDrawable[] = { 0x01010194, 0x01010199, 0x010101b3, 0x010101b4, 0x010101b5, 0x010101b6 }; const int R::RotateDrawable_drawable = 1; const int R::RotateDrawable_fromDegrees = 2; const int R::RotateDrawable_pivotX = 4; const int R::RotateDrawable_pivotY = 5; const int R::RotateDrawable_toDegrees = 3; const int R::RotateDrawable_visible = 0; const int R::styleable::ScaleAnimation[] = { 0x010101b5, 0x010101b6, 0x010101c2, 0x010101c3, 0x010101c4, 0x010101c5 }; const int R::ScaleAnimation_fromXScale = 2; const int R::ScaleAnimation_fromYScale = 4; const int R::ScaleAnimation_pivotX = 0; const int R::ScaleAnimation_pivotY = 1; const int R::ScaleAnimation_toXScale = 3; const int R::ScaleAnimation_toYScale = 5; const int R::styleable::ScaleDrawable[] = { 0x01010199, 0x010101fc, 0x010101fd, 0x010101fe, 0x01010310 }; const int R::ScaleDrawable_drawable = 0; const int R::ScaleDrawable_scaleGravity = 3; const int R::ScaleDrawable_scaleHeight = 2; const int R::ScaleDrawable_scaleWidth = 1; const int R::ScaleDrawable_useIntrinsicSizeAsMinimum = 4; const int R::styleable::ScrollView[] = { 0x0101017a }; const int R::ScrollView_fillViewport = 0; const int R::styleable::SearchView[] = { 0x0101011f, 0x01010220, 0x01010264, 0x010102fa, 0x01010358 }; const int R::SearchView_iconifiedByDefault = 3; const int R::SearchView_imeOptions = 2; const int R::SearchView_inputType = 1; const int R::SearchView_maxWidth = 0; const int R::SearchView_queryHint = 4; const int R::styleable::Searchable[] = { 0x01010001, 0x01010002, 0x01010150, 0x010101d5, 0x010101d6, 0x010101d7, 0x010101d8, 0x010101d9, 0x010101da, 0x01010205, 0x01010220, 0x01010252, 0x01010253, 0x01010254, 0x01010255, 0x01010256, 0x01010264, 0x0101026d, 0x0101026e, 0x01010282, 0x0101028a, 0x0101028c }; const int R::Searchable_autoUrlDetect = 21; const int R::Searchable_hint = 2; const int R::Searchable_icon = 1; const int R::Searchable_imeOptions = 16; const int R::Searchable_includeInGlobalSearch = 18; const int R::Searchable_inputType = 10; const int R::Searchable_label = 0; const int R::Searchable_queryAfterZeroResults = 19; const int R::Searchable_searchButtonText = 9; const int R::Searchable_searchMode = 3; const int R::Searchable_searchSettingsDescription = 20; const int R::Searchable_searchSuggestAuthority = 4; const int R::Searchable_searchSuggestIntentAction = 7; const int R::Searchable_searchSuggestIntentData = 8; const int R::Searchable_searchSuggestPath = 5; const int R::Searchable_searchSuggestSelection = 6; const int R::Searchable_searchSuggestThreshold = 17; const int R::Searchable_voiceLanguage = 14; const int R::Searchable_voiceLanguageModel = 12; const int R::Searchable_voiceMaxResults = 15; const int R::Searchable_voicePromptText = 13; const int R::Searchable_voiceSearchMode = 11; const int R::styleable::SearchableActionKey[] = { 0x010100c5, 0x010101db, 0x010101dc, 0x010101dd }; const int R::SearchableActionKey_keycode = 0; const int R::SearchableActionKey_queryActionMsg = 1; const int R::SearchableActionKey_suggestActionMsg = 2; const int R::SearchableActionKey_suggestActionMsgColumn = 3; const int R::styleable::SeekBar[] = { 0x01010142, 0x01010143 }; const int R::SeekBar_thumb = 0; const int R::SeekBar_thumbOffset = 1; const int R::styleable::SelectionModeDrawables[] = { 0x01010311, 0x01010312, 0x01010313, 0x0101037e }; const int R::SelectionModeDrawables_actionModeCopyDrawable = 1; const int R::SelectionModeDrawables_actionModeCutDrawable = 0; const int R::SelectionModeDrawables_actionModePasteDrawable = 2; const int R::SelectionModeDrawables_actionModeSelectAllDrawable = 3; const int R::styleable::ShapeDrawable[] = { 0x0101011c, 0x01010155, 0x01010159, 0x010101a5 }; const int R::ShapeDrawable_color = 3; const int R::ShapeDrawable_dither = 0; const int R::ShapeDrawable_height = 1; const int R::ShapeDrawable_width = 2; const int R::styleable::ShapeDrawablePadding[] = { 0x010101ad, 0x010101ae, 0x010101af, 0x010101b0 }; const int R::ShapeDrawablePadding_bottom = 3; const int R::ShapeDrawablePadding_left = 0; const int R::ShapeDrawablePadding_right = 2; const int R::ShapeDrawablePadding_top = 1; const int R::styleable::SizeAdaptiveLayout[] = { }; const int R::styleable::SizeAdaptiveLayout_Layout[] = { 0x01010436, 0x01010437 }; const int R::SizeAdaptiveLayout_Layout_layout_maxHeight = 0; const int R::SizeAdaptiveLayout_Layout_layout_minHeight = 1; const int R::styleable::SlidingChallengeLayout_Layout[] = { 0x01010436, 0x01010450 }; const int R::SlidingChallengeLayout_Layout_layout_childType = 1; const int R::SlidingChallengeLayout_Layout_layout_maxHeight = 0; const int R::styleable::SlidingDrawer[] = { 0x010100c4, 0x01010257, 0x01010258, 0x01010259, 0x0101025a, 0x0101025b, 0x0101025c }; const int R::SlidingDrawer_allowSingleTap = 3; const int R::SlidingDrawer_animateOnClick = 6; const int R::SlidingDrawer_bottomOffset = 1; const int R::SlidingDrawer_content = 5; const int R::SlidingDrawer_handle = 4; const int R::SlidingDrawer_orientation = 0; const int R::SlidingDrawer_topOffset = 2; const int R::styleable::SlidingTab[] = { 0x010100c4 }; const int R::SlidingTab_orientation = 0; const int R::styleable::SpellChecker[] = { 0x01010001, 0x01010225 }; const int R::SpellChecker_label = 0; const int R::SpellChecker_settingsActivity = 1; const int R::styleable::SpellChecker_Subtype[] = { 0x01010001, 0x01010399, 0x0101039a }; const int R::SpellChecker_Subtype_label = 0; const int R::SpellChecker_Subtype_subtypeExtraValue = 2; const int R::SpellChecker_Subtype_subtypeLocale = 1; const int R::styleable::Spinner[] = { 0x010100af, 0x01010175, 0x01010176, 0x0101017b, 0x01010262, 0x010102ac, 0x010102ad, 0x010102f1, 0x01010411, 0x01010412 }; const int R::Spinner_disableChildrenWhenDisabled = 9; const int R::Spinner_dropDownHorizontalOffset = 5; const int R::Spinner_dropDownSelector = 1; const int R::Spinner_dropDownVerticalOffset = 6; const int R::Spinner_dropDownWidth = 4; const int R::Spinner_gravity = 0; const int R::Spinner_popupBackground = 2; const int R::Spinner_popupPromptView = 8; const int R::Spinner_prompt = 3; const int R::Spinner_spinnerMode = 7; const int R::styleable::StackView[] = { 0x0101040e, 0x0101040f }; const int R::StackView_clickColor = 1; const int R::StackView_resOutColor = 0; const int R::styleable::StateListDrawable[] = { 0x0101011c, 0x01010194, 0x01010195, 0x01010196, 0x0101030c, 0x0101030d }; const int R::StateListDrawable_constantSize = 3; const int R::StateListDrawable_dither = 0; const int R::StateListDrawable_enterFadeDuration = 4; const int R::StateListDrawable_exitFadeDuration = 5; const int R::StateListDrawable_variablePadding = 2; const int R::StateListDrawable_visible = 1; const int R::styleable::Storage[] = { 0x01010440, 0x01010441, 0x01010442, 0x01010443, 0x01010444, 0x01010445, 0x01010446, 0x01010447 }; const int R::Storage_allowMassStorage = 6; const int R::Storage_emulated = 4; const int R::Storage_maxFileSize = 7; const int R::Storage_mountPoint = 0; const int R::Storage_mtpReserve = 5; const int R::Storage_primary = 2; const int R::Storage_removable = 3; const int R::Storage_storageDescription = 1; const int R::styleable::SuggestionSpan[] = { 0x010103cf, 0x010103d0 }; const int R::SuggestionSpan_textUnderlineColor = 0; const int R::SuggestionSpan_textUnderlineThickness = 1; const int R::styleable::Switch[] = { 0x01010124, 0x01010125, 0x01010142, 0x0101036e, 0x0101036f, 0x01010370, 0x01010371, 0x01010372 }; const int R::Switch_switchMinWidth = 5; const int R::Switch_switchPadding = 6; const int R::Switch_switchTextAppearance = 3; const int R::Switch_textOff = 1; const int R::Switch_textOn = 0; const int R::Switch_thumb = 2; const int R::Switch_thumbTextPadding = 7; const int R::Switch_track = 4; const int R::styleable::SwitchPreference[] = { 0x010101ef, 0x010101f0, 0x010101f1, 0x0101036b, 0x0101036c }; const int R::SwitchPreference_disableDependentsState = 2; const int R::SwitchPreference_summaryOff = 1; const int R::SwitchPreference_summaryOn = 0; const int R::SwitchPreference_switchTextOff = 4; const int R::SwitchPreference_switchTextOn = 3; const int R::styleable::SyncAdapter[] = { 0x01010225, 0x0101028f, 0x01010290, 0x01010291, 0x0101029b, 0x01010332, 0x01010333 }; const int R::SyncAdapter_accountType = 1; const int R::SyncAdapter_allowParallelSyncs = 5; const int R::SyncAdapter_contentAuthority = 2; const int R::SyncAdapter_isAlwaysSyncable = 6; const int R::SyncAdapter_settingsActivity = 0; const int R::SyncAdapter_supportsUploading = 4; const int R::SyncAdapter_userVisible = 3; const int R::styleable::TabWidget[] = { 0x01010129, 0x010102bb, 0x010102bc, 0x010102bd, 0x01010410 }; const int R::TabWidget_divider = 0; const int R::TabWidget_tabLayout = 4; const int R::TabWidget_tabStripEnabled = 3; const int R::TabWidget_tabStripLeft = 1; const int R::TabWidget_tabStripRight = 2; const int R::styleable::TableLayout[] = { 0x01010149, 0x0101014a, 0x0101014b }; const int R::TableLayout_collapseColumns = 2; const int R::TableLayout_shrinkColumns = 1; const int R::TableLayout_stretchColumns = 0; const int R::styleable::TableRow[] = { }; const int R::styleable::TableRow_Cell[] = { 0x0101014c, 0x0101014d }; const int R::TableRow_Cell_layout_column = 0; const int R::TableRow_Cell_layout_span = 1; const int R::styleable::TextAppearance[] = { 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x01010099, 0x0101009a, 0x0101009b, 0x0101038c, 0x010103ac }; const int R::TextAppearance_fontFamily = 8; const int R::TextAppearance_textAllCaps = 7; const int R::TextAppearance_textColor = 3; const int R::TextAppearance_textColorHighlight = 4; const int R::TextAppearance_textColorHint = 5; const int R::TextAppearance_textColorLink = 6; const int R::TextAppearance_textSize = 0; const int R::TextAppearance_textStyle = 2; const int R::TextAppearance_typeface = 1; const int R::styleable::TextClock[] = { 0x010103ca, 0x010103cb, 0x010103cc }; const int R::TextClock_format12Hour = 0; const int R::TextClock_format24Hour = 1; const int R::TextClock_timeZone = 2; const int R::styleable::TextSwitcher[] = { }; const int R::styleable::TextToSpeechEngine[] = { 0x01010225 }; const int R::TextToSpeechEngine_settingsActivity = 0; const int R::styleable::TextView[] = { 0x0101000e, 0x01010034, 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x01010099, 0x0101009a, 0x0101009b, 0x010100ab, 0x010100af, 0x010100b0, 0x010100b1, 0x0101011f, 0x01010120, 0x0101013f, 0x01010140, 0x0101014e, 0x0101014f, 0x01010150, 0x01010151, 0x01010152, 0x01010153, 0x01010154, 0x01010155, 0x01010156, 0x01010157, 0x01010158, 0x01010159, 0x0101015a, 0x0101015b, 0x0101015c, 0x0101015d, 0x0101015e, 0x0101015f, 0x01010160, 0x01010161, 0x01010162, 0x01010163, 0x01010164, 0x01010165, 0x01010166, 0x01010167, 0x01010168, 0x01010169, 0x0101016a, 0x0101016b, 0x0101016c, 0x0101016d, 0x0101016e, 0x0101016f, 0x01010170, 0x01010171, 0x01010217, 0x01010218, 0x0101021d, 0x01010220, 0x01010223, 0x01010224, 0x01010264, 0x01010265, 0x01010266, 0x010102c5, 0x010102c6, 0x010102c7, 0x01010314, 0x01010315, 0x01010316, 0x0101035e, 0x0101035f, 0x01010362, 0x01010374, 0x0101038c, 0x01010392, 0x01010393, 0x010103ac }; const int R::TextView_autoLink = 11; const int R::TextView_autoText = 45; const int R::TextView_bufferType = 17; const int R::TextView_capitalize = 44; const int R::TextView_cursorVisible = 21; const int R::TextView_digits = 41; const int R::TextView_drawableBottom = 49; const int R::TextView_drawableEnd = 74; const int R::TextView_drawableLeft = 50; const int R::TextView_drawablePadding = 52; const int R::TextView_drawableRight = 51; const int R::TextView_drawableStart = 73; const int R::TextView_drawableTop = 48; const int R::TextView_editable = 46; const int R::TextView_editorExtras = 58; const int R::TextView_ellipsize = 9; const int R::TextView_ems = 27; const int R::TextView_enabled = 0; const int R::TextView_fontFamily = 75; const int R::TextView_freezesText = 47; const int R::TextView_gravity = 10; const int R::TextView_height = 24; const int R::TextView_hint = 19; const int R::TextView_imeActionId = 61; const int R::TextView_imeActionLabel = 60; const int R::TextView_imeOptions = 59; const int R::TextView_includeFontPadding = 34; const int R::TextView_inputMethod = 43; const int R::TextView_inputType = 56; const int R::TextView_lineSpacingExtra = 53; const int R::TextView_lineSpacingMultiplier = 54; const int R::TextView_lines = 23; const int R::TextView_linksClickable = 12; const int R::TextView_marqueeRepeatLimit = 55; const int R::TextView_maxEms = 26; const int R::TextView_maxHeight = 14; const int R::TextView_maxLength = 35; const int R::TextView_maxLines = 22; const int R::TextView_maxWidth = 13; const int R::TextView_minEms = 29; const int R::TextView_minHeight = 16; const int R::TextView_minLines = 25; const int R::TextView_minWidth = 15; const int R::TextView_numeric = 40; const int R::TextView_password = 31; const int R::TextView_phoneNumber = 42; const int R::TextView_privateImeOptions = 57; const int R::TextView_scrollHorizontally = 30; const int R::TextView_selectAllOnFocus = 33; const int R::TextView_shadowColor = 36; const int R::TextView_shadowDx = 37; const int R::TextView_shadowDy = 38; const int R::TextView_shadowRadius = 39; const int R::TextView_singleLine = 32; const int R::TextView_text = 18; const int R::TextView_textAllCaps = 72; const int R::TextView_textAppearance = 1; const int R::TextView_textColor = 5; const int R::TextView_textColorHighlight = 6; const int R::TextView_textColorHint = 7; const int R::TextView_textColorLink = 8; const int R::TextView_textCursorDrawable = 70; const int R::TextView_textEditNoPasteWindowLayout = 66; const int R::TextView_textEditPasteWindowLayout = 65; const int R::TextView_textEditSideNoPasteWindowLayout = 69; const int R::TextView_textEditSidePasteWindowLayout = 68; const int R::TextView_textEditSuggestionItemLayout = 71; const int R::TextView_textIsSelectable = 67; const int R::TextView_textScaleX = 20; const int R::TextView_textSelectHandle = 64; const int R::TextView_textSelectHandleLeft = 62; const int R::TextView_textSelectHandleRight = 63; const int R::TextView_textSize = 2; const int R::TextView_textStyle = 4; const int R::TextView_typeface = 3; const int R::TextView_width = 28; const int R::styleable::TextViewAppearance[] = { 0x01010034 }; const int R::TextViewAppearance_textAppearance = 0; const int R::styleable::TextViewMultiLineBackgroundState[] = { 0x0101034d }; const int R::TextViewMultiLineBackgroundState_state_multiline = 0; const int R::styleable::Theme[] = { 0x01010030, 0x01010031, 0x01010032, 0x01010033, 0x01010034, 0x01010035, 0x01010036, 0x01010037, 0x01010038, 0x01010039, 0x0101003a, 0x0101003b, 0x0101003c, 0x0101003d, 0x0101003e, 0x0101003f, 0x01010040, 0x01010041, 0x01010042, 0x01010043, 0x01010044, 0x01010045, 0x01010046, 0x01010047, 0x01010048, 0x01010049, 0x0101004a, 0x0101004b, 0x0101004c, 0x0101004d, 0x0101004e, 0x0101004f, 0x01010050, 0x01010051, 0x01010052, 0x01010053, 0x01010054, 0x01010055, 0x01010056, 0x01010057, 0x01010058, 0x01010059, 0x0101005a, 0x0101005b, 0x0101005c, 0x0101005d, 0x0101005e, 0x0101005f, 0x01010060, 0x01010061, 0x01010062, 0x0101006a, 0x0101006b, 0x0101006c, 0x0101006d, 0x0101006e, 0x0101006f, 0x01010070, 0x01010071, 0x01010072, 0x01010073, 0x01010074, 0x01010075, 0x01010076, 0x01010077, 0x01010078, 0x01010079, 0x0101007a, 0x0101007b, 0x0101007c, 0x0101007d, 0x0101007e, 0x01010080, 0x01010081, 0x01010082, 0x01010083, 0x01010084, 0x01010085, 0x01010086, 0x01010087, 0x01010088, 0x01010089, 0x0101008a, 0x0101008b, 0x0101008c, 0x0101008d, 0x0101008e, 0x0101008f, 0x01010090, 0x01010091, 0x01010092, 0x01010093, 0x01010094, 0x010100ae, 0x01010206, 0x01010207, 0x01010208, 0x0101020d, 0x0101020f, 0x01010210, 0x01010212, 0x01010213, 0x01010214, 0x01010219, 0x0101021a, 0x0101021e, 0x0101021f, 0x01010222, 0x0101022b, 0x01010230, 0x01010267, 0x01010287, 0x01010288, 0x01010289, 0x0101028b, 0x01010292, 0x010102a0, 0x010102a1, 0x010102ab, 0x010102ae, 0x010102af, 0x010102b0, 0x010102b1, 0x010102b2, 0x010102b3, 0x010102b6, 0x010102b9, 0x010102c5, 0x010102c6, 0x010102c7, 0x010102c8, 0x010102cd, 0x010102ce, 0x010102d6, 0x010102d7, 0x010102d8, 0x010102db, 0x010102dc, 0x010102dd, 0x010102e4, 0x010102eb, 0x010102f0, 0x010102f3, 0x010102f4, 0x010102f5, 0x010102f6, 0x010102f7, 0x010102fd, 0x010102ff, 0x01010300, 0x01010301, 0x01010302, 0x01010305, 0x01010306, 0x01010308, 0x01010309, 0x0101030a, 0x0101030b, 0x0101030e, 0x01010311, 0x01010312, 0x01010313, 0x01010314, 0x01010315, 0x01010317, 0x0101032b, 0x0101032c, 0x0101032e, 0x0101032f, 0x01010330, 0x01010336, 0x01010337, 0x01010338, 0x01010339, 0x0101033a, 0x0101034e, 0x0101034f, 0x01010350, 0x01010351, 0x01010352, 0x01010353, 0x01010355, 0x01010359, 0x0101035b, 0x0101035c, 0x0101035d, 0x0101035e, 0x0101035f, 0x01010360, 0x01010361, 0x0101036d, 0x01010373, 0x01010374, 0x0101037e, 0x01010386, 0x01010387, 0x01010388, 0x0101038d, 0x0101038e, 0x0101038f, 0x01010390, 0x01010391, 0x01010394, 0x01010397, 0x0101039b, 0x0101039c, 0x0101039d, 0x0101039e, 0x0101039f, 0x010103a3, 0x010103a4, 0x010103a8, 0x010103ad, 0x010103bd, 0x010103be, 0x010103c0, 0x010103c3, 0x010103c8, 0x010103cd, 0x010103ce, 0x010103cf, 0x010103d0, 0x010103d1, 0x010103d2, 0x010103d3, 0x010103d4, 0x010103d5, 0x010103d6, 0x010103d7, 0x010103d8, 0x010103d9, 0x010103da, 0x010103db, 0x010103dc, 0x010103dd, 0x010103de, 0x010103df, 0x010103e0, 0x010103e1, 0x010103e2, 0x010103e3, 0x010103e4, 0x010103e5, 0x010103e6, 0x010103e7, 0x010103e8, 0x010103e9, 0x010103ea, 0x010103eb, 0x010103ec, 0x010103ed, 0x010103ee, 0x010103ef, 0x010103f0, 0x010103f1, 0x010103f2, 0x010103f3, 0x010103f4, 0x010103f5, 0x010103f6, 0x010103f7, 0x010103f8, 0x010103f9, 0x010103fa }; const int R::Theme_absListViewStyle = 51; const int R::Theme_accessibilityFocusedDrawable = 261; const int R::Theme_actionBarDivider = 204; const int R::Theme_actionBarItemBackground = 205; const int R::Theme_actionBarSize = 140; const int R::Theme_actionBarSplitStyle = 196; const int R::Theme_actionBarStyle = 132; const int R::Theme_actionBarTabBarStyle = 143; const int R::Theme_actionBarTabStyle = 142; const int R::Theme_actionBarTabTextStyle = 144; const int R::Theme_actionBarWidgetTheme = 203; const int R::Theme_actionButtonStyle = 135; const int R::Theme_actionDropDownStyle = 134; const int R::Theme_actionMenuTextAppearance = 188; const int R::Theme_actionMenuTextColor = 189; const int R::Theme_actionModeBackground = 136; const int R::Theme_actionModeCloseButtonStyle = 146; const int R::Theme_actionModeCloseDrawable = 137; const int R::Theme_actionModeCopyDrawable = 160; const int R::Theme_actionModeCutDrawable = 159; const int R::Theme_actionModeFindDrawable = 239; const int R::Theme_actionModePasteDrawable = 161; const int R::Theme_actionModePopupWindowStyle = 241; const int R::Theme_actionModeSelectAllDrawable = 193; const int R::Theme_actionModeShareDrawable = 238; const int R::Theme_actionModeSplitBackground = 206; const int R::Theme_actionModeStyle = 202; const int R::Theme_actionModeWebSearchDrawable = 240; const int R::Theme_actionOverflowButtonStyle = 145; const int R::Theme_activatedBackgroundIndicator = 147; const int R::Theme_activityChooserViewStyle = 237; const int R::Theme_alertDialogButtonGroupStyle = 227; const int R::Theme_alertDialogCenterButtons = 228; const int R::Theme_alertDialogIcon = 181; const int R::Theme_alertDialogStyle = 45; const int R::Theme_alertDialogTheme = 155; const int R::Theme_autoCompleteTextViewStyle = 52; const int R::Theme_backgroundDimAmount = 2; const int R::Theme_backgroundDimEnabled = 106; const int R::Theme_borderlessButtonStyle = 165; const int R::Theme_buttonBarButtonStyle = 168; const int R::Theme_buttonBarStyle = 167; const int R::Theme_buttonStyle = 24; const int R::Theme_buttonStyleInset = 26; const int R::Theme_buttonStyleSmall = 25; const int R::Theme_buttonStyleToggle = 27; const int R::Theme_calendarViewStyle = 185; const int R::Theme_candidatesTextStyleSpans = 109; const int R::Theme_checkBoxPreferenceStyle = 87; const int R::Theme_checkboxStyle = 53; const int R::Theme_checkedTextViewStyle = 217; const int R::Theme_colorActivatedHighlight = 200; const int R::Theme_colorBackground = 1; const int R::Theme_colorBackgroundCacheHint = 118; const int R::Theme_colorFocusedHighlight = 199; const int R::Theme_colorForeground = 0; const int R::Theme_colorForegroundInverse = 94; const int R::Theme_colorLongPressedHighlight = 198; const int R::Theme_colorMultiSelectHighlight = 201; const int R::Theme_colorPressedHighlight = 197; const int R::Theme_datePickerStyle = 184; const int R::Theme_detailsElementBackground = 175; const int R::Theme_dialogCustomTitleDecorLayout = 245; const int R::Theme_dialogPreferenceStyle = 89; const int R::Theme_dialogTheme = 154; const int R::Theme_dialogTitleDecorLayout = 246; const int R::Theme_dialogTitleIconsDecorLayout = 244; const int R::Theme_disabledAlpha = 3; const int R::Theme_dividerHorizontal = 166; const int R::Theme_dividerVertical = 156; const int R::Theme_dropDownHintAppearance = 80; const int R::Theme_dropDownItemStyle = 78; const int R::Theme_dropDownListViewStyle = 54; const int R::Theme_dropDownSpinnerStyle = 133; const int R::Theme_dropdownListPreferredItemHeight = 225; const int R::Theme_editTextBackground = 179; const int R::Theme_editTextColor = 178; const int R::Theme_editTextPreferenceStyle = 90; const int R::Theme_editTextStyle = 55; const int R::Theme_errorMessageAboveBackground = 223; const int R::Theme_errorMessageBackground = 222; const int R::Theme_expandableListPreferredChildIndicatorLeft = 34; const int R::Theme_expandableListPreferredChildIndicatorRight = 35; const int R::Theme_expandableListPreferredChildPaddingLeft = 31; const int R::Theme_expandableListPreferredItemIndicatorLeft = 32; const int R::Theme_expandableListPreferredItemIndicatorRight = 33; const int R::Theme_expandableListPreferredItemPaddingLeft = 30; const int R::Theme_expandableListViewStyle = 56; const int R::Theme_expandableListViewWhiteStyle = 125; const int R::Theme_fastScrollOverlayPosition = 174; const int R::Theme_fastScrollPreviewBackgroundLeft = 171; const int R::Theme_fastScrollPreviewBackgroundRight = 172; const int R::Theme_fastScrollTextColor = 182; const int R::Theme_fastScrollThumbDrawable = 170; const int R::Theme_fastScrollTrackDrawable = 173; const int R::Theme_findOnPageNextDrawable = 262; const int R::Theme_findOnPagePreviousDrawable = 263; const int R::Theme_galleryItemBackground = 28; const int R::Theme_galleryStyle = 57; const int R::Theme_gestureOverlayViewStyle = 232; const int R::Theme_gridViewStyle = 58; const int R::Theme_homeAsUpIndicator = 157; const int R::Theme_horizontalScrollViewStyle = 180; const int R::Theme_imageButtonStyle = 59; const int R::Theme_imageWellStyle = 60; const int R::Theme_listChoiceBackgroundIndicator = 141; const int R::Theme_listChoiceIndicatorMultiple = 104; const int R::Theme_listChoiceIndicatorSingle = 103; const int R::Theme_listDivider = 102; const int R::Theme_listDividerAlertDialog = 152; const int R::Theme_listPopupWindowStyle = 148; const int R::Theme_listPreferredItemHeight = 29; const int R::Theme_listPreferredItemHeightLarge = 194; const int R::Theme_listPreferredItemHeightSmall = 195; const int R::Theme_listPreferredItemPaddingEnd = 214; const int R::Theme_listPreferredItemPaddingLeft = 209; const int R::Theme_listPreferredItemPaddingRight = 210; const int R::Theme_listPreferredItemPaddingStart = 213; const int R::Theme_listSeparatorTextViewStyle = 96; const int R::Theme_listViewStyle = 61; const int R::Theme_listViewWhiteStyle = 62; const int R::Theme_mapViewStyle = 82; const int R::Theme_mediaRouteButtonStyle = 212; const int R::Theme_numberPickerStyle = 235; const int R::Theme_panelBackground = 46; const int R::Theme_panelColorBackground = 49; const int R::Theme_panelColorForeground = 48; const int R::Theme_panelFullBackground = 47; const int R::Theme_panelMenuIsCompact = 229; const int R::Theme_panelMenuListTheme = 231; const int R::Theme_panelMenuListWidth = 230; const int R::Theme_panelTextAppearance = 50; const int R::Theme_pointerStyle = 260; const int R::Theme_popupMenuStyle = 149; const int R::Theme_popupWindowStyle = 63; const int R::Theme_preferenceCategoryStyle = 84; const int R::Theme_preferenceFragmentStyle = 242; const int R::Theme_preferenceFrameLayoutStyle = 258; const int R::Theme_preferenceInformationStyle = 85; const int R::Theme_preferenceLayoutChild = 92; const int R::Theme_preferencePanelStyle = 243; const int R::Theme_preferenceScreenStyle = 83; const int R::Theme_preferenceStyle = 86; const int R::Theme_presentationTheme = 215; const int R::Theme_progressBarStyle = 64; const int R::Theme_progressBarStyleHorizontal = 65; const int R::Theme_progressBarStyleInverse = 111; const int R::Theme_progressBarStyleLarge = 67; const int R::Theme_progressBarStyleLargeInverse = 113; const int R::Theme_progressBarStyleSmall = 66; const int R::Theme_progressBarStyleSmallInverse = 112; const int R::Theme_progressBarStyleSmallTitle = 98; const int R::Theme_quickContactBadgeOverlay = 233; const int R::Theme_quickContactBadgeStyleSmallWindowLarge = 124; const int R::Theme_quickContactBadgeStyleSmallWindowMedium = 123; const int R::Theme_quickContactBadgeStyleSmallWindowSmall = 122; const int R::Theme_quickContactBadgeStyleWindowLarge = 121; const int R::Theme_quickContactBadgeStyleWindowMedium = 120; const int R::Theme_quickContactBadgeStyleWindowSmall = 119; const int R::Theme_radioButtonStyle = 71; const int R::Theme_ratingBarStyle = 69; const int R::Theme_ratingBarStyleIndicator = 99; const int R::Theme_ratingBarStyleSmall = 70; const int R::Theme_ringtonePreferenceStyle = 91; const int R::Theme_scrollViewStyle = 72; const int R::Theme_searchDialogTheme = 257; const int R::Theme_searchDropdownBackground = 248; const int R::Theme_searchResultListItemHeight = 224; const int R::Theme_searchViewCloseIcon = 249; const int R::Theme_searchViewEditQuery = 253; const int R::Theme_searchViewEditQueryBackground = 254; const int R::Theme_searchViewGoIcon = 250; const int R::Theme_searchViewSearchIcon = 251; const int R::Theme_searchViewTextField = 255; const int R::Theme_searchViewTextFieldRight = 256; const int R::Theme_searchViewVoiceIcon = 252; const int R::Theme_searchWidgetCorpusItemBackground = 211; const int R::Theme_seekBarStyle = 68; const int R::Theme_segmentedButtonStyle = 169; const int R::Theme_selectableItemBackground = 158; const int R::Theme_spinnerDropDownItemStyle = 79; const int R::Theme_spinnerItemStyle = 81; const int R::Theme_spinnerStyle = 73; const int R::Theme_stackViewStyle = 234; const int R::Theme_starStyle = 74; const int R::Theme_switchPreferenceStyle = 190; const int R::Theme_switchStyle = 259; const int R::Theme_tabWidgetStyle = 75; const int R::Theme_textAppearance = 4; const int R::Theme_textAppearanceAutoCorrectionSuggestion = 219; const int R::Theme_textAppearanceButton = 95; const int R::Theme_textAppearanceEasyCorrectSuggestion = 216; const int R::Theme_textAppearanceInverse = 5; const int R::Theme_textAppearanceLarge = 16; const int R::Theme_textAppearanceLargeInverse = 19; const int R::Theme_textAppearanceLargePopupMenu = 150; const int R::Theme_textAppearanceListItem = 207; const int R::Theme_textAppearanceListItemSmall = 208; const int R::Theme_textAppearanceMedium = 17; const int R::Theme_textAppearanceMediumInverse = 20; const int R::Theme_textAppearanceMisspelledSuggestion = 218; const int R::Theme_textAppearanceSearchResultSubtitle = 116; const int R::Theme_textAppearanceSearchResultTitle = 117; const int R::Theme_textAppearanceSmall = 18; const int R::Theme_textAppearanceSmallInverse = 21; const int R::Theme_textAppearanceSmallPopupMenu = 151; const int R::Theme_textCheckMark = 22; const int R::Theme_textCheckMarkInverse = 23; const int R::Theme_textColorAlertDialogListItem = 153; const int R::Theme_textColorHighlightInverse = 176; const int R::Theme_textColorHintInverse = 15; const int R::Theme_textColorLinkInverse = 177; const int R::Theme_textColorPrimary = 6; const int R::Theme_textColorPrimaryDisableOnly = 7; const int R::Theme_textColorPrimaryInverse = 9; const int R::Theme_textColorPrimaryInverseDisableOnly = 114; const int R::Theme_textColorPrimaryInverseNoDisable = 13; const int R::Theme_textColorPrimaryNoDisable = 11; const int R::Theme_textColorSearchUrl = 110; const int R::Theme_textColorSecondary = 8; const int R::Theme_textColorSecondaryInverse = 10; const int R::Theme_textColorSecondaryInverseNoDisable = 14; const int R::Theme_textColorSecondaryNoDisable = 12; const int R::Theme_textColorTertiary = 100; const int R::Theme_textColorTertiaryInverse = 101; const int R::Theme_textEditNoPasteWindowLayout = 163; const int R::Theme_textEditPasteWindowLayout = 162; const int R::Theme_textEditSideNoPasteWindowLayout = 187; const int R::Theme_textEditSidePasteWindowLayout = 186; const int R::Theme_textEditSuggestionItemLayout = 192; const int R::Theme_textSelectHandle = 129; const int R::Theme_textSelectHandleLeft = 127; const int R::Theme_textSelectHandleRight = 128; const int R::Theme_textSelectHandleWindowStyle = 130; const int R::Theme_textSuggestionsWindowStyle = 191; const int R::Theme_textUnderlineColor = 220; const int R::Theme_textUnderlineThickness = 221; const int R::Theme_textViewStyle = 76; const int R::Theme_timePickerStyle = 236; const int R::Theme_toastFrameBackground = 247; const int R::Theme_webTextViewStyle = 126; const int R::Theme_webViewStyle = 77; const int R::Theme_windowActionBar = 131; const int R::Theme_windowActionBarOverlay = 139; const int R::Theme_windowActionModeOverlay = 138; const int R::Theme_windowAnimationStyle = 93; const int R::Theme_windowBackground = 36; const int R::Theme_windowCloseOnTouchOutside = 183; const int R::Theme_windowContentOverlay = 41; const int R::Theme_windowDisablePreview = 107; const int R::Theme_windowEnableSplitTouch = 164; const int R::Theme_windowFrame = 37; const int R::Theme_windowFullscreen = 97; const int R::Theme_windowIsFloating = 39; const int R::Theme_windowIsTranslucent = 40; const int R::Theme_windowNoDisplay = 105; const int R::Theme_windowNoTitle = 38; const int R::Theme_windowShowWallpaper = 115; const int R::Theme_windowSoftInputMode = 108; const int R::Theme_windowSplitActionBar = 226; const int R::Theme_windowTitleBackgroundStyle = 44; const int R::Theme_windowTitleSize = 42; const int R::Theme_windowTitleStyle = 43; const int R::Theme_yesNoPreferenceStyle = 88; const int R::styleable::TimePicker[] = { 0x01010413 }; const int R::TimePicker_internalLayout = 0; const int R::styleable::ToggleButton[] = { 0x01010033, 0x01010124, 0x01010125 }; const int R::ToggleButton_disabledAlpha = 0; const int R::ToggleButton_textOff = 2; const int R::ToggleButton_textOn = 1; const int R::styleable::TranslateAnimation[] = { 0x010101c6, 0x010101c7, 0x010101c8, 0x010101c9 }; const int R::TranslateAnimation_fromXDelta = 0; const int R::TranslateAnimation_fromYDelta = 2; const int R::TranslateAnimation_toXDelta = 1; const int R::TranslateAnimation_toYDelta = 3; const int R::styleable::TwoLineListItem[] = { 0x0101017e }; const int R::TwoLineListItem_mode = 0; const int R::styleable::VerticalSlider_Layout[] = { 0x01010193 }; const int R::VerticalSlider_Layout_layout_scale = 0; const int R::styleable::View[] = { 0x01010063, 0x01010064, 0x01010065, 0x01010066, 0x01010067, 0x01010068, 0x01010069, 0x0101007f, 0x010100d0, 0x010100d1, 0x010100d2, 0x010100d3, 0x010100d4, 0x010100d5, 0x010100d6, 0x010100d7, 0x010100d8, 0x010100d9, 0x010100da, 0x010100db, 0x010100dc, 0x010100dd, 0x010100de, 0x010100df, 0x010100e0, 0x010100e1, 0x010100e2, 0x010100e3, 0x010100e4, 0x010100e5, 0x010100e6, 0x010100e7, 0x010100e8, 0x010100e9, 0x0101013f, 0x01010140, 0x01010215, 0x01010216, 0x0101024e, 0x0101025e, 0x0101026f, 0x01010273, 0x010102a8, 0x010102a9, 0x010102aa, 0x010102c1, 0x010102c4, 0x0101031f, 0x01010320, 0x01010321, 0x01010322, 0x01010323, 0x01010324, 0x01010325, 0x01010326, 0x01010327, 0x01010328, 0x01010334, 0x0101033c, 0x01010354, 0x010103a5, 0x010103aa, 0x010103b0, 0x010103b1, 0x010103b2, 0x010103b3, 0x010103b4, 0x010103c6 }; const int R::View_alpha = 47; const int R::View_background = 12; const int R::View_clickable = 29; const int R::View_contentDescription = 41; const int R::View_drawingCacheQuality = 32; const int R::View_duplicateParentState = 33; const int R::View_fadeScrollbars = 44; const int R::View_fadingEdge = 23; const int R::View_fadingEdgeLength = 24; const int R::View_filterTouchesWhenObscured = 46; const int R::View_fitsSystemWindows = 21; const int R::View_focusable = 18; const int R::View_focusableInTouchMode = 19; const int R::View_hapticFeedbackEnabled = 39; const int R::View_id = 8; const int R::View_importantForAccessibility = 61; const int R::View_isScrollContainer = 38; const int R::View_keepScreenOn = 37; const int R::View_labelFor = 67; const int R::View_layerType = 59; const int R::View_layoutDirection = 64; const int R::View_longClickable = 30; const int R::View_minHeight = 35; const int R::View_minWidth = 34; const int R::View_nextFocusDown = 28; const int R::View_nextFocusForward = 58; const int R::View_nextFocusLeft = 25; const int R::View_nextFocusRight = 26; const int R::View_nextFocusUp = 27; const int R::View_onClick = 40; const int R::View_overScrollMode = 45; const int R::View_padding = 13; const int R::View_paddingBottom = 17; const int R::View_paddingEnd = 66; const int R::View_paddingLeft = 14; const int R::View_paddingRight = 16; const int R::View_paddingStart = 65; const int R::View_paddingTop = 15; const int R::View_requiresFadingEdge = 60; const int R::View_rotation = 54; const int R::View_rotationX = 55; const int R::View_rotationY = 56; const int R::View_saveEnabled = 31; const int R::View_scaleX = 52; const int R::View_scaleY = 53; const int R::View_scrollX = 10; const int R::View_scrollY = 11; const int R::View_scrollbarAlwaysDrawHorizontalTrack = 5; const int R::View_scrollbarAlwaysDrawVerticalTrack = 6; const int R::View_scrollbarDefaultDelayBeforeFade = 43; const int R::View_scrollbarFadeDuration = 42; const int R::View_scrollbarSize = 0; const int R::View_scrollbarStyle = 7; const int R::View_scrollbarThumbHorizontal = 1; const int R::View_scrollbarThumbVertical = 2; const int R::View_scrollbarTrackHorizontal = 3; const int R::View_scrollbarTrackVertical = 4; const int R::View_scrollbars = 22; const int R::View_soundEffectsEnabled = 36; const int R::View_tag = 9; const int R::View_textAlignment = 63; const int R::View_textDirection = 62; const int R::View_transformPivotX = 48; const int R::View_transformPivotY = 49; const int R::View_translationX = 50; const int R::View_translationY = 51; const int R::View_verticalScrollbarPosition = 57; const int R::View_visibility = 20; const int R::styleable::ViewAnimator[] = { 0x01010177, 0x01010178, 0x010102d5 }; const int R::ViewAnimator_animateFirstView = 2; const int R::ViewAnimator_inAnimation = 0; const int R::ViewAnimator_outAnimation = 1; const int R::styleable::ViewDrawableStates[] = { 0x0101009c, 0x0101009d, 0x0101009e, 0x010100a1, 0x010100a7, 0x010102fe, 0x0101031b, 0x01010367, 0x01010368, 0x01010369 }; const int R::ViewDrawableStates_state_accelerated = 6; const int R::ViewDrawableStates_state_activated = 5; const int R::ViewDrawableStates_state_drag_can_accept = 8; const int R::ViewDrawableStates_state_drag_hovered = 9; const int R::ViewDrawableStates_state_enabled = 2; const int R::ViewDrawableStates_state_focused = 0; const int R::ViewDrawableStates_state_hovered = 7; const int R::ViewDrawableStates_state_pressed = 4; const int R::ViewDrawableStates_state_selected = 3; const int R::ViewDrawableStates_state_window_focused = 1; const int R::styleable::ViewFlipper[] = { 0x01010179, 0x010102b5 }; const int R::ViewFlipper_autoStart = 1; const int R::ViewFlipper_flipInterval = 0; const int R::styleable::ViewGroup[] = { 0x010100ea, 0x010100eb, 0x010100ec, 0x010100ed, 0x010100ee, 0x010100ef, 0x010100f0, 0x010100f1, 0x010102ef, 0x010102f2 }; const int R::ViewGroup_addStatesFromChildren = 6; const int R::ViewGroup_alwaysDrawnWithCache = 5; const int R::ViewGroup_animateLayoutChanges = 9; const int R::ViewGroup_animationCache = 3; const int R::ViewGroup_clipChildren = 0; const int R::ViewGroup_clipToPadding = 1; const int R::ViewGroup_descendantFocusability = 7; const int R::ViewGroup_layoutAnimation = 2; const int R::ViewGroup_persistentDrawingCache = 4; const int R::ViewGroup_splitMotionEvents = 8; const int R::styleable::ViewGroup_Layout[] = { 0x010100f4, 0x010100f5 }; const int R::ViewGroup_Layout_layout_height = 1; const int R::ViewGroup_Layout_layout_width = 0; const int R::styleable::ViewGroup_MarginLayout[] = { 0x010100f4, 0x010100f5, 0x010100f6, 0x010100f7, 0x010100f8, 0x010100f9, 0x010100fa, 0x010103b5, 0x010103b6 }; const int R::ViewGroup_MarginLayout_layout_height = 1; const int R::ViewGroup_MarginLayout_layout_margin = 2; const int R::ViewGroup_MarginLayout_layout_marginBottom = 6; const int R::ViewGroup_MarginLayout_layout_marginEnd = 8; const int R::ViewGroup_MarginLayout_layout_marginLeft = 3; const int R::ViewGroup_MarginLayout_layout_marginRight = 5; const int R::ViewGroup_MarginLayout_layout_marginStart = 7; const int R::ViewGroup_MarginLayout_layout_marginTop = 4; const int R::ViewGroup_MarginLayout_layout_width = 0; const int R::styleable::ViewStub[] = { 0x010100f2, 0x010100f3 }; const int R::ViewStub_inflatedId = 1; const int R::ViewStub_layout = 0; const int R::styleable::ViewSwitcher[] = { }; const int R::styleable::VolumePreference[] = { 0x01010209 }; const int R::VolumePreference_streamType = 0; const int R::styleable::Wallpaper[] = { 0x01010020, 0x01010225, 0x010102a5, 0x010102b4 }; const int R::Wallpaper_author = 3; const int R::Wallpaper_description = 0; const int R::Wallpaper_settingsActivity = 1; const int R::Wallpaper_thumbnail = 2; const int R::styleable::WallpaperPreviewInfo[] = { 0x01010331 }; const int R::WallpaperPreviewInfo_staticWallpaperPreview = 0; const int R::styleable::WeightedLinearLayout[] = { 0x01010415, 0x01010416, 0x01010417, 0x01010418 }; const int R::WeightedLinearLayout_majorWeightMax = 2; const int R::WeightedLinearLayout_majorWeightMin = 0; const int R::WeightedLinearLayout_minorWeightMax = 3; const int R::WeightedLinearLayout_minorWeightMin = 1; const int R::styleable::Window[] = { 0x01010032, 0x01010054, 0x01010055, 0x01010056, 0x01010057, 0x01010058, 0x01010059, 0x01010098, 0x010100ae, 0x0101020d, 0x0101021e, 0x0101021f, 0x01010222, 0x0101022b, 0x01010292, 0x010102cd, 0x010102dd, 0x010102e4, 0x01010317, 0x01010356, 0x01010357, 0x0101035b, 0x010103d5, 0x010103fb, 0x010103fc, 0x010103fd, 0x010103fe }; const int R::Window_backgroundDimAmount = 0; const int R::Window_backgroundDimEnabled = 11; const int R::Window_textColor = 7; const int R::Window_windowActionBar = 15; const int R::Window_windowActionBarOverlay = 17; const int R::Window_windowActionModeOverlay = 16; const int R::Window_windowAnimationStyle = 8; const int R::Window_windowBackground = 1; const int R::Window_windowCloseOnTouchOutside = 21; const int R::Window_windowContentOverlay = 6; const int R::Window_windowDisablePreview = 12; const int R::Window_windowEnableSplitTouch = 18; const int R::Window_windowFixedHeightMajor = 26; const int R::Window_windowFixedHeightMinor = 24; const int R::Window_windowFixedWidthMajor = 23; const int R::Window_windowFixedWidthMinor = 25; const int R::Window_windowFrame = 2; const int R::Window_windowFullscreen = 9; const int R::Window_windowIsFloating = 4; const int R::Window_windowIsTranslucent = 5; const int R::Window_windowMinWidthMajor = 19; const int R::Window_windowMinWidthMinor = 20; const int R::Window_windowNoDisplay = 10; const int R::Window_windowNoTitle = 3; const int R::Window_windowShowWallpaper = 14; const int R::Window_windowSoftInputMode = 13; const int R::Window_windowSplitActionBar = 22; const int R::styleable::WindowAnimation[] = { 0x010100b4, 0x010100b5, 0x010100b6, 0x010100b7, 0x010100b8, 0x010100b9, 0x010100ba, 0x010100bb, 0x010100bc, 0x010100bd, 0x010100be, 0x010100bf, 0x010100c0, 0x010100c1, 0x010100c2, 0x010100c3, 0x01010293, 0x01010294, 0x01010295, 0x01010296, 0x01010297, 0x01010298, 0x01010299, 0x0101029a }; const int R::WindowAnimation_activityCloseEnterAnimation = 6; const int R::WindowAnimation_activityCloseExitAnimation = 7; const int R::WindowAnimation_activityOpenEnterAnimation = 4; const int R::WindowAnimation_activityOpenExitAnimation = 5; const int R::WindowAnimation_taskCloseEnterAnimation = 10; const int R::WindowAnimation_taskCloseExitAnimation = 11; const int R::WindowAnimation_taskOpenEnterAnimation = 8; const int R::WindowAnimation_taskOpenExitAnimation = 9; const int R::WindowAnimation_taskToBackEnterAnimation = 14; const int R::WindowAnimation_taskToBackExitAnimation = 15; const int R::WindowAnimation_taskToFrontEnterAnimation = 12; const int R::WindowAnimation_taskToFrontExitAnimation = 13; const int R::WindowAnimation_wallpaperCloseEnterAnimation = 18; const int R::WindowAnimation_wallpaperCloseExitAnimation = 19; const int R::WindowAnimation_wallpaperIntraCloseEnterAnimation = 22; const int R::WindowAnimation_wallpaperIntraCloseExitAnimation = 23; const int R::WindowAnimation_wallpaperIntraOpenEnterAnimation = 20; const int R::WindowAnimation_wallpaperIntraOpenExitAnimation = 21; const int R::WindowAnimation_wallpaperOpenEnterAnimation = 16; const int R::WindowAnimation_wallpaperOpenExitAnimation = 17; const int R::WindowAnimation_windowEnterAnimation = 0; const int R::WindowAnimation_windowExitAnimation = 1; const int R::WindowAnimation_windowHideAnimation = 3; const int R::WindowAnimation_windowShowAnimation = 2; }; };
51.107773
95
0.816339
jingcao80
5fde1048e3ba09396e3eb85d31727a63a0b41224
5,841
hh
C++
cc/record.hh
skepner/dtra2
5aeeb66cd8e42217976ae0ad481dcc42549e6bf0
[ "MIT" ]
null
null
null
cc/record.hh
skepner/dtra2
5aeeb66cd8e42217976ae0ad481dcc42549e6bf0
[ "MIT" ]
null
null
null
cc/record.hh
skepner/dtra2
5aeeb66cd8e42217976ae0ad481dcc42549e6bf0
[ "MIT" ]
null
null
null
#pragma once #include <string> #include "date.hh" // ---------------------------------------------------------------------- namespace xlnt { class cell; } namespace dtra { inline namespace v2 { class Directory; // -------------------------------------------------- class Record { public: void importer_default(const xlnt::cell& cell); void exporter_default(xlnt::cell& cell) const; std::string csv_exporter_default() const { return {}; } void allow_zero_date(bool allow_zero_date); std::string validate(const Directory& locations, const Directory& birds); std::pair<std::string, bool> merge(const Record& rec, bool resolve_conflict_with_merge_in); static std::string new_record_id(); void reset_record_id() { record_id_ = new_record_id(); } static constexpr const char* re_sample_id = "^(217|DT)-[0-9]+$"; static constexpr const char* sample_id_message = "expected: 217-xxxxx, DT-xxxxx"; static constexpr const char* re_ct = "^[<>]?[0-9]+(\\.[0-9][0-9]?)?$"; static constexpr const char* ct_message = "expected: valid CT Value"; static constexpr const char* re_h_status = "^(P|N)$"; static constexpr const char* h_status_message = "expected: P or N"; static constexpr const char* re_pathotype = "^(LPAI|HPAI)$"; static constexpr const char* pathotype_message = "expected: LPAI or HPAI"; static constexpr const char* re_egg_passage = "^(0|1)$"; static constexpr const char* egg_passage_message = "expected: 0 or 1"; static std::string new_record_id_; field::Uppercase sample_id_{re_sample_id, sample_id_message, field::can_be_empty::no}; field::Date collection_date_{field::can_be_empty::no}; field::Text species_; field::Uppercase age_{"^[HAU]$", "expected: H, A, U", field::can_be_empty::no}; field::Uppercase sex_{"^[MFU]$", "expected Sex: M, F, U", field::can_be_empty::no}; field::Text ring_number_; field::Uppercase host_identifier_{re_sample_id, sample_id_message}; field::Text host_species_; field::Text host_common_name_; field::Uppercase health_{"^[HSDU]$", "expected: H(ealthy), S(ick), D(ead), U(undetermined)"}; field::Uppercase capture_method_status_{"^(A|K|O|M|P|Z|F|U|OT.*)$", "expected: A, K, O, M, P, Z, F, OT-<text>, U"}; // see bottom of record.cc field::Uppercase behavior_{"^(W|D|CW|U)$", "expected: W(ild), D(omestic), CW (captive-wild), U(known)"}; field::Text location_{field::can_be_empty::no}; field::Text province_; field::Text country_; field::Float latitude_{-90, 90}; field::Float longitude_{-180, 180}; field::Uppercase sample_material_{"^(TS|OP|C|F|COP|B|SR|TT|CF|TB|TO|L|S|W|O[- ].+|X.*)$", "expected: TS, OP, C, F, COP, B, SR, TT, CF, TB, TO, L, S, W, O -<text>, X-<text>"}; // see bottom of record.cc field::Uppercase test_for_influenza_virus_; // {"^RRT-PCR +MA( *,? *RRT-PCR +H5( *,? *RRT-PCR +H7)?)?$", "expected: RRT-PCR MA, RRT-PCR H5, RRT-PCR H7"} field::Date date_of_testing_; field::Uppercase pool_id_{"^[0-9\\.]+$", "expected: numeric value"}; field::Uppercase influenza_test_result_{"^(P|N)$", "expected: P, N"}; field::Uppercase ma_ct_value_{re_ct, ct_message}; field::Uppercase h5_status_{re_h_status, h_status_message}; field::Uppercase h5_ct_value_{re_ct, ct_message}; field::Uppercase h5_pathotype_{re_pathotype, pathotype_message}; field::Uppercase h7_status_{re_h_status, h_status_message}; field::Uppercase h7_ct_value_{re_ct, ct_message}; field::Uppercase h7_pathotype_{re_pathotype, pathotype_message}; field::Uppercase h9_status_{re_h_status, h_status_message}; field::Uppercase h9_ct_value_{re_ct, ct_message}; field::Text emc_id_; field::Text ahvla_id_; field::Uppercase first_egg_passage_{re_egg_passage, egg_passage_message}; field::Uppercase second_egg_passage_{re_egg_passage, egg_passage_message}; field::Uppercase passage_isolation_{"^(E1|E2|NOT *PERFORMED|NEGATIVE)$", "expected: E1, E2, not performed"}; field::Uppercase virus_pathotype_{"^(LPAI|HPAI|NOT *IDENTIFIABLE)$", "expected: LPAI, HPAI, notidentifiable"}; field::Uppercase haemagglutinin_subtype_{"^((H[1-9]|H1[0-6])(/(H[1-9]|H1[0-6]))*|MIXED|H +NOT +DETERMINED)$", "expected: H1-H16, mixed, H not determined"}; field::Uppercase neuraminidase_subtype_{"^(N[1-9](/N[1-9])*|MIXED|N +NOT +DETERMINED)$", "expected: N1-N9, mixed, N not determined"}; field::Uppercase serology_sample_id_{re_sample_id, sample_id_message}; field::Date serology_testing_date_; field::Uppercase serology_status_{"^(\\+|-|\\*)$", "expected: +, -, *"}; field::Text record_id_; private: void validate_hostspecies_commonname(const Directory& birds, std::vector<std::string>& reports); void check_dates(std::vector<std::string>& reports); void update_locations(const Directory& locations, std::vector<std::string>& reports); void update_behavior(std::vector<std::string>& reports); }; } // namespace v2 } // namespace dtra // ---------------------------------------------------------------------- /// Local Variables: /// eval: (if (fboundp 'eu-rename-buffer) (eu-rename-buffer)) /// End:
54.588785
213
0.588255
skepner
5fe35e13763aab39c3aa3d34251ef07e01a67fae
921
cpp
C++
HDUOJ/1020.cpp
Accelerator404/Algorithm-Demonstration
e40a499c23a56d363c743c76ac967d9c4247a4be
[ "Apache-2.0" ]
1
2019-09-18T23:45:27.000Z
2019-09-18T23:45:27.000Z
HDUOJ/1020.cpp
Accelerator404/Algorithm-Demonstration
e40a499c23a56d363c743c76ac967d9c4247a4be
[ "Apache-2.0" ]
null
null
null
HDUOJ/1020.cpp
Accelerator404/Algorithm-Demonstration
e40a499c23a56d363c743c76ac967d9c4247a4be
[ "Apache-2.0" ]
1
2019-09-18T23:45:28.000Z
2019-09-18T23:45:28.000Z
#include <iostream> #include <cstdio> #include <string> #include <algorithm> using namespace std; //to_string要求C++11 int main() { int N; cin >> N; for(int i=1;i <= N;i++){ char target; string input,output; int count = 0; cin >> input; for(int j = 0;j < input.length();j++){ if(j == 0){ target = input[j]; count++; } else if(target != input[j]){ if(count>1){ output.append(to_string(count)); } output+=target; count = 0; target = input[j]; count++; } else{ count++; } } if(count>1){ output.append(to_string(count)); } output+=target; cout << output << endl; } return 0; }
20.931818
52
0.394137
Accelerator404
5fea1034974be509fb893f4ef79ba7f60bff7ad6
1,739
cpp
C++
vstgui/tests/unittest/lib/cpoint_test.cpp
GizzZmo/vstgui
477a3de78ecbcf25f52cce9ad49c5feb0b15ea9e
[ "BSD-3-Clause" ]
205
2019-06-09T18:40:27.000Z
2022-03-24T01:53:49.000Z
vstgui/tests/unittest/lib/cpoint_test.cpp
GizzZmo/vstgui
477a3de78ecbcf25f52cce9ad49c5feb0b15ea9e
[ "BSD-3-Clause" ]
11
2019-02-09T16:15:34.000Z
2021-03-24T06:28:56.000Z
vstgui/tests/unittest/lib/cpoint_test.cpp
GizzZmo/vstgui
477a3de78ecbcf25f52cce9ad49c5feb0b15ea9e
[ "BSD-3-Clause" ]
30
2019-06-11T04:05:46.000Z
2022-03-29T15:52:14.000Z
// This file is part of VSTGUI. It is subject to the license terms // in the LICENSE file found in the top-level directory of this // distribution and at http://github.com/steinbergmedia/vstgui/LICENSE #include "../../../lib/cpoint.h" #include "../unittests.h" namespace VSTGUI { TESTCASE(CPointTest, TEST(unequal, EXPECT(CPoint (0, 0) != CPoint (1, 1)); EXPECT(CPoint (0, 0) != CPoint (0, 1)); EXPECT(CPoint (0, 0) != CPoint (1, 0)); ); TEST(equal, EXPECT(CPoint (0, 0) == CPoint (0, 0)); ); TEST(operatorAddAssign, CPoint p (1, 1); p += CPoint (1, 1); EXPECT(p == CPoint (2, 2)); ); TEST(operatorSubtractAssign, CPoint p (2, 2); p -= CPoint (1, 1); EXPECT(p == CPoint (1, 1)); ); TEST(operatorAdd, CPoint p (2, 2); auto p2 = p + CPoint (1, 1); EXPECT(p2 == CPoint (3, 3)); EXPECT(p == CPoint (2, 2)); ); TEST(operatorSubtract, CPoint p (2, 2); auto p2 = p - CPoint (1, 1); EXPECT(p2 == CPoint (1, 1)); EXPECT(p == CPoint (2, 2)); ); TEST(operatorInverse, CPoint p (2, 2); auto p2 = -p; EXPECT(p2 == CPoint (-2, -2)); EXPECT(p == CPoint (2, 2)); ); TEST(offsetCoords, CPoint p (1, 2); p.offset (1, 2); EXPECT(p == CPoint (2, 4)); ); TEST(offsetPoint, CPoint p (1, 2); p.offset (CPoint (2, 3)); EXPECT(p == CPoint (3, 5)); ); TEST(offsetInverse, CPoint p (5, 3); p.offsetInverse (CPoint(2, 1)); EXPECT(p == CPoint (3, 2)); ); TEST(makeIntegral, CPoint p (5.3, 4.2); p.makeIntegral (); EXPECT(p == CPoint (5, 4)); p (5.5, 4.5); p.makeIntegral (); EXPECT(p == CPoint (6, 5)); p (5.9, 4.1); p.makeIntegral (); EXPECT(p == CPoint (6, 4)); p (5.1, 4.501); p.makeIntegral (); EXPECT(p == CPoint (5, 5)); ); ); } // VSTGUI
19.539326
70
0.565267
GizzZmo
5feb4e69c10ca0a874238cb07dbe30865b23f5dc
658
cpp
C++
modules/augment/src/uniformnoise.cpp
FadyEssam/opencv_contrib
8ebe2629ec7ae17338f6dc7acceada82151185ed
[ "BSD-3-Clause" ]
null
null
null
modules/augment/src/uniformnoise.cpp
FadyEssam/opencv_contrib
8ebe2629ec7ae17338f6dc7acceada82151185ed
[ "BSD-3-Clause" ]
1
2019-07-11T20:21:36.000Z
2019-07-11T20:21:36.000Z
modules/augment/src/uniformnoise.cpp
FadyEssam/opencv_contrib
8ebe2629ec7ae17338f6dc7acceada82151185ed
[ "BSD-3-Clause" ]
null
null
null
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. #include "precomp.hpp" namespace cv { namespace augment { UniformNoise::UniformNoise(float _low, float _high) { low = _low; high = _high; } void UniformNoise::image(InputArray src, OutputArray dst) { addWeighted(src, 1.0, noise, 1.0, 0.0, dst); } Rect2f UniformNoise::rectangle(const Rect2f& src) { return src; } void UniformNoise::init(const Mat& srcImage) { noise = Mat(srcImage.size(), srcImage.type(),Scalar(0)); randu(noise, low, high); } }}
21.933333
90
0.711246
FadyEssam
5fedfe656a8f4eb606b3b48b506acf7b76af47db
32,654
cpp
C++
src/main/cpp/driver/ps_ds4_controller.cpp
morrky89/PSMoveSteamVRBridge
03d29b14d1738597523bd059d30736cb0d075d37
[ "Apache-2.0" ]
147
2017-03-28T21:32:25.000Z
2022-01-03T14:43:58.000Z
src/main/cpp/driver/ps_ds4_controller.cpp
morrky89/PSMoveSteamVRBridge
03d29b14d1738597523bd059d30736cb0d075d37
[ "Apache-2.0" ]
129
2017-04-01T20:34:52.000Z
2021-04-06T07:34:49.000Z
src/main/cpp/driver/ps_ds4_controller.cpp
morrky89/PSMoveSteamVRBridge
03d29b14d1738597523bd059d30736cb0d075d37
[ "Apache-2.0" ]
53
2017-03-29T19:31:40.000Z
2022-03-13T11:38:23.000Z
#define _USE_MATH_DEFINES #include "constants.h" #include "server_driver.h" #include "utils.h" #include "settings_util.h" #include "driver.h" #include "facing_handsolver.h" #include "ps_ds4_controller.h" #include "trackable_device.h" #include <assert.h> namespace steamvrbridge { // -- PSDualshock4ControllerConfig ----- configuru::Config PSDualshock4ControllerConfig::WriteToJSON() { configuru::Config &pt= ControllerConfig::WriteToJSON(); // Throwing power settings pt["linear_velocity_multiplier"] = linear_velocity_multiplier; pt["linear_velocity_exponent"] = linear_velocity_exponent; // General Settings pt["rumble_suppressed"] = rumble_suppressed; pt["extend_y_cm"] = extend_Y_meters * 100.f; pt["extend_x_cm"] = extend_Z_meters * 100.f; pt["rotate_z_90"] = z_rotate_90_degrees; pt["calibration_offset_cm"] = calibration_offset_meters * 100.f; pt["thumbstick_deadzone"] = thumbstick_deadzone; pt["disable_alignment_gesture"] = disable_alignment_gesture; pt["use_orientation_in_hmd_alignment"] = use_orientation_in_hmd_alignment; //PSMove controller button -> fake touchpad mappings WriteEmulatedTouchpadAction(pt, k_PSMButtonID_PS); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_Triangle); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_Circle); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_Cross); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_Square); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_DPad_Left); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_DPad_Up); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_DPad_Right); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_DPad_Down); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_Options); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_Share); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_Touchpad); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_LeftJoystick); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_RightJoystick); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_LeftShoulder); WriteEmulatedTouchpadAction(pt, k_PSMButtonID_RightShoulder); return pt; } bool PSDualshock4ControllerConfig::ReadFromJSON(const configuru::Config &pt) { if (!ControllerConfig::ReadFromJSON(pt)) return false; // Throwing power settings linear_velocity_multiplier = pt.get_or<float>("linear_velocity_multiplier", linear_velocity_multiplier); linear_velocity_exponent = pt.get_or<float>("linear_velocity_exponent", linear_velocity_exponent); // General Settings rumble_suppressed = pt.get_or<bool>("rumble_suppressed", rumble_suppressed); extend_Y_meters = pt.get_or<float>("extend_y_cm", 0.f) / 100.f; extend_Z_meters = pt.get_or<float>("extend_x_cm", 0.f) / 100.f; z_rotate_90_degrees = pt.get_or<bool>("rotate_z_90", z_rotate_90_degrees); calibration_offset_meters = pt.get_or<float>("calibration_offset_cm", 6.f) / 100.f; thumbstick_deadzone = pt.get_or<float>("thumbstick_deadzone", thumbstick_deadzone); disable_alignment_gesture = pt.get_or<bool>("disable_alignment_gesture", disable_alignment_gesture); use_orientation_in_hmd_alignment = pt.get_or<bool>("use_orientation_in_hmd_alignment", use_orientation_in_hmd_alignment); // DS4 controller button -> fake touchpad mappings ReadEmulatedTouchpadAction(pt, k_PSMButtonID_PS); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_Triangle); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_Circle); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_Cross); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_Square); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_DPad_Left); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_DPad_Up); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_DPad_Right); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_DPad_Down); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_Options); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_Share); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_Touchpad); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_LeftJoystick); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_RightJoystick); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_LeftShoulder); ReadEmulatedTouchpadAction(pt, k_PSMButtonID_RightShoulder); return true; } // -- PSDualshock4Controller ----- PSDualshock4Controller::PSDualshock4Controller( PSMControllerID psmControllerId, vr::ETrackedControllerRole trackedControllerRole, const char *psmSerialNo) : Controller() , m_parentController(nullptr) , m_nPSMControllerId(psmControllerId) , m_PSMServiceController(nullptr) , m_nPoseSequenceNumber(0) , m_resetPoseButtonPressTime() , m_bResetPoseRequestSent(false) , m_resetAlignButtonPressTime() , m_bResetAlignRequestSent(false) , m_touchpadDirectionsUsed(false) , m_bUseControllerOrientationInHMDAlignment(false) , m_lastSanitizedLeftThumbstick_X(0.f) , m_lastSanitizedLeftThumbstick_Y(0.f) , m_lastSanitizedRightThumbstick_X(0.f) , m_lastSanitizedRightThumbstick_Y(0.f) { char svrIdentifier[256]; Utils::GenerateControllerSteamVRIdentifier(svrIdentifier, sizeof(svrIdentifier), psmControllerId); m_strSteamVRSerialNo = svrIdentifier; m_lastTouchpadPressTime = std::chrono::high_resolution_clock::now(); if (psmSerialNo != NULL) { m_strPSMControllerSerialNo = psmSerialNo; } // Tell PSM Client API that we are listening to this controller id PSM_AllocateControllerListener(psmControllerId); m_PSMServiceController = PSM_GetController(psmControllerId); m_TrackedControllerRole = trackedControllerRole; m_trackingStatus = vr::TrackingResult_Uninitialized; } PSDualshock4Controller::~PSDualshock4Controller() { PSM_FreeControllerListener(m_PSMServiceController->ControllerID); m_PSMServiceController = nullptr; } vr::EVRInitError PSDualshock4Controller::Activate(vr::TrackedDeviceIndex_t unObjectId) { vr::EVRInitError result = Controller::Activate(unObjectId); if (result == vr::VRInitError_None) { Logger::Info("PSDualshock4Controller::Activate - Controller %d Activated\n", unObjectId); // If we aren't doing the alignment gesture then just pretend we have tracking // This will suppress the alignment gesture dialog in the monitor if (getConfig()->disable_alignment_gesture || CServerDriver_PSMoveService::getInstance()->IsHMDTrackingSpaceCalibrated()) { m_trackingStatus = vr::TrackingResult_Running_OK; } else { CServerDriver_PSMoveService::getInstance()->LaunchPSMoveMonitor(); } PSMRequestID requestId; if (PSM_StartControllerDataStreamAsync( m_PSMServiceController->ControllerID, PSMStreamFlags_includePositionData | PSMStreamFlags_includePhysicsData, &requestId) != PSMResult_Error) { PSM_RegisterCallback(requestId, PSDualshock4Controller::start_controller_response_callback, this); } // Setup controller properties { vr::CVRPropertyHelpers *properties = vr::VRProperties(); properties->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceOff_String, "{psmove}gamepad_status_off.png"); properties->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceSearching_String, "{psmove}gamepad_status_ready.png"); properties->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceSearchingAlert_String, "{psmove}gamepad_status_ready_alert.png"); properties->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceReady_String, "{psmove}gamepad_status_ready.png"); properties->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceReadyAlert_String, "{psmove}gamepad_status_ready_alert.png"); properties->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceNotReady_String, "{psmove}gamepad_status_error.png"); properties->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceStandby_String, "{psmove}gamepad_status_ready.png"); properties->SetStringProperty(m_ulPropertyContainer, vr::Prop_NamedIconPathDeviceAlertLow_String, "{psmove}gamepad_status_ready_low.png"); properties->SetBoolProperty(m_ulPropertyContainer, vr::Prop_WillDriftInYaw_Bool, true); properties->SetBoolProperty(m_ulPropertyContainer, vr::Prop_DeviceIsWireless_Bool, true); properties->SetBoolProperty(m_ulPropertyContainer, vr::Prop_DeviceProvidesBatteryStatus_Bool, false); properties->SetInt32Property(m_ulPropertyContainer, vr::Prop_DeviceClass_Int32, vr::TrackedDeviceClass_Controller); // The {psmove} syntax lets us refer to rendermodels that are installed // in the driver's own resources/rendermodels directory. The driver can // still refer to SteamVR models like "generic_hmd". if (getConfig()->override_model.length() > 0) { properties->SetStringProperty(m_ulPropertyContainer, vr::Prop_RenderModelName_String, getConfig()->override_model.c_str()); } else { properties->SetStringProperty(m_ulPropertyContainer, vr::Prop_RenderModelName_String, "{psmove}dualshock4_controller"); } // Set device properties vr::VRProperties()->SetInt32Property(m_ulPropertyContainer, vr::Prop_ControllerRoleHint_Int32, m_TrackedControllerRole); vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_ManufacturerName_String, "Sony"); vr::VRProperties()->SetUint64Property(m_ulPropertyContainer, vr::Prop_HardwareRevision_Uint64, 1313); vr::VRProperties()->SetUint64Property(m_ulPropertyContainer, vr::Prop_FirmwareVersion_Uint64, 1315); vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_ModelNumber_String, "Dualshock4"); vr::VRProperties()->SetStringProperty(m_ulPropertyContainer, vr::Prop_SerialNumber_String, m_strPSMControllerSerialNo.c_str()); } } return result; } void PSDualshock4Controller::start_controller_response_callback( const PSMResponseMessage *response, void *userdata) { PSDualshock4Controller *controller = reinterpret_cast<PSDualshock4Controller *>(userdata); if (response->result_code == PSMResult::PSMResult_Success) { Logger::Info("PSDualshock4Controller::start_controller_response_callback - Controller stream started\n"); // Create the special case system button (bound to PS button) controller->CreateButtonComponent(k_PSMButtonID_System); // Create buttons components controller->CreateButtonComponent(k_PSMButtonID_PS); controller->CreateButtonComponent(k_PSMButtonID_Triangle); controller->CreateButtonComponent(k_PSMButtonID_Circle); controller->CreateButtonComponent(k_PSMButtonID_Cross); controller->CreateButtonComponent(k_PSMButtonID_Square); controller->CreateButtonComponent(k_PSMButtonID_DPad_Up); controller->CreateButtonComponent(k_PSMButtonID_DPad_Down); controller->CreateButtonComponent(k_PSMButtonID_DPad_Left); controller->CreateButtonComponent(k_PSMButtonID_DPad_Right); controller->CreateButtonComponent(k_PSMButtonID_Options); controller->CreateButtonComponent(k_PSMButtonID_Share); controller->CreateButtonComponent(k_PSMButtonID_Touchpad); controller->CreateButtonComponent(k_PSMButtonID_LeftJoystick); controller->CreateButtonComponent(k_PSMButtonID_RightJoystick); controller->CreateButtonComponent(k_PSMButtonID_LeftShoulder); controller->CreateButtonComponent(k_PSMButtonID_RightShoulder); // Create axis components controller->CreateAxisComponent(k_PSMAxisID_LeftTrigger); controller->CreateAxisComponent(k_PSMAxisID_RightTrigger); controller->CreateAxisComponent(k_PSMAxisID_LeftJoystick_X); controller->CreateAxisComponent(k_PSMAxisID_LeftJoystick_Y); controller->CreateAxisComponent(k_PSMAxisID_RightJoystick_X); controller->CreateAxisComponent(k_PSMAxisID_RightJoystick_Y); // Create components for emulated trackpad controller->CreateButtonComponent(k_PSMButtonID_EmulatedTrackpadTouched); controller->CreateButtonComponent(k_PSMButtonID_EmulatedTrackpadPressed); controller->CreateAxisComponent(k_PSMAxisID_EmulatedTrackpad_X); controller->CreateAxisComponent(k_PSMAxisID_EmulatedTrackpad_Y); // Create haptic components controller->CreateHapticComponent(k_PSMHapticID_LeftRumble); controller->CreateHapticComponent(k_PSMHapticID_RightRumble); } } void PSDualshock4Controller::Deactivate() { Logger::Info("PSDualshock4Controller::Deactivate - Controller stream stopped\n"); PSM_StopControllerDataStreamAsync(m_PSMServiceController->ControllerID, nullptr); Controller::Deactivate(); } void PSDualshock4Controller::UpdateControllerState() { static const uint64_t s_kTouchpadButtonMask = vr::ButtonMaskFromId(vr::k_EButton_SteamVR_Touchpad); assert(m_PSMServiceController != nullptr); assert(m_PSMServiceController->IsConnected); const PSMDualShock4 &clientView = m_PSMServiceController->ControllerState.PSDS4State; const bool bStartRealignHMDTriggered = (clientView.ShareButton == PSMButtonState_PRESSED && clientView.OptionsButton == PSMButtonState_PRESSED) || (clientView.ShareButton == PSMButtonState_PRESSED && clientView.OptionsButton == PSMButtonState_DOWN) || (clientView.ShareButton == PSMButtonState_DOWN && clientView.OptionsButton == PSMButtonState_PRESSED); // See if the recenter button has been held for the requisite amount of time bool bRecenterRequestTriggered = false; { PSMButtonState resetPoseButtonState = clientView.OptionsButton; switch (resetPoseButtonState) { case PSMButtonState_PRESSED: { m_resetPoseButtonPressTime = std::chrono::high_resolution_clock::now(); } break; case PSMButtonState_DOWN: { if (!m_bResetPoseRequestSent) { const float k_hold_duration_milli = 250.f; std::chrono::time_point<std::chrono::high_resolution_clock> now = std::chrono::high_resolution_clock::now(); std::chrono::duration<float, std::milli> pressDurationMilli = now - m_resetPoseButtonPressTime; if (pressDurationMilli.count() >= k_hold_duration_milli) { bRecenterRequestTriggered = true; } } } break; case PSMButtonState_RELEASED: { m_bResetPoseRequestSent = false; } break; } } // If SHARE was just pressed while and OPTIONS was held or vice versa, // recenter the controller orientation pose and start the realignment of the controller to HMD tracking space. if (bStartRealignHMDTriggered && !getConfig()->disable_alignment_gesture) { Logger::Info("PSDualshock4Controller::UpdateControllerState(): Calling StartRealignHMDTrackingSpace() in response to controller chord.\n"); PSM_ResetControllerOrientationAsync(m_PSMServiceController->ControllerID, k_psm_quaternion_identity, nullptr); m_bResetPoseRequestSent = true; // We have the transform of the HMD in world space. // The controller's position is a few inches ahead of the HMD's on the HMD's local -Z axis. PSMVector3f controllerLocalOffsetFromHmdPosition = *k_psm_float_vector3_zero; controllerLocalOffsetFromHmdPosition = { 0.0f, 0.0f, -1.0f * getConfig()->calibration_offset_meters }; try { PSMPosef hmdPose = Utils::GetHMDPoseInMeters(); PSMPosef realignedPose = Utils::RealignHMDTrackingSpace(*k_psm_quaternion_identity, controllerLocalOffsetFromHmdPosition, m_PSMServiceController->ControllerID, hmdPose, getConfig()->use_orientation_in_hmd_alignment); CServerDriver_PSMoveService::getInstance()->SetHMDTrackingSpace(realignedPose); } catch (std::exception & e) { // Log an error message and safely carry on Logger::Error(e.what()); } m_bResetAlignRequestSent = true; } else if (bRecenterRequestTriggered) { Logger::Info("PSDualshock4Controller::UpdateControllerState(): Calling ClientPSMoveAPI::reset_orientation() in response to controller button press.\n"); PSM_ResetControllerOrientationAsync(m_PSMServiceController->ControllerID, k_psm_quaternion_identity, nullptr); m_bResetPoseRequestSent = true; } else { // System Button hard-coded to PS button Controller::UpdateButton(k_PSMButtonID_System, clientView.PSButton); // Process all the native buttons Controller::UpdateButton(k_PSMButtonID_PS, clientView.PSButton); Controller::UpdateButton(k_PSMButtonID_Triangle, clientView.TriangleButton); Controller::UpdateButton(k_PSMButtonID_Circle, clientView.CircleButton); Controller::UpdateButton(k_PSMButtonID_Cross, clientView.CrossButton); Controller::UpdateButton(k_PSMButtonID_Square, clientView.SquareButton); Controller::UpdateButton(k_PSMButtonID_DPad_Up, clientView.DPadUpButton); Controller::UpdateButton(k_PSMButtonID_DPad_Down, clientView.DPadDownButton); Controller::UpdateButton(k_PSMButtonID_DPad_Left, clientView.DPadLeftButton); Controller::UpdateButton(k_PSMButtonID_DPad_Right, clientView.DPadRightButton); Controller::UpdateButton(k_PSMButtonID_Options, clientView.OptionsButton); Controller::UpdateButton(k_PSMButtonID_Share, clientView.ShareButton); Controller::UpdateButton(k_PSMButtonID_Touchpad, clientView.TrackPadButton); Controller::UpdateButton(k_PSMButtonID_LeftJoystick, clientView.L3Button); Controller::UpdateButton(k_PSMButtonID_RightJoystick, clientView.R3Button); Controller::UpdateButton(k_PSMButtonID_LeftShoulder, clientView.L1Button); Controller::UpdateButton(k_PSMButtonID_RightShoulder, clientView.R1Button); // Thumbstick handling UpdateThumbsticks(); // Touchpad handling UpdateEmulatedTrackpad(); // Trigger handling Controller::UpdateAxis(k_PSMAxisID_LeftTrigger, clientView.LeftTriggerValue / 255.f); Controller::UpdateAxis(k_PSMAxisID_RightTrigger, clientView.RightTriggerValue / 255.f); } } void PSDualshock4Controller::RemapThumbstick( const float thumb_stick_x, const float thumb_stick_y, float &out_sanitized_x, float &out_sanitized_y) { const float thumb_stick_radius = sqrtf(thumb_stick_x*thumb_stick_x + thumb_stick_y * thumb_stick_y); // Moving a thumb-stick outside of the deadzone is consider a touchpad touch if (thumb_stick_radius >= getConfig()->thumbstick_deadzone) { // Rescale the thumb-stick position to hide the dead zone const float rescaledRadius = (thumb_stick_radius - getConfig()->thumbstick_deadzone) / (1.f - getConfig()->thumbstick_deadzone); // Set the thumb-stick axis out_sanitized_x = (rescaledRadius / thumb_stick_radius) * thumb_stick_x; out_sanitized_y = (rescaledRadius / thumb_stick_radius) * thumb_stick_y; } else { out_sanitized_x= 0.f; out_sanitized_y= 0.f; } } void PSDualshock4Controller::UpdateThumbsticks() { const PSMDualShock4 &clientView = m_PSMServiceController->ControllerState.PSDS4State; RemapThumbstick( clientView.LeftAnalogX, clientView.LeftAnalogY, m_lastSanitizedLeftThumbstick_X, m_lastSanitizedLeftThumbstick_Y); RemapThumbstick( clientView.RightAnalogX, clientView.RightAnalogY, m_lastSanitizedRightThumbstick_X, m_lastSanitizedRightThumbstick_Y); Controller::UpdateAxis(k_PSMAxisID_LeftJoystick_X, m_lastSanitizedLeftThumbstick_X); Controller::UpdateAxis(k_PSMAxisID_LeftJoystick_Y, m_lastSanitizedLeftThumbstick_Y); Controller::UpdateAxis(k_PSMAxisID_RightJoystick_X, m_lastSanitizedRightThumbstick_X); Controller::UpdateAxis(k_PSMAxisID_RightJoystick_Y, m_lastSanitizedRightThumbstick_Y); } // Updates the state of the controllers touchpad axis relative to its position over time and active state. void PSDualshock4Controller::UpdateEmulatedTrackpad() { // Bail if the config hasn't enabled the emulated trackpad if (!HasButton(k_PSMButtonID_EmulatedTrackpadPressed) && !HasButton(k_PSMButtonID_EmulatedTrackpadPressed)) return; // Find the highest priority emulated touch pad action (if any) eEmulatedTrackpadAction highestPriorityAction= k_EmulatedTrackpadAction_None; for (int buttonIndex = 0; buttonIndex < static_cast<int>(k_PSMButtonID_Count); ++buttonIndex) { eEmulatedTrackpadAction action= getConfig()->ps_button_id_to_emulated_touchpad_action[buttonIndex]; if (action != k_EmulatedTrackpadAction_None) { PSMButtonState button_state= PSMButtonState_UP; if (Controller::GetButtonState((ePSMButtonID)buttonIndex, button_state)) { if (button_state == PSMButtonState_DOWN || button_state == PSMButtonState_PRESSED) { if (action >= highestPriorityAction) { highestPriorityAction= action; } if (action >= k_EmulatedTrackpadAction_Press) { break; } } } } } float touchpad_x = 0.f; float touchpad_y = 0.f; PSMButtonState emulatedTouchPadTouchedState= PSMButtonState_UP; PSMButtonState emulatedTouchPadPressedState= PSMButtonState_UP; if (highestPriorityAction == k_EmulatedTrackpadAction_Touch) { emulatedTouchPadTouchedState= PSMButtonState_DOWN; } else if (highestPriorityAction == k_EmulatedTrackpadAction_Press) { emulatedTouchPadTouchedState= PSMButtonState_DOWN; emulatedTouchPadPressedState= PSMButtonState_DOWN; } if (highestPriorityAction > k_EmulatedTrackpadAction_Press) { emulatedTouchPadTouchedState= PSMButtonState_DOWN; emulatedTouchPadPressedState= PSMButtonState_DOWN; // If the action specifies a specific trackpad direction, // then use the given trackpad axis switch (highestPriorityAction) { case k_EmulatedTrackpadAction_Left: touchpad_x= -1.f; touchpad_y= 0.f; break; case k_EmulatedTrackpadAction_Up: touchpad_x= 0.f; touchpad_y= 1.f; break; case k_EmulatedTrackpadAction_Right: touchpad_x= 1.f; touchpad_y= 0.f; break; case k_EmulatedTrackpadAction_Down: touchpad_x= 0.f; touchpad_y= -1.f; break; case k_EmulatedTrackpadAction_UpLeft: touchpad_x = -0.707f; touchpad_y = 0.707f; break; case k_EmulatedTrackpadAction_UpRight: touchpad_x = 0.707f; touchpad_y = 0.707f; break; case k_EmulatedTrackpadAction_DownLeft: touchpad_x = -0.707f; touchpad_y = -0.707f; break; case k_EmulatedTrackpadAction_DownRight: touchpad_x = 0.707f; touchpad_y = -0.707f; break; } } else if (getConfig()->ps_button_id_to_emulated_touchpad_action[k_PSMButtonID_LeftJoystick] != k_EmulatedTrackpadAction_None) { // Consider the touchpad pressed if the left thumbstick is deflected at all. const bool bIsTouched= fabsf(m_lastSanitizedLeftThumbstick_X) + fabsf(m_lastSanitizedLeftThumbstick_Y) > 0.f; if (bIsTouched) { emulatedTouchPadTouchedState= PSMButtonState_DOWN; emulatedTouchPadPressedState= PSMButtonState_DOWN; touchpad_x= m_lastSanitizedLeftThumbstick_X; touchpad_y= m_lastSanitizedLeftThumbstick_Y; } } else if (getConfig()->ps_button_id_to_emulated_touchpad_action[k_PSMButtonID_RightJoystick] != k_EmulatedTrackpadAction_None) { // Consider the touchpad pressed if the right thumbstick is deflected at all. const bool bIsTouched= fabsf(m_lastSanitizedRightThumbstick_X) + fabsf(m_lastSanitizedRightThumbstick_Y) > 0.f; if (bIsTouched) { emulatedTouchPadTouchedState= PSMButtonState_DOWN; emulatedTouchPadPressedState= PSMButtonState_DOWN; touchpad_x= m_lastSanitizedRightThumbstick_X; touchpad_y= m_lastSanitizedRightThumbstick_Y; } } Controller::UpdateButton(k_PSMButtonID_EmulatedTrackpadTouched, emulatedTouchPadTouchedState); Controller::UpdateButton(k_PSMButtonID_EmulatedTrackpadPressed, emulatedTouchPadPressedState); Controller::UpdateAxis(k_PSMAxisID_EmulatedTrackpad_X, touchpad_x); Controller::UpdateAxis(k_PSMAxisID_EmulatedTrackpad_Y, touchpad_y); } void PSDualshock4Controller::UpdateTrackingState() { assert(m_PSMServiceController != nullptr); assert(m_PSMServiceController->IsConnected); const PSMDualShock4 &view = m_PSMServiceController->ControllerState.PSDS4State; // The tracking status will be one of the following states: m_Pose.result = m_trackingStatus; m_Pose.deviceIsConnected = m_PSMServiceController->IsConnected; // These should always be false from any modern driver. These are for Oculus DK1-like // rotation-only tracking. Support for that has likely rotted in vrserver. m_Pose.willDriftInYaw = false; m_Pose.shouldApplyHeadModel = false; // No prediction since that's already handled in the psmove service m_Pose.poseTimeOffset = -0.016f; // No transform due to the current HMD orientation m_Pose.qDriverFromHeadRotation.w = 1.f; m_Pose.qDriverFromHeadRotation.x = 0.0f; m_Pose.qDriverFromHeadRotation.y = 0.0f; m_Pose.qDriverFromHeadRotation.z = 0.0f; m_Pose.vecDriverFromHeadTranslation[0] = 0.f; m_Pose.vecDriverFromHeadTranslation[1] = 0.f; m_Pose.vecDriverFromHeadTranslation[2] = 0.f; // Set position { const PSMVector3f &position = view.Pose.Position; m_Pose.vecPosition[0] = position.x * k_fScalePSMoveAPIToMeters; m_Pose.vecPosition[1] = position.y * k_fScalePSMoveAPIToMeters; m_Pose.vecPosition[2] = position.z * k_fScalePSMoveAPIToMeters; } // virtual extend controllers if (getConfig()->extend_Y_meters != 0.0f || getConfig()->extend_Z_meters != 0.0f) { const PSMQuatf &orientation = view.Pose.Orientation; PSMVector3f shift = { (float)m_Pose.vecPosition[0], (float)m_Pose.vecPosition[1], (float)m_Pose.vecPosition[2] }; if (getConfig()->extend_Z_meters != 0.0f) { PSMVector3f local_forward = { 0, 0, -1 }; PSMVector3f global_forward = PSM_QuatfRotateVector(&orientation, &local_forward); shift = PSM_Vector3fScaleAndAdd(&global_forward, getConfig()->extend_Z_meters, &shift); } if (getConfig()->extend_Y_meters != 0.0f) { PSMVector3f local_forward = { 0, -1, 0 }; PSMVector3f global_forward = PSM_QuatfRotateVector(&orientation, &local_forward); shift = PSM_Vector3fScaleAndAdd(&global_forward, getConfig()->extend_Y_meters, &shift); } m_Pose.vecPosition[0] = shift.x; m_Pose.vecPosition[1] = shift.y; m_Pose.vecPosition[2] = shift.z; } // Set rotational coordinates { const PSMQuatf &orientation = view.Pose.Orientation; m_Pose.qRotation.w = getConfig()->z_rotate_90_degrees ? -orientation.w : orientation.w; m_Pose.qRotation.x = orientation.x; m_Pose.qRotation.y = orientation.y; m_Pose.qRotation.z = getConfig()->z_rotate_90_degrees ? -orientation.z : orientation.z; } // Set the physics state of the controller /*{ const PSMPhysicsData &physicsData = view.PhysicsData; m_Pose.vecVelocity[0] = physicsData.LinearVelocityCmPerSec.x * abs(pow(abs(physicsData.LinearVelocityCmPerSec.x), m_fLinearVelocityExponent)) * k_fScalePSMoveAPIToMeters * m_fLinearVelocityMultiplier; m_Pose.vecVelocity[1] = physicsData.LinearVelocityCmPerSec.y * abs(pow(abs(physicsData.LinearVelocityCmPerSec.y), m_fLinearVelocityExponent)) * k_fScalePSMoveAPIToMeters * m_fLinearVelocityMultiplier; m_Pose.vecVelocity[2] = physicsData.LinearVelocityCmPerSec.z * abs(pow(abs(physicsData.LinearVelocityCmPerSec.z), m_fLinearVelocityExponent)) * k_fScalePSMoveAPIToMeters * m_fLinearVelocityMultiplier; m_Pose.vecAcceleration[0] = physicsData.LinearAccelerationCmPerSecSqr.x * k_fScalePSMoveAPIToMeters; m_Pose.vecAcceleration[1] = physicsData.LinearAccelerationCmPerSecSqr.y * k_fScalePSMoveAPIToMeters; m_Pose.vecAcceleration[2] = physicsData.LinearAccelerationCmPerSecSqr.z * k_fScalePSMoveAPIToMeters; m_Pose.vecAngularVelocity[0] = physicsData.AngularVelocityRadPerSec.x; m_Pose.vecAngularVelocity[1] = physicsData.AngularVelocityRadPerSec.y; m_Pose.vecAngularVelocity[2] = physicsData.AngularVelocityRadPerSec.z; m_Pose.vecAngularAcceleration[0] = physicsData.AngularAccelerationRadPerSecSqr.x; m_Pose.vecAngularAcceleration[1] = physicsData.AngularAccelerationRadPerSecSqr.y; m_Pose.vecAngularAcceleration[2] = physicsData.AngularAccelerationRadPerSecSqr.z; }*/ m_Pose.poseIsValid = view.bIsPositionValid && view.bIsOrientationValid; // This call posts this pose to shared memory, where all clients will have access to it the next // moment they want to predict a pose. vr::VRServerDriverHost()->TrackedDevicePoseUpdated(m_unSteamVRTrackedDeviceId, m_Pose, sizeof(vr::DriverPose_t)); } // TODO - Make use of amplitude and frequency for Buffered Haptics, will give us patterning and panning vibration // See: https://developer.oculus.com/documentation/pcsdk/latest/concepts/dg-input-touch-haptic/ void PSDualshock4Controller::UpdateRumbleState(PSMControllerRumbleChannel channel) { Controller::HapticState *haptic_state= GetHapticState( channel == PSMControllerRumbleChannel_Left ? k_PSMHapticID_LeftRumble : k_PSMHapticID_RightRumble); if (haptic_state == nullptr) return; if (!getConfig()->rumble_suppressed) { // pulse duration - the length of each pulse // amplitude - strength of vibration // frequency - speed of each pulse // convert to microseconds, the max duration received from OpenVR appears to be 5 micro seconds uint16_t pendingHapticPulseDurationMicroSecs = static_cast<uint16_t>(haptic_state->pendingHapticDurationSecs * 1000000); const float k_max_rumble_update_rate = 33.f; // Don't bother trying to update the rumble faster than 30fps (33ms) const float k_max_pulse_microseconds = 5000.f; // Docs suggest max pulse duration of 5ms, but we'll call 1ms max std::chrono::time_point<std::chrono::high_resolution_clock> now = std::chrono::high_resolution_clock::now(); bool bTimoutElapsed = true; if (haptic_state->lastTimeRumbleSentValid) { std::chrono::duration<double, std::milli> timeSinceLastSend = now - haptic_state->lastTimeRumbleSent; bTimoutElapsed = timeSinceLastSend.count() >= k_max_rumble_update_rate; } // See if a rumble request hasn't come too recently if (bTimoutElapsed) { float rumble_fraction = (static_cast<float>(pendingHapticPulseDurationMicroSecs) / k_max_pulse_microseconds) * haptic_state->pendingHapticAmplitude; if (rumble_fraction > 0) { steamvrbridge::Logger::Debug( "PSDualshock4Controller::UpdateRumble: m_pendingHapticPulseDurationSecs=%f, pendingHapticPulseDurationMicroSecs=%d, rumble_fraction=%f\n", haptic_state->pendingHapticDurationSecs, pendingHapticPulseDurationMicroSecs, rumble_fraction); } // Unless a zero rumble intensity was explicitly set, // don't rumble less than 35% (no enough to feel) if (haptic_state->pendingHapticDurationSecs != 0) { if (rumble_fraction < 0.35f) { // rumble values less 35% isn't noticeable rumble_fraction = 0.35f; } } // Keep the pulse intensity within reasonable bounds if (rumble_fraction > 1.f) { rumble_fraction = 1.f; } // Actually send the rumble to the server PSM_SetControllerRumble(m_PSMServiceController->ControllerID, channel, rumble_fraction); // Remember the last rumble we went and when we sent it haptic_state->lastTimeRumbleSent = now; haptic_state->lastTimeRumbleSentValid = true; // Reset the pending haptic pulse duration. // If another call to TriggerHapticPulse() is made later, it will stomp this value. // If no future haptic event is received by ServerDriver then the next call to UpdateRumbleState() // in k_max_rumble_update_rate milliseconds will set the rumble_fraction to 0.f // This effectively makes the shortest rumble pulse k_max_rumble_update_rate milliseconds. haptic_state->pendingHapticDurationSecs = DEFAULT_HAPTIC_DURATION; haptic_state->pendingHapticAmplitude = DEFAULT_HAPTIC_AMPLITUDE; haptic_state->pendingHapticFrequency = DEFAULT_HAPTIC_FREQUENCY; } } else { // Reset the pending haptic pulse duration since rumble is suppressed. haptic_state->pendingHapticDurationSecs = DEFAULT_HAPTIC_DURATION; haptic_state->pendingHapticAmplitude = DEFAULT_HAPTIC_AMPLITUDE; haptic_state->pendingHapticFrequency = DEFAULT_HAPTIC_FREQUENCY; } } void PSDualshock4Controller::Update() { Controller::Update(); if (IsActivated() && m_PSMServiceController->IsConnected) { int seq_num = m_PSMServiceController->OutputSequenceNum; // Only other updating incoming state if it actually changed and is due for one if (m_nPoseSequenceNumber < seq_num) { m_nPoseSequenceNumber = seq_num; UpdateTrackingState(); UpdateControllerState(); } // Update the outgoing state UpdateRumbleState(PSMControllerRumbleChannel_Left); UpdateRumbleState(PSMControllerRumbleChannel_Right); } } void PSDualshock4Controller::RefreshWorldFromDriverPose() { TrackableDevice::RefreshWorldFromDriverPose(); // Mark the calibration process as done once we have setup the world from driver pose m_trackingStatus = vr::TrackingResult_Running_OK; } }
43.772118
155
0.784866
morrky89
5feeb313522dbb912920abf6105287aa0f6676cb
9,638
cpp
C++
FDTD/EncodeOutput.cpp
plisdku/trogdor6
d77eb137dd0c03635c0016801ada54117697e521
[ "MIT" ]
null
null
null
FDTD/EncodeOutput.cpp
plisdku/trogdor6
d77eb137dd0c03635c0016801ada54117697e521
[ "MIT" ]
null
null
null
FDTD/EncodeOutput.cpp
plisdku/trogdor6
d77eb137dd0c03635c0016801ada54117697e521
[ "MIT" ]
null
null
null
/* * EncodeOutput.cpp * Trogdor6 * * Created by Paul Hansen on 3/23/11. * Copyright 2011 Stanford University. All rights reserved. * * This file is covered by the MIT license. See LICENSE.txt. */ #include "EncodeOutput.h" #include "SimulationDescription.h" #include "VoxelizedPartition.h" #include "operations/OutputEHDB.h" #include "rle/SupportRegion3.h" #include "rle/MergeRunlines.h" #include "Support.h" #include <vector> using namespace std; using namespace RLE; using namespace YeeUtilities; struct CallbackOutput { CallbackOutput(vector<RunlineOutput> & runlines) : mRunlines(runlines) {} void operator()(const std::int64_t indices[], const std::uint64_t strides[], std::uint64_t length, std::uint64_t numStreams) { RunlineOutput runline(indices[0], length); mRunlines.push_back(runline); } vector<RunlineOutput> & mRunlines; }; typedef CallbackOutput CallbackSource; struct CallbackSparseOutput { CallbackSparseOutput(vector<RunlineOutput> & runlines) : mRunlines(runlines) {} void operator()(const std::int64_t indices[], const std::uint64_t strides[], std::uint64_t length, std::uint64_t numStreams) { RunlineOutput runline(indices[0], length); mRunlines.push_back(runline); } vector<RunlineOutput> & mRunlines; }; struct CallbackOutputAverageTwo { CallbackOutputAverageTwo(vector<RunlineAverageTwo> & runlines) : mRunlines(runlines) {} void operator()(const std::int64_t indices[], const std::uint64_t strides[], std::uint64_t length, std::uint64_t numStreams) { RunlineAverageTwo runline(indices[0], indices[1], length); mRunlines.push_back(runline); } vector<RunlineAverageTwo> & mRunlines; }; struct CallbackTensorialOutput { CallbackTensorialOutput( vector<RunlineTensorialOutput> & runlines) : mRunlines(runlines) {} void operator()(const std::int64_t indices[], const std::uint64_t strides[], std::uint64_t length, std::uint64_t numStreams) { RunlineTensorialOutput runline(indices[0], indices[1], length); mRunlines.push_back(runline); } vector<RunlineTensorialOutput> & mRunlines; }; EncodeOutput:: EncodeOutput(const GridDescription & gridDesc, const VoxelizedPartition & vp) : mGridDesc(gridDesc), mVoxelGrid(vp) { } Pointer<OutputEHDB> EncodeOutput:: encode(const OutputDescription & outputDesc) const { Pointer<OutputEHDB> output(new OutputEHDB(outputDesc, gridDescription().dxyz(), gridDescription().dt(), gridDescription().origin())); SupportRegion3 supp, suppShifted; for (int ff = 0; ff < outputDesc.fields().size(); ff++) { const OutputField & field(outputDesc.fields().at(ff)); if (field.field() == kEE || field.field() == kHH) { if (field.ii() == field.jj()) encodeTensorialDiagonalOutput(*output, outputDesc, field); else encodeTensorialOffDiagonalOutput(*output, outputDesc, field); } else if (field.octant() == 0 || field.octant() == 7) encodeInterpolatedOutput(*output, outputDesc, field); else if (field.field() == kJ || field.field() == kM) encodeSparseOutput(*output, outputDesc, field); else encodeStandardOutput(*output, outputDesc, field); } return output; } void EncodeOutput:: encodeStandardOutput(OutputEHDB & output, const OutputDescription & outputDesc, const OutputField & field) const { assert(field.ii() == field.jj()); int xyz = field.ii(); const IndexArray3 & fieldIndices = voxelGrid().fieldIndices().field(field.field(), xyz); vector<RunlineOutput> runlines; for (int rr = 0; rr < outputDesc.regions().size(); rr++) { SupportRegion3 supp = support(outputDesc.regions().at(rr).yeeCells(), Vector3b(voxelGrid().extents().nodeYeeCells().num())); IndexArray3 outputIndices; restriction(fieldIndices, supp, outputIndices); IndexArray3 const* inds[] = { &outputIndices }; CallbackOutput callback(runlines); RLE::mergeOverlapping(inds, 1, callback); } output.appendField(field, runlines); } void EncodeOutput:: encodeSparseOutput(OutputEHDB & output, const OutputDescription & outputDesc, const OutputField & field) const { assert(field.ii() == field.jj()); int xyz = field.ii(); const IndexArray3 & fieldIndices = voxelGrid().fieldIndices().field(field.field(), xyz); vector<RunlineOutput> runlines; for (int rr = 0; rr < outputDesc.regions().size(); rr++) { SupportRegion3 supp = support(outputDesc.regions().at(rr).yeeCells(), Vector3b(voxelGrid().extents().nodeYeeCells().num())); SupportRegion3 emptyCells = supp - fieldIndices; IndexArray3 outputIndices, emptyIndices(emptyCells); restriction(fieldIndices, supp, outputIndices); IndexArray3 const* inds[] = { &outputIndices, &emptyIndices }; // this DOES work, using the standard output callback. CallbackOutput callback(runlines); RLE::mergeOverlapping(inds, 2, callback); } output.appendField(field, runlines); } void EncodeOutput:: encodeInterpolatedOutput(OutputEHDB & output, const OutputDescription & outputDesc, const OutputField & field) const { assert(field.ii() == field.jj()); int xyz = field.ii(); const IndexArray3 & fieldIndices = voxelGrid().fieldIndices().field(field.field(), xyz); vector<RunlineAverageTwo> runlines; for (int rr = 0; rr < outputDesc.regions().size(); rr++) { SupportRegion3 supp = support(outputDesc.regions().at(rr).yeeCells(), Vector3b(voxelGrid().extents().nodeYeeCells().num())); SupportRegion3 suppShifted; if (field.field() == kE || field.field() == kD || field.field() == kJ) { assert(field.octant() == 0); translate(supp, suppShifted, (-Vector3<std::int64_t>::unit(xyz)).asArray()); } else if (field.field() == kH || field.field() == kB || field.field() == kM) { assert(field.octant() == 7); translate(supp, suppShifted, Vector3<std::int64_t>::unit(xyz).asArray()); } else throw(std::logic_error("Bad field")); IndexArray3 outputIndices, outputIndicesShifted; restriction(fieldIndices, supp, outputIndices); restriction(fieldIndices, suppShifted, outputIndicesShifted); IndexArray3 const* inds[] = { &outputIndices, &outputIndicesShifted }; CallbackOutputAverageTwo callback(runlines); RLE::mergeOverlapping(inds, 2, callback); } output.appendField(field, runlines); } void EncodeOutput:: encodeTensorialDiagonalOutput(OutputEHDB & output, const OutputDescription & outputDesc, const OutputField & field) const { assert(field.ii() == field.jj()); assert(field.field() == kEE || field.field() == kHH); int xyz = field.ii(); // These are the fields we want to output, e.g. Exx. const IndexArray3 & tensorialIndices = voxelGrid().fieldIndices().field(field.field(), xyz, xyz); vector<RunlineTensorialOutput> runlines; for (int rr = 0; rr < outputDesc.regions().size(); rr++) { SupportRegion3 supp = support(outputDesc.regions().at(rr).yeeCells(), Vector3b(voxelGrid().extents().nodeYeeCells().num())); // These are the "backup fields." For diagonal permittivities, the Exx // field is just ordinary Ex, since there are no Exy and Exz components. const IndexArray3 & vectorialIndices = (field.field() == kEE) ? voxelGrid().fieldIndices().e(xyz) : voxelGrid().fieldIndices().h(xyz); IndexArray3 mainIndices, backupIndices; restriction(tensorialIndices, supp, mainIndices); restriction(vectorialIndices, supp, backupIndices); IndexArray3 const* inds[] = { &mainIndices, &backupIndices }; CallbackTensorialOutput callback(runlines); RLE::mergeOverlapping(inds, 2, callback); } output.appendTensorialDiagonalField(field, runlines); } void EncodeOutput:: encodeTensorialOffDiagonalOutput(OutputEHDB & output, const OutputDescription & outputDesc, const OutputField & field) const { assert(field.ii() != field.jj()); assert(field.field() == kEE || field.field() == kHH); const IndexArray3 & tensorialIndices = voxelGrid().fieldIndices().field(field.field(), field.ii(), field.jj()); vector<RunlineTensorialOutput> runlines; for (int rr = 0; rr < outputDesc.regions().size(); rr++) { SupportRegion3 supp = support(outputDesc.regions().at(rr).yeeCells(), Vector3b(voxelGrid().extents().nodeYeeCells().num())); IndexArray3 outputIndices, emptyIndices(supp); restriction(tensorialIndices, supp, outputIndices); IndexArray3 const* inds[] = { &outputIndices, &emptyIndices }; CallbackTensorialOutput callback(runlines); RLE::mergeOverlapping(inds, 2, callback); } output.appendTensorialOffDiagonalField(field, runlines); }
30.596825
88
0.630629
plisdku
5fef168528168f3c92178c86d0dad2e17cfd3203
746
cpp
C++
codechef/lapindrome.cpp
NIKU-SINGH/problemsolving
f7dd9d065a945a2f59e84580f926d35949ce3be2
[ "MIT" ]
null
null
null
codechef/lapindrome.cpp
NIKU-SINGH/problemsolving
f7dd9d065a945a2f59e84580f926d35949ce3be2
[ "MIT" ]
1
2021-07-07T14:37:03.000Z
2021-07-07T14:39:58.000Z
codechef/lapindrome.cpp
NIKU-SINGH/problemsolving
f7dd9d065a945a2f59e84580f926d35949ce3be2
[ "MIT" ]
null
null
null
#include <iostream> using namespace std; int main() { // your code goes here int t; cin>>t; while(t--) { string str; cin>>str; int n = str.length(); int part1freq[26] ={0}; int part2freq[26]={0}; for(int i=0;i<n/2;i++) { part1freq[str[i]-'a']++; } for(int j=(n+1)/2;j<n;j++) { part2freq[str[j]-'a']++; } int res=0; for(int i=0;i<26;i++) { if(part1freq[i] != part2freq[i]) { res++; break; } } if(res==0) cout<<"YES"<<"\n"; else cout<<"NO"<<"\n"; } return 0; }
16.217391
44
0.349866
NIKU-SINGH
5ff14ce2f2ce439eda50895e17a1e0e0c322c16d
773
hpp
C++
include/aikido/planner.hpp
personalrobotics/r3
1303e3f3ef99a0c2249abc7415d19113f0026565
[ "BSD-3-Clause" ]
181
2016-04-22T15:11:23.000Z
2022-03-26T12:51:08.000Z
include/aikido/planner.hpp
personalrobotics/r3
1303e3f3ef99a0c2249abc7415d19113f0026565
[ "BSD-3-Clause" ]
514
2016-04-20T04:29:51.000Z
2022-02-10T19:46:21.000Z
include/aikido/planner.hpp
personalrobotics/r3
1303e3f3ef99a0c2249abc7415d19113f0026565
[ "BSD-3-Clause" ]
31
2017-03-17T09:53:02.000Z
2022-03-23T10:35:05.000Z
#include "aikido/planner/PlanningResult.hpp" #include "aikido/planner/SnapPlanner.hpp" #include "aikido/planner/TrajectoryPostProcessor.hpp" #include "aikido/planner/World.hpp" #include "aikido/planner/ompl/BackwardCompatibility.hpp" #include "aikido/planner/ompl/CRRT.hpp" #include "aikido/planner/ompl/CRRTConnect.hpp" #include "aikido/planner/ompl/GeometricStateSpace.hpp" #include "aikido/planner/ompl/GoalRegion.hpp" #include "aikido/planner/ompl/MotionValidator.hpp" #include "aikido/planner/ompl/Planner.hpp" #include "aikido/planner/ompl/StateSampler.hpp" #include "aikido/planner/ompl/StateValidityChecker.hpp" #include "aikido/planner/ompl/dart.hpp" #include "aikido/planner/parabolic/ParabolicSmoother.hpp" #include "aikido/planner/parabolic/ParabolicTimer.hpp"
45.470588
57
0.818887
personalrobotics
5ff9f69ce234ca1b3fd89957e617a022c9b3ee36
2,747
hpp
C++
R2017b/extern/include/multimedia/AudioDefs.hpp
catou93/pelican_test
23de9722c431fa0caa3c68d038de9423cfcdda80
[ "BSD-2-Clause" ]
5
2018-11-21T11:52:49.000Z
2021-04-14T03:13:31.000Z
R2017b/extern/include/multimedia/AudioDefs.hpp
catou93/pelican_test
23de9722c431fa0caa3c68d038de9423cfcdda80
[ "BSD-2-Clause" ]
3
2018-08-24T03:12:36.000Z
2019-09-29T06:21:32.000Z
R2017b/extern/include/multimedia/AudioDefs.hpp
catou93/pelican_test
23de9722c431fa0caa3c68d038de9423cfcdda80
[ "BSD-2-Clause" ]
4
2018-08-10T07:02:30.000Z
2022-03-09T07:20:16.000Z
/* * AudioDefs.h - Definitions for audio I/O * * Copyright 1995-2012 The MathWorks, Inc. */ #ifndef AUDIODEFS_H #define AUDIODEFS_H /* these follow Simulink data types, in simstruc_types.h */ typedef enum { AudioDataType_Double = 0, /* double */ AudioDataType_Single, /* float */ AudioDataType_Int8, /* char */ AudioDataType_Uint8, /* unsigned char */ AudioDataType_Int16, /* short */ AudioDataType_Uint16, /* unsigned short */ AudioDataType_Int32, /* long */ AudioDataType_Uint32, /* unsigned long */ AudioDataType_INVALID, /* bool */ AudioDataType_Int24, /* 24-bit signed */ AudioDataType_Uint24, /* 24-bit unsigned */ AudioDataType_NUM_TYPES } AudioDataType; static const int AudioDataTypeSize[] = {8,4,1,1,2,2,4,4,1,3,3}; static const int AudioDataTypeFloat[] = {1,1,0,0,0,0,0,0,0,0,0}; /* An enumeration of typical audio data types which is used on several masks. */ typedef enum { AudioDT_Invalid = 0, AudioDT_Derived = 1, AudioDT_Uint8, AudioDT_Int16, AudioDT_Int24, AudioDT_Single, AudioDT_NUM_TYPES } AudioDTE_Common; /* The default mapping from AudioDataTypes onto common audio data types */ static const AudioDTE_Common AudioDataTypeToCommonDTE[] = { AudioDT_Single, AudioDT_Single, AudioDT_Uint8, AudioDT_Uint8, AudioDT_Int16, AudioDT_Int16, AudioDT_Int24, AudioDT_Int24, AudioDT_Invalid, AudioDT_Int24, AudioDT_Int24 }; /* Mapping from common data types to Audio Data Types */ static const AudioDataType CommonDTEToAudioDataType[] = { AudioDataType_INVALID, AudioDataType_INVALID, AudioDataType_Uint8, AudioDataType_Int16, AudioDataType_Int24, AudioDataType_Single }; typedef struct { unsigned char isValid; /* zero if the file has no audio */ /* The following fields refer to the PCM format of the audio data as encoded in the file/device */ unsigned char isFloat; /* true if the samples are in floating-point format */ double sampleRate; /* audio sample rate */ int numBits; /* audio bit depth */ int numChannels; /* number of audio channels (typically 1 or two) */ /* The following fields refer to the format of the data in MATLAB/Simulink */ AudioDataType dataType; /* data type of audio samples */ int frameSize; /* number of audio samples per frame */ /* The name of the compression format, if we are writing a file */ const char* audioCompressor; /* set to NULL for none */ } MMAudioInfo; #endif /* AUDIODEFS_H */
30.865169
102
0.649072
catou93
5ffb6add8895c91cfa81e7e0f06f13ade6048f8a
2,942
cpp
C++
source/internal/logger.cpp
HeliosInteractive/libkeen
f31246c2f0a705b9f1c25e4400d96a62408c37e6
[ "MIT" ]
1
2016-04-26T04:16:55.000Z
2016-04-26T04:16:55.000Z
source/internal/logger.cpp
HeliosInteractive/libkeen
f31246c2f0a705b9f1c25e4400d96a62408c37e6
[ "MIT" ]
null
null
null
source/internal/logger.cpp
HeliosInteractive/libkeen
f31246c2f0a705b9f1c25e4400d96a62408c37e6
[ "MIT" ]
2
2016-04-14T16:57:03.000Z
2020-02-21T00:17:48.000Z
#include "internal/logger.hpp" #include <iostream> #include <fstream> #include <iomanip> #include <chrono> #include <ctime> // by default turn on both file and console // logging behaviors. #ifndef LIBKEEN_LOG_TO_CONSOLE # define LIBKEEN_LOG_TO_CONSOLE 1 #endif #ifndef LIBKEEN_LOG_TO_LOGFILE # define LIBKEEN_LOG_TO_LOGFILE 1 #endif namespace { std::string now() { auto now = std::chrono::system_clock::now(); auto now_time_t = std::chrono::system_clock::to_time_t(now); std::stringstream ss; ss << std::put_time(std::localtime(&now_time_t), "%Y-%m-%d %X"); return ss.str(); }} namespace libkeen { namespace internal { Logger::~Logger() { log("Logger " + mType + " is shutdown."); } Logger::Logger(const std::string& type) : mType(type) , mLogToFile(true) , mLogToConsole(true) { log("Logger " + mType + " is started."); } void Logger::log(const std::string& message) { #if LIBKEEN_LOG_TO_CONSOLE || LIBKEEN_LOG_TO_LOGFILE try { std::lock_guard<decltype(mMutex)> lock(mMutex); std::stringstream msg; msg << "[" << mType << "][" << std::this_thread::get_id() << "][" << now() << "]: " << message << std::endl; #if LIBKEEN_LOG_TO_CONSOLE if (mLogToConsole) { std::cout << msg.str(); } #endif // LIBKEEN_LOG_TO_CONSOLE #if LIBKEEN_LOG_TO_LOGFILE if (mLogToFile) { std::ofstream("libkeen.log", std::ios_base::app | std::ios_base::out) << msg.str(); } #endif // LIBKEEN_LOG_TO_LOGFILE } catch (const std::exception& ex) { std::cerr << "Logger failed: " << ex.what() << std::endl; } catch (...) { std::cerr << "Logger failed." << std::endl; } #endif } void Logger::enableLogToFile(bool on /*= true*/) { std::lock_guard<decltype(mMutex)> lock(mMutex); mLogToFile = on; } void Logger::enableLogToConsole(bool on /*= true*/) { std::lock_guard<decltype(mMutex)> lock(mMutex); mLogToConsole = on; } void Logger::pull(std::vector<LoggerRef>& container) { if (!container.empty()) container.clear(); container.push_back(loggers::debug()); container.push_back(loggers::error()); container.push_back(loggers::warn()); container.push_back(loggers::info()); } std::shared_ptr<Logger> loggers::debug() { static std::shared_ptr<Logger> debug_logger = std::make_shared<Logger>("debug"); return debug_logger; } std::shared_ptr<Logger> loggers::error() { static std::shared_ptr<Logger> error_logger = std::make_shared<Logger>("error"); return error_logger; } std::shared_ptr<Logger> loggers::warn() { static std::shared_ptr<Logger> warn_logger = std::make_shared<Logger>("warn"); return warn_logger; } std::shared_ptr<Logger> loggers::info() { static std::shared_ptr<Logger> info_logger = std::make_shared<Logger>("info"); return info_logger; } }}
22.120301
95
0.633583
HeliosInteractive
5ffc113e32897d21acdfb1256f6c36cb28d1b377
4,297
cpp
C++
Project/AudioManager.cpp
OiCGame/GameJam01
7860098d235678cbe32215c733366d4fb973ea5e
[ "MIT" ]
null
null
null
Project/AudioManager.cpp
OiCGame/GameJam01
7860098d235678cbe32215c733366d4fb973ea5e
[ "MIT" ]
null
null
null
Project/AudioManager.cpp
OiCGame/GameJam01
7860098d235678cbe32215c733366d4fb973ea5e
[ "MIT" ]
null
null
null
#include "AudioManager.h" CAudioManager::CAudioManager() { } CAudioManager::~CAudioManager() { } CAudioManager& CAudioManager::Singleton(void) { static CAudioManager obj; return obj; } void CAudioManager::Play(SoundBufferKey key) { auto temp = SoundBufferAsset(key); auto it = std::find(m_pSounds.begin(), m_pSounds.end(), temp); if (it == m_pSounds.end()) { m_pSounds.push_back(temp); } // if if (temp) { temp->Play(); } // if } void CAudioManager::Play(SoundStreamBufferKey key) { auto temp = SoundStreamBufferAsset(key); auto it = std::find(m_pSounds.begin(), m_pSounds.end(), temp); if (it == m_pSounds.end()) { m_pSounds.push_back(temp); } // if if(temp){ temp->Play(); } // if } bool CAudioManager::Load(void) { if (!CSoundBufferAsset::Load(SoundBufferKey::Sound0, "shot1.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if auto sound = SoundBufferAsset(SoundBufferKey::Sound0); m_pSounds.push_back(sound); if (!CSoundBufferAsset::Load(SoundBufferKey::boomerang, "boomerang1.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if sound = SoundBufferAsset(SoundBufferKey::boomerang); m_pSounds.push_back(sound); if (!CSoundBufferAsset::Load(SoundBufferKey::shot_struck, "shot-struck1.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if sound = SoundBufferAsset(SoundBufferKey::shot_struck); m_pSounds.push_back(sound); if (!CSoundBufferAsset::Load(SoundBufferKey::enemy_explosion, "enemy_explosion.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if sound = SoundBufferAsset(SoundBufferKey::enemy_explosion); m_pSounds.push_back(sound); if (!CSoundBufferAsset::Load(SoundBufferKey::player_explosion, "player_explosion.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if sound = SoundBufferAsset(SoundBufferKey::player_explosion); m_pSounds.push_back(sound); if (!CSoundBufferAsset::Load(SoundBufferKey::ok_se, "ok_se.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if sound = SoundBufferAsset(SoundBufferKey::ok_se); if (!CSoundBufferAsset::Load(SoundBufferKey::flash_01, "shakin1.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if sound = SoundBufferAsset(SoundBufferKey::flash_01); m_pSounds.push_back(sound); if (!CSoundBufferAsset::Load(SoundBufferKey::flash_02, "shakin2.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if sound = SoundBufferAsset(SoundBufferKey::flash_02); m_pSounds.push_back(sound); if (!CSoundBufferAsset::Load(SoundBufferKey::item_get, "itemGet.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if sound = SoundBufferAsset(SoundBufferKey::item_get); m_pSounds.push_back(sound); if (!CSoundStreamBufferAsset::Load(SoundStreamBufferKey::Bgm0, "game_bgm.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if auto bgm0 = SoundStreamBufferAsset(SoundStreamBufferKey::Bgm0); bgm0->SetLoop(true); m_pSounds.push_back(bgm0); if (!CSoundStreamBufferAsset::Load(SoundStreamBufferKey::title, "title_bgm.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if bgm0 = SoundStreamBufferAsset(SoundStreamBufferKey::title); bgm0->SetLoop(true); m_pSounds.push_back(bgm0); if (!CSoundStreamBufferAsset::Load(SoundStreamBufferKey::gameclear, "gameclear_bgm.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if bgm0 = SoundStreamBufferAsset(SoundStreamBufferKey::gameclear); bgm0->SetLoop(true); m_pSounds.push_back(bgm0); if (!CSoundStreamBufferAsset::Load(SoundStreamBufferKey::gameover, "gameover_bgm.mp3")) { MOF_PRINTLOG("failed to load sound"); return false; } // if bgm0 = SoundStreamBufferAsset(SoundStreamBufferKey::gameover); bgm0->SetLoop(true); m_pSounds.push_back(bgm0); return true; } void CAudioManager::Update(void) { for (auto sound : m_pSounds) { if (sound) { sound->Update(); } // if } // for } void CAudioManager::Release(void) { for (auto sound : m_pSounds) { if (sound) { sound->Release(); sound.reset(); } // if } // for m_pSounds.clear(); }
30.475177
92
0.695136
OiCGame
5ffca5a8fee1bfe85e677a558fb668dc73292ed0
472
cpp
C++
array/sumofallsubarray.cpp
riti2409/forplacements
9e8fb99c9d65b04eea71abb3fbdcffc2a1433a04
[ "MIT" ]
5
2021-12-03T14:29:16.000Z
2022-02-04T09:06:37.000Z
array/sumofallsubarray.cpp
riti2409/forplacements
9e8fb99c9d65b04eea71abb3fbdcffc2a1433a04
[ "MIT" ]
null
null
null
array/sumofallsubarray.cpp
riti2409/forplacements
9e8fb99c9d65b04eea71abb3fbdcffc2a1433a04
[ "MIT" ]
2
2022-01-16T14:20:42.000Z
2022-01-17T06:49:01.000Z
//5 // 1 2 0 7 2 //o/p-> 1,3,3,10,12,2,2,9,11,0,7,9,7,9,2, #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } int currsum=0; for (int i = 0; i < n; i++) { currsum=0; for (int j = i; j < n; j++) { currsum+=arr[j]; cout<<currsum<<","; } } return 0; }
14.30303
42
0.358051
riti2409
5fff380e5006a8672a31e48f8f2f7a1f46761144
1,689
cpp
C++
ipc2/ipc2.cpp
Elexir-Stefan/ray-usermode
9a1c7d773496493482cf2e711fe1808b537db63a
[ "MIT" ]
null
null
null
ipc2/ipc2.cpp
Elexir-Stefan/ray-usermode
9a1c7d773496493482cf2e711fe1808b537db63a
[ "MIT" ]
null
null
null
ipc2/ipc2.cpp
Elexir-Stefan/ray-usermode
9a1c7d773496493482cf2e711fe1808b537db63a
[ "MIT" ]
null
null
null
#include <raykernel.h> #include <exception> #include <video/VideoStream.h> #include <processes/processes.h> #include <ipc/ipc.h> #include <sstream> using namespace Kernel; using namespace Kernel::IPC; using namespace Kernel::Processes; /** * TestFunction used as callback */ int TestFunction(int arg2, float arg3) { kout << "This function worked properly! " << arg2 << VideoStream::endl; return 666; } char* ToString(int number, char* result) { char* nPtr = result + strlen(result); std::ostringstream sin; sin << number; strcpy(nPtr, sin.str().c_str()); return result; } float AnotherTestFunction(char arg1, int arg2, int arg3) { kout << "This is another test function -- " << arg2 << " (" << arg3 << ")" << VideoStream::endl; return 1.4142f; } int UserProgramEntry(const char *arguments) { try { Sync waitForOther = Sync("dingsbums", TRUE); // Register our connection Communication::Register("andererProzess", "Wartet auf eine Verbindung"); Socket& socket = Communication::CreateSocket("dessenSocket"); socket.AddLocalCallback(int, TestFunction, int, float); socket.AddLocalCallback(char*, ToString, int, char*); socket.AddRemoteMethod(char, int, float); socket.AddRemoteMethod(float, char, int, int); try { UNUSED Plug* plug = new Plug(socket); waitForOther.Go(TRUE); } catch(IPCSetupException &e) { kout << "An error occured while registering the socket!" << VideoStream::endl; } Thread::Sleep(); // never reaches this point... return 0; } catch (IPCSetupException &e) { kout << "An error occured while setting up the communication wall." << VideoStream::endl; return -1; } }
19.870588
97
0.6791
Elexir-Stefan
2700c4b0db0f1c1293d72965144c99c28dd89578
1,540
cpp
C++
Accepted_The 2000's ACM-ICPC/P2783 (Robots).cpp
peneksglazami/acm-icpc-training
a3c41b65b8f8523713f9859b076f300a12c4e7f3
[ "CC0-1.0" ]
null
null
null
Accepted_The 2000's ACM-ICPC/P2783 (Robots).cpp
peneksglazami/acm-icpc-training
a3c41b65b8f8523713f9859b076f300a12c4e7f3
[ "CC0-1.0" ]
null
null
null
Accepted_The 2000's ACM-ICPC/P2783 (Robots).cpp
peneksglazami/acm-icpc-training
a3c41b65b8f8523713f9859b076f300a12c4e7f3
[ "CC0-1.0" ]
null
null
null
/*************************************************** Problem: 2783 - Robots ACM ICPC - North America - Mid Central - 2003/2004 Solved by Andrey Grigorov ***************************************************/ #include <stdio.h> #include <vector> #include <queue> using namespace std; typedef struct{ int row,col; } garbage; class Compare{ public: bool operator()(garbage a, garbage b){ return ((a.row > b.row) || ((a.row == b.row) && (a.col > b.col))); } }; int main(){ priority_queue <garbage, vector<garbage>, Compare > pq1,pq2; int r,c,rob_cnt; garbage g,cur_g; scanf("%d %d",&r,&c); while ((r != -1) || (c != -1)){ while (!pq1.empty()) pq1.pop(); while (!pq2.empty()) pq2.pop(); do{ g.row = r; g.col = c; pq1.push(g); scanf("%d %d",&r,&c); }while (r || c); rob_cnt = 0; while (!pq1.empty()){ rob_cnt++; g.row = 0; g.col = 0; while (!pq1.empty()){ cur_g = pq1.top(); pq1.pop(); if ((g.row <= cur_g.row) && (g.col <= cur_g.col)){ g = cur_g; } else pq2.push(cur_g); } while (!pq2.empty()){ pq1.push(pq2.top()); pq2.pop(); } } printf("%d\n",rob_cnt); scanf("%d %d",&r,&c); } return 0; }
24.83871
78
0.380519
peneksglazami
dfd6b713f18b58b836b96f6fc5f669da6bc435ff
517
cpp
C++
cpp/data/grid.cpp
equivalence1/ml_lib
92d75ab73bc2d77ba8fa66022c803c06cad66f21
[ "Apache-2.0" ]
null
null
null
cpp/data/grid.cpp
equivalence1/ml_lib
92d75ab73bc2d77ba8fa66022c803c06cad66f21
[ "Apache-2.0" ]
null
null
null
cpp/data/grid.cpp
equivalence1/ml_lib
92d75ab73bc2d77ba8fa66022c803c06cad66f21
[ "Apache-2.0" ]
null
null
null
#include "grid.h" void Grid::binarize(ConstVecRef<float> row, VecRef<uint8_t> dst) const { for (int64_t f = 0; f < features_.size(); ++f) { dst[f] = computeBin(row[origFeatureIndex(f)], borders_[f]); } } void Grid::binarize(const Vec& x, Buffer<uint8_t>& to) const { assert(x.device().deviceType() == ComputeDeviceType::Cpu); assert(to.device().deviceType() == ComputeDeviceType::Cpu); const auto values = x.arrayRef(); const auto dst = to.arrayRef(); binarize(values, dst); }
28.722222
72
0.644101
equivalence1
dfd8d1e701891eb5373cf737aa8c8970666e3637
699
cpp
C++
Luogu/luogu4317.cpp
wzl19371/OI-LIfe
f7f54542d1369b5e4047fcbb2e26c1c64d22ee26
[ "MIT" ]
1
2020-10-05T02:07:52.000Z
2020-10-05T02:07:52.000Z
Luogu/luogu4317.cpp
wzl19371/OI-LIfe
f7f54542d1369b5e4047fcbb2e26c1c64d22ee26
[ "MIT" ]
null
null
null
Luogu/luogu4317.cpp
wzl19371/OI-LIfe
f7f54542d1369b5e4047fcbb2e26c1c64d22ee26
[ "MIT" ]
null
null
null
#include <cstdio> using namespace std; typedef long long ll; const ll p=10000007; ll n,f[107][107],t[107]; ll qpow(ll x,ll y){ ll ans=1; while(y){ if(y&1) ans=ans*x%p; x=x*x%p; y>>=1; } return ans; } ll dp(int n,int m){ if(m>n||!n||m<0) return 0; if(f[n][m]) return f[n][m]; if(n==m||!m) return f[n][m]=1; return f[n][m]=dp(n-1,m)+dp(n-1,m-1); } int main(){ scanf("%lld",&n); for(int i=1;i<=60;i++) for(int j=1;j<=60;j++) dp(i,j); int ct=0; for(ll i=60;i>=0;i--){ if(n&(1ll<<i)){ for(int j=1;j<=i;j++) t[ct+j]+=f[i][j]; t[++ct]++; } } ll ans=1; for(int i=1;i<=60;i++) ans=ans*qpow(i,t[i])%p; printf("%lld\n",ans); return 0; }
19.416667
57
0.492132
wzl19371
dfdbd34f1489377b3c0d503948724cef06abae30
389
cpp
C++
Competitive Programming/part_02/deque.cpp
l0rdluc1f3r/CppCompetitiveProgramming
71376b5a6182dc446811072c73a2b13f33110d4c
[ "Apache-2.0" ]
1
2022-03-24T06:38:53.000Z
2022-03-24T06:38:53.000Z
Competitive Programming/part_02/deque.cpp
l0rdluc1f3r/CppCompetitiveProgramming
71376b5a6182dc446811072c73a2b13f33110d4c
[ "Apache-2.0" ]
null
null
null
Competitive Programming/part_02/deque.cpp
l0rdluc1f3r/CppCompetitiveProgramming
71376b5a6182dc446811072c73a2b13f33110d4c
[ "Apache-2.0" ]
null
null
null
#include <bits/stdc++.h> int main(){ std::deque<int> d1; std::deque<int> d2(5, 10); std::deque<int> d3(d2); std::deque<int> d4(d2.begin(), d2.end()); int arr[] = {1,2,3,4,5}; std::deque<int> d5(arr, arr+5); for(auto &el : d5){ std::cout<<el<<" "; } if(d5.empty()){ std::cout<<"Oh No"; } d1.push_back(10); d1.push_front(20); d1.emplace_back(10); d1.emplace_front(20); }
18.52381
42
0.573265
l0rdluc1f3r
dfdd67d54ff9a7d7661d3955809d73d17cbbd4ba
54,704
cxx
C++
ds/ds/src/ldap/client/bind.cxx
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
ds/ds/src/ldap/client/bind.cxx
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
ds/ds/src/ldap/client/bind.cxx
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
/*++ Copyright (c) 1996 Microsoft Corporation Module Name: bind.c send a bind to an LDAP server Abstract: This module implements the LDAP ldap_bind API. Author: Andy Herron (andyhe) 08-May-1996 Anoop Anantha (AnoopA) 24-Jun-1998 Revision History: --*/ #include "precomp.h" #pragma hdrstop #include "ldapp2.hxx" BOOLEAN FailedntdsapiLoadLib = FALSE; ULONG LdapNonUnicodeBind ( LDAP *ExternalHandle, PCHAR DistName, PCHAR Cred, ULONG Method, BOOLEAN Synchronous ); ULONG LdapGetServiceNameForBind ( PLDAP_CONN Connection, struct l_timeval *Timeout, ULONG AuthMethod ); PWCHAR LdapMakeServiceNameFromHostName ( PWCHAR HostName ); // // This routine is one of the main entry points for clients calling into the // ldap API. // ULONG __cdecl ldap_simple_bindW ( LDAP *ExternalHandle, PWCHAR DistName, PWCHAR PassWord ) { ULONG err; PLDAP_CONN connection = NULL; connection = GetConnectionPointer(ExternalHandle); if (connection == NULL) { return (ULONG) -1; } err = LdapBind( connection, DistName, LDAP_AUTH_SIMPLE, PassWord, FALSE); DereferenceLdapConnection( connection ); return err; } ULONG __cdecl ldap_simple_bind_sW ( LDAP *ExternalHandle, PWCHAR DistName, PWCHAR PassWord ) { ULONG err; PLDAP_CONN connection = NULL; connection = GetConnectionPointer(ExternalHandle); if (connection == NULL) { return LDAP_PARAM_ERROR; } err = LdapBind( connection, DistName, LDAP_AUTH_SIMPLE, PassWord, TRUE); DereferenceLdapConnection( connection ); return err; } ULONG __cdecl ldap_bindW ( LDAP *ExternalHandle, PWCHAR DistName, PWCHAR Cred, ULONG Method ) { ULONG err; PLDAP_CONN connection = NULL; connection = GetConnectionPointer(ExternalHandle); if (connection == NULL) { return (ULONG) -1; } err = LdapBind( connection, DistName, Method, Cred, FALSE); DereferenceLdapConnection( connection ); return err; } ULONG __cdecl ldap_bind_sW ( LDAP *ExternalHandle, PWCHAR DistName, PWCHAR Cred, ULONG Method ) { ULONG err; PLDAP_CONN connection = NULL; connection = GetConnectionPointer(ExternalHandle); if (connection == NULL) { return LDAP_PARAM_ERROR; } err = LdapBind( connection, DistName, Method, Cred, TRUE); DereferenceLdapConnection( connection ); return err; } ULONG __cdecl ldap_simple_bind ( LDAP *ExternalHandle, PCHAR DistName, PCHAR PassWord ) { return LdapNonUnicodeBind( ExternalHandle, DistName, PassWord, LDAP_AUTH_SIMPLE, FALSE ); } ULONG __cdecl ldap_simple_bind_s ( LDAP *ExternalHandle, PCHAR DistName, PCHAR PassWord ) { return LdapNonUnicodeBind( ExternalHandle, DistName, PassWord, LDAP_AUTH_SIMPLE, TRUE ); } ULONG __cdecl ldap_bind ( LDAP *ExternalHandle, PCHAR DistName, PCHAR Cred, ULONG Method ) { return LdapNonUnicodeBind( ExternalHandle, DistName, Cred, Method, FALSE ); } ULONG __cdecl ldap_bind_s ( LDAP *ExternalHandle, PCHAR DistName, PCHAR Cred, ULONG Method ) { return LdapNonUnicodeBind( ExternalHandle, DistName, Cred, Method, TRUE ); } ULONG LdapNonUnicodeBind ( LDAP *ExternalHandle, PCHAR DistName, PCHAR Cred, ULONG Method, BOOLEAN Synchronous ) { ULONG err; PWCHAR wName = NULL; PWCHAR wPassword = NULL; PLDAP_CONN connection = NULL; connection = GetConnectionPointer(ExternalHandle); if (connection == NULL) { return (ULONG) ( Synchronous ? LDAP_PARAM_ERROR : -1 ); } err = ToUnicodeWithAlloc( DistName, -1, &wName, LDAP_UNICODE_SIGNATURE, LANG_ACP ); if (err != LDAP_SUCCESS) { goto error; } if (Method != LDAP_AUTH_SIMPLE) { wPassword = (PWCHAR) Cred; } else { err = ToUnicodeWithAlloc( Cred, -1, &wPassword, LDAP_UNICODE_SIGNATURE, LANG_ACP ); } if (err != LDAP_SUCCESS) { goto error; } err = LdapBind( connection, wName, Method, wPassword, Synchronous); error: if (wName) { ldapFree( wName, LDAP_UNICODE_SIGNATURE ); } if (Method == LDAP_AUTH_SIMPLE && wPassword) { ldapFree( wPassword, LDAP_UNICODE_SIGNATURE ); } DereferenceLdapConnection( connection ); return err; } ULONG LdapBind ( PLDAP_CONN connection, PWCHAR BindDistName, ULONG Method, PWCHAR BindCred, BOOLEAN Synchronous ) // // This routine sends a bind request to the server and optionally waits // for a reply. // // If the call is Sychronous, it returns the LDAP error code. Otherwise it // returns either -1 for failure or the LDAP message number if successful. // { ULONG err; PLDAP_REQUEST request = NULL; BOOLEAN haveLock = FALSE; BOOLEAN resetBindInProgress = FALSE; LONG messageNumber = 0; ULONG credentialLength = 0; ULONG oldVersion; struct l_timeval BindTimeout; ULONG initialBindError = LDAP_SUCCESS; BOOLEAN terminateConnection = FALSE; BOOLEAN fSentMessage = FALSE; LUID savedCurrentLogonId = {0, 0}; #if DBG ULONGLONG startTime = LdapGetTickCount(); #endif ULONG flags = ( connection->NegotiateFlags == DEFAULT_NEGOTIATE_FLAGS ) ? ( 0 ) : connection->NegotiateFlags; ASSERT(connection != NULL); err = LdapConnect( connection, NULL, FALSE ); if (err != 0) { return (ULONG) ( Synchronous ? err : -1 ); } if (!connection->WhistlerServer) { // // If this is a second bind on a connection which has signing/sealing // turned on, we must disallow it. This is by design because the server can't // handle multiple binds on a signed/sealed connection. // if (connection->CurrentSignStatus || connection->CurrentSealStatus) { LdapPrint0("Second Bind is illegal on a signed/sealed connection\n"); return LDAP_UNWILLING_TO_PERFORM; } } oldVersion = connection->publicLdapStruct.ld_version; if (( Method == LDAP_AUTH_NEGOTIATE ) || ( Method == LDAP_AUTH_DIGEST )){ // // set the connection type to LDAP v3. // connection->publicLdapStruct.ld_version = LDAP_VERSION3; } CLdapBer lber( connection->publicLdapStruct.ld_version ); // // we initially set the error state to success so that the lowest layer // can set it accurately. // SetConnectionError( connection, LDAP_SUCCESS, NULL ); IF_DEBUG(CONNECTION) { LdapPrint2( "ldap_bind called for conn 0x%x, host is %s.\n", connection, connection->publicLdapStruct.ld_host); } ACQUIRE_LOCK( &connection->StateLock ); haveLock = TRUE; if ((connection->ConcurrentBind) && (Method != LDAP_AUTH_SIMPLE)) { IF_DEBUG(CONNECTION) { LdapPrint2( "ldap_bind connection 0x%x in concurrent mode but method=0x%x\n", connection, Method); } err = LDAP_UNWILLING_TO_PERFORM; SetConnectionError( connection, err, NULL ); goto exitBind; } if (connection->ConnObjectState != ConnObjectActive) { IF_DEBUG(CONNECTION) { LdapPrint1( "ldap_bind connection 0x%x is closing.\n", connection); } err = LDAP_PARAM_ERROR; SetConnectionError( connection, err, NULL ); goto exitBind; } // // Free existing DN if we have one for the current connection // ldapFree( connection->DNOnBind, LDAP_USER_DN_SIGNATURE ); connection->DNOnBind = NULL; // // If someone sends a bind for a v2 CLDAP session, just remember the // DN for the search request and we're done. // if ((connection->UdpHandle != INVALID_SOCKET) && (connection->publicLdapStruct.ld_version == LDAP_VERSION2)) { IF_DEBUG(CONNECTION) { LdapPrint1( "ldap_bind connection 0x%x is connectionless.\n", connection); } if (BindDistName != NULL) { ULONG dnLength = strlenW( BindDistName ); if (dnLength > 0) { connection->DNOnBind = (PLDAPDN) ldapMalloc( (dnLength + 1) * sizeof(WCHAR), LDAP_USER_DN_SIGNATURE ); if (connection->DNOnBind != NULL) { CopyMemory( connection->DNOnBind, BindDistName, dnLength * sizeof(WCHAR) ); } } } err = LDAP_SUCCESS; messageNumber = -1; // if they do an async call, we need to return // an invalid msg number so they don't try to // wait on it. They'd wait a LONG time. goto exitBind; } if (connection->TcpHandle == INVALID_SOCKET) { IF_DEBUG(NETWORK_ERRORS) { LdapPrint1( "ldap_bind connection 0x%x is connectionless.\n", connection); } err = LDAP_PROTOCOL_ERROR; SetConnectionError( connection, err, NULL ); goto exitBind; } if (!connection->ConcurrentBind) { if (connection->BindInProgress == TRUE) { IF_DEBUG(API_ERRORS) { LdapPrint1( "ldap_bind connection 0x%x has bind in progress.\n", connection); } err = LDAP_LOCAL_ERROR; SetConnectionError( connection, err, NULL ); goto exitBind; } connection->BindInProgress = TRUE; } resetBindInProgress = TRUE; FreeCurrentCredentials( connection ); RELEASE_LOCK( &connection->StateLock ); haveLock = FALSE; if (( Method != LDAP_AUTH_SIMPLE ) && ( Method != LDAP_AUTH_EXTERNAL )) { if ( ! Synchronous ) { // // All of these methods must be called through // the synchronous handler routine. // err = LDAP_PARAM_ERROR; goto exitBind; } if (!LdapInitSecurity()) { IF_DEBUG(API_ERRORS) { LdapPrint1( "ldap_bind connection 0x%x failed to init security.\n", connection); } err = LDAP_LOCAL_ERROR; SetConnectionError( connection, err, NULL ); goto exitBind; } err = LDAP_AUTH_METHOD_NOT_SUPPORTED; // // Get the specific auth details set up. // if ( Method == LDAP_AUTH_SICILY ) { err = LdapTryAllMsnAuthentication( connection, BindCred ); } else if ( Method == LDAP_AUTH_NEGOTIATE ) { if (( SspiPackageNegotiate ) || (connection->PreferredSecurityPackage)) { // // Determine the service name to use for kerberos auth. // This has to be regenerated each time a bind is performed // including the autoreconnect scenario. // // AnoopA: 2/4/98 // We need to put in a timeout because we were hanging // when the server failed to respond to our searches // if (connection->publicLdapStruct.ld_timelimit != 0) { BindTimeout.tv_sec = connection->publicLdapStruct.ld_timelimit; } else { BindTimeout.tv_sec = 120; } BindTimeout.tv_usec = 0; LdapDetermineServerVersion(connection, &BindTimeout, &(connection->WhistlerServer)); if (connection->ServiceNameForBind != NULL) { ldapFree( connection->ServiceNameForBind, LDAP_SERVICE_NAME_SIGNATURE ); connection->ServiceNameForBind = NULL; } err = LdapGetServiceNameForBind( connection, &BindTimeout, Method ); IF_DEBUG(BIND) { LdapPrint1("New servicename for bind is %S\n", connection->ServiceNameForBind); } // // For LDAP_AUTH_NEGOTIATE, we expect the credentials // to be either NULL (to indicate the locally logged // on user), or to contain a SEC_WINNT_AUTH_IDENTITY // structure. // if ( (err != LDAP_OPERATIONS_ERROR) && (err != LDAP_SERVER_DOWN) && (err != LDAP_REFERRAL_V2) && (err != LDAP_TIMEOUT) ) { PWCHAR serviceNameForBind; if ((!connection->ForceHostBasedSPN) && (connection->ServiceNameForBind != NULL)) { serviceNameForBind = connection->ServiceNameForBind; } else { serviceNameForBind = LdapMakeServiceNameFromHostName(connection->HostNameW); if (!serviceNameForBind) { IF_DEBUG(OUTMEMORY) { LdapPrint1( "ldap_bind connection 0x%x couldn't allocate service name.\n", connection); } err = LDAP_NO_MEMORY; SetConnectionError( connection, err, NULL ); goto exitBind; } } // // A third party server like Netscape might support // DIGEST-MD5 but not support GSS-SPNEGO // if (SspiPackageDigest && !connection->PreferredSecurityPackage && !connection->SupportsGSS_SPNEGO && connection->SupportsDIGEST ) { flags = connection->NegotiateFlags; Method = LDAP_AUTH_DIGEST; if (serviceNameForBind != connection->ServiceNameForBind) { // must have come from LdapMakeServiceNameFromHostName ldapFree(serviceNameForBind, LDAP_SERVICE_NAME_SIGNATURE); } goto TryIndividualAuthMethods; } else { err = LdapSspiBind( connection, (connection->PreferredSecurityPackage)? connection->PreferredSecurityPackage: SspiPackageNegotiate, Method, connection->NegotiateFlags, BindDistName, serviceNameForBind, BindCred ); } initialBindError = err; if (serviceNameForBind != connection->ServiceNameForBind) { // must have come from LdapMakeServiceNameFromHostName // --> need to free it ldapFree(serviceNameForBind, LDAP_SERVICE_NAME_SIGNATURE); } } if (err == LDAP_PROTOCOL_ERROR) { // // if the server doesn't support v3, we back off to // NTLM authentication. // connection->publicLdapStruct.ld_version = LDAP_VERSION2; Method = LDAP_AUTH_NTLM; goto TryIndividualAuthMethods; } else if (err == LDAP_AUTH_METHOD_NOT_SUPPORTED) { // // if the server doesn't support v3, we back off to // NTLM authentication. // connection->publicLdapStruct.ld_version = oldVersion; Method = LDAP_AUTH_NTLM; goto TryIndividualAuthMethods; } else if (err == LDAP_TIMEOUT || err == LDAP_SERVER_DOWN) { // // The server failed to respond to our search request // Abort the bind // goto exitBind; } } } else { TryIndividualAuthMethods: // // These are the same on the wire as when // LDAP_AUTH_SICILY is used, but they skip // the package enumeration and authenticate // directly as requested. // if (connection->publicLdapStruct.ld_timelimit != 0) { BindTimeout.tv_sec = connection->publicLdapStruct.ld_timelimit; } else { BindTimeout.tv_sec = 120; } BindTimeout.tv_usec = 0; LdapDetermineServerVersion(connection, &BindTimeout, &(connection->WhistlerServer)); if ((Method == LDAP_AUTH_DPA) && (SspiPackageDpa != NULL)) { err = LdapSspiBind( connection, SspiPackageDpa, Method, flags, L"DPA", NULL, BindCred ); } else if ((Method == LDAP_AUTH_MSN) && (SspiPackageSicily != NULL)) { err = LdapSspiBind( connection, SspiPackageSicily, Method, flags, L"MSN", NULL, BindCred ); } else if ((Method == LDAP_AUTH_NTLM) && (SspiPackageNtlm != NULL)) { err = LdapSspiBind( connection, SspiPackageNtlm, Method, flags, L"NTLM", NULL, BindCred ); } else if ((Method == LDAP_AUTH_DIGEST) && (SspiPackageDigest != NULL)) { // // Read the RootDSE and also determine the SPN to use. // ldapFree( connection->ServiceNameForBind, LDAP_SERVICE_NAME_SIGNATURE ); connection->ServiceNameForBind = NULL; err = LdapGetServiceNameForBind( connection, &BindTimeout, Method ); PWCHAR serviceNameForBind = NULL; if ((!connection->ForceHostBasedSPN) && (connection->ServiceNameForBind != NULL)) { serviceNameForBind = connection->ServiceNameForBind; } else { serviceNameForBind = LdapMakeServiceNameFromHostName(connection->HostNameW); if (!serviceNameForBind) { IF_DEBUG(OUTMEMORY) { LdapPrint1( "ldap_bind connection 0x%x couldn't allocate service name.\n", connection); } err = LDAP_NO_MEMORY; SetConnectionError( connection, err, NULL ); goto exitBind; } } if (err == LDAP_SUCCESS) { err = LdapSspiBind( connection, SspiPackageDigest, Method, flags, NULL, serviceNameForBind, BindCred ); } if (serviceNameForBind != connection->ServiceNameForBind) { // must have come from LdapMakeServiceNameFromHostName // --> need to free it ldapFree(serviceNameForBind, LDAP_SERVICE_NAME_SIGNATURE); } } } } else if ( Method == LDAP_AUTH_SIMPLE ) { // // Simple authentication. // request = LdapCreateRequest( connection, LDAP_BIND_CMD ); if (request == NULL) { IF_DEBUG(OUTMEMORY) { LdapPrint1( "ldap_bind connection 0x%x couldn't allocate request.\n", connection); } err = LDAP_NO_MEMORY; SetConnectionError( connection, err, NULL ); goto exitBind; } messageNumber = request->MessageId; request->ChaseReferrals = 0; // // Make sure this no other waiting thread steals a response meant // for us. // request->Synchronous = Synchronous; // // format the bind request. // if ((connection->publicLdapStruct.ld_version == LDAP_VERSION2) || (connection->publicLdapStruct.ld_version == LDAP_VERSION3)) { // // the ldapv2 Bind message looks like this : // // [APPLICATION 0] (IMPLICIT) SEQUENCE { // version (INTEGER) // szDN (LDAPDN) // authentication CHOICE { // simple [0] OCTET STRING // [... other choices ...] // } // } err = lber.HrStartWriteSequence(); if (err != NOERROR) { SetConnectionError( connection, err, NULL ); goto exitBind; } err = lber.HrAddValue( messageNumber ); if (err != NOERROR) { SetConnectionError( connection, err, NULL ); goto exitBind; } err = lber.HrStartWriteSequence(LDAP_BIND_CMD); if (err != NOERROR) { SetConnectionError( connection, err, NULL ); goto exitBind; } err = lber.HrAddValue((LONG) connection->publicLdapStruct.ld_version); if (err != NOERROR) { SetConnectionError( connection, err, NULL ); goto exitBind; } err = lber.HrAddValue((const WCHAR *) BindDistName ); if (err != NOERROR) { SetConnectionError( connection, err, NULL ); goto exitBind; } WCHAR nullStr = L'\0'; PWCHAR credentials = BindCred; if (credentials != NULL) { credentialLength = (strlenW( credentials ) + 1) * sizeof(WCHAR); err = lber.HrAddValue((const WCHAR *) credentials, Method ); } else { credentials = &nullStr; err = lber.HrAddBinaryValue( (BYTE *) credentials, 0, Method ); } if (err != NOERROR) { SetConnectionError( connection, err, NULL ); goto exitBind; } err = lber.HrEndWriteSequence(); ASSERT(err == NOERROR); err = lber.HrEndWriteSequence(); ASSERT(err == NOERROR); } else { IF_DEBUG(API_ERRORS) { LdapPrint2( "ldap_bind connection 0x%x asked for version 0x%x.\n", connection, connection->publicLdapStruct.ld_version ); } err = LDAP_PROTOCOL_ERROR; SetConnectionError( connection, err, NULL ); goto exitBind; } // // send the bind request. // ACQUIRE_LOCK( &connection->ReconnectLock ); AddToPendingList( request, connection ); err = LdapSend( connection, &lber ); if (err != LDAP_SUCCESS) { IF_DEBUG(NETWORK_ERRORS) { LdapPrint2( "ldap_bind connection 0x%x send with error of 0x%x.\n", connection, err ); } DecrementPendingList( request, connection ); RELEASE_LOCK( &connection->ReconnectLock ); } else { fSentMessage = TRUE; RELEASE_LOCK( &connection->ReconnectLock ); if (Synchronous) { PLDAPMessage message = NULL; ULONG timeout = LDAP_BIND_TIME_LIMIT_DEFAULT; if (connection->publicLdapStruct.ld_timelimit != 0) { timeout = connection->publicLdapStruct.ld_timelimit * 1000; } err = LdapWaitForResponseFromServer( connection, request, timeout, FALSE, /// not search results &message, TRUE ); // Disable autoreconnect if (err == LDAP_SUCCESS) { if (message != NULL) { err = message->lm_returncode; } else { ASSERT( connection->ServerDown ); err = LDAP_SERVER_DOWN; IF_DEBUG(SERVERDOWN) { LdapPrint2( "ldapBind thread 0x%x has connection 0x%x as down.\n", GetCurrentThreadId(), connection ); } } IF_DEBUG(TRACE1) { LdapPrint2( "LdapBind conn 0x%x gets response of 0x%x from server.\n", connection, err ); } } else { IF_DEBUG(TRACE2) { LdapPrint2( "LdapBind conn 0x%x didn't get response from server, 0x%x.\n", connection, err ); } } if (message != NULL) { ldap_msgfree( message ); } } } } else { // // External authentication. From draft-ietf-ldapext-authmeth-04.txt, // the DN contains the Authorization Id of the following two forms: // // ; distinguished-name-based authz id. // dnAuthzId = "dn:" dn // dn = utf8string ; with syntax defined in RFC 2253 // // ; unspecified userid, UTF-8 encoded. // uAuthzId = "u:" userid // userid = utf8string ; syntax unspecified // // One of the above authzIds will be part of the credentials field in // the SASL credentials field. // ASSERT( Method == LDAP_AUTH_EXTERNAL ); if ( BindCred || (! Synchronous)) { // // You can't specify credentials in an EXTERNAL SASL bind nor // can it be called asynchronously. // err = LDAP_PARAM_ERROR; goto exitBind; } err = LdapExchangeOpaqueToken(connection, LDAP_AUTH_SASL, // auth mechanism L"EXTERNAL", // oid BindDistName, // authzId NULL, // Credentials 0, // Credential length NULL, // return data NULL, // return data in berval form NULL, // server controls NULL, // client controls (PULONG) &messageNumber,// Message Number FALSE, // Send only TRUE, // Controls are unicode &fSentMessage // did the message get sent? ); } // End of EXTERNAL auth. if (( Method == LDAP_AUTH_SIMPLE ) || ( Method == LDAP_AUTH_EXTERNAL )) { // For non-SSPI bind methods, we want to clear the security context (if any) // of the connection, in case this was a re-bind following a previous // SSPI bind. We also need to clear any signing/sealing left over from // the previous bind. We do this only if we got to the point of actually // sending the bind message to the server. if (fSentMessage) { // We save off the LUID so that, if we're reconnecting, we can later // restore the previous LUID rather than overwrite it with a new one savedCurrentLogonId = connection->CurrentLogonId; CloseCredentials( connection ); ACQUIRE_LOCK(&ConnectionListLock) if ((connection->SecureStream) && (connection->CurrentSignStatus || connection->CurrentSealStatus)) { PSECURESTREAM pTemp; pTemp = (PSECURESTREAM) connection->SecureStream; delete pTemp; connection->SecureStream = NULL; connection->CurrentSignStatus = FALSE; connection->CurrentSealStatus = FALSE; } RELEASE_LOCK(&ConnectionListLock) } } if (err == LDAP_SUCCESS) { // // save off the credentials we used to get to this server // ACQUIRE_LOCK( &connection->StateLock ); ldapFree( connection->DNOnBind, LDAP_USER_DN_SIGNATURE ); connection->DNOnBind = NULL; if (( Method == LDAP_AUTH_SIMPLE ) || ( Method == LDAP_AUTH_EXTERNAL )) { FreeCurrentCredentials(connection); if (credentialLength > 0) { // Note that we'll need up to (DES_BLOCKLEN-1) bytes of padding for RtlEncryptMemory connection->CurrentCredentials = (PWCHAR) ldapMalloc( credentialLength + 1 + (DES_BLOCKLEN-1), LDAP_CREDENTIALS_SIGNATURE ); if ( connection->CurrentCredentials != NULL ) { CopyMemory( connection->CurrentCredentials, BindCred, credentialLength ); if (GlobalUseScrambling) { ACQUIRE_LOCK( &connection->ScramblingLock ); pRtlInitUnicodeString( &connection->ScrambledCredentials, connection->CurrentCredentials); RoundUnicodeStringMaxLength(&connection->ScrambledCredentials, DES_BLOCKLEN); // // Scramble plain-text credentials // EncodeUnicodeString(&connection->ScrambledCredentials); connection->Scrambled = TRUE; RELEASE_LOCK( &connection->ScramblingLock ); } } } connection->BindMethod = Method; // save off the LUID for referral chasing if (!connection->Reconnecting) { GetCurrentLuid( &connection->CurrentLogonId ); } else { connection->CurrentLogonId = savedCurrentLogonId; } } connection->BindPerformed = TRUE; if (BindDistName != NULL) { ULONG dnLength = strlenW( BindDistName ) * sizeof(WCHAR); if (dnLength > 0) { connection->DNOnBind = (PLDAPDN) ldapMalloc( dnLength + sizeof(WCHAR), LDAP_USER_DN_SIGNATURE ); if (connection->DNOnBind != NULL) { CopyMemory( connection->DNOnBind, BindDistName, dnLength ); } } } RELEASE_LOCK( &connection->StateLock ); } exitBind: IF_DEBUG(BIND) { LdapPrint2( "ldap_bind returned err = 0x%x for connection 0x%x.\n", err, connection ); } if (resetBindInProgress == TRUE) { ldap_msgfree( connection->BindResponse ); connection->BindResponse = NULL; connection->BindInProgress = FALSE; } // // if the server returns a protocol error, RFC 2251 mandates // the client MUST close the connection as the server will // be unwilling to accept further operations. We mark // the connection as down so that future requests trigger // a disconnect/reconnect. // if ((err != LDAP_SUCCESS) && (terminateConnection == TRUE)) { if (!haveLock) { ACQUIRE_LOCK( &connection->StateLock ); } connection->HostConnectState = HostConnectStateError; if (!haveLock) { RELEASE_LOCK( &connection->StateLock ); } } if (haveLock) { RELEASE_LOCK( &connection->StateLock ); } if (! Synchronous) { if (err == LDAP_SUCCESS) { err = messageNumber; } else { err = (DWORD) -1; if (request != NULL) { CloseLdapRequest( request ); } } } else { if (request != NULL) { CloseLdapRequest( request ); } } if (request != NULL) { DereferenceLdapRequest( request ); } START_LOGGING; DSLOG((DSLOG_FLAG_TAG_CNPN,"[+][ID=0][OP=ldap_bind]")); DSLOG((0,"[DN=%ws][PA=0x%x][ST=%I64d][ET=%I64d][ER=%d][-]\n", BindDistName, Method, startTime, LdapGetTickCount(), err)); END_LOGGING; return err; } ULONG FreeCurrentCredentials ( PLDAP_CONN Connection ) { if (Connection->CurrentCredentials != NULL) { ULONG tag; if ( Connection->BindMethod == LDAP_AUTH_SIMPLE ) { tag = LDAP_CREDENTIALS_SIGNATURE; } else { tag = LDAP_SECURITY_SIGNATURE; } ldapSecureFree( Connection->CurrentCredentials, tag ); Connection->CurrentCredentials = NULL; } Connection->BindMethod = 0; if (GlobalUseScrambling) { pRtlInitUnicodeString( &Connection->ScrambledCredentials, NULL); } return LDAP_SUCCESS; } // important: must be lower-case, per RFC 2829, section 11 #define LDAP_SERVICE_PREFIX L"ldap" PWCHAR LdapMakeServiceNameFromHostName ( PWCHAR HostName ) { PWCHAR pszServiceName = NULL; if (!LoadUser32Now()) { return NULL; } pszServiceName = (PWCHAR) ldapMalloc( (strlenW(LDAP_SERVICE_PREFIX) + strlenW(HostName) + 2)*sizeof(WCHAR), LDAP_SERVICE_NAME_SIGNATURE); if (!pszServiceName) { return NULL; }; pfwsprintfW (pszServiceName, L"%s/%s", LDAP_SERVICE_PREFIX, HostName); return pszServiceName; } ULONG LdapGetServiceNameForBind ( PLDAP_CONN Connection, struct l_timeval *Timeout, ULONG AuthMethod ) { #define TEMPBUFFERSIZE 4096 PWCHAR pszSpn = NULL; DWORD pcSpnLength = TEMPBUFFERSIZE; PLDAP ldapConnection = Connection->ExternalInfo; ULONG err; PLDAPMessage results = NULL; ULONG oldChaseReferrals = Connection->publicLdapStruct.ld_options; BOOLEAN foundGSSAPI = FALSE; BOOLEAN foundGSS_SPNEGO = FALSE; BOOLEAN foundDIGEST = FALSE; USHORT PortNumber = 0; PWCHAR servicename = NULL; PWCHAR attrList[4] = { L"supportedSASLMechanisms", NULL }; // // We try to generate a service principle name if we have a fully qualified // machine name. // if ((Connection->DnsSuppliedName != NULL) && (NTDSLibraryHandle == NULL) && (!FailedntdsapiLoadLib) ){ // // Try to load ntdsapi.dll // ACQUIRE_LOCK( &LoadLibLock ); NTDSLibraryHandle = LoadSystem32LibraryA( "NTDSAPI.DLL" ); if (NTDSLibraryHandle != NULL) { pDsMakeSpnW = (FNDSMAKESPNW) GetProcAddress( NTDSLibraryHandle, "DsMakeSpnW" ); if (pDsMakeSpnW == NULL) { // // No big deal. We won't die if we don't get that function // Just don't try to load the dll again. // FailedntdsapiLoadLib = TRUE; FreeLibrary( NTDSLibraryHandle ); NTDSLibraryHandle = NULL; } } else { FailedntdsapiLoadLib = TRUE; } RELEASE_LOCK( &LoadLibLock ); } if (pDsMakeSpnW) { // // We have to decide what we want to pass in as the service name. If we // connect using an IP address, we are out of luck and end up reading // the rootDSE attribute anyway. // // AnoopA (1/27/99): I have to read the RootDSE ALWAYS to figure out if the // server is pre-GSS-SPNEGO or not. But, we will try our best to get the // servicename through DsMakeSpn and not from the RootDSE. // // // If we had a domain name, we must redirect it to the appropriate KDC by // supplying the @domain in the end. So, the new SPN will look like: // // LDAP/FQMN/FQDN@FQDN // pszSpn = (PWCHAR) ldapMalloc( TEMPBUFFERSIZE, LDAP_BUFFER_SIGNATURE ); if (!pszSpn) { goto ReadRootDSE; } if (Connection->DomainName) { LONG DomainLength = strlenW(Connection->DomainName); if (DomainLength >= TEMPBUFFERSIZE/8) { goto ReadRootDSE; } servicename = (PWCHAR)ldapMalloc( (DomainLength*2+2)* sizeof(WCHAR), LDAP_BUFFER_SIGNATURE); if (!servicename) { goto ReadRootDSE; } CopyMemory( servicename, Connection->DomainName, DomainLength * sizeof(WCHAR)); if ( (!(Connection->ResolvedGetDCFlags & DS_NDNC_FLAG)) && (AuthMethod != LDAP_AUTH_DIGEST) ) { // If binding to a non-domain naming context (NDNC), we don't // want to include the so-called DomainName (really, the NDNC name) // as a realm hint, because NDNCs aren't Kerberos realms. // It also doesn't make sense to include the realm hint in the Digest // case. *(servicename+DomainLength) = L'@'; CopyMemory( servicename + DomainLength+1, Connection->DomainName, DomainLength * sizeof(WCHAR)); } } else { servicename = Connection->DnsSuppliedName; } if ( (!((Connection->PortNumber == LDAP_PORT) || (Connection->PortNumber == LDAP_GC_PORT) || (Connection->PortNumber == LDAP_SSL_PORT) || (Connection->PortNumber == LDAP_SSL_GC_PORT))) && (AuthMethod != LDAP_AUTH_DIGEST)) { // // This connection is on a non-standard port. Include it in the SPN, unless // we're building a Digest URI (Digest doesn't take the port number) // PortNumber = Connection->PortNumber; } IF_DEBUG(BIND) { LdapPrint1("Connection->hostname is %s\n", Connection->publicLdapStruct.ld_host); LdapPrint1("Connection->DnsSuppliedNAme is %S\n ", Connection->DnsSuppliedName); LdapPrint1("Connection->DomainName is %S\n ", Connection->DomainName); } // // Note: The service class name in the SPN must be lower-case ("ldap"). // This is required by RFC 2829, section 11. W2k DCs are not case-sensitive, // however, some third-party servers are. // err = pDsMakeSpnW( LDAP_SERVICE_PREFIX, // ServiceClass servicename, // ServiceName Connection->DnsSuppliedName, // Optional InstanceName PortNumber, // PortNumber, if nonstandard NULL, // Optional referrer &pcSpnLength, // Length of buffer pszSpn // Actual buffer ); if (err == ERROR_SUCCESS) { Connection->ServiceNameForBind = ldap_dup_stringW( pszSpn, 0, LDAP_SERVICE_NAME_SIGNATURE ); IF_DEBUG(BIND) { LdapPrint2("LDAP: DsMakeSpn returned %S with error %d\n", Connection->ServiceNameForBind, err); } } } ReadRootDSE: Connection->publicLdapStruct.ld_options &= ~LDAP_OPT_CHASE_REFERRALS; Connection->publicLdapStruct.ld_options &= ~LDAP_CHASE_SUBORDINATE_REFERRALS; Connection->publicLdapStruct.ld_options &= ~LDAP_CHASE_EXTERNAL_REFERRALS; // // Ensure that we don't try to sign/seal - remember that we haven't // bound yet. // err = ldap_search_ext_sW( ldapConnection, NULL, LDAP_SCOPE_BASE, L"(objectclass=*)", attrList, 0, // attributes only NULL, // server controls NULL, // client controls Timeout, 0, // size limit &results ); if (results != NULL) { PLDAPMessage message = ldap_first_record( Connection, results, LDAP_RES_SEARCH_ENTRY ); if (message != NULL) { struct berelement *opaque = NULL; PWCHAR attribute = LdapFirstAttribute( Connection, message, (BerElement **) &opaque, TRUE ); while (attribute != NULL) { PWCHAR *values = NULL; ULONG count; if (LdapGetValues( Connection, message, attribute, FALSE, TRUE, (PVOID *) &values) != NOERROR) values = NULL; ULONG totalValues = ldap_count_valuesW( values ); if ( ldapWStringsIdentical( attribute, -1, L"supportedSASLMechanisms", -1 )) { for (count = 0; count < totalValues; count++ ) { if (ldapWStringsIdentical( values[count], -1, L"GSSAPI", -1 )) { foundGSSAPI = TRUE; IF_DEBUG(BIND) { LdapPrint1( "ldapBind found GSSAPI auth type on conn 0x%x\n", Connection); } } else if (ldapWStringsIdentical( values[count], -1, L"GSS-SPNEGO", -1 )) { foundGSS_SPNEGO = TRUE; IF_DEBUG(BIND) { LdapPrint1( "ldapBind found GSS-SPNEGO auth type on conn 0x%x\n", Connection); } } else if (ldapWStringsIdentical( values[count], -1, L"DIGEST-MD5", -1 )) { foundDIGEST = TRUE; IF_DEBUG(BIND) { LdapPrint1( "ldapBind found DIGEST auth type on conn 0x%x\n", Connection); } } } } ldap_value_freeW( values ); attribute = LdapNextAttribute( Connection, message, opaque, TRUE ); } } ldap_msgfree( results ); } Connection->publicLdapStruct.ld_options = oldChaseReferrals; if (err == LDAP_SUCCESS) { // // This must be a v3 server we are talking to. It responded successfully // to our RootDSE search // IF_DEBUG(BIND) { LdapPrint0("ldap bind: Server is v3\n"); } Connection->HighestSupportedLdapVersion = LDAP_VERSION3; if ((foundGSS_SPNEGO == FALSE) && (foundGSSAPI == FALSE)) { // // Non-AD server // IF_DEBUG(BIND) { LdapPrint0("ldap bind: Server does not support GSSAPI or GSS-SPNEGO\n"); } } else if ((foundGSS_SPNEGO == FALSE) && (foundGSSAPI == TRUE)){ // // AD Beta2 server // Connection->SupportsGSSAPI = TRUE; IF_DEBUG(BIND) { LdapPrint0("ldap bind: Server supports GSSAPI but not GSS-SPNEGO\n"); } } else if ((foundGSS_SPNEGO == TRUE) && (foundGSSAPI == FALSE)) { // // Non-AD server but it supports the negotiate package. // Connection->SupportsGSS_SPNEGO = TRUE; IF_DEBUG(BIND) { LdapPrint0("ldap bind: Server supports GSS-SPNEGO but not GSSAPI\n"); } } else if ((foundGSS_SPNEGO == TRUE) && (foundGSSAPI == TRUE)) { // // AD Beta3 server // Connection->SupportsGSS_SPNEGO = TRUE; Connection->SupportsGSSAPI = TRUE; IF_DEBUG(BIND) { LdapPrint0("ldap bind: Server supports both GSS-SPNEGO and GSSAPI\n"); } } Connection->SupportsDIGEST = foundDIGEST; } else { // // This server probably requires a bind before doing a search. // IF_DEBUG(BIND) { LdapPrint0("ldap bind: Server is v2\n"); } Connection->HighestSupportedLdapVersion = LDAP_VERSION2; } if (Connection->DomainName) { ldapFree(servicename, LDAP_BUFFER_SIGNATURE); servicename = NULL; } if (pszSpn) { ldapFree(pszSpn, LDAP_BUFFER_SIGNATURE); pszSpn = NULL; } return err; } BOOLEAN LdapAuthError( ULONG err ) { // // Returns FALSE for non authentication errors like LDAP_BUSY etc. // if (( err == LDAP_INAPPROPRIATE_AUTH ) || ( err == LDAP_INVALID_CREDENTIALS ) || ( err == LDAP_INSUFFICIENT_RIGHTS ) || ( err == LDAP_AUTH_METHOD_NOT_SUPPORTED ) || ( err == LDAP_STRONG_AUTH_REQUIRED ) || ( err == LDAP_AUTH_UNKNOWN )) { return TRUE; } return FALSE; } ULONG LdapDetermineServerVersion ( PLDAP_CONN Connection, struct l_timeval *Timeout, BOOLEAN *pfIsServerWhistler // OUT ) { PLDAP ldapConnection = Connection->ExternalInfo; ULONG err; PLDAPMessage results = NULL; ULONG oldChaseReferrals = Connection->publicLdapStruct.ld_options; PWCHAR attrList[2] = { L"supportedCapabilities", NULL }; Connection->publicLdapStruct.ld_options &= ~LDAP_OPT_CHASE_REFERRALS; Connection->publicLdapStruct.ld_options &= ~LDAP_CHASE_SUBORDINATE_REFERRALS; Connection->publicLdapStruct.ld_options &= ~LDAP_CHASE_EXTERNAL_REFERRALS; *pfIsServerWhistler = FALSE; err = ldap_search_ext_sW( ldapConnection, NULL, LDAP_SCOPE_BASE, L"(objectclass=*)", attrList, 0, // attributes only NULL, // server controls NULL, // client controls Timeout, 0, // size limit &results ); if (results != NULL) { PLDAPMessage message = ldap_first_record( Connection, results, LDAP_RES_SEARCH_ENTRY ); if (message != NULL) { struct berelement *opaque = NULL; PWCHAR attribute = LdapFirstAttribute( Connection, message, (BerElement **) &opaque, TRUE ); while (attribute != NULL) { PWCHAR *values = NULL; ULONG count; if (LdapGetValues( Connection, message, attribute, FALSE, TRUE, (PVOID *) &values) != NOERROR) values = NULL; ULONG totalValues = ldap_count_valuesW( values ); if ( ldapWStringsIdentical( attribute, -1, L"supportedCapabilities", -1 )) { for (count = 0; count < totalValues; count++ ) { if (ldapWStringsIdentical( values[count], -1, L"1.2.840.113556.1.4.1791", // Whistler w/ rebind fixes OID -1 )) { *pfIsServerWhistler = TRUE; IF_DEBUG(BIND) { LdapPrint1( "ldapBind found server is Whistler or better AD on conn 0x%x\n", Connection); } } } } ldap_value_freeW( values ); attribute = LdapNextAttribute( Connection, message, opaque, TRUE ); } } ldap_msgfree( results ); } Connection->publicLdapStruct.ld_options = oldChaseReferrals; return err; } // bind.c eof.
31.511521
142
0.464993
npocmaka
dfe7a9aee06726f7894b1bed816b96427f5c00d0
686
cxx
C++
templates/initmodule.cxx
lukeolson/crappy
fdd9449f7976e2a4e678db06e1b8d1a8bfef4e84
[ "BSD-3-Clause" ]
null
null
null
templates/initmodule.cxx
lukeolson/crappy
fdd9449f7976e2a4e678db06e1b8d1a8bfef4e84
[ "BSD-3-Clause" ]
null
null
null
templates/initmodule.cxx
lukeolson/crappy
fdd9449f7976e2a4e678db06e1b8d1a8bfef4e84
[ "BSD-3-Clause" ]
null
null
null
#include <Python.h> #include "crappy.h" extern "C" { #include "crappy_impl.h" static char crappy_doc[] = "Docstring for crappy."; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, "crappy", NULL, -1, crappy_methods, NULL, NULL, NULL, NULL }; PyObject *PyInit_crappy(void) { PyObject *m; m = PyModule_Create(&moduledef); import_array(); return m; } #else PyMODINIT_FUNC initcrappy(void) { PyObject *m; m = Py_InitModule3("crappy", crappy_methods, crappy_doc); import_array(); if (m == NULL) { Py_FatalError("can't initialize module crappy"); } } #endif }
16.333333
61
0.639942
lukeolson
dfea84a2adab64773bce92477019e19b41ecd308
509
cpp
C++
source/jz28.cpp
loganautomata/leetcode
5a626c91f271bae231328c92a3be23eba227f66e
[ "MIT" ]
null
null
null
source/jz28.cpp
loganautomata/leetcode
5a626c91f271bae231328c92a3be23eba227f66e
[ "MIT" ]
null
null
null
source/jz28.cpp
loganautomata/leetcode
5a626c91f271bae231328c92a3be23eba227f66e
[ "MIT" ]
null
null
null
#include "jz28.h" using namespace std; bool Jz28::IsMirror(TreeNode* left, TreeNode* right) { if(left == nullptr && right == nullptr) return true; else if (left == nullptr || right == nullptr || left->val != right->val) return false; // 迭代终止条件, 遍历完至少一颗树, 或者发现两颗树不是镜像. return IsMirror(left->right, right->left) && IsMirror(left->left, right->right); } bool Jz28::isSymmetric(TreeNode* root) { if (root == nullptr) return true; // 排除树为空的特殊情形 return IsMirror(root->left, root->right); }
26.789474
124
0.664047
loganautomata
dfeb53f30e17721692806e323e06477af45bafd9
19,834
cpp
C++
Source/Samples/79_NonoVG/NonoVG.cpp
elix22/Urho3D
99902ae2a867be0d6dbe4c575f9c8c318805ec64
[ "MIT" ]
20
2019-04-18T07:37:34.000Z
2022-02-02T21:43:47.000Z
Source/Samples/79_NonoVG/NonoVG.cpp
elix22/Urho3D
99902ae2a867be0d6dbe4c575f9c8c318805ec64
[ "MIT" ]
11
2019-10-21T13:39:41.000Z
2021-11-05T08:11:54.000Z
Source/Samples/79_NonoVG/NonoVG.cpp
elix22/Urho3D
99902ae2a867be0d6dbe4c575f9c8c318805ec64
[ "MIT" ]
1
2021-12-03T18:11:36.000Z
2021-12-03T18:11:36.000Z
// // Copyright (c) 2008-2021 the Urho3D project. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // #include <Urho3D/Core/CoreEvents.h> #include <Urho3D/Engine/Engine.h> #include <Urho3D/Graphics/Graphics.h> #include <Urho3D/Graphics/GraphicsEvents.h> #include <Urho3D/Graphics/Material.h> #include <Urho3D/Graphics/Model.h> #include <Urho3D/Graphics/Octree.h> #include <Urho3D/Graphics/StaticModel.h> #include <Urho3D/Graphics/Texture2D.h> #include <Urho3D/Input/Input.h> #include <Urho3D/Resource/ResourceCache.h> #include <Urho3D/UI/Button.h> #include <Urho3D/UI/CheckBox.h> #include <Urho3D/UI/LineEdit.h> #include <Urho3D/UI/Text.h> #include <Urho3D/UI/ToolTip.h> #include <Urho3D/UI/UI.h> #include <Urho3D/UI/UIEvents.h> #include <Urho3D/UI/Window.h> #include <Urho3D/Graphics/Technique.h> #include "NVG.h" #include "VGCanvas.h" #include "VGEvents.h" #include "VGFrameBuffer.h" #include "VGElement.h" #include "VGComponent.h" #include "NonoVG.h" #include "Demo.h" static DemoData demoData_; #include <Urho3D/DebugNew.h> URHO3D_DEFINE_APPLICATION_MAIN(NonoVG) NonoVG::NonoVG(Context* context) : Sample(context) , time_(0) { } void NonoVG::Setup() { engineParameters_[EP_RESOURCE_PATHS] = "Data;CoreData;"; engineParameters_[EP_LOG_NAME] = GetSubsystem<FileSystem>()->GetProgramDir() + GetTypeName() + ".log"; engineParameters_[EP_FULL_SCREEN] = false; engineParameters_[EP_WINDOW_WIDTH] = 1400; engineParameters_[EP_WINDOW_HEIGHT] = 1000; engineParameters_[EP_WINDOW_RESIZABLE] = true; engineParameters_[EP_WINDOW_TITLE] = GetTypeName(); context_->RegisterSubsystem(new NanoVG(context_)); VGElement::RegisterObject(context_); VGCanvas::RegisterObject(context_); VGFrameBuffer::RegisterObject(context_); VGComponent::RegisterObject(context_); } void NonoVG::Start() { // Execute base class startup Sample::Start(); uiRoot_ = GetSubsystem<UI>()->GetRoot(); // Load XML file containing default UI style sheet auto* cache = GetSubsystem<ResourceCache>(); auto* style = cache->GetResource<XMLFile>("UI/DefaultStyle.xml"); // Set the loaded style as default style uiRoot_->SetDefaultStyle(style); NanoVG* nvg = GetSubsystem<NanoVG>(); if (nvg) { nvg->Initialize(); loadDemoData(nvg, &demoData_); } CreateScene(); InitControls(); SetupViewport(); SubscribeToEvents(); // Enable OS cursor GetSubsystem<Input>()->SetMouseVisible(true); // Set the mouse mode to use in the sample Sample::InitMouseMode(MM_FREE); } void NonoVG::CreateScene() { auto* cache = GetSubsystem<ResourceCache>(); auto* graphics = GetSubsystem<Graphics>(); scene_ = new Scene(context_); // Create the Octree component to the scene. This is required before adding any drawable components, or else nothing // will show up. The default octree volume will be from (-1000, -1000, -1000) to (1000, 1000, 1000) in world // coordinates; it is also legal to place objects outside the volume but their visibility can then not be checked in // a hierarchically optimizing manner scene_->CreateComponent<Octree>(); // Create a child scene node (at world origin) and a StaticModel component into it. Set the StaticModel to show a // simple plane mesh with a "stone" material. Note that naming the scene nodes is optional. Scale the scene node // larger (100 x 100 world units) Node* planeNode = scene_->CreateChild("Plane"); planeNode->SetScale(Vector3(100.0f, 1.0f, 100.0f)); auto* planeObject = planeNode->CreateComponent<StaticModel>(); planeObject->SetModel(cache->GetResource<Model>("Models/Plane.mdl")); planeObject->SetMaterial(cache->GetResource<Material>("Materials/StoneTiled.xml")); // Create a directional light to the world so that we can see something. The light scene node's orientation controls // the light direction; we will use the SetDirection() function which calculates the orientation from a forward // direction vector. The light will use default settings (white light, no shadows) Node* lightNode = scene_->CreateChild("DirectionalLight"); lightNode->SetDirection(Vector3(0.6f, -1.0f, 0.8f)); // The direction vector does not need to be normalized auto* light = lightNode->CreateComponent<Light>(); light->SetLightType(LIGHT_DIRECTIONAL); // Create more StaticModel objects to the scene, randomly positioned, rotated and scaled. For rotation, we construct // a quaternion from Euler angles where the Y angle (rotation about the Y axis) is randomized. The mushroom model // contains LOD levels, so the StaticModel component will automatically select the LOD level according to the view // distance (you'll see the model get simpler as it moves further away). Finally, rendering a large number of the // same object with the same material allows instancing to be used, if the GPU supports it. This reduces the amount // of CPU work in rendering the scene. const unsigned NUM_OBJECTS = 200; for (unsigned i = 0; i < NUM_OBJECTS; ++i) { Node* mushroomNode = scene_->CreateChild("Mushroom"); mushroomNode->SetPosition(Vector3(Random(90.0f) - 45.0f, 0.0f, Random(90.0f) - 45.0f)); mushroomNode->SetRotation(Quaternion(0.0f, Random(360.0f), 0.0f)); mushroomNode->SetScale(0.5f + Random(2.0f)); auto* mushroomObject = mushroomNode->CreateComponent<StaticModel>(); mushroomObject->SetModel(cache->GetResource<Model>("Models/Mushroom.mdl")); mushroomObject->SetMaterial(cache->GetResource<Material>("Materials/Mushroom.xml")); } // Create a "screen" like object for viewing the second scene. Construct it from two StaticModels, a box for the // frame and a plane for the actual view { Node* boxNode = scene_->CreateChild("ScreenBox"); boxNode->SetPosition(Vector3(0.0f, 10.0f, 0.0f)); boxNode->SetScale(Vector3(21.0f, 16.0f, 0.5f)); auto* boxObject = boxNode->CreateComponent<StaticModel>(); boxObject->SetModel(cache->GetResource<Model>("Models/Box.mdl")); boxObject->SetMaterial(cache->GetResource<Material>("Materials/Stone.xml")); Node* screenNode = scene_->CreateChild("Screen"); screenNode->SetPosition(Vector3(0.0f, 10.0f, -0.27f)); screenNode->SetRotation(Quaternion(-90.0f, 0.0f, 0.0f)); screenNode->SetScale(Vector3(20.0f, 0.0f, 15.0f)); auto* screenObject = screenNode->CreateComponent<StaticModel>(); screenObject->SetModel(cache->GetResource<Model>("Models/Plane.mdl")); VGFrameBuffer* vgFrameBuffer = scene_->CreateComponent<VGFrameBuffer>(); vgFrameBuffer->CreateFrameBuffer(1024, 1024); vgFrameBuffer->SetClearColor(Color(0.4, 0.4, 0.4, 1.0)); vgFrameBuffer->EnableRenderEvents(); // Create a new material from scratch, use the diffuse unlit technique, assign the render texture // as its diffuse texture, then assign the material to the screen plane object SharedPtr<Material> renderMaterial(new Material(context_)); renderMaterial->SetTechnique(0, cache->GetResource<Technique>("Techniques/DiffUnlit.xml")); renderMaterial->SetTexture(TU_DIFFUSE, vgFrameBuffer->GetRenderTarget()); // Since the screen material is on top of the box model and may Z-fight, use negative depth bias // to push it forward (particularly necessary on mobiles with possibly less Z resolution) renderMaterial->SetDepthBias(BiasParameters(-0.001f, 0.0f)); screenObject->SetMaterial(renderMaterial); } // Create a scene node for the camera, which we will move around // The camera will use default settings (1000 far clip distance, 45 degrees FOV, set aspect ratio automatically) cameraNode_ = scene_->CreateChild("Camera"); cameraNode_->CreateComponent<Camera>(); // Set an initial position for the camera scene node above the plane cameraNode_->SetPosition(Vector3(0.0f, 7.0f, -30.0f)); } void NonoVG::SetupViewport() { auto* renderer = GetSubsystem<Renderer>(); // Set up a viewport to the Renderer subsystem so that the 3D scene can be seen. We need to define the scene and the // camera at minimum. Additionally we could configure the viewport screen size and the rendering path (eg. forward / // deferred) to use, but now we just use full screen and default render path configured in the engine command line // options SharedPtr<Viewport> viewport(new Viewport(context_, scene_, cameraNode_->GetComponent<Camera>())); renderer->SetViewport(0, viewport); } void NonoVG::InitControls() { auto* graphics = GetSubsystem<Graphics>(); NanoVG* nvg = GetSubsystem<NanoVG>(); SharedPtr<Window> window_ = InitWindow(); VGCanvas * vgCanvas = window_->CreateChild<VGCanvas>("VGCanvas"); vgCanvas->SetClearColor(Color(0.5,0.5,0.5,1.0)); window_ = InitWindow(); vgCanvas = window_->CreateChild<VGCanvas>("VGCanvas2"); vgCanvas->SetClearColor(Color(0.5, 0.5, 0.5, 1.0)); window_->SetPosition(200, 200); vgComponents_.Clear(); SharedPtr<VGComponent> vgComponent = VGComponent::Create(scene_, "vgComponentRoot"); vgComponents_.Push(vgComponent); vgComponent = vgComponent->CreateChild("vgComponentChild"); vgComponents_.Push(vgComponent); vgComponent = vgComponent->CreateChild("vgComponentChild2"); vgComponents_.Push(vgComponent); vgComponent = vgComponent->CreateChild("vgComponentChild3"); vgComponents_.Push(vgComponent); /* window_ = InitWindow(); int winSize = Min(graphics->GetWidth() / 2.0, graphics->GetHeight() / 2.0); window_->SetMinWidth(winSize); window_->SetMinHeight(winSize); window_->SetWidth(winSize); window_->SetHeight(winSize); Sprite * sprite = window_->CreateChild<Sprite>("SVGSprite"); svgTexture = nvg->LoadSVGIntoTexture("nanosvg/23_modified.svg"); sprite->SetTexture(svgTexture); window_->SetPosition(300, 300); */ } SharedPtr<Window> NonoVG::InitWindow() { // Create the Window and add it to the UI's root node /// The Window. SharedPtr<Window> window_(new Window(context_)); uiRoot_->AddChild(window_); auto* graphics = GetSubsystem<Graphics>(); // Set Window size and layout settings window_->SetMinWidth(graphics->GetWidth() / 1.5); window_->SetMinHeight(graphics->GetHeight() / 1.5); window_->SetLayout(LM_VERTICAL, 6, IntRect(6, 6, 6, 6)); window_->SetAlignment(HA_LEFT, VA_TOP); window_->SetName("NanoVG Window"); window_->SetMovable(true); window_->SetResizable(true); window_->SetFocusMode(FocusMode::FM_FOCUSABLE); // Create Window 'titlebar' container auto* titleBar = new UIElement(context_); titleBar->SetMinSize(0, 24); titleBar->SetMaxHeight(24); titleBar->SetVerticalAlignment(VA_TOP); titleBar->SetLayoutMode(LM_HORIZONTAL); // Create the Window title Text auto* windowTitle = new Text(context_); windowTitle->SetName("WindowTitle"); windowTitle->SetText("Hello NanoVG!"); // Create the Window's close button auto* buttonClose = new Button(context_); buttonClose->SetName("CloseButton"); // Add the controls to the title bar titleBar->AddChild(windowTitle); titleBar->AddChild(buttonClose); // Add the title bar to the Window window_->AddChild(titleBar); // Apply styles window_->SetStyleAuto(); windowTitle->SetStyleAuto(); buttonClose->SetStyle("CloseButton"); return window_; } void NonoVG::MoveCamera(float timeStep) { // Do not move if the UI has a focused element (the console) if (GetSubsystem<UI>()->GetFocusElement()) return; auto* input = GetSubsystem<Input>(); // Movement speed as world units per second const float MOVE_SPEED = 20.0f; // Mouse sensitivity as degrees per pixel const float MOUSE_SENSITIVITY = 0.1f; // Use this frame's mouse motion to adjust camera node yaw and pitch. Clamp the pitch between -90 and 90 degrees IntVector2 mouseMove = input->GetMouseMove(); yaw_ += MOUSE_SENSITIVITY * mouseMove.x_; pitch_ += MOUSE_SENSITIVITY * mouseMove.y_; pitch_ = Clamp(pitch_, -90.0f, 90.0f); // Construct new orientation for the camera scene node from yaw and pitch. Roll is fixed to zero cameraNode_->SetRotation(Quaternion(pitch_, yaw_, 0.0f)); // Read WASD keys and move the camera scene node to the corresponding direction if they are pressed // Use the Translate() function (default local space) to move relative to the node's orientation. if (input->GetKeyDown(KEY_W)) cameraNode_->Translate(Vector3::FORWARD * MOVE_SPEED * timeStep); if (input->GetKeyDown(KEY_S)) cameraNode_->Translate(Vector3::BACK * MOVE_SPEED * timeStep); if (input->GetKeyDown(KEY_A)) cameraNode_->Translate(Vector3::LEFT * MOVE_SPEED * timeStep); if (input->GetKeyDown(KEY_D)) cameraNode_->Translate(Vector3::RIGHT * MOVE_SPEED * timeStep); } void NonoVG::SubscribeToEvents() { // Subscribe HandleUpdate() function for processing update events SubscribeToEvent(E_UPDATE, URHO3D_HANDLER(NonoVG, HandleUpdate)); SubscribeToEvent(E_VGRENDER, URHO3D_HANDLER(NonoVG, HandleNVGRender)); SubscribeToEvent(E_VGFBRENDER, URHO3D_HANDLER(NonoVG, HandleVGFBRender)); } void NonoVG::HandleUpdate(StringHash eventType, VariantMap& eventData) { using namespace Update; // Take the frame time step, which is stored as a float float timeStep = eventData[P_TIMESTEP].GetFloat(); time_ += timeStep; // Move the camera, scale movement with time step MoveCamera(timeStep); } void NonoVG::HandleNVGRender(StringHash eventType, VariantMap& eventData) { using namespace VGRender; VGElement* nanoVGUIElement = static_cast<VGElement*>(eventData[P_VGELEMENT].GetPtr()); IntVector2 size = nanoVGUIElement->GetSize(); String canvasName = nanoVGUIElement->GetName(); if (canvasName == "VGCanvas") { renderVGElement(nanoVGUIElement, 0, 0, size.x_, size.y_, time_, 0, &demoData_); } if (canvasName == "VGCanvas2") { RenderVGComponents(); } } void NonoVG::RenderVGComponents() { NanoVG* nvg = GetSubsystem<NanoVG>(); VGFrameBuffer* frameBuffer = nvg->GetCurrentFrameBuffer(); if (frameBuffer == nullptr) return; IntVector2 frameBufferSize = frameBuffer->GetSize(); int screenWidth = frameBufferSize.x_; int screenHeight = frameBufferSize.y_; // Urho takes the angles in degrees , as oppesed to nanovg which takes them in radians float rotation = time_ * 90; for (VGComponent * vgComponent : vgComponents_) { String name = vgComponent->GetName(); if (name == "vgComponentRoot") { float width = screenWidth * 0.04; float height = screenWidth * 0.02; float hotspot_x = width / 2.0; float hotspot_y = height / 2.0; vgComponent->BeginDraw(); NVGpaint bg = vgComponent->LinearGradient(0, 0, 60, 30, nvgRGBA(255, 255, 255, 32), nvgRGBA(0, 0, 0, 32)); vgComponent->SetPosition(screenWidth / 2.0, screenHeight/2.0); vgComponent->SetRotation(rotation); // vgComponent->SetScale(2.0f, 1.0f); vgComponent->BeginPath(); vgComponent->Ellipse(width, height); vgComponent->SetHotSpot(hotspot_x, hotspot_y); vgComponent->FillColor(nvgRGBA(0, 96, 128, 255)); vgComponent->Fill(); vgComponent->FillPaint(bg); vgComponent->Fill(); vgComponent->EndDraw(); } else if (name == "vgComponentChild") { float width = screenWidth * 0.1; float height = screenWidth * 0.1; float hotspot_x = width / 2.0; float hotspot_y = height / 2.0; vgComponent->BeginDraw(); /*position is set relative to the parent ,vgComponentRoot */ vgComponent->SetPosition(screenWidth * 0.17, screenHeight * 0.17); vgComponent->SetRotation(-2 * rotation); vgComponent->SetHotSpot(hotspot_x, hotspot_y); drawColorwheelOnVGComponent(vgComponent, 0, 0, width, height, 0); vgComponent->EndDraw(); } else if (name == "vgComponentChild2") { float width = screenWidth * 0.02; float height = screenWidth * 0.02; float hotspot_x = width / 2.0; float hotspot_y = height / 2.0; vgComponent->BeginDraw(); NVGpaint bg = vgComponent->LinearGradient(0, 0, 15, 30, nvgRGBA(255, 255, 255, 32), nvgRGBA(0, 0, 0, 32)); /*position is set relative to the parent ,vgComponentChild */ vgComponent->SetPosition(screenWidth * 0.17, screenHeight * 0.17); vgComponent->SetRotation(2 * rotation); vgComponent->BeginPath(); vgComponent->RoundedRect(width, height, 3); vgComponent->SetHotSpot(hotspot_x, hotspot_y); vgComponent->FillColor(nvgRGBA(125, 45, 200, 255)); vgComponent->Fill(); vgComponent->FillPaint(bg); vgComponent->Fill(); vgComponent->EndDraw(); } else if (name == "vgComponentChild3") { float width = screenWidth * 0.07; float height = screenWidth * 0.07; float hotspot_x = width / 2.0; float hotspot_y = height / 2.0; vgComponent->BeginDraw(); /*position is set relative to the parent ,vgComponentChild2 */ vgComponent->SetPosition(screenWidth * 0.03, screenHeight * 0.03); vgComponent->SetRotation(-rotation); NVGpaint imgPaint = vgComponent->ImagePattern(0, 0, width, height, 0, demoData_.svgImage, 1.0); vgComponent->BeginPath(); vgComponent->RoundedRect(width, width, 3); vgComponent->SetHotSpot(hotspot_x, hotspot_y); vgComponent->FillPaint(imgPaint); vgComponent->Fill(); vgComponent->EndDraw(); } } } void NonoVG::HandleVGFBRender(StringHash eventType, VariantMap& eventData) { using namespace VGFBRender; VGFrameBuffer* vgFrameBuffer = static_cast<VGFrameBuffer*>(eventData[P_VGFRAMEBUFFER].GetPtr()); IntVector2 size = vgFrameBuffer->GetSize(); renderVGFrameBuffer(vgFrameBuffer, 0, 0, size.x_, size.y_, time_, 0, &demoData_); } void NonoVG::Stop() { Sample::Stop(); NanoVG* nvg = GetSubsystem<NanoVG>(); if (nvg) { nvg->Clear(); } svgTexture.Reset(); }
38.289575
120
0.680851
elix22
dfeb8c9b4d6274e1a67b7fc3a1f69d5c8e66fb53
9,288
cc
C++
google/cloud/baremetalsolution/bare_metal_solution_connection.cc
GoogleCloudPlatform/google-cloud-cpp
c4fc35de9e15f95b1dbf585f1c96de5dba609e2b
[ "Apache-2.0" ]
80
2017-11-24T00:19:45.000Z
2019-01-25T10:24:33.000Z
google/cloud/baremetalsolution/bare_metal_solution_connection.cc
GoogleCloudPlatform/google-cloud-cpp
c4fc35de9e15f95b1dbf585f1c96de5dba609e2b
[ "Apache-2.0" ]
1,579
2017-11-24T01:01:21.000Z
2019-01-28T23:41:21.000Z
google/cloud/baremetalsolution/bare_metal_solution_connection.cc
GoogleCloudPlatform/google-cloud-cpp
c4fc35de9e15f95b1dbf585f1c96de5dba609e2b
[ "Apache-2.0" ]
51
2017-11-24T00:56:11.000Z
2019-01-18T20:35:02.000Z
// Copyright 2022 Google LLC // // 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 // // https://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. // Generated by the Codegen C++ plugin. // If you make any local changes, they will be lost. // source: google/cloud/baremetalsolution/v2/baremetalsolution.proto #include "google/cloud/baremetalsolution/bare_metal_solution_connection.h" #include "google/cloud/baremetalsolution/bare_metal_solution_options.h" #include "google/cloud/baremetalsolution/internal/bare_metal_solution_connection_impl.h" #include "google/cloud/baremetalsolution/internal/bare_metal_solution_option_defaults.h" #include "google/cloud/baremetalsolution/internal/bare_metal_solution_stub_factory.h" #include "google/cloud/background_threads.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/pagination_range.h" #include <memory> namespace google { namespace cloud { namespace baremetalsolution { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN BareMetalSolutionConnection::~BareMetalSolutionConnection() = default; StreamRange<google::cloud::baremetalsolution::v2::Instance> BareMetalSolutionConnection::ListInstances( google::cloud::baremetalsolution::v2:: ListInstancesRequest) { // NOLINT(performance-unnecessary-value-param) return google::cloud::internal::MakeUnimplementedPaginationRange< StreamRange<google::cloud::baremetalsolution::v2::Instance>>(); } StatusOr<google::cloud::baremetalsolution::v2::Instance> BareMetalSolutionConnection::GetInstance( google::cloud::baremetalsolution::v2::GetInstanceRequest const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } future<StatusOr<google::cloud::baremetalsolution::v2::ResetInstanceResponse>> BareMetalSolutionConnection::ResetInstance( google::cloud::baremetalsolution::v2::ResetInstanceRequest const&) { return google::cloud::make_ready_future< StatusOr<google::cloud::baremetalsolution::v2::ResetInstanceResponse>>( Status(StatusCode::kUnimplemented, "not implemented")); } StreamRange<google::cloud::baremetalsolution::v2::Volume> BareMetalSolutionConnection::ListVolumes( google::cloud::baremetalsolution::v2:: ListVolumesRequest) { // NOLINT(performance-unnecessary-value-param) return google::cloud::internal::MakeUnimplementedPaginationRange< StreamRange<google::cloud::baremetalsolution::v2::Volume>>(); } StatusOr<google::cloud::baremetalsolution::v2::Volume> BareMetalSolutionConnection::GetVolume( google::cloud::baremetalsolution::v2::GetVolumeRequest const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } future<StatusOr<google::cloud::baremetalsolution::v2::Volume>> BareMetalSolutionConnection::UpdateVolume( google::cloud::baremetalsolution::v2::UpdateVolumeRequest const&) { return google::cloud::make_ready_future< StatusOr<google::cloud::baremetalsolution::v2::Volume>>( Status(StatusCode::kUnimplemented, "not implemented")); } StreamRange<google::cloud::baremetalsolution::v2::Network> BareMetalSolutionConnection::ListNetworks( google::cloud::baremetalsolution::v2:: ListNetworksRequest) { // NOLINT(performance-unnecessary-value-param) return google::cloud::internal::MakeUnimplementedPaginationRange< StreamRange<google::cloud::baremetalsolution::v2::Network>>(); } StatusOr<google::cloud::baremetalsolution::v2::Network> BareMetalSolutionConnection::GetNetwork( google::cloud::baremetalsolution::v2::GetNetworkRequest const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } StreamRange<google::cloud::baremetalsolution::v2::SnapshotSchedulePolicy> BareMetalSolutionConnection::ListSnapshotSchedulePolicies( google::cloud::baremetalsolution::v2:: ListSnapshotSchedulePoliciesRequest) { // NOLINT(performance-unnecessary-value-param) return google::cloud::internal::MakeUnimplementedPaginationRange<StreamRange< google::cloud::baremetalsolution::v2::SnapshotSchedulePolicy>>(); } StatusOr<google::cloud::baremetalsolution::v2::SnapshotSchedulePolicy> BareMetalSolutionConnection::GetSnapshotSchedulePolicy( google::cloud::baremetalsolution::v2:: GetSnapshotSchedulePolicyRequest const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } StatusOr<google::cloud::baremetalsolution::v2::SnapshotSchedulePolicy> BareMetalSolutionConnection::CreateSnapshotSchedulePolicy( google::cloud::baremetalsolution::v2:: CreateSnapshotSchedulePolicyRequest const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } StatusOr<google::cloud::baremetalsolution::v2::SnapshotSchedulePolicy> BareMetalSolutionConnection::UpdateSnapshotSchedulePolicy( google::cloud::baremetalsolution::v2:: UpdateSnapshotSchedulePolicyRequest const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } Status BareMetalSolutionConnection::DeleteSnapshotSchedulePolicy( google::cloud::baremetalsolution::v2:: DeleteSnapshotSchedulePolicyRequest const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } StatusOr<google::cloud::baremetalsolution::v2::VolumeSnapshot> BareMetalSolutionConnection::CreateVolumeSnapshot( google::cloud::baremetalsolution::v2::CreateVolumeSnapshotRequest const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } future<StatusOr<google::cloud::baremetalsolution::v2::VolumeSnapshot>> BareMetalSolutionConnection::RestoreVolumeSnapshot( google::cloud::baremetalsolution::v2::RestoreVolumeSnapshotRequest const&) { return google::cloud::make_ready_future< StatusOr<google::cloud::baremetalsolution::v2::VolumeSnapshot>>( Status(StatusCode::kUnimplemented, "not implemented")); } Status BareMetalSolutionConnection::DeleteVolumeSnapshot( google::cloud::baremetalsolution::v2::DeleteVolumeSnapshotRequest const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } StatusOr<google::cloud::baremetalsolution::v2::VolumeSnapshot> BareMetalSolutionConnection::GetVolumeSnapshot( google::cloud::baremetalsolution::v2::GetVolumeSnapshotRequest const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } StreamRange<google::cloud::baremetalsolution::v2::VolumeSnapshot> BareMetalSolutionConnection::ListVolumeSnapshots( google::cloud::baremetalsolution::v2:: ListVolumeSnapshotsRequest) { // NOLINT(performance-unnecessary-value-param) return google::cloud::internal::MakeUnimplementedPaginationRange< StreamRange<google::cloud::baremetalsolution::v2::VolumeSnapshot>>(); } StatusOr<google::cloud::baremetalsolution::v2::Lun> BareMetalSolutionConnection::GetLun( google::cloud::baremetalsolution::v2::GetLunRequest const&) { return Status(StatusCode::kUnimplemented, "not implemented"); } StreamRange<google::cloud::baremetalsolution::v2::Lun> BareMetalSolutionConnection::ListLuns( google::cloud::baremetalsolution::v2:: ListLunsRequest) { // NOLINT(performance-unnecessary-value-param) return google::cloud::internal::MakeUnimplementedPaginationRange< StreamRange<google::cloud::baremetalsolution::v2::Lun>>(); } std::shared_ptr<BareMetalSolutionConnection> MakeBareMetalSolutionConnection( Options options) { internal::CheckExpectedOptions<CommonOptionList, GrpcOptionList, BareMetalSolutionPolicyOptionList>(options, __func__); options = baremetalsolution_internal::BareMetalSolutionDefaultOptions( std::move(options)); auto background = internal::MakeBackgroundThreadsFactory(options)(); auto stub = baremetalsolution_internal::CreateDefaultBareMetalSolutionStub( background->cq(), options); return std::make_shared< baremetalsolution_internal::BareMetalSolutionConnectionImpl>( std::move(background), std::move(stub), std::move(options)); } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace baremetalsolution } // namespace cloud } // namespace google namespace google { namespace cloud { namespace baremetalsolution_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN std::shared_ptr<baremetalsolution::BareMetalSolutionConnection> MakeBareMetalSolutionConnection(std::shared_ptr<BareMetalSolutionStub> stub, Options options) { options = BareMetalSolutionDefaultOptions(std::move(options)); auto background = internal::MakeBackgroundThreadsFactory(options)(); return std::make_shared< baremetalsolution_internal::BareMetalSolutionConnectionImpl>( std::move(background), std::move(stub), std::move(options)); } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace baremetalsolution_internal } // namespace cloud } // namespace google
43
94
0.778208
GoogleCloudPlatform
dfeec959a6ac004088e326a95d987644c70b9f92
514
cpp
C++
2014/node.cpp
Yww729604/XidianCodeTest
bf99657fc58718f1edd2e91291420ee5e2c58d21
[ "MIT" ]
1
2022-02-05T16:37:13.000Z
2022-02-05T16:37:13.000Z
2014/node.cpp
Yww729604/XidianCodeTest
bf99657fc58718f1edd2e91291420ee5e2c58d21
[ "MIT" ]
null
null
null
2014/node.cpp
Yww729604/XidianCodeTest
bf99657fc58718f1edd2e91291420ee5e2c58d21
[ "MIT" ]
null
null
null
#include <bits/stdc++.h> using namespace std; typedef struct node { int data; string s; string t; struct node *next; }*linkList; void init(linkList &l) { int d; while(cin>>d) { linkList tempNode = (linkList)malloc(sizeof(struct node)); tempNode->data = d; tempNode->next = l; l = tempNode; } } void print(linkList l) { linkList p = l; while(p != NULL) { cout<<p->data<<" "; p = p->next; } } int main(int argc, char const *argv[]) { linkList l = NULL; init(l); print(l); return 0; }
12.536585
60
0.61284
Yww729604
dff59b9ba2b8df0fac9d4e7cb4fa9a32b92fe8b2
12,610
cpp
C++
cplusplus/level1_single_api/4_op_dev/1_custom_op/framework/tf_scope_fusion_pass/decode_bbox_v2_multi_pass.cpp
Dedederek/samples
31d99de20af2f7046556e0f48c4b789b99e422f8
[ "Apache-2.0" ]
25
2020-11-20T09:01:35.000Z
2022-03-29T10:35:38.000Z
cplusplus/level1_single_api/4_op_dev/1_custom_op/framework/tf_scope_fusion_pass/decode_bbox_v2_multi_pass.cpp
Dedederek/samples
31d99de20af2f7046556e0f48c4b789b99e422f8
[ "Apache-2.0" ]
5
2021-02-28T20:49:37.000Z
2022-03-04T21:50:27.000Z
cplusplus/level1_single_api/4_op_dev/1_custom_op/framework/tf_scope_fusion_pass/decode_bbox_v2_multi_pass.cpp
Dedederek/samples
31d99de20af2f7046556e0f48c4b789b99e422f8
[ "Apache-2.0" ]
16
2020-12-06T07:26:13.000Z
2022-03-01T07:51:55.000Z
/* Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the Apache License Version 2.0. * You may not use this file except in compliance with the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * Apache License for more details at * http://www.apache.org/licenses/LICENSE-2.0 */ #include "decode_bbox_v2_multi_pass.h" #define OP_LOGE(OP_NAME, fmt, ...) printf("[ERROR]%s,%s:%u:" #fmt "\n", __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__) #define OP_LOGW(OP_NAME, fmt, ...) printf("[WARN]%s,%s:%u:" #fmt "\n", __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__) #define OP_LOGI(OP_NAME, fmt, ...) printf("[INFO]%s,%s:%u:" #fmt "\n", __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__) namespace ge { namespace { const char *const kScopeType = "DecodeBboxV2"; const char *const kScopeTypeDecodeBboxV2 = "DecodeBboxV2"; const char *const kOpType = "DecodeBboxV2"; const char *const kBoxesUnpack = "/unstack"; const char *const kBoxesDiv = "RealDiv"; const size_t kRealDivInputSize = 2; const size_t kScaleSize = 4; } // namespace std::vector<ScopeFusionPatterns> DecodeBboxV2MultiScopeFusionPass::DefinePatterns() { std::vector<ScopeFusionPatterns> patterns_list; ScopeFusionPatterns pattern; GenScopePatterns(pattern); patterns_list.push_back(pattern); return patterns_list; } void DecodeBboxV2MultiScopeFusionPass::GenScopePatterns(ScopeFusionPatterns &patterns) { std::vector<ScopePattern *> batch; ScopePattern *decode_bbox_v2_pattern = new(std::nothrow) ScopePattern(); if (decode_bbox_v2_pattern == nullptr) { OP_LOGE(kOpType, "Alloc an object failed."); return; } decode_bbox_v2_pattern->SetSubType(kScopeTypeDecodeBboxV2); decode_bbox_v2_pattern->AddNodeOpTypeFeature(NodeOpTypeFeature("Exp", 2, 0)); // Exp num is 2 decode_bbox_v2_pattern->AddNodeOpTypeFeature(NodeOpTypeFeature("Mul", 4, 0)); // Mul num is 4 decode_bbox_v2_pattern->AddNodeOpTypeFeature(NodeOpTypeFeature("Sub", 4, 0)); // Sub num is 4 decode_bbox_v2_pattern->AddNodeOpTypeFeature(NodeOpTypeFeature("RealDiv", 0, 2)); // RealDiv num is 2*n decode_bbox_v2_pattern->AddNodeOpTypeFeature(NodeOpTypeFeature("Unpack", 2, 0)); // Unpack num is 2 decode_bbox_v2_pattern->AddNodeOpTypeFeature(NodeOpTypeFeature("Pack", 1, 0)); // Pack num is 1 decode_bbox_v2_pattern->AddNodeOpTypeFeature(NodeOpTypeFeature("Transpose", 3, 0)); // Transpose num is 3 decode_bbox_v2_pattern->AddNodeOpTypeFeature(NodeOpTypeFeature("Softmax", -1, 0)); // doesn't have Softmax OP_LOGI(kOpType, "Add GenScopePatterns DecodeBboxV2."); batch.push_back(decode_bbox_v2_pattern); patterns.push_back(batch); } std::string DecodeBboxV2MultiScopeFusionPass::PassName() { return std::string("DecodeBboxV2MultiScopeFusionPass"); } Status DecodeBboxV2MultiScopeFusionPass::LastMatchScopesAndOPs(shared_ptr<ScopeGraph> &scope_graph, std::vector<ScopesResult> &results) { OP_LOGI(kOpType, "LastMatchScopesAndOPs start."); if (scope_graph == nullptr) { OP_LOGE(kOpType, "Input params is nullptr."); return FAILED; } const ScopeTree *scope_tree = scope_graph->GetScopeTree(); if (scope_tree == nullptr) { OP_LOGE(kOpType, "Scope tree is nullptr."); return FAILED; } const std::vector<Scope *> &scopes = scope_tree->GetAllScopes(); for (auto &scope : scopes) { // Class ScopeTree guarantees scope is not empty. AscendString op_subtype; Status ret = scope->SubType(op_subtype); if (ret != SUCCESS) { return FAILED; } AscendString op_name; ret = scope->Name(op_name); if (ret != SUCCESS) { return FAILED; } if (op_subtype == kScopeTypeDecodeBboxV2) { OP_LOGI(kOpType, "DecodeBbox LastMatchScopesAndOPs match scope %s.", op_name.GetString()); ScopesResult result; std::vector<Scope *> result_scopes; result_scopes.push_back(scope); result.SetScopes(result_scopes); std::vector<ge::OperatorPtr> nodes; std::unordered_map<AscendString, ge::OperatorPtr> nodes_map; ret = scope->AllNodesMap(nodes_map); if (ret != SUCCESS) { return FAILED; } for (const auto &node_info : nodes_map) { nodes.emplace_back(node_info.second); } result.SetNodes(nodes); results.push_back(result); } } return (!(results.empty())) ? SUCCESS : FAILED; } namespace { Status ParseFloatFromConstNode(const ge::OperatorPtr node, float &value) { if (node == nullptr) { return FAILED; } ge::Tensor tensor; auto ret = node->GetAttr("value", tensor); if (ret != ge::GRAPH_SUCCESS) { AscendString op_name; ret = node->GetName(op_name); if (ret != ge::GRAPH_SUCCESS) { return FAILED; } OP_LOGE(kOpType, "Failed to get value from %s", op_name.GetString()); return FAILED; } uint8_t *data_addr = tensor.GetData(); value = *(reinterpret_cast<float *>(data_addr)); return SUCCESS; } Status DecodeBboxV2ParseParams(const std::vector<ge::OperatorPtr> &inside_nodes, ge::Operator *op_dest) { if (op_dest == nullptr) { OP_LOGE(kOpType, "Dest operator is nullptr."); return FAILED; } std::map<std::string, std::string> scales_const_name_map; std::map<string, ge::OperatorPtr> node_map; for (const auto &node : inside_nodes) { if (node == nullptr) { OP_LOGE(kOpType, "Inner operator is nullptr."); return FAILED; } AscendString op_type; graphStatus ret = node->GetOpType(op_type); if (ret != ge::GRAPH_SUCCESS) { return FAILED; } ge::AscendString op_name; ret = node->GetName(op_name); string str_op_name; if (op_name.GetString() != nullptr) { str_op_name = op_name.GetString(); } if (op_type == kBoxesDiv) { if (node->GetInputsSize() < kRealDivInputSize) { OP_LOGE(kOpType, "Input size of %s is invalid, which is %zu.", kBoxesDiv, node->GetInputsSize()); return FAILED; } ge::AscendString input_unpack_name0; ret = node->GetInputDesc(0).GetName(input_unpack_name0); string str_input_unpack_name0; if (input_unpack_name0.GetString() != nullptr) { str_input_unpack_name0 = input_unpack_name0.GetString(); } ge::AscendString input_unpack_name1; ret = node->GetInputDesc(1).GetName(input_unpack_name1); string str_input_unpack_name1; if (input_unpack_name1.GetString() != nullptr) { str_input_unpack_name1 = input_unpack_name1.GetString(); } if (str_input_unpack_name0.find(kBoxesUnpack) != string::npos) { scales_const_name_map.insert({str_op_name, str_input_unpack_name1}); } } node_map[str_op_name] = node; } std::vector<float> scales_list = {1.0, 1.0, 1.0, 1.0}; if (scales_const_name_map.size() != kScaleSize) { OP_LOGI(op_dest->GetName().c_str(), "Boxes doesn't need scale."); } else { size_t i = 0; for (const auto &name_pair : scales_const_name_map) { float scale_value = 1.0; auto ret = ParseFloatFromConstNode(node_map[name_pair.second], scale_value); if (ret != SUCCESS) { return ret; } scales_list[i++] = scale_value; } } op_dest->SetAttr("scales", scales_list); return SUCCESS; } } // namespace void DecodeBboxV2MultiScopeFusionPass::GenerateFusionResult(const std::vector<Scope *> &scopes, FusionScopesResult *fusion_rlt) { if (fusion_rlt == nullptr) { return; } if (scopes.size() != 1) { // not match, set fusion_rlt->SetType(kScopeInvalidType); return; } fusion_rlt->InsertInputs("transpose", {0, kFusionDisableIndex}); fusion_rlt->InsertInputs("get_center_coordinates_and_sizes/transpose", {1, kFusionDisableIndex}); fusion_rlt->InsertOutputs("transpose_1", {0}); fusion_rlt->SetType(kScopeToMultiNodes); AscendString scope_name; Status ret = scopes[0]->Name(scope_name); if (ret != SUCCESS) { return ; } std::string str_scope_name; if (scope_name != nullptr) { str_scope_name = scope_name.GetString(); } fusion_rlt->SetName(str_scope_name.substr(0, str_scope_name.length() - 1).c_str()); fusion_rlt->SetDescription(""); auto in_identity_0 = fusion_rlt->AddInnerNode("input_identity_0", "Identity"); CHECK_INNER_NODE_CONDITION(in_identity_0 != nullptr, fusion_rlt); ret = in_identity_0->InsertInput(kInputFromFusionScope, 0) .InsertOutput("inner_core_decode_bbox_v2", 0) .BuildInnerNode(); CHECK_INNER_NODE_CONDITION(ret == ge::GRAPH_SUCCESS, fusion_rlt); std::string str_attr = "input_0_identity_attr"; in_identity_0->MutableOperator()->SetAttr("key", str_attr); auto in_identity_1 = fusion_rlt->AddInnerNode("input_identity_1", "Identity"); CHECK_INNER_NODE_CONDITION(in_identity_1 != nullptr, fusion_rlt); ret = in_identity_1->InsertInput(kInputFromFusionScope, 1) .InsertOutput("inner_core_decode_bbox_v2", 1) .BuildInnerNode(); CHECK_INNER_NODE_CONDITION(ret == ge::GRAPH_SUCCESS, fusion_rlt); auto core_decode_bbox = fusion_rlt->AddInnerNode("inner_core_decode_bbox_v2", kScopeType); CHECK_INNER_NODE_CONDITION(core_decode_bbox != nullptr, fusion_rlt); ret = core_decode_bbox->InsertInput("input_identity_0", 0) .InsertInput("input_identity_1", 0) .InsertOutput("output_identity", 0) .BuildInnerNode(); CHECK_INNER_NODE_CONDITION(ret == ge::GRAPH_SUCCESS, fusion_rlt); auto parser_ret = DecodeBboxV2ParseParams(fusion_rlt->Nodes(), core_decode_bbox->MutableOperator()); CHECK_INNER_NODE_CONDITION(parser_ret == SUCCESS, fusion_rlt); auto out_identity = fusion_rlt->AddInnerNode("output_identity", "Identity"); CHECK_INNER_NODE_CONDITION(out_identity != nullptr, fusion_rlt); ret = out_identity->InsertInput("inner_core_decode_bbox_v2", 0) .InsertOutput(kOutputToFusionScope, 0) .BuildInnerNode(); CHECK_INNER_NODE_CONDITION(ret == ge::GRAPH_SUCCESS, fusion_rlt); ret = fusion_rlt->CheckInnerNodesInfo(); CHECK_INNER_NODE_CONDITION(ret == ge::GRAPH_SUCCESS, fusion_rlt); OP_LOGI(kOpType, "Set fusion multi-to-multi result successfully."); return; } REGISTER_SCOPE_FUSION_PASS("DecodeBboxV2MultiScopeFusionPass", DecodeBboxV2MultiScopeFusionPass, false); } // namespace ge
46.021898
120
0.589215
Dedederek
dffd810adde01422c379df331b7e6794ae00f53a
292
hpp
C++
fw/include/fw/BasicEffect.hpp
sienkiewiczkm/framework
9940403404aa5c67186fe09b0910de3a6c8e9762
[ "MIT" ]
null
null
null
fw/include/fw/BasicEffect.hpp
sienkiewiczkm/framework
9940403404aa5c67186fe09b0910de3a6c8e9762
[ "MIT" ]
9
2016-12-09T13:02:18.000Z
2019-09-13T09:29:18.000Z
fw/include/fw/BasicEffect.hpp
sienkiewiczkm/framework
9940403404aa5c67186fe09b0910de3a6c8e9762
[ "MIT" ]
null
null
null
#pragma once #include "Effect.hpp" namespace fw { class BasicEffect: public EffectBase { public: BasicEffect(); virtual ~BasicEffect(); void create(); virtual void destroy(); virtual void begin(); virtual void end(); protected: void createShaders(); }; }
12.166667
27
0.643836
sienkiewiczkm
dffef375e236877eca4d7bcfdbbc268ffc6ea653
4,319
cpp
C++
nTA/Source/igui_BuildButton.cpp
loganjones/nTA-Total-Annihilation-Clone
d7d0e4d33f1d452d17cf2fed2b2bcb7f6d7d4d14
[ "MIT" ]
2
2020-05-09T20:50:12.000Z
2021-06-20T08:34:58.000Z
nTA/Source/igui_BuildButton.cpp
loganjones/nTA-Total-Annihilation-Clone
d7d0e4d33f1d452d17cf2fed2b2bcb7f6d7d4d14
[ "MIT" ]
null
null
null
nTA/Source/igui_BuildButton.cpp
loganjones/nTA-Total-Annihilation-Clone
d7d0e4d33f1d452d17cf2fed2b2bcb7f6d7d4d14
[ "MIT" ]
2
2018-01-08T00:12:04.000Z
2020-06-14T10:56:50.000Z
// igui_BuildButton.cpp // \author Logan Jones ///////////////////////// \date 4/25/2002 /// \file /// \brief ... ///////////////////////////////////////////////////////////////////// #include "igui.h" #include "igui_BuildButton.h" #include "game.h" #include "snd.h" ///////////////////////////////////////////////////////////////////// // Default Construction/Destruction // igui_BuildButton::igui_BuildButton():gadget_Button() {} igui_BuildButton::~igui_BuildButton() {} // ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// // igui_BuildButton::OnInitButtonImages() // \author Logan Jones /////////////////////////////////////////// \date 11/5/2002 // //=================================================================== // void igui_BuildButton::OnInitButtonImages() { theInterface->ControlBar().LoadBuildButton( this, m_CommonData, m_ButtonInfo ); } // End igui_BuildButton::OnInitButtonImages() ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// // igui_BuildButton::OnRender() // \author Logan Jones ///////////////////////////////// \date 02-02-2003 // //=================================================================== // void igui_BuildButton::OnRender() { const igui_BuildOrders* pOrders = theInterface->ControlBar().m_CurrentSelection->BuildOrders(); int Amount; // Render the button first gadget_Button::OnRender(); // If the selected unit has build orders and those oreders include this item then render the amount info if( pOrders && (Amount=pOrders->Amount(m_CommonData.Name))!=0 ) { // Setup the info string depending on the amount (less than 0 indicates infinite) if( Amount>0 ) m_BuildText[0] = '+', itoa( Amount, m_BuildText+1, 10 ); else m_BuildText[0] = '~', m_BuildText[1] = '\0'; // Render the info gfx->SetCurrentFont( guiResources.Fonts.Standard ); gfx->RenderStringCenteredAt( m_ScreenPosition + std_Point(m_Size.width/2, m_Size.height-6) + (m_Pressed ? std_Point(1,1) : std_Point(0,0)), m_BuildText, TRUE, FALSE ); } } // End igui_BuildButton::OnRender() ///////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // igui_BuildButton::OnCursorMove() // \author Logan Jones ///////////////////////////////////// \date 5/1/2002 // //==================================================================== // Parameters: // std_Point& ptCursor - // DWORD dwFlags - // void igui_BuildButton::OnCursorMove( std_Point& ptCursor, DWORD dwFlags ) { // Call the default gadget_Button::OnCursorMove( ptCursor, dwFlags ); // Display the type information for the unit represented by this button theInterface->InfoBar().DisplayBuildInfo( theGame.Units.GetUnitType(m_CommonData.Name) ); } // End igui_BuildButton::OnCursorMove() ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // igui_BuildButton::OnPressed() // \author Logan Jones ////////////////////////////////// \date 4/27/2002 // //==================================================================== // Parameters: // DWORD dwButton - Button that completed the press // void igui_BuildButton::OnPressed( DWORD dwButton ) { // Send the pressed message //SendMessage( m_pParent, igui_msg_BuildButtonPressed, (DWORD)(LPTSTR(m_CommonData.Name)), dwButton ); sound.PlaySound( (dwButton==1) ? guiResources.Sounds.AddBuild : guiResources.Sounds.SubBuild ); theInterface->BuildButtonPressed( m_CommonData.Name, (m_CommonData.CommonAttribs&8)!=0, dwButton==1 ); } // End igui_BuildButton::OnPressed() ////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// // End - igui_BuildButton.cpp // ///////////////////////////////
37.556522
114
0.447094
loganjones
5f06d2639771912de5fc88bf84cdb7629ab6a5ff
471
hpp
C++
Proftaak2.4/AudioComponent.hpp
rubenwo/Proftaak2.4
c3231883cd2cd961fa1db5a27af65f36e8f3daa8
[ "MIT" ]
null
null
null
Proftaak2.4/AudioComponent.hpp
rubenwo/Proftaak2.4
c3231883cd2cd961fa1db5a27af65f36e8f3daa8
[ "MIT" ]
null
null
null
Proftaak2.4/AudioComponent.hpp
rubenwo/Proftaak2.4
c3231883cd2cd961fa1db5a27af65f36e8f3daa8
[ "MIT" ]
null
null
null
#ifndef AUDIO_COMPONENT_HPP #define AUDIO_COMPONENT_HPP #include "Component.h" #include <string> #include "SoundPlayer.hpp" class AudioComponent : public Component { public: AudioComponent(const SoundID& soundID); ~AudioComponent(); virtual void update(float elapsedTime) override; void playAudio(bool loop); void stopAudio(); private: SoundPlayer* soundPlayer; SoundID soundID; irrklang::ISound* sound; }; #endif // !AUDIO_COMPONENT_HPP
20.478261
50
0.740977
rubenwo
5f0b0bee274cc3e652992befca93a04e990ea2c6
18,825
cpp
C++
samples/Hello/third-party/fuzzylite/fuzzylite/src/rule/Antecedent.cpp
okocsis/ios-cmake
ca61d83725bc5b1a755928f4592badbd9a8b37f4
[ "BSD-3-Clause" ]
null
null
null
samples/Hello/third-party/fuzzylite/fuzzylite/src/rule/Antecedent.cpp
okocsis/ios-cmake
ca61d83725bc5b1a755928f4592badbd9a8b37f4
[ "BSD-3-Clause" ]
null
null
null
samples/Hello/third-party/fuzzylite/fuzzylite/src/rule/Antecedent.cpp
okocsis/ios-cmake
ca61d83725bc5b1a755928f4592badbd9a8b37f4
[ "BSD-3-Clause" ]
null
null
null
/* fuzzylite (R), a fuzzy logic control library in C++. Copyright (C) 2010-2017 FuzzyLite Limited. All rights reserved. Author: Juan Rada-Vilela, Ph.D. <jcrada@fuzzylite.com> This file is part of fuzzylite. fuzzylite is free software: you can redistribute it and/or modify it under the terms of the FuzzyLite License included with the software. You should have received a copy of the FuzzyLite License along with fuzzylite. If not, see <http://www.fuzzylite.com/license/>. fuzzylite is a registered trademark of FuzzyLite Limited. */ #include "fl/rule/Antecedent.h" #include "fl/Engine.h" #include "fl/factory/HedgeFactory.h" #include "fl/factory/FactoryManager.h" #include "fl/hedge/Any.h" #include "fl/rule/Expression.h" #include "fl/rule/Rule.h" #include "fl/term/Aggregated.h" #include "fl/variable/InputVariable.h" #include "fl/variable/OutputVariable.h" #include <stack> namespace fl { Antecedent::Antecedent() : _text(""), _expression(fl::null) { } Antecedent::~Antecedent() { _expression.reset(fl::null); } void Antecedent::setText(const std::string& text) { this->_text = text; } std::string Antecedent::getText() const { return this->_text; } Expression* Antecedent::getExpression() const { return this->_expression.get(); } void Antecedent::setExpression(Expression* expression) { this->_expression.reset(expression); } bool Antecedent::isLoaded() const { return _expression.get() != fl::null; } scalar Antecedent::activationDegree(const TNorm* conjunction, const SNorm* disjunction) const { return this->activationDegree(conjunction, disjunction, _expression.get()); } scalar Antecedent::activationDegree(const TNorm* conjunction, const SNorm* disjunction, const Expression* node) const { if (not isLoaded()) { throw Exception("[antecedent error] antecedent <" + getText() + "> is not loaded", FL_AT); } const Expression::Type expression = node->type(); if (expression == Expression::Proposition) { const Proposition* proposition = static_cast<const Proposition*> (node); if (not proposition->variable->isEnabled()) { return 0.0; } if (not proposition->hedges.empty()) { //if last hedge is "Any", apply hedges in reverse order and return degree std::vector<Hedge*>::const_reverse_iterator rit = proposition->hedges.rbegin(); if (dynamic_cast<Any*> (*rit)) { scalar result = (*rit)->hedge(fl::nan); while (++rit != proposition->hedges.rend()) { result = (*rit)->hedge(result); } return result; } } scalar result = fl::nan; Variable::Type variableType = proposition->variable->type(); if (variableType == Variable::Input) { result = proposition->term->membership(proposition->variable->getValue()); } else if (variableType == Variable::Output) { result = static_cast<OutputVariable*> (proposition->variable) ->fuzzyOutput()->activationDegree(proposition->term); } if (not proposition->hedges.empty()) { for (std::vector<Hedge*>::const_reverse_iterator rit = proposition->hedges.rbegin(); rit != proposition->hedges.rend(); ++rit) { result = (*rit)->hedge(result); } } return result; } //if node is an operator if (expression == Expression::Operator) { const Operator* fuzzyOperator = static_cast<const Operator*> (node); if (not (fuzzyOperator->left and fuzzyOperator->right)) { std::ostringstream ex; ex << "[syntax error] left and right operands must exist"; throw Exception(ex.str(), FL_AT); } if (fuzzyOperator->name == Rule::andKeyword()) { if (not conjunction) throw Exception("[conjunction error] " "the following rule requires a conjunction operator:\n" + _text, FL_AT); return conjunction->compute( this->activationDegree(conjunction, disjunction, fuzzyOperator->left), this->activationDegree(conjunction, disjunction, fuzzyOperator->right)); } if (fuzzyOperator->name == Rule::orKeyword()) { if (not disjunction) throw Exception("[disjunction error] " "the following rule requires a disjunction operator:\n" + _text, FL_AT); return disjunction->compute( this->activationDegree(conjunction, disjunction, fuzzyOperator->left), this->activationDegree(conjunction, disjunction, fuzzyOperator->right)); } std::ostringstream ex; ex << "[syntax error] operator <" << fuzzyOperator->name << "> not recognized"; throw Exception(ex.str(), FL_AT); } else { std::ostringstream ss; ss << "[antecedent error] expected a Proposition or Operator, but found <"; if (node) ss << node->toString(); ss << ">"; throw Exception(ss.str(), FL_AT); } } Complexity Antecedent::complexity(const TNorm* conjunction, const SNorm* disjunction) const { return complexity(conjunction, disjunction, _expression.get()); } Complexity Antecedent::complexity(const TNorm* conjunction, const SNorm* disjunction, const Expression* node) const { if (not isLoaded()) { return Complexity(); } Complexity result; const Expression::Type expression = node->type(); if (expression == Expression::Proposition) { const Proposition* proposition = static_cast<const Proposition*> (node); if (not proposition->variable->isEnabled()) { return result; } if (not proposition->hedges.empty()) { //if last hedge is "Any", apply hedges in reverse order and return degree std::vector<Hedge*>::const_reverse_iterator rit = proposition->hedges.rbegin(); if (dynamic_cast<Any*> (*rit)) { result += (*rit)->complexity(); while (++rit != proposition->hedges.rend()) { result = (*rit)->complexity(); } return result; } } Variable::Type variableType = proposition->variable->type(); if (variableType == Variable::Input) { result += proposition->term->complexity(); } else if (variableType == Variable::Output) { OutputVariable* outputVariable = static_cast<OutputVariable*> (proposition->variable); result += outputVariable->fuzzyOutput()->complexityOfActivationDegree(); } if (not proposition->hedges.empty()) { for (std::vector<Hedge*>::const_reverse_iterator rit = proposition->hedges.rbegin(); rit != proposition->hedges.rend(); ++rit) { result += (*rit)->complexity(); } } return result; } //if node is an operator if (expression == Expression::Operator) { const Operator* fuzzyOperator = static_cast<const Operator*> (node); if (not (fuzzyOperator->left and fuzzyOperator->right)) { std::ostringstream ex; ex << "[syntax error] left and right operands must exist"; throw Exception(ex.str(), FL_AT); } if (fuzzyOperator->name == Rule::andKeyword()) { if (conjunction) { result += conjunction->complexity(); } result += complexity(conjunction, disjunction, fuzzyOperator->left) + complexity(conjunction, disjunction, fuzzyOperator->right); return result; } if (fuzzyOperator->name == Rule::orKeyword()) { if (disjunction) { result += disjunction->complexity(); } result += complexity(conjunction, disjunction, fuzzyOperator->left) + complexity(conjunction, disjunction, fuzzyOperator->right); return result; } } return Complexity(); } void Antecedent::unload() { _expression.reset(fl::null); } void Antecedent::load(const Engine* engine) { load(getText(), engine); } void Antecedent::load(const std::string& antecedent, const Engine* engine) { FL_DBG("Antecedent: " << antecedent); unload(); setText(antecedent); if (Op::trim(antecedent).empty()) { throw Exception("[syntax error] antecedent is empty", FL_AT); } /* Builds an proposition tree from the antecedent of a fuzzy rule. The rules are: 1) After a variable comes 'is', 2) After 'is' comes a hedge or a term 3) After a hedge comes a hedge or a term 4) After a term comes a variable or an operator */ Function function; std::string postfix = function.toPostfix(antecedent); FL_DBG("Postfix: " << postfix); std::stringstream tokenizer(postfix); std::string token; enum FSM { S_VARIABLE = 1, S_IS = 2, S_HEDGE = 4, S_TERM = 8, S_AND_OR = 16 }; int state = S_VARIABLE; std::stack<Expression*> expressionStack; Proposition* proposition = fl::null; try { while (tokenizer >> token) { if (state bitand S_VARIABLE) { Variable* variable = fl::null; if (engine->hasInputVariable(token)) variable = engine->getInputVariable(token); else if (engine->hasOutputVariable(token)) variable = engine->getOutputVariable(token); if (variable) { proposition = new Proposition; proposition->variable = variable; expressionStack.push(proposition); state = S_IS; FL_DBG("Token <" << token << "> is variable"); continue; } } if (state bitand S_IS) { if (token == Rule::isKeyword()) { state = S_HEDGE bitor S_TERM; FL_DBG("Token <" << token << "> is keyword"); continue; } } if (state bitand S_HEDGE) { HedgeFactory* factory = FactoryManager::instance()->hedge(); if (factory->hasConstructor(token)) { Hedge* hedge = factory->constructObject(token); proposition->hedges.push_back(hedge); if (dynamic_cast<Any*> (hedge)) { state = S_VARIABLE bitor S_AND_OR; } else { state = S_HEDGE bitor S_TERM; } FL_DBG("Token <" << token << "> is hedge"); continue; } } if (state bitand S_TERM) { if (proposition->variable->hasTerm(token)) { proposition->term = proposition->variable->getTerm(token); state = S_VARIABLE bitor S_AND_OR; FL_DBG("Token <" << token << "> is term"); continue; } } if (state bitand S_AND_OR) { if (token == Rule::andKeyword() or token == Rule::orKeyword()) { if (expressionStack.size() < 2) { std::ostringstream ex; ex << "[syntax error] logical operator <" << token << "> expects two operands," << "but found <" << expressionStack.size() << "> in antecedent"; throw Exception(ex.str(), FL_AT); } Operator* fuzzyOperator = new Operator; fuzzyOperator->name = token; fuzzyOperator->right = expressionStack.top(); expressionStack.pop(); fuzzyOperator->left = expressionStack.top(); expressionStack.pop(); expressionStack.push(fuzzyOperator); state = S_VARIABLE bitor S_AND_OR; FL_DBG("Subtree: " << fuzzyOperator->toString() << "(" << fuzzyOperator->left->toString() << ") " << "(" << fuzzyOperator->right->toString() << ")"); continue; } } //If reached this point, there was an error if ((state bitand S_VARIABLE) or (state bitand S_AND_OR)) { std::ostringstream ex; ex << "[syntax error] antecedent expected variable or logical operator, but found <" << token << ">"; throw Exception(ex.str(), FL_AT); } if (state bitand S_IS) { std::ostringstream ex; ex << "[syntax error] antecedent expected keyword <" << Rule::isKeyword() << ">, but found <" << token << ">"; throw Exception(ex.str(), FL_AT); } if ((state bitand S_HEDGE) or (state bitand S_TERM)) { std::ostringstream ex; ex << "[syntax error] antecedent expected hedge or term, but found <" << token << ">"; throw Exception(ex.str(), FL_AT); } std::ostringstream ex; ex << "[syntax error] unexpected token <" << token << "> in antecedent"; throw Exception(ex.str(), FL_AT); } if (not ((state bitand S_VARIABLE) or (state bitand S_AND_OR))) { //only acceptable final state if (state bitand S_IS) { std::ostringstream ex; ex << "[syntax error] antecedent expected keyword <" << Rule::isKeyword() << "> after <" << token << ">"; throw Exception(ex.str(), FL_AT); } if ((state bitand S_HEDGE) or (state bitand S_TERM)) { std::ostringstream ex; ex << "[syntax error] antecedent expected hedge or term after <" << token << ">"; throw Exception(ex.str(), FL_AT); } } if (expressionStack.size() != 1) { std::vector<std::string> errors; while (expressionStack.size() > 1) { Expression* expression = expressionStack.top(); expressionStack.pop(); errors.push_back(expression->toString()); delete expression; } std::ostringstream ex; ex << "[syntax error] unable to parse the following expressions in antecedent <" << Op::join(errors, " ") << ">"; throw Exception(ex.str(), FL_AT); } } catch (...) { for (std::size_t i = 0; i < expressionStack.size(); ++i) { delete expressionStack.top(); expressionStack.pop(); } throw; } setExpression(expressionStack.top()); } std::string Antecedent::toString() const { return toInfix(getExpression()); } std::string Antecedent::toPrefix(const Expression* node) const { if (not isLoaded()) { throw Exception("[antecedent error] antecedent <" + _text + "> is not loaded", FL_AT); } if (not node) node = getExpression(); if (dynamic_cast<const Proposition*> (node)) { return node->toString(); } std::stringstream ss; if (const Operator * fuzzyOperator = dynamic_cast<const Operator*> (node)) { ss << fuzzyOperator->toString() << " " << toPrefix(fuzzyOperator->left) << " " << toPrefix(fuzzyOperator->right) << " "; } else { ss << "[antecedent error] unknown class of Expression <" << (node ? node->toString() : "null") << ">"; } return ss.str(); } std::string Antecedent::toInfix(const Expression* node) const { if (not isLoaded()) { throw Exception("[antecedent error] antecedent <" + _text + "> is not loaded", FL_AT); } if (not node) node = getExpression(); if (dynamic_cast<const Proposition*> (node)) { return node->toString(); } std::stringstream ss; if (const Operator * fuzzyOperator = dynamic_cast<const Operator*> (node)) { ss << toInfix(fuzzyOperator->left) << " " << fuzzyOperator->toString() << " " << toInfix(fuzzyOperator->right) << " "; } else { ss << "[antecedent error] unknown class of Expression <" << (node ? node->toString() : "null") << ">"; } return ss.str(); } std::string Antecedent::toPostfix(const Expression* node) const { if (not isLoaded()) { throw Exception("[antecedent error] antecedent <" + _text + "> is not loaded", FL_AT); } if (not node) node = getExpression(); if (dynamic_cast<const Proposition*> (node)) { return node->toString(); } std::stringstream ss; if (const Operator * fuzzyOperator = dynamic_cast<const Operator*> (node)) { ss << toPostfix(fuzzyOperator->left) << " " << toPostfix(fuzzyOperator->right) << " " << fuzzyOperator->toString() << " "; } else { ss << "[antecedent error] unknown class of Expression <" << (node ? node->toString() : "null") << ">"; } return ss.str(); } }
42.020089
130
0.511766
okocsis
5f0b11c4cd68c112a699f2ce03244a5e7c0a8e3a
2,075
cpp
C++
cmd/qc.cpp
cbutakoff/DSI-Studio
d77dffa4526d66da421fa84f7187e85bca6bce7c
[ "BSD-3-Clause" ]
null
null
null
cmd/qc.cpp
cbutakoff/DSI-Studio
d77dffa4526d66da421fa84f7187e85bca6bce7c
[ "BSD-3-Clause" ]
null
null
null
cmd/qc.cpp
cbutakoff/DSI-Studio
d77dffa4526d66da421fa84f7187e85bca6bce7c
[ "BSD-3-Clause" ]
null
null
null
#include <QString> #include <QStringList> #include <QFileInfo> #include "program_option.hpp" #include "libs/dsi/image_model.hpp" QStringList search_files(QString dir,QString filter); std::string quality_check_src_files(QString dir) { std::ostringstream out; QStringList filenames = search_files(dir,"*.src.gz"); out << "FileName\tImage dimension\tResolution\tDWI count\tMax b-value\tB-table matched\tNeighboring DWI correlation" << std::endl; int dwi_count = 0; float max_b = 0; for(int i = 0;check_prog(i,filenames.size());++i) { out << QFileInfo(filenames[i]).baseName().toStdString() << "\t"; ImageModel handle; unique_prog(true); if (!handle.load_from_file(filenames[i].toStdString().c_str())) { out << "Cannot load SRC file" << std::endl; continue; } unique_prog(false); // output image dimension out << image::vector<3,int>(handle.voxel.dim.begin()) << "\t"; // output image resolution out << handle.voxel.vs << "\t"; // output DWI count int cur_dwi_count = 0; out << (cur_dwi_count = handle.src_bvalues.size()) << "\t"; if(i == 0) dwi_count = cur_dwi_count; // output max_b float cur_max_b = 0; out << (cur_max_b = *std::max_element(handle.src_bvalues.begin(),handle.src_bvalues.end())) << "\t"; if(i == 0) max_b = cur_max_b; // check shell structure out << (max_b == cur_max_b && cur_dwi_count == dwi_count ? "Yes\t" : "No\t"); // calculate neighboring DWI correlation out << handle.quality_control_neighboring_dwi_corr() << "\t"; out << std::endl; } return out.str(); } /** perform reconstruction */ int qc(void) { std::string file_name = po.get("source"); if(QFileInfo(file_name.c_str()).isDir()) { file_name += "\\src_report.txt"; std::ofstream out(file_name.c_str()); out << quality_check_src_files(file_name.c_str()); } return 0; }
30.514706
134
0.595663
cbutakoff
5f0e3f2dd7ee0392eb3e547e9dc2ff6d8748df75
1,193
hpp
C++
tooling/data/prefix_splitter.hpp
victorlaurentiu/tsmp
5391ffb488d7db9555405965ede5c63800fbb71f
[ "MIT" ]
23
2021-10-30T09:32:58.000Z
2022-01-23T19:39:26.000Z
tooling/data/prefix_splitter.hpp
victorlaurentiu/tsmp
5391ffb488d7db9555405965ede5c63800fbb71f
[ "MIT" ]
null
null
null
tooling/data/prefix_splitter.hpp
victorlaurentiu/tsmp
5391ffb488d7db9555405965ede5c63800fbb71f
[ "MIT" ]
4
2021-10-31T13:05:29.000Z
2021-11-27T03:18:48.000Z
#pragma once #include "types.hpp" #include <fmt/core.h> #include <fmt/ranges.h> #include <algorithm> #include <iterator> namespace data { class prefix_splitter_t { public: prefix_splitter_t(const std::vector<record_decl_t>& records = {}, std::vector<std::string> trivial_types = {}); void add_record(record_decl_t record); const std::vector<field_decl_t>& fields() const; const std::vector<function_decl_t>& functions() const; const std::vector<record_decl_t>& records() const; static std::string strip_special_chars(std::string input); std::string render() const; private: bool has_field(const field_decl_t& field, const std::vector<field_decl_t>& field_list) const; bool has_function(const function_decl_t& function, const std::vector<function_decl_t>& function_list) const; void add_field(const field_decl_t& field); void add_function(const function_decl_t& function); bool field_list_match(const record_decl_t& lhs, const record_decl_t& rhs) const; std::vector<field_decl_t> m_fields; std::vector<function_decl_t> m_functions; std::vector<record_decl_t> m_records; std::vector<std::string> m_trivial_types; }; }
31.394737
115
0.736798
victorlaurentiu
5f10a140d8b55a3b61668b65754fdce6601f3d16
2,058
hpp
C++
include/shadertoy/pre.hpp
vtavernier/libshadertoy
a0b2a133199383cc7e9bcb3c0300f39eb95177c0
[ "MIT" ]
2
2020-02-23T09:33:07.000Z
2021-11-15T18:23:13.000Z
include/shadertoy/pre.hpp
vtavernier/libshadertoy
a0b2a133199383cc7e9bcb3c0300f39eb95177c0
[ "MIT" ]
2
2019-08-09T15:48:07.000Z
2020-11-16T13:51:56.000Z
include/shadertoy/pre.hpp
vtavernier/libshadertoy
a0b2a133199383cc7e9bcb3c0300f39eb95177c0
[ "MIT" ]
3
2019-12-12T09:42:34.000Z
2020-12-14T03:56:30.000Z
#ifndef _SHADERTOY_PRE_HPP_ #define _SHADERTOY_PRE_HPP_ #include "shadertoy/shadertoy_export.h" /// Base namespace for libshadertoy namespace shadertoy { /// Definition of rendering buffers namespace buffers { struct buffer_output; class basic_buffer; class program_buffer; class toy_buffer; } /// Shader source compiler types namespace compiler { class basic_part; class template_part; class file_part; class program_template; } /// Geometry primitives namespace geometry { class basic_geometry; class screen_quad; } /// OpenGL wrapper helpers namespace gl { class null_buffer_error; class buffer; class opengl_error; class null_framebuffer_error; class framebuffer; class null_program_error; class attrib_location; class uniform_location; class program_link_error; class program_validate_error; class program; class null_query_error; class query; class null_sampler_error; class sampler; class null_renderbuffer_error; class renderbuffer; class null_shader_error; class shader_compilation_error; class shader_allocator; class shader; class null_texture_error; class texture_allocator; class texture; class null_vertex_array_error; class vertex_array; } /// Buffer input class definitions namespace inputs { class basic_input; class buffer_input; class checker_input; class error_input; class exr_input; class file_input; class image_input; class jpeg_input; class noise_input; class soil_input; } /// Swap chain member class definitions namespace members { class basic_member; class buffer_member; class screen_member; } /// Miscellaneous utilities namespace utils { } class basic_shader_inputs; class bound_inputs_base; class swap_chain; class render_context; class shader_compiler; class texture_engine; } // Include template and utilities everywhere #include "shadertoy/shadertoy_error.hpp" #include "shadertoy/size.hpp" #include "shadertoy/member_swap_policy.hpp" #endif /* _SHADERTOY_PRE_HPP_ */
17.294118
44
0.76725
vtavernier
5f126bb8b7c978139132b0742118e7df3dc353d8
71
cc
C++
logs/doc/02_window.cc
chanchann/Burger_client
548753124b563123a479f3e3a5a42f792001d673
[ "MIT" ]
null
null
null
logs/doc/02_window.cc
chanchann/Burger_client
548753124b563123a479f3e3a5a42f792001d673
[ "MIT" ]
null
null
null
logs/doc/02_window.cc
chanchann/Burger_client
548753124b563123a479f3e3a5a42f792001d673
[ "MIT" ]
null
null
null
/** * https://blog.csdn.net/Zhanganliu/article/details/79927310 * */
17.75
60
0.676056
chanchann
5f13923f795cc5a51afee898d5e4b906cd968f74
3,048
cpp
C++
src/target_new_source.cpp
folkertvanheusden/constatus
7b0c42a5017bf96afcb0f34c0d4987bdc40ef2e6
[ "Apache-2.0" ]
5
2021-07-15T11:39:25.000Z
2022-02-25T06:14:58.000Z
src/target_new_source.cpp
folkertvanheusden/constatus
7b0c42a5017bf96afcb0f34c0d4987bdc40ef2e6
[ "Apache-2.0" ]
2
2021-09-27T11:13:42.000Z
2021-10-10T01:02:39.000Z
src/target_new_source.cpp
folkertvanheusden/constatus
7b0c42a5017bf96afcb0f34c0d4987bdc40ef2e6
[ "Apache-2.0" ]
2
2021-06-11T09:19:47.000Z
2022-02-18T22:22:01.000Z
// (C) 2017-2021 by folkert van heusden, released under Apache License v2.0 #include "config.h" #include <unistd.h> #include "target_new_source.h" #include "error.h" #include "exec.h" #include "log.h" #include "picio.h" #include "utils.h" #include "controls.h" #include "source.h" #include "view.h" #include "filter.h" #include "schedule.h" target_new_source::target_new_source(const std::string & id, const std::string & descr, source *const s, const double interval, const std::vector<filter *> *const filters, configuration_t *const cfg, const std::string & new_s_id, const std::string & new_s_descr, schedule *const sched, const bool rot90) : target(id, descr, s, "", "", "", -1, interval, filters, "", "", "", -1, cfg, false, false, sched), new_s_id(new_s_id), new_s_descr(new_s_descr), rot90(rot90) { } target_new_source::~target_new_source() { stop(); } source * target_new_source::get_new_source() { new_source_lock.lock(); if (!new_source) { log(id, LL_INFO, "Instantiating new source %s", new_s_id.c_str()); new_source = new source(new_s_id, new_s_descr, "", -1.0, nullptr, -1, -1, LL_DEBUG, 0.1, nullptr, default_failure(), new controls(), 100); } new_source_lock.unlock(); return new_source; } void target_new_source::operator()() { log(id, LL_INFO, "\"as-a-new-source\" thread started"); set_thread_name("newsrc" + new_s_id); const double fps = 1.0 / interval; video_frame *prev_frame = nullptr; uint64_t prev_ts = 0; s -> start(); for(;!local_stop_flag;) { pauseCheck(); st->track_fps(); uint64_t before_ts = get_us(); if (new_source) { video_frame *pvf = s->get_frame(false, prev_ts); if (pvf) { prev_ts = pvf->get_ts(); if (filters && !filters->empty()) { instance *inst = find_instance_by_interface(cfg, s); video_frame *temp = pvf->apply_filtering(inst, s, prev_frame, filters, nullptr); delete pvf; pvf = temp; } const bool allow_store = sched == nullptr || sched->is_on(); if (allow_store) { auto img = pvf->get_data_and_len(E_RGB); const uint8_t *data = std::get<0>(img); const size_t len = std::get<1>(img); const int w = pvf->get_w(); const int h = pvf->get_h(); if (rot90) { // rotate uint8_t *new_ = (uint8_t *)malloc(len); for(int y=0; y<h; y++) { for(int x=0; x<w; x++) { new_[x * h * 3 + y * 3 + 0] = data[y * w * 3 + x * 3 + 0]; new_[x * h * 3 + y * 3 + 1] = data[y * w * 3 + x * 3 + 1]; new_[x * h * 3 + y * 3 + 2] = data[y * w * 3 + x * 3 + 2]; } } new_source->set_size(h, w); new_source->set_frame(E_RGB, new_, len); free(new_); } else { new_source->set_size(w, h); new_source->set_frame(E_RGB, data, len); } } delete prev_frame; prev_frame = pvf; } } st->track_cpu_usage(); handle_fps(&local_stop_flag, fps, before_ts); } delete prev_frame; s -> stop(); log(id, LL_INFO, "\"as-a-new-source\" thread terminating"); }
24.983607
463
0.60794
folkertvanheusden
5f1a72bb9a4c910ddbe4a97a8b109b5681b1f070
4,044
cpp
C++
projector_fun/data/metaballs.cpp
mflagel/asdf_multiplat
9ef5a87b9ea9e38a7c6d409a60a1b8c5dce4b015
[ "MIT" ]
null
null
null
projector_fun/data/metaballs.cpp
mflagel/asdf_multiplat
9ef5a87b9ea9e38a7c6d409a60a1b8c5dce4b015
[ "MIT" ]
null
null
null
projector_fun/data/metaballs.cpp
mflagel/asdf_multiplat
9ef5a87b9ea9e38a7c6d409a60a1b8c5dce4b015
[ "MIT" ]
null
null
null
#include "stdafx.h" #include "metaballs.h" using namespace std; using namespace glm; namespace asdf { namespace projector_fun { metaballs_t::metaballs_t() { balls.reserve(5); balls.push_back(metaball_t{vec3{0.0f, 0.0f, 0.0f}, 50.0f}); balls.push_back(metaball_t{vec3{-100.0f, 100.0f, 0.0f}, 50.0f, vec3{20.0f, -150.0f, 0.0f}}); balls.push_back(metaball_t{vec3{280.0f, -280.0f, 0.0f}, 20.0f, vec3{100.0f, -100.0f, 0.0f}}); balls.push_back(metaball_t{vec3{0.0f, 0.0f, 0.0f}, 10.0f, vec3{100.0f, 20.0f, 0.0f}}); //pre-fill for(size_t i = 0; i < (texture_width * texture_height); ++i) { color_data[i] = clear_color; } texture = std::make_shared<texture_t>("metaball_texture", color_data, texture_width, texture_height); } vec3 metaballs_t::get_pos(const size_t x, const size_t y) const { auto halfwidth = texture_width / 2; auto halfheight = texture_height / 2; auto screenpos = texture_to_screen_space(ivec2{x, y}, ivec2{halfwidth, halfheight}); return vec3(screenpos.x, screenpos.y, 0.0f); } void metaballs_t::draw_metaballs() { //clear for(size_t i = 0; i < (texture_width * texture_height); ++i) { color_data[i] = clear_color; } for(size_t y = 0; y < texture_height; ++y) { for(size_t x = 0; x < texture_width; ++x) { float sum = 0; // Value to act as a summation of all Metaballs' fields applied to this particular pixel for(auto const& ball : balls) { sum += ball.calc(get_pos(x,y)); } draw_pixel(x, y, sum); } } // LOG("max sum: %f", max_sum); texture->write(color_data, texture_width, texture_height); } void metaballs_t::draw_pixel(const size_t x, const size_t y, const float sum) { float min_threshold = 0.99f * draw_mode != shaded; float max_threshold = 1.01f; bool should_draw = false; should_draw |= (draw_mode == hollow) && sum >= min_threshold && sum <= max_threshold; should_draw |= (draw_mode == fill) && sum >= min_threshold; should_draw |= (draw_mode == shaded) && sum >= min_threshold; should_draw |= (draw_mode == inverse) && sum <= max_threshold; if(should_draw) { auto color = COLOR_WHITE; if(draw_mode == shaded) { color = color_data[y * texture_width + x]; color += glm::min(1.0f, sum/5.0f) * COLOR_WHITE; } color_data[y * texture_width + x] = color; } } std::shared_ptr<texture_t> metaballs_t::array_to_texture() { draw_metaballs(); return std::make_shared<texture_t>("metaball test" , color_data , texture_width, texture_height); } void metaballs_t::update(float dt) { float extra_wrap_space = 0.0f; for(auto const& ball : balls) { extra_wrap_space = glm::max(ball.radius, extra_wrap_space); } extra_wrap_space *= 4; // extra_wrap_space = glm::max(texture->halfwidth, texture->halfheight); auto ball_lower_bounds = glm::vec3{-texture->halfwidth - extra_wrap_space, -texture->halfheight - extra_wrap_space, 0.0f}; auto ball_upper_bounds = glm::vec3{ texture->halfwidth + extra_wrap_space, texture->halfheight + extra_wrap_space, 0.0f}; for(auto& ball : balls) { // wrap around sides ball.position.x *= 1 - (2 * (ball.position.x > ball_upper_bounds.x || ball.position.x < ball_lower_bounds.x)); ball.position.y *= 1 - (2 * (ball.position.y > ball_upper_bounds.y || ball.position.y < ball_lower_bounds.y)); ball.position += ball.velocity * dt; } } } }
32.095238
130
0.560584
mflagel
5f1c68e8389253e45e3b6f1c21c2eb39ea14d50d
6,349
cpp
C++
Products/Common/sxml_print.cpp
TrevorDArcyEvans/DivingMagpieSoftware
7ffcfef653b110e514d5db735d11be0aae9953ec
[ "MIT" ]
1
2021-05-27T10:27:25.000Z
2021-05-27T10:27:25.000Z
Products/Common/sxml_print.cpp
TrevorDArcyEvans/Diving-Magpie-Software
7ffcfef653b110e514d5db735d11be0aae9953ec
[ "MIT" ]
null
null
null
Products/Common/sxml_print.cpp
TrevorDArcyEvans/Diving-Magpie-Software
7ffcfef653b110e514d5db735d11be0aae9953ec
[ "MIT" ]
null
null
null
#include "stdafx.h" #include "XML_XSL.h" #include "SRegistryAccess.hpp" #include "SHResult.hpp" #include "LogEvent.h" #include "SLogError.h" #include "SXML_Print.h" #include "RemoveAllCharactersInFile.h" #include "SDelayedDeleteFile.h" //------------------------------------------------------------------------ SXML_Print::SXML_Print() { Initialise(); }//SXML_Print::SXML_Print //------------------------------------------------------------------------ SXML_Print::SXML_Print ( CString sRegKey ) { Initialise(); m_RegKey = sRegKey; }//SXML_Print::SXML_Print //------------------------------------------------------------------------ // SXML_Print::Initialise // called by both constructors to set all member variables to blank SXML_Print::Initialise() { m_RegKey = _T(""); m_XSL_FileName = _T(""); m_OutputFileExt = _T(""); m_TimeOut = 10; m_RemoveChars.clear(); }//SXML_Print::Initialise //------------------------------------------------------------------------ SXML_Print::~SXML_Print() { }//SXML_Print::~SXML_Print //------------------------------------------------------------------------ // SXML_Print::AddRemoveChar // adds specified character to the end of the list of characters to remove // from output file // // parameters // cRemoveChar // character to remove from output file // this can be any character in the extended ASCII character set // ASCII 0 -255 inclusive // // returns // S_OK // always returns S_OK! HRESULT SXML_Print::AddRemoveChar ( char cRemoveChar ) { m_RemoveChars.push_back(cRemoveChar); return S_OK; }//SXML_Print::AddRemoveChar //------------------------------------------------------------------------ // SXML_Print::LoadSettings // queries registry keys for the XSL filename and the extension for the // output file. Registry key is specified by m_RegKey and string values // are read out of the following sub-keys: // // "XSL FileName" --> m_XSL_FileName // "Output FileExt" --> m_OutputFileExt // "TimeOut" --> m_TimeOut // // If m_RegKey = _T("CMIDS\\Archiver") then settings will be read out of the // following registry keys: // // [HKEY_LOCAL_MACHINE\SOFTWARE\Sigmex\CMIDS\Archiver] // "XSL FileName"="c:\\Archiver.xsl" // "Output FileExt"="html" SXML_Print::LoadSettings() { // load XSL file name & output file extension out of the registry SRegistryAccess RegAc(HKEY_LOCAL_MACHINE); m_XSL_FileName = RegAc.ReadString(m_RegKey, _T("XSL FileName" )); m_OutputFileExt = RegAc.ReadString(m_RegKey, _T("Output FileExt")); m_TimeOut = RegAc.ReadInt (m_RegKey, _T("TimeOut" ), m_TimeOut); }//SXML_Print::LoadSettings //------------------------------------------------------------------------ // SXML_Print::Print // will query the registry for an XSL file to apply to the specified XML file, // apply the XSL file and print it out to the default system printer // // parameters // sXMLFileName // fully qualified name to XML file to print out // // returns // S_OK // if successfully printed out file // otherwise // return values from IDMS_XML2XSL::Print() in XML2XSL.cpp // // notes // caller should call CWaitCursor before calling this function as we // wait for the print program to initialise and start printing before // returning HRESULT SXML_Print::Print ( CString sXMLFileName ) { HRESULT hres = S_OK; CString sOutputFileName; try { TCHAR sTempPath [MAX_PATH]; TCHAR sTempFileName[MAX_PATH]; // work out where the temporary files are GetTempPath(sizeof(sTempPath) / sizeof(TCHAR), sTempPath); // form the output file name GetTempFileName(sTempPath, _T("SXML_Print"), 0, sTempFileName); sOutputFileName = sTempFileName; // remove temp file created by GetTempFileName() DeleteFile(sTempFileName); // remove existing extension int nDotPos = sOutputFileName.Find(_T(".")); if (-1 != nDotPos) { sOutputFileName.Delete(nDotPos + 1, sOutputFileName.GetLength() - nDotPos - 1); } // then add our own extension sOutputFileName += m_OutputFileExt; // now apply the XSL transform CComPtr <IDMS_XML2XSL> pXML_XSL; CComBSTR sXML_FileName = sXMLFileName; CComBSTR sXSL_FileName = m_XSL_FileName; CComBSTR sOutput_FileName = sOutputFileName; STEST_HR(pXML_XSL.CoCreateInstance(__uuidof(DMS_XML2XSL))); STEST_HR(pXML_XSL->put_XML_FileName (sXML_FileName )); STEST_HR(pXML_XSL->put_XSL_FileName (sXSL_FileName )); STEST_HR(pXML_XSL->put_Output_FileName(sOutput_FileName)); STEST_HR(pXML_XSL->Apply_XSL_XML()); // remove all extraneous characters from the output file // before we print out for (int i = 0; i < m_RemoveChars.size (); i++) { RemoveAllCharactersInFile(::CString(sOutput_FileName), m_RemoveChars[i]); } // finally print out - whew! STEST_HR(pXML_XSL->Print()); hres = S_OK; } catch (_com_error& e) { LogEvent(_T ("Error in SXML_Print::Print: %s"), e.ErrorMessage()); hres = E_UNEXPECTED; } catch (...) { LogEvent(_T ("Unknown error in SXML_Print::Print")); hres = E_UNEXPECTED; }//try // we have to wait for print program to initialise and print out // note that there is no *real* way of waiting as we don't know what to // wait on. Thus, this is just a guess... // // We cleanup the temporary files we've created before returning // note that we do this in a separate thread so as not to block SDelayedDeleteFile::DelayedDeleteFile(sOutputFileName, m_TimeOut); return hres; }//SXML_Print::Print //------------------------------------------------------------------------
33.067708
91
0.559143
TrevorDArcyEvans
5f21d84c5ad5cc082a87ea46dcf513cbcc1485f8
165
hh
C++
src/debug.hh
nojhan/kakoune
c8156429c4685189e0a6b7bd0f273dc64432db2c
[ "Unlicense" ]
null
null
null
src/debug.hh
nojhan/kakoune
c8156429c4685189e0a6b7bd0f273dc64432db2c
[ "Unlicense" ]
null
null
null
src/debug.hh
nojhan/kakoune
c8156429c4685189e0a6b7bd0f273dc64432db2c
[ "Unlicense" ]
null
null
null
#ifndef debug_hh_INCLUDED #define debug_hh_INCLUDED #include "string.hh" namespace Kakoune { void write_debug(const String& str); } #endif // debug_hh_INCLUDED
11.785714
36
0.775758
nojhan
5f23c46d08dbd90a6786bc62dbb46ddd5bf8d734
367
cpp
C++
Exercicios/42.cpp
thiago1590/Exercicios_LinguagemC_1periodo
a7affcbb121493ef8abb556a6bdb7c28926144df
[ "MIT" ]
null
null
null
Exercicios/42.cpp
thiago1590/Exercicios_LinguagemC_1periodo
a7affcbb121493ef8abb556a6bdb7c28926144df
[ "MIT" ]
null
null
null
Exercicios/42.cpp
thiago1590/Exercicios_LinguagemC_1periodo
a7affcbb121493ef8abb556a6bdb7c28926144df
[ "MIT" ]
null
null
null
#include <stdio.h> int calculo(int anos, int meses, int dias, int result) { result = (365 * anos) + (30 * meses) + dias;} int main() { int anos, meses, dias, result,a; printf("digite sua idade em anos meses e dias"); scanf("%d %d %d", &anos, &meses, &dias); a = calculo(anos, meses, dias, result); printf(" sua idade em dias eh %d", a); return 0; }
19.315789
55
0.607629
thiago1590
5f245914a64789f52ed6e45ea844f1f14ffb2212
787
cpp
C++
OnitamaEngine/Source/MoveInformation/MoveInformation.cpp
CodeGorger/OnitamaEngine
641930951ce272ee4922c5dfe57cc3b25b1ed37a
[ "MIT" ]
1
2021-09-14T16:25:02.000Z
2021-09-14T16:25:02.000Z
OnitamaEngine/Source/MoveInformation/MoveInformation.cpp
CodeGorger/OnitamaEngine
641930951ce272ee4922c5dfe57cc3b25b1ed37a
[ "MIT" ]
null
null
null
OnitamaEngine/Source/MoveInformation/MoveInformation.cpp
CodeGorger/OnitamaEngine
641930951ce272ee4922c5dfe57cc3b25b1ed37a
[ "MIT" ]
null
null
null
#include "MoveInformation.h" bool MoveInformation::ParseMove(std::string inTcpMove) { if (inTcpMove.size() > 20) { //"Invalid inTcpMove string is exceeded the maximal allowed length" return false; } size_t indexOfFirstSemicolon = inTcpMove.find_first_of(";"); _cardName=inTcpMove.substr(0, indexOfFirstSemicolon); _figureStartPosition.ParseFromChessString( inTcpMove.substr(indexOfFirstSemicolon,2)); size_t indexOfFirstCharAfterSemicolon = indexOfFirstSemicolon + 2; _figureEndPosition.ParseFromChessString( inTcpMove.substr(indexOfFirstCharAfterSemicolon, 2)); _isInitialized = true; return true; } std::string MoveInformation::ToString() { return _cardName + ";" + _figureStartPosition.ToChessString() + _figureEndPosition.ToChessString(); }
22.485714
69
0.768742
CodeGorger
5f26fe6923b37dc6264b51411b8612ec8e293614
930
cpp
C++
src/utils/dll.cpp
TiWinDeTea/NinjaClown
fdd48e62466f11036fa0360fad2bcb182d6d3352
[ "MIT" ]
2
2020-04-10T14:39:00.000Z
2021-02-11T15:52:16.000Z
src/utils/dll.cpp
TiWinDeTea/NinjaClown
fdd48e62466f11036fa0360fad2bcb182d6d3352
[ "MIT" ]
2
2019-12-17T08:50:20.000Z
2020-02-03T09:37:56.000Z
src/utils/dll.cpp
TiWinDeTea/NinjaClown
fdd48e62466f11036fa0360fad2bcb182d6d3352
[ "MIT" ]
1
2020-08-19T03:06:52.000Z
2020-08-19T03:06:52.000Z
#include "utils/dll.hpp" #ifdef OS_WINDOWS # include "utils/system.hpp" #endif namespace utils { dll::~dll() { if (m_handle == nullptr) { return; } #if defined OS_WINDOWS FreeLibrary(m_handle); #elif defined OS_LINUX dlclose(m_handle); #endif } dll::operator bool() const { return m_handle != nullptr; } std::string dll::error() const { #if defined OS_WINDOWS return sys_last_error(); #elif defined OS_LINUX const char *error = dlerror(); if (error == nullptr) { return ""; } return error; #endif } bool dll::load(const char *dll_path) { #if defined OS_WINDOWS if (m_handle != nullptr) { FreeLibrary(m_handle); } m_handle = LoadLibrary(dll_path); #elif defined OS_LINUX if (m_handle != nullptr) { dlclose(m_handle); } m_handle = dlopen(dll_path, RTLD_NOW); #endif return m_handle != nullptr; } bool dll::load(const std::string &dll_path) { return load(dll_path.c_str()); } } // namespace utils
16.034483
45
0.692473
TiWinDeTea
5f284b2ca6233ddc59b0fa0a1e7b7007d1eaf132
1,276
cpp
C++
LeetCode/2058_Find_the_Minimum_and_Maximum_Number_of_Nodes_Between_Critical_Points/main.cpp
sungmen/Acmicpc_Solve
0298a6aec84993a4d8767bd2c00490b7201e06a4
[ "MIT" ]
null
null
null
LeetCode/2058_Find_the_Minimum_and_Maximum_Number_of_Nodes_Between_Critical_Points/main.cpp
sungmen/Acmicpc_Solve
0298a6aec84993a4d8767bd2c00490b7201e06a4
[ "MIT" ]
null
null
null
LeetCode/2058_Find_the_Minimum_and_Maximum_Number_of_Nodes_Between_Critical_Points/main.cpp
sungmen/Acmicpc_Solve
0298a6aec84993a4d8767bd2c00490b7201e06a4
[ "MIT" ]
null
null
null
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: vector<int> nodesBetweenCriticalPoints(ListNode* head) { vector<int> answer(2, -1); if (head == nullptr) return answer; int back = head->val; vector<int> tmp; int idx = 1; if (head->next == nullptr) return answer; head = head->next; while (head->next != nullptr) { if ((back < head->val && head->val > head->next->val) || (back > head->val && head->val < head->next->val)) { tmp.push_back(idx); if (tmp.size() > 1) { if (answer[0] != -1) { answer[0] = min(answer[0], tmp.back() - tmp[tmp.size()-2]); } else { answer[0] = tmp.back() - tmp[tmp.size()-2]; } answer[1] = tmp.back() - tmp[0]; } } idx++; back = head->val; head = head->next; } return answer; } };
32.717949
121
0.442006
sungmen
5f285e6e670fb5b70171c74ea1cacaa09eaf22be
918
hpp
C++
include/locomotion_viewer/LocomotionViewer.hpp
ori-drs/locomotion-viewer
6569d09786743283c1be8c47ca75171c1c4aeea0
[ "Apache-2.0" ]
6
2020-04-06T10:09:14.000Z
2022-01-07T02:05:06.000Z
include/locomotion_viewer/LocomotionViewer.hpp
ori-drs/locomotion-viewer
6569d09786743283c1be8c47ca75171c1c4aeea0
[ "Apache-2.0" ]
null
null
null
include/locomotion_viewer/LocomotionViewer.hpp
ori-drs/locomotion-viewer
6569d09786743283c1be8c47ca75171c1c4aeea0
[ "Apache-2.0" ]
2
2018-12-24T12:17:26.000Z
2021-03-01T23:21:10.000Z
/* * OnlineID.h * * Created on: Feb 11, 2018 * Author: Romeo Orsolino */ #ifndef RVIZPOLYGONSTOOLS_H_ #define RVIZPOLYGONSTOOLS_H_ #include <locomotion_viewer/ThreeDim.h> #include <Eigen/Dense> #include <iostream> #include <string> #include <chrono> namespace locomotion_viewer{ using legs_colors = std::vector<rviz_visual_tools::colors>; class LocomotionViewer: public locomotion_viewer::ThreeDim { public: LocomotionViewer(std::string base_frame, std::string marker_topic, ros::NodeHandle nh); ~LocomotionViewer(); legs_colors default_legs_colors_ = {rviz_visual_tools::RED,rviz_visual_tools::GREEN,rviz_visual_tools::BLUE,rviz_visual_tools::YELLOW}; rviz_visual_tools::colors base_color_; private: }; typedef std::shared_ptr<LocomotionViewer> LocomotionViewerPtr; } // namespace locomotion_viewer #endif /* DLS_ONLINEID_H_ */
20.863636
137
0.72658
ori-drs
5f2b2e114fb30ce3badacb521f4de1f1ff972894
919
cpp
C++
implementations/cairo/gb_cairo_main.cpp
enthought/GraphicsBench
ec0327c480fa91c71ec52239700b808db9bb272b
[ "BSD-3-Clause" ]
null
null
null
implementations/cairo/gb_cairo_main.cpp
enthought/GraphicsBench
ec0327c480fa91c71ec52239700b808db9bb272b
[ "BSD-3-Clause" ]
null
null
null
implementations/cairo/gb_cairo_main.cpp
enthought/GraphicsBench
ec0327c480fa91c71ec52239700b808db9bb272b
[ "BSD-3-Clause" ]
null
null
null
#include "gb_cairo_lines.h" #include "gb_cairo_box_alpha.h" #include "gb_cairo_box_gradient.h" #include "gb_cairo_memmove.h" int main(int argc, char **argv) { GBCairoLineBenchmark gb_cairo_line; gb_cairo_line.init(); gb_cairo_line.app_state.load_data("../../data/gb_lines.data"); gb_cairo_line.render(); GBCairoBoxBenchmark gb_cairo_box_alpha; gb_cairo_box_alpha.init(); gb_cairo_box_alpha.app_state.load_data("../../data/gb_box_alpha.data"); gb_cairo_box_alpha.render(); GBCairoBoxGradientBenchmark gb_cairo_box_gradient; gb_cairo_box_gradient.init(); gb_cairo_box_gradient.app_state.load_data("../../data/gb_box_alpha.data"); gb_cairo_box_gradient.render(); GBCairoMemmoveBenchmark gb_cairo_memmove; gb_cairo_memmove.init(); gb_cairo_memmove.app_state.load_data("../../data/gb_box_alpha.data"); gb_cairo_memmove.render(); return 0; }
30.633333
78
0.738847
enthought
5f2b5120ad88c492e66730d7b2e7f4040ac33c62
4,850
cpp
C++
source/video/sampler.cpp
synaodev/LeviathanRacket
c70dfddf0097c7f4e902ec5de46a6eabed5a4691
[ "MIT" ]
5
2020-03-25T14:46:23.000Z
2022-02-23T01:46:26.000Z
source/video/sampler.cpp
synaodev/LeviathanRacket
c70dfddf0097c7f4e902ec5de46a6eabed5a4691
[ "MIT" ]
1
2022-01-14T00:01:48.000Z
2022-01-14T00:01:48.000Z
source/video/sampler.cpp
synaodev/LeviathanRacket
c70dfddf0097c7f4e902ec5de46a6eabed5a4691
[ "MIT" ]
2
2020-03-25T14:46:24.000Z
2020-08-21T04:33:23.000Z
#include "./sampler.hpp" #include "./gl-check.hpp" #include "../utility/logger.hpp" namespace { constexpr sint_t kWorkingUnit = GL_TEXTURE4; constexpr sint_t kMipMapTexs = 4; constexpr sint_t kTotalTexs = 80; constexpr sint_t kDimensions = 256; constexpr sint_t kTotalAtlas = 5; } sint_t sampler_t::get_working_unit() { return kWorkingUnit; } sint_t sampler_t::get_maximum_textures() { return kTotalTexs; } sint_t sampler_t::get_maximum_atlases() { return kTotalAtlas; } bool sampler_t::has_immutable_option() { return opengl_version[0] == 4 and opengl_version[1] >= 2; } void sampler_data_t::destroy() { if (id != 0) { glCheck(glBindTexture(type, 0)); glCheck(glDeleteTextures(1, &id)); id = 0; type = 0; count = 0; } } sampler_data_t sampler_allocator_t::kNullHandle {}; bool sampler_allocator_t::create(pixel_format_t format) { const glm::ivec2 texture_dims { kDimensions, kDimensions }; this->format = format; auto& t = this->texture(texture_dims); auto& s = this->atlas(texture_dims); return true; } sampler_data_t& sampler_allocator_t::texture(const glm::ivec2& dimensions) { if (dimensions.x == kDimensions and dimensions.y == kDimensions) { if (textures.id == 0) { // Save previous unit and set to working unit sint_t previous = 0; glCheck(glGetIntegerv(GL_ACTIVE_TEXTURE, &previous)); glCheck(glActiveTexture(kWorkingUnit)); uint_t handle = 0; glCheck(glGenTextures(1, &handle)); glCheck(glBindTexture(GL_TEXTURE_2D_ARRAY, handle)); if (sampler_t::has_immutable_option()) { glCheck(glTexStorage3D( GL_TEXTURE_2D_ARRAY, kMipMapTexs, gfx_t::get_pixel_format_gl_enum(format), dimensions.x, dimensions.y, kTotalTexs )); } else { glCheck(glTexImage3D( GL_TEXTURE_2D_ARRAY, 0, gfx_t::get_pixel_format_gl_enum(format), dimensions.x, dimensions.y, kTotalTexs, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr )); } glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT)); glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_REPEAT)); glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE)); glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_NEAREST)); if (sampler_t::has_immutable_option()) { glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR)); } else { glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST)); } glCheck(glBindTexture(GL_TEXTURE_2D_ARRAY, 0)); // Restore previous unit glCheck(glActiveTexture(previous)); textures.id = handle; textures.type = GL_TEXTURE_2D_ARRAY; textures.count = 0; } return textures; } synao_log("Error! Texture size must be 256x256! This one is {}x{}!\n", dimensions.x, dimensions.y); return kNullHandle; } const sampler_data_t& sampler_allocator_t::texture() const { return textures; } sampler_data_t& sampler_allocator_t::atlas(const glm::ivec2& dimensions) { if (dimensions.x == kDimensions and dimensions.y == kDimensions) { if (atlases.id == 0) { // Save previous unit and set to working unit sint_t previous = 0; glCheck(glGetIntegerv(GL_ACTIVE_TEXTURE, &previous)); glCheck(glActiveTexture(kWorkingUnit)); uint_t handle = 0; glCheck(glGenTextures(1, &handle)); glCheck(glBindTexture(GL_TEXTURE_2D_ARRAY, handle)); if (sampler_t::has_immutable_option()) { glCheck(glTexStorage3D( GL_TEXTURE_2D_ARRAY, kMipMapTexs, gfx_t::get_pixel_format_gl_enum(format), dimensions.x, dimensions.y, kTotalAtlas )); } else { glCheck(glTexImage3D( GL_TEXTURE_2D_ARRAY, 0, gfx_t::get_pixel_format_gl_enum(format), dimensions.x, dimensions.y, kTotalAtlas, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr )); } glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_REPEAT)); glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_REPEAT)); glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE)); glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_NEAREST)); if (sampler_t::has_immutable_option()) { glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR)); } else { glCheck(glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_NEAREST)); } glCheck(glBindTexture(GL_TEXTURE_2D_ARRAY, 0)); // Restore previous unit glCheck(glActiveTexture(previous)); atlases.id = handle; atlases.type = GL_TEXTURE_2D_ARRAY; atlases.count = 0; } return atlases; } synao_log("Error! Atlas size must be 256x256! This one is {}x{}!\n", dimensions.x, dimensions.y); return kNullHandle; } const sampler_data_t& sampler_allocator_t::atlas() const { return atlases; }
30.3125
100
0.738144
synaodev
5f2c025588e266c2452f1bc787d861692e79a247
2,668
hpp
C++
lib/malloy/core/detail/controller_run_result.hpp
Tectu/malloy
066adfe3ac312ac4c0b4a745603faed650400f5a
[ "MIT" ]
22
2021-04-17T17:32:14.000Z
2022-03-29T09:42:03.000Z
lib/malloy/core/detail/controller_run_result.hpp
Tectu/malloy
066adfe3ac312ac4c0b4a745603faed650400f5a
[ "MIT" ]
98
2021-04-03T18:53:19.000Z
2022-02-06T10:49:30.000Z
lib/malloy/core/detail/controller_run_result.hpp
Tectu/malloy
066adfe3ac312ac4c0b4a745603faed650400f5a
[ "MIT" ]
3
2021-05-12T15:17:11.000Z
2021-12-28T03:15:46.000Z
#pragma once #include <boost/asio/executor_work_guard.hpp> #include <boost/asio/io_context.hpp> #include <boost/asio/use_future.hpp> #include <spdlog/logger.h> #include <memory> #include <thread> #include <stdexcept> namespace malloy::detail { /** * Controller configuration. */ struct controller_config { /** * The number of worked threads for the I/O context to use. */ std::size_t num_threads = 1; /** * The logger instance to use. */ std::shared_ptr<spdlog::logger> logger; void validate() { if (!logger) throw std::logic_error{"invalid config: logger is null"}; else if (num_threads == 0) throw std::logic_error{"invalid config: cannot have 0 threads"}; }; }; template<typename T> class controller_run_result { public: controller_run_result(const controller_config& cfg, T ctrl, std::unique_ptr<boost::asio::io_context> ioc) : m_io_ctx{std::move(ioc)}, m_workguard{m_io_ctx->get_executor()}, m_ctrl{std::move(ctrl)} { // Create the I/O context threads m_io_threads.reserve(cfg.num_threads - 1); for (std::size_t i = 0; i < cfg.num_threads; i++) { m_io_threads.emplace_back( [this] { m_io_ctx->run(); }); } // Log cfg.logger->debug("starting i/o context."); } ~controller_run_result() { // Stop the `io_context`. This will cause `run()` // to return immediately, eventually destroying the // `io_context` and all of the sockets in it. m_io_ctx->stop(); // Tell the workguard that we no longer need it's service m_workguard.reset(); for (auto& thread : m_io_threads) { thread.join(); }; } /** * @brief Block until all queued async actions completed */ void run() { m_workguard.reset(); m_io_ctx->run(); } private: using workguard_t = boost::asio::executor_work_guard<boost::asio::io_context::executor_type>; std::unique_ptr<boost::asio::io_context> m_io_ctx; workguard_t m_workguard; std::vector<std::thread> m_io_threads; T m_ctrl; // This order matters, the T may destructor need access to something related to the io context }; } // namespace malloy::detail
28.084211
115
0.53973
Tectu
5f2dc3edcc7d8f849aefa87bc990ccc20f81fcb7
1,259
cpp
C++
Tree/Binary_Tree/main.cpp
AshishS-1123/Data-Structures
58c36b7f1e0bc72064aac5ff53f96c7df34e52b5
[ "MIT" ]
null
null
null
Tree/Binary_Tree/main.cpp
AshishS-1123/Data-Structures
58c36b7f1e0bc72064aac5ff53f96c7df34e52b5
[ "MIT" ]
null
null
null
Tree/Binary_Tree/main.cpp
AshishS-1123/Data-Structures
58c36b7f1e0bc72064aac5ff53f96c7df34e52b5
[ "MIT" ]
null
null
null
#include <iostream> #include "binary_tree.cpp" #include "traverse.cpp" using namespace std; int main() { // create a tree object binaryTree tree = binaryTree(); // insert 10, 20, 30, 40, 50, 60 cout << "\nAfter adding 10..."; tree.insert_element(10); tree.print_tree(); cout << "\nAfter adding 20..."; tree.insert_element(20); tree.print_tree(); cout << "\nAfter adding 30..."; tree.insert_element(30); tree.print_tree(); cout << "\nAfter adding 40..."; tree.insert_element(40); tree.print_tree(); cout << "\nAfter adding 50..."; tree.insert_element(50); tree.print_tree(); cout << "\nAfter adding 60..."; tree.insert_element(60); tree.print_tree(); // print inorder traversal of tree cout << "\nInorder traversal of tree::\n\t"; traverse_inorder(tree); // print preorder traversal of tree cout << "\nPreorder traversal of tree::\n\t"; traverse_preorder(tree); // print postrder traversal of tree cout << "\nPostorder traversal of tree::\n\t"; traverse_postorder(tree); // print level order traversal cout << "\nLevel Order traversal of tree::\n\t"; traverse_level(tree); cout << "\n"; return 0; }
20.639344
52
0.612391
AshishS-1123
5f2ff7f49f8e5b1f37b9117542c9bfe0af6fbc11
2,113
cpp
C++
src/apps/S3DAnalyzer/widgets/widthhintlabel.cpp
hugbed/OpenS3D
4ffad16f9b0973404b59eb1424cc45f68754fe12
[ "BSD-3-Clause" ]
8
2017-04-16T16:38:15.000Z
2020-04-20T03:23:15.000Z
src/apps/S3DAnalyzer/widgets/widthhintlabel.cpp
hugbed/OpenS3D
4ffad16f9b0973404b59eb1424cc45f68754fe12
[ "BSD-3-Clause" ]
40
2017-04-12T17:24:44.000Z
2017-12-21T18:41:23.000Z
src/apps/S3DAnalyzer/widgets/widthhintlabel.cpp
hugbed/OpenS3D
4ffad16f9b0973404b59eb1424cc45f68754fe12
[ "BSD-3-Clause" ]
6
2017-07-13T21:51:09.000Z
2021-05-18T16:22:03.000Z
#include "widthhintlabel.h" #include <gsl/gsl_util> WidthHintLabel::WidthHintLabel(QWidget* parent) : QLabel(parent) { initPixmaps(); setAlignment(Qt::AlignCenter); setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed)); auto&& pixmap = m_pixmaps[static_cast<int>(State::Neutral)]; setMinimumSize(pixmap->width() + 5, pixmap->height() + 4); } void WidthHintLabel::setState(State state) { setPixmap(*gsl::at(m_pixmaps, static_cast<int>(state))); update(); } void WidthHintLabel::updateHint(float ratio) { // ok this is the worst // todo: think a bit more about this // it's way worse to have more than not enough range if (inRange(0.8f, 1.0f, ratio)) { setState(State::Neutral); } else if (inRange(0.7f, 0.8f, ratio)) { setState(State::ShouldWiden); } else if (inRange(1.0f, 1.05f, ratio)) { setState(State::ShouldNarrow); } else if (inRange(0.6f, 0.7f, ratio)) { setState(State::ShouldWidenMuch); } else if (inRange(1.05f, 1.1f, ratio)) { setState(State::ShouldNarrowMuch); } else if (ratio < 0.6f) { setState(State::ShouldWidenVeryMuch); } else if (ratio >= 1.1f) { setState(State::ShouldNarrowVeryMuch); } update(); } // todo, this should be outside bool WidthHintLabel::inRange(float min, float max, float value) { return min <= value && value < max; } void WidthHintLabel::initPixmaps() { initPixmap(State::ShouldNarrowVeryMuch, ":icons/in_arrows_red.png"); initPixmap(State::ShouldNarrowMuch, ":icons/in_arrows_orange.png"); initPixmap(State::ShouldNarrow, ":icons/in_arrows_green.png"); initPixmap(State::ShouldWidenVeryMuch, ":icons/out_arrows_red.png"); initPixmap(State::ShouldWidenMuch, ":icons/out_arrows_orange.png"); initPixmap(State::ShouldWiden, ":icons/out_arrows_green.png"); initPixmap(State::Neutral, ":icons/neutral_arrows.png"); setPixmap(*m_pixmaps[static_cast<int>(State::Neutral)]); } void WidthHintLabel::initPixmap(State state, const QString& filepath) { auto pixmap = std::make_unique<QPixmap>(filepath); gsl::at(m_pixmaps, static_cast<int>(state)) = std::move(pixmap); }
33.539683
73
0.708471
hugbed
5f311ccb8f94cd59ff9a022f220547b79ca01ba1
1,134
cpp
C++
OpenGL_Planetarium/Cubemap.cpp
vmkarhula/Planetarium
f99acf1c98f2789a3eae70eba69d83ab4cba2a43
[ "MIT" ]
null
null
null
OpenGL_Planetarium/Cubemap.cpp
vmkarhula/Planetarium
f99acf1c98f2789a3eae70eba69d83ab4cba2a43
[ "MIT" ]
null
null
null
OpenGL_Planetarium/Cubemap.cpp
vmkarhula/Planetarium
f99acf1c98f2789a3eae70eba69d83ab4cba2a43
[ "MIT" ]
null
null
null
#include "Cubemap.h" #include <iostream> #include "stb/stb_image.h" Cubemap::Cubemap(std::vector<std::string> paths) { glGenTextures(1, &m_GLID); glBindTexture(GL_TEXTURE_CUBE_MAP, m_GLID); int width, height, nrChannels; for (unsigned int i = 0; i < paths.size(); i++) { unsigned char* data = stbi_load(paths[i].c_str(), &width, &height, &nrChannels, 0); if (data) { glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, data); stbi_image_free(data); } else { std::cerr << "Cubemap failed to load texture at path:" << paths[i] << std::endl; stbi_image_free(data); } } glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); glBindTexture(GL_TEXTURE_CUBE_MAP, 0); } Cubemap::~Cubemap() { glDeleteTextures(1, &m_GLID); }
23.142857
113
0.741623
vmkarhula