text
stringlengths
3
1.04M
Mesmerizing Vintage Rooms Wimborne Photo Design Ideas. Vintage Room Ideas For Teenager Rooms Ideas. Terrific Images About Vintage Rooms Bedrooms Antique Dining Room Decorating Ideas Fbfbabfacabcd Game Decor Car Bedroom Laundry Accessories Living In Mass Baseball Wall. Modern Vintage Living Room Design Of Blue Room. Remarkable Vintage Rooms Photo Decoration Ideas. Astounding Vintage Rooms Hillsborough Photo Design Inspiration. Vintage Bed Rooms Hotel Resort Beautiful Room Old. White Vintage Rooms Tumblr Diy Edfdbeb. Entrancing Charming Retro Living Rooms Vintage Room Ideas Home Circa Mantel Antique Modern Decorating Pinterest On A Budget Design Decorations Style. Vintage Laundry Room Pictures Rooms Pictures. Appealing Vintage Rooms Hillsborough Pics Design Ideas. Exciting Vintage Rooms For Girls Pics Inspiration. Surprising Vintage Rooms Ideas Pics Decoration Ideas. Extraordinary Vintage Rooms Wimborne Pics Decoration Ideas. Wonderful Vintage Rooms Wimborne Pictures Decoration Inspiration. Charming Vintage Rooms Hillsborough Pics Decoration Inspiration. Gorgeous Vintage Rooms Ideas To Design Your Home Furniture. Extraordinary Vintage Rooms Wimborne Pictures Design Ideas. The Vintage Rooms Antique Shop In Matlock Derbyshire Ddeb. Breathtaking Vintage Rooms Decor Pics Design Inspiration. Vintage Baby Room Pictures Rooms Pictures. Vintage Design Living Room Room. Stunning Vintage Rooms Wimborne Pictures Design Inspiration. Stunning Vintage Rooms Matlock Images Design Ideas. The Vintage Rooms Antique Shop In Matlock Derbyshire Ddge. Captivating Modern Vintage Rooms Images Decoration Inspiration. Furniture Fireplace Vintage Living Room Decor Brown Collection Handmade Premium Material Good Ideas Shocking. Awesome Vintage Rooms For Girls Images Ideas. Vintage Rooms Tumblr Girly For Teens Girls Ccfbbeb. Living Room Decor Items Scenar Home Vintage Items. Mesmerizing Vintage Rooms Decor Pics Decoration Ideas. Exciting Vintage Rooms Matlock Pictures Design Inspiration. Astounding Vintage Rooms Ideas Images Decoration Inspiration. Dmitrovka Luury Apartment Bedroom Modern Vintage Rooms Master. Interesting Vintage Rooms Hillsborough Images Ideas. Amusing Vintage Rooms Decor Pics Ideas. Amusing Vintage Rooms Matlock Photo Ideas. Picturesque Modern House Interior Antique Laundry Room Decor Ilfullfull Living Decorating Ideas Baseball In Mass Bedroom Wall Game Dining Accessories Car. Vintage Dining Room Ideas Fresh Decor Plans. modern vintage rooms. vintage rooms. vintage rooms decor. vintage rooms for girls. vintage rooms hillsborough. vintage rooms ideas. vintage rooms matlock.
There are many wonderful posts online about how to successfully exhibit at a trade show. Having read many articles, looked at many pictures, and then ruminated on everything ad nauseum, I proceeded to do everything wrong. So, for those of you who actually have time to read for fun, read on. For those of you who are seeking advice on how to do things well, stop here and search for another article. Keeping your full-time job is an absolute must if you want to feel overwhelmed, miss paying your bills on time, and shower only when people start avoiding you. Check us out tomorrow for step 2!
/* * Copyright 2012 Valentin v. Seggern * * 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. */ package com.crowflying.buildwatch.smartwatch; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; public class ExtensionReceiver extends BroadcastReceiver { private static final String LOG_TAG = "ExtensionReceiver"; @Override public void onReceive(Context context, Intent intent) { Log.d(LOG_TAG, String.format("onReceive %s", intent.getAction())); intent.setClass(context, BuildWatchExtensionService.class); context.startService(intent); } }
/* --------------------------------------------------------------------------- Open Asset Import Library (assimp) --------------------------------------------------------------------------- Copyright (c) 2006-2019, assimp team All rights reserved. Redistribution and use of this software 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 the assimp team, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of the assimp team. 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. --------------------------------------------------------------------------- */ /** @file Importer.cpp * @brief Implementation of the CPP-API class #Importer */ #include <assimp/version.h> #include <assimp/config.h> #include <assimp/importerdesc.h> // ------------------------------------------------------------------------------------------------ /* Uncomment this line to prevent Assimp from catching unknown exceptions. * * Note that any Exception except DeadlyImportError may lead to * undefined behaviour -> loaders could remain in an unusable state and * further imports with the same Importer instance could fail/crash/burn ... */ // ------------------------------------------------------------------------------------------------ #ifndef ASSIMP_BUILD_DEBUG # define ASSIMP_CATCH_GLOBAL_EXCEPTIONS #endif // ------------------------------------------------------------------------------------------------ // Internal headers // ------------------------------------------------------------------------------------------------ #include "Common/Importer.h" #include "Common/BaseProcess.h" #include "Common/DefaultProgressHandler.h" #include "PostProcessing/ProcessHelper.h" #include "Common/ScenePreprocessor.h" #include "Common/ScenePrivate.h" #include <assimp/BaseImporter.h> #include <assimp/GenericProperty.h> #include <assimp/MemoryIOWrapper.h> #include <assimp/Profiler.h> #include <assimp/TinyFormatter.h> #include <assimp/Exceptional.h> #include <assimp/Profiler.h> #include <set> #include <memory> #include <cctype> #include <assimp/DefaultIOStream.h> #include <assimp/DefaultIOSystem.h> #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS # include "PostProcessing/ValidateDataStructure.h" #endif using namespace Assimp::Profiling; using namespace Assimp::Formatter; namespace Assimp { // ImporterRegistry.cpp void GetImporterInstanceList(std::vector< BaseImporter* >& out); void DeleteImporterInstanceList(std::vector< BaseImporter* >& out); // PostStepRegistry.cpp void GetPostProcessingStepInstanceList(std::vector< BaseProcess* >& out); } using namespace Assimp; using namespace Assimp::Intern; // ------------------------------------------------------------------------------------------------ // Intern::AllocateFromAssimpHeap serves as abstract base class. It overrides // new and delete (and their array counterparts) of public API classes (e.g. Logger) to // utilize our DLL heap. // See http://www.gotw.ca/publications/mill15.htm // ------------------------------------------------------------------------------------------------ void* AllocateFromAssimpHeap::operator new ( size_t num_bytes) { return ::operator new(num_bytes); } void* AllocateFromAssimpHeap::operator new ( size_t num_bytes, const std::nothrow_t& ) throw() { try { return AllocateFromAssimpHeap::operator new( num_bytes ); } catch( ... ) { return NULL; } } void AllocateFromAssimpHeap::operator delete ( void* data) { return ::operator delete(data); } void* AllocateFromAssimpHeap::operator new[] ( size_t num_bytes) { return ::operator new[](num_bytes); } void* AllocateFromAssimpHeap::operator new[] ( size_t num_bytes, const std::nothrow_t& ) throw() { try { return AllocateFromAssimpHeap::operator new[]( num_bytes ); } catch( ... ) { return NULL; } } void AllocateFromAssimpHeap::operator delete[] ( void* data) { return ::operator delete[](data); } // ------------------------------------------------------------------------------------------------ // Importer constructor. Importer::Importer() : pimpl( new ImporterPimpl ) { pimpl->mScene = NULL; pimpl->mErrorString = ""; // Allocate a default IO handler pimpl->mIOHandler = new DefaultIOSystem; pimpl->mIsDefaultHandler = true; pimpl->bExtraVerbose = false; // disable extra verbose mode by default pimpl->mProgressHandler = new DefaultProgressHandler(); pimpl->mIsDefaultProgressHandler = true; GetImporterInstanceList(pimpl->mImporter); GetPostProcessingStepInstanceList(pimpl->mPostProcessingSteps); // Allocate a SharedPostProcessInfo object and store pointers to it in all post-process steps in the list. pimpl->mPPShared = new SharedPostProcessInfo(); for (std::vector<BaseProcess*>::iterator it = pimpl->mPostProcessingSteps.begin(); it != pimpl->mPostProcessingSteps.end(); ++it) { (*it)->SetSharedData(pimpl->mPPShared); } } // ------------------------------------------------------------------------------------------------ // Destructor of Importer Importer::~Importer() { // Delete all import plugins DeleteImporterInstanceList(pimpl->mImporter); // Delete all post-processing plug-ins for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) delete pimpl->mPostProcessingSteps[a]; // Delete the assigned IO and progress handler delete pimpl->mIOHandler; delete pimpl->mProgressHandler; // Kill imported scene. Destructor's should do that recursively delete pimpl->mScene; // Delete shared post-processing data delete pimpl->mPPShared; // and finally the pimpl itself delete pimpl; } // ------------------------------------------------------------------------------------------------ // Register a custom post-processing step aiReturn Importer::RegisterPPStep(BaseProcess* pImp) { ai_assert(NULL != pImp); ASSIMP_BEGIN_EXCEPTION_REGION(); pimpl->mPostProcessingSteps.push_back(pImp); ASSIMP_LOG_INFO("Registering custom post-processing step"); ASSIMP_END_EXCEPTION_REGION(aiReturn); return AI_SUCCESS; } // ------------------------------------------------------------------------------------------------ // Register a custom loader plugin aiReturn Importer::RegisterLoader(BaseImporter* pImp) { ai_assert(NULL != pImp); ASSIMP_BEGIN_EXCEPTION_REGION(); // -------------------------------------------------------------------- // Check whether we would have two loaders for the same file extension // This is absolutely OK, but we should warn the developer of the new // loader that his code will probably never be called if the first // loader is a bit too lazy in his file checking. // -------------------------------------------------------------------- std::set<std::string> st; std::string baked; pImp->GetExtensionList(st); for(std::set<std::string>::const_iterator it = st.begin(); it != st.end(); ++it) { #ifdef ASSIMP_BUILD_DEBUG if (IsExtensionSupported(*it)) { ASSIMP_LOG_WARN_F("The file extension ", *it, " is already in use"); } #endif baked += *it; } // add the loader pimpl->mImporter.push_back(pImp); ASSIMP_LOG_INFO_F("Registering custom importer for these file extensions: ", baked); ASSIMP_END_EXCEPTION_REGION(aiReturn); return AI_SUCCESS; } // ------------------------------------------------------------------------------------------------ // Unregister a custom loader plugin aiReturn Importer::UnregisterLoader(BaseImporter* pImp) { if(!pImp) { // unregistering a NULL importer is no problem for us ... really! return AI_SUCCESS; } ASSIMP_BEGIN_EXCEPTION_REGION(); std::vector<BaseImporter*>::iterator it = std::find(pimpl->mImporter.begin(), pimpl->mImporter.end(),pImp); if (it != pimpl->mImporter.end()) { pimpl->mImporter.erase(it); ASSIMP_LOG_INFO("Unregistering custom importer: "); return AI_SUCCESS; } ASSIMP_LOG_WARN("Unable to remove custom importer: I can't find you ..."); ASSIMP_END_EXCEPTION_REGION(aiReturn); return AI_FAILURE; } // ------------------------------------------------------------------------------------------------ // Unregister a custom loader plugin aiReturn Importer::UnregisterPPStep(BaseProcess* pImp) { if(!pImp) { // unregistering a NULL ppstep is no problem for us ... really! return AI_SUCCESS; } ASSIMP_BEGIN_EXCEPTION_REGION(); std::vector<BaseProcess*>::iterator it = std::find(pimpl->mPostProcessingSteps.begin(), pimpl->mPostProcessingSteps.end(),pImp); if (it != pimpl->mPostProcessingSteps.end()) { pimpl->mPostProcessingSteps.erase(it); ASSIMP_LOG_INFO("Unregistering custom post-processing step"); return AI_SUCCESS; } ASSIMP_LOG_WARN("Unable to remove custom post-processing step: I can't find you .."); ASSIMP_END_EXCEPTION_REGION(aiReturn); return AI_FAILURE; } // ------------------------------------------------------------------------------------------------ // Supplies a custom IO handler to the importer to open and access files. void Importer::SetIOHandler( IOSystem* pIOHandler) { ASSIMP_BEGIN_EXCEPTION_REGION(); // If the new handler is zero, allocate a default IO implementation. if (!pIOHandler) { // Release pointer in the possession of the caller pimpl->mIOHandler = new DefaultIOSystem(); pimpl->mIsDefaultHandler = true; } // Otherwise register the custom handler else if (pimpl->mIOHandler != pIOHandler) { delete pimpl->mIOHandler; pimpl->mIOHandler = pIOHandler; pimpl->mIsDefaultHandler = false; } ASSIMP_END_EXCEPTION_REGION(void); } // ------------------------------------------------------------------------------------------------ // Get the currently set IO handler IOSystem* Importer::GetIOHandler() const { return pimpl->mIOHandler; } // ------------------------------------------------------------------------------------------------ // Check whether a custom IO handler is currently set bool Importer::IsDefaultIOHandler() const { return pimpl->mIsDefaultHandler; } // ------------------------------------------------------------------------------------------------ // Supplies a custom progress handler to get regular callbacks during importing void Importer::SetProgressHandler ( ProgressHandler* pHandler ) { ASSIMP_BEGIN_EXCEPTION_REGION(); // If the new handler is zero, allocate a default implementation. if (!pHandler) { // Release pointer in the possession of the caller pimpl->mProgressHandler = new DefaultProgressHandler(); pimpl->mIsDefaultProgressHandler = true; } // Otherwise register the custom handler else if (pimpl->mProgressHandler != pHandler) { delete pimpl->mProgressHandler; pimpl->mProgressHandler = pHandler; pimpl->mIsDefaultProgressHandler = false; } ASSIMP_END_EXCEPTION_REGION(void); } // ------------------------------------------------------------------------------------------------ // Get the currently set progress handler ProgressHandler* Importer::GetProgressHandler() const { return pimpl->mProgressHandler; } // ------------------------------------------------------------------------------------------------ // Check whether a custom progress handler is currently set bool Importer::IsDefaultProgressHandler() const { return pimpl->mIsDefaultProgressHandler; } // ------------------------------------------------------------------------------------------------ // Validate post process step flags bool _ValidateFlags(unsigned int pFlags) { if (pFlags & aiProcess_GenSmoothNormals && pFlags & aiProcess_GenNormals) { ASSIMP_LOG_ERROR("#aiProcess_GenSmoothNormals and #aiProcess_GenNormals are incompatible"); return false; } if (pFlags & aiProcess_OptimizeGraph && pFlags & aiProcess_PreTransformVertices) { ASSIMP_LOG_ERROR("#aiProcess_OptimizeGraph and #aiProcess_PreTransformVertices are incompatible"); return false; } return true; } // ------------------------------------------------------------------------------------------------ // Free the current scene void Importer::FreeScene( ) { ASSIMP_BEGIN_EXCEPTION_REGION(); delete pimpl->mScene; pimpl->mScene = NULL; pimpl->mErrorString = ""; ASSIMP_END_EXCEPTION_REGION(void); } // ------------------------------------------------------------------------------------------------ // Get the current error string, if any const char* Importer::GetErrorString() const { /* Must remain valid as long as ReadFile() or FreeFile() are not called */ return pimpl->mErrorString.c_str(); } // ------------------------------------------------------------------------------------------------ // Enable extra-verbose mode void Importer::SetExtraVerbose(bool bDo) { pimpl->bExtraVerbose = bDo; } // ------------------------------------------------------------------------------------------------ // Get the current scene const aiScene* Importer::GetScene() const { return pimpl->mScene; } // ------------------------------------------------------------------------------------------------ // Orphan the current scene and return it. aiScene* Importer::GetOrphanedScene() { aiScene* s = pimpl->mScene; ASSIMP_BEGIN_EXCEPTION_REGION(); pimpl->mScene = NULL; pimpl->mErrorString = ""; /* reset error string */ ASSIMP_END_EXCEPTION_REGION(aiScene*); return s; } // ------------------------------------------------------------------------------------------------ // Validate post-processing flags bool Importer::ValidateFlags(unsigned int pFlags) const { ASSIMP_BEGIN_EXCEPTION_REGION(); // run basic checks for mutually exclusive flags if(!_ValidateFlags(pFlags)) { return false; } // ValidateDS does not anymore occur in the pp list, it plays an awesome extra role ... #ifdef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS if (pFlags & aiProcess_ValidateDataStructure) { return false; } #endif pFlags &= ~aiProcess_ValidateDataStructure; // Now iterate through all bits which are set in the flags and check whether we find at least // one pp plugin which handles it. for (unsigned int mask = 1; mask < (1u << (sizeof(unsigned int)*8-1));mask <<= 1) { if (pFlags & mask) { bool have = false; for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) { if (pimpl->mPostProcessingSteps[a]-> IsActive(mask) ) { have = true; break; } } if (!have) { return false; } } } ASSIMP_END_EXCEPTION_REGION(bool); return true; } // ------------------------------------------------------------------------------------------------ const aiScene* Importer::ReadFileFromMemory( const void* pBuffer, size_t pLength, unsigned int pFlags, const char* pHint /*= ""*/) { ASSIMP_BEGIN_EXCEPTION_REGION(); if (!pHint) { pHint = ""; } if (!pBuffer || !pLength || strlen(pHint) > MaxLenHint ) { pimpl->mErrorString = "Invalid parameters passed to ReadFileFromMemory()"; return NULL; } // prevent deletion of the previous IOHandler IOSystem* io = pimpl->mIOHandler; pimpl->mIOHandler = NULL; SetIOHandler(new MemoryIOSystem((const uint8_t*)pBuffer,pLength,io)); // read the file and recover the previous IOSystem static const size_t BufSize(Importer::MaxLenHint + 28); char fbuff[BufSize]; ai_snprintf(fbuff, BufSize, "%s.%s",AI_MEMORYIO_MAGIC_FILENAME,pHint); ReadFile(fbuff,pFlags); SetIOHandler(io); ASSIMP_END_EXCEPTION_REGION(const aiScene*); return pimpl->mScene; } // ------------------------------------------------------------------------------------------------ void WriteLogOpening(const std::string& file) { ASSIMP_LOG_INFO_F("Load ", file); // print a full version dump. This is nice because we don't // need to ask the authors of incoming bug reports for // the library version they're using - a log dump is // sufficient. const unsigned int flags( aiGetCompileFlags() ); std::stringstream stream; stream << "Assimp " << aiGetVersionMajor() << "." << aiGetVersionMinor() << "." << aiGetVersionRevision() << " " #if defined(ASSIMP_BUILD_ARCHITECTURE) << ASSIMP_BUILD_ARCHITECTURE #elif defined(_M_IX86) || defined(__x86_32__) || defined(__i386__) << "x86" #elif defined(_M_X64) || defined(__x86_64__) << "amd64" #elif defined(_M_IA64) || defined(__ia64__) << "itanium" #elif defined(__ppc__) || defined(__powerpc__) << "ppc32" #elif defined(__powerpc64__) << "ppc64" #elif defined(__arm__) << "arm" #else << "<unknown architecture>" #endif << " " #if defined(ASSIMP_BUILD_COMPILER) << ( ASSIMP_BUILD_COMPILER ) #elif defined(_MSC_VER) << "msvc" #elif defined(__GNUC__) << "gcc" #else << "<unknown compiler>" #endif #ifdef ASSIMP_BUILD_DEBUG << " debug" #endif << (flags & ASSIMP_CFLAGS_NOBOOST ? " noboost" : "") << (flags & ASSIMP_CFLAGS_SHARED ? " shared" : "") << (flags & ASSIMP_CFLAGS_SINGLETHREADED ? " singlethreaded" : ""); ASSIMP_LOG_DEBUG(stream.str()); } // ------------------------------------------------------------------------------------------------ // Reads the given file and returns its contents if successful. const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags) { ASSIMP_BEGIN_EXCEPTION_REGION(); const std::string pFile(_pFile); // ---------------------------------------------------------------------- // Put a large try block around everything to catch all std::exception's // that might be thrown by STL containers or by new(). // ImportErrorException's are throw by ourselves and caught elsewhere. //----------------------------------------------------------------------- WriteLogOpening(pFile); #ifdef ASSIMP_CATCH_GLOBAL_EXCEPTIONS try #endif // ! ASSIMP_CATCH_GLOBAL_EXCEPTIONS { // Check whether this Importer instance has already loaded // a scene. In this case we need to delete the old one if (pimpl->mScene) { ASSIMP_LOG_DEBUG("(Deleting previous scene)"); FreeScene(); } // First check if the file is accessible at all if( !pimpl->mIOHandler->Exists( pFile)) { pimpl->mErrorString = "Unable to open file \"" + pFile + "\"."; ASSIMP_LOG_ERROR(pimpl->mErrorString); return NULL; } std::unique_ptr<Profiler> profiler(GetPropertyInteger(AI_CONFIG_GLOB_MEASURE_TIME,0)?new Profiler():NULL); if (profiler) { profiler->BeginRegion("total"); } // Find an worker class which can handle the file BaseImporter* imp = NULL; SetPropertyInteger("importerIndex", -1); for( unsigned int a = 0; a < pimpl->mImporter.size(); a++) { if( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, false)) { imp = pimpl->mImporter[a]; SetPropertyInteger("importerIndex", a); break; } } if (!imp) { // not so bad yet ... try format auto detection. const std::string::size_type s = pFile.find_last_of('.'); if (s != std::string::npos) { ASSIMP_LOG_INFO("File extension not known, trying signature-based detection"); for( unsigned int a = 0; a < pimpl->mImporter.size(); a++) { if( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, true)) { imp = pimpl->mImporter[a]; SetPropertyInteger("importerIndex", a); break; } } } // Put a proper error message if no suitable importer was found if( !imp) { pimpl->mErrorString = "No suitable reader found for the file format of file \"" + pFile + "\"."; ASSIMP_LOG_ERROR(pimpl->mErrorString); return NULL; } } // Get file size for progress handler IOStream * fileIO = pimpl->mIOHandler->Open( pFile ); uint32_t fileSize = 0; if (fileIO) { fileSize = static_cast<uint32_t>(fileIO->FileSize()); pimpl->mIOHandler->Close( fileIO ); } // Dispatch the reading to the worker class for this format const aiImporterDesc *desc( imp->GetInfo() ); std::string ext( "unknown" ); if ( NULL != desc ) { ext = desc->mName; } ASSIMP_LOG_INFO("Found a matching importer for this file format: " + ext + "." ); pimpl->mProgressHandler->UpdateFileRead( 0, fileSize ); if (profiler) { profiler->BeginRegion("import"); } pimpl->mScene = imp->ReadFile( this, pFile, pimpl->mIOHandler); pimpl->mProgressHandler->UpdateFileRead( fileSize, fileSize ); if (profiler) { profiler->EndRegion("import"); } SetPropertyString("sourceFilePath", pFile); // If successful, apply all active post processing steps to the imported data if( pimpl->mScene) { #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS // The ValidateDS process is an exception. It is executed first, even before ScenePreprocessor is called. if (pFlags & aiProcess_ValidateDataStructure) { ValidateDSProcess ds; ds.ExecuteOnScene (this); if (!pimpl->mScene) { return NULL; } } #endif // no validation // Preprocess the scene and prepare it for post-processing if (profiler) { profiler->BeginRegion("preprocess"); } ScenePreprocessor pre(pimpl->mScene); pre.ProcessScene(); if (profiler) { profiler->EndRegion("preprocess"); } // Ensure that the validation process won't be called twice ApplyPostProcessing(pFlags & (~aiProcess_ValidateDataStructure)); } // if failed, extract the error string else if( !pimpl->mScene) { pimpl->mErrorString = imp->GetErrorText(); } // clear any data allocated by post-process steps pimpl->mPPShared->Clean(); if (profiler) { profiler->EndRegion("total"); } } #ifdef ASSIMP_CATCH_GLOBAL_EXCEPTIONS catch (std::exception &e) { #if (defined _MSC_VER) && (defined _CPPRTTI) // if we have RTTI get the full name of the exception that occurred pimpl->mErrorString = std::string(typeid( e ).name()) + ": " + e.what(); #else pimpl->mErrorString = std::string("std::exception: ") + e.what(); #endif ASSIMP_LOG_ERROR(pimpl->mErrorString); delete pimpl->mScene; pimpl->mScene = NULL; } #endif // ! ASSIMP_CATCH_GLOBAL_EXCEPTIONS // either successful or failure - the pointer expresses it anyways ASSIMP_END_EXCEPTION_REGION(const aiScene*); return pimpl->mScene; } // ------------------------------------------------------------------------------------------------ // Apply post-processing to the currently bound scene const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags) { ASSIMP_BEGIN_EXCEPTION_REGION(); // Return immediately if no scene is active if (!pimpl->mScene) { return NULL; } // If no flags are given, return the current scene with no further action if (!pFlags) { return pimpl->mScene; } // In debug builds: run basic flag validation ai_assert(_ValidateFlags(pFlags)); ASSIMP_LOG_INFO("Entering post processing pipeline"); #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS // The ValidateDS process plays an exceptional role. It isn't contained in the global // list of post-processing steps, so we need to call it manually. if (pFlags & aiProcess_ValidateDataStructure) { ValidateDSProcess ds; ds.ExecuteOnScene (this); if (!pimpl->mScene) { return NULL; } } #endif // no validation #ifdef ASSIMP_BUILD_DEBUG if (pimpl->bExtraVerbose) { #ifdef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS ASSIMP_LOG_ERROR("Verbose Import is not available due to build settings"); #endif // no validation pFlags |= aiProcess_ValidateDataStructure; } #else if (pimpl->bExtraVerbose) { ASSIMP_LOG_WARN("Not a debug build, ignoring extra verbose setting"); } #endif // ! DEBUG std::unique_ptr<Profiler> profiler(GetPropertyInteger(AI_CONFIG_GLOB_MEASURE_TIME,0)?new Profiler():NULL); for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) { BaseProcess* process = pimpl->mPostProcessingSteps[a]; pimpl->mProgressHandler->UpdatePostProcess(static_cast<int>(a), static_cast<int>(pimpl->mPostProcessingSteps.size()) ); if( process->IsActive( pFlags)) { if (profiler) { profiler->BeginRegion("postprocess"); } process->ExecuteOnScene ( this ); if (profiler) { profiler->EndRegion("postprocess"); } } if( !pimpl->mScene) { break; } #ifdef ASSIMP_BUILD_DEBUG #ifdef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS continue; #endif // no validation // If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step if (pimpl->bExtraVerbose) { ASSIMP_LOG_DEBUG("Verbose Import: re-validating data structures"); ValidateDSProcess ds; ds.ExecuteOnScene (this); if( !pimpl->mScene) { ASSIMP_LOG_ERROR("Verbose Import: failed to re-validate data structures"); break; } } #endif // ! DEBUG } pimpl->mProgressHandler->UpdatePostProcess( static_cast<int>(pimpl->mPostProcessingSteps.size()), static_cast<int>(pimpl->mPostProcessingSteps.size()) ); // update private scene flags if( pimpl->mScene ) ScenePriv(pimpl->mScene)->mPPStepsApplied |= pFlags; // clear any data allocated by post-process steps pimpl->mPPShared->Clean(); ASSIMP_LOG_INFO("Leaving post processing pipeline"); ASSIMP_END_EXCEPTION_REGION(const aiScene*); return pimpl->mScene; } // ------------------------------------------------------------------------------------------------ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess, bool requestValidation ) { ASSIMP_BEGIN_EXCEPTION_REGION(); // Return immediately if no scene is active if ( NULL == pimpl->mScene ) { return NULL; } // If no flags are given, return the current scene with no further action if ( NULL == rootProcess ) { return pimpl->mScene; } // In debug builds: run basic flag validation ASSIMP_LOG_INFO( "Entering customized post processing pipeline" ); #ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS // The ValidateDS process plays an exceptional role. It isn't contained in the global // list of post-processing steps, so we need to call it manually. if ( requestValidation ) { ValidateDSProcess ds; ds.ExecuteOnScene( this ); if ( !pimpl->mScene ) { return NULL; } } #endif // no validation #ifdef ASSIMP_BUILD_DEBUG if ( pimpl->bExtraVerbose ) { #ifdef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS ASSIMP_LOG_ERROR( "Verbose Import is not available due to build settings" ); #endif // no validation } #else if ( pimpl->bExtraVerbose ) { ASSIMP_LOG_WARN( "Not a debug build, ignoring extra verbose setting" ); } #endif // ! DEBUG std::unique_ptr<Profiler> profiler( GetPropertyInteger( AI_CONFIG_GLOB_MEASURE_TIME, 0 ) ? new Profiler() : NULL ); if ( profiler ) { profiler->BeginRegion( "postprocess" ); } rootProcess->ExecuteOnScene( this ); if ( profiler ) { profiler->EndRegion( "postprocess" ); } // If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step if ( pimpl->bExtraVerbose || requestValidation ) { ASSIMP_LOG_DEBUG( "Verbose Import: revalidating data structures" ); ValidateDSProcess ds; ds.ExecuteOnScene( this ); if ( !pimpl->mScene ) { ASSIMP_LOG_ERROR( "Verbose Import: failed to revalidate data structures" ); } } // clear any data allocated by post-process steps pimpl->mPPShared->Clean(); ASSIMP_LOG_INFO( "Leaving customized post processing pipeline" ); ASSIMP_END_EXCEPTION_REGION( const aiScene* ); return pimpl->mScene; } // ------------------------------------------------------------------------------------------------ // Helper function to check whether an extension is supported by ASSIMP bool Importer::IsExtensionSupported(const char* szExtension) const { return nullptr != GetImporter(szExtension); } // ------------------------------------------------------------------------------------------------ size_t Importer::GetImporterCount() const { return pimpl->mImporter.size(); } // ------------------------------------------------------------------------------------------------ const aiImporterDesc* Importer::GetImporterInfo(size_t index) const { if (index >= pimpl->mImporter.size()) { return NULL; } return pimpl->mImporter[index]->GetInfo(); } // ------------------------------------------------------------------------------------------------ BaseImporter* Importer::GetImporter (size_t index) const { if (index >= pimpl->mImporter.size()) { return NULL; } return pimpl->mImporter[index]; } // ------------------------------------------------------------------------------------------------ // Find a loader plugin for a given file extension BaseImporter* Importer::GetImporter (const char* szExtension) const { return GetImporter(GetImporterIndex(szExtension)); } // ------------------------------------------------------------------------------------------------ // Find a loader plugin for a given file extension size_t Importer::GetImporterIndex (const char* szExtension) const { ai_assert(nullptr != szExtension); ASSIMP_BEGIN_EXCEPTION_REGION(); // skip over wildcard and dot characters at string head -- for ( ; *szExtension == '*' || *szExtension == '.'; ++szExtension ); std::string ext(szExtension); if (ext.empty()) { return static_cast<size_t>(-1); } std::transform( ext.begin(), ext.end(), ext.begin(), ToLower<char> ); std::set<std::string> str; for (std::vector<BaseImporter*>::const_iterator i = pimpl->mImporter.begin();i != pimpl->mImporter.end();++i) { str.clear(); (*i)->GetExtensionList(str); for (std::set<std::string>::const_iterator it = str.begin(); it != str.end(); ++it) { if (ext == *it) { return std::distance(static_cast< std::vector<BaseImporter*>::const_iterator >(pimpl->mImporter.begin()), i); } } } ASSIMP_END_EXCEPTION_REGION(size_t); return static_cast<size_t>(-1); } // ------------------------------------------------------------------------------------------------ // Helper function to build a list of all file extensions supported by ASSIMP void Importer::GetExtensionList(aiString& szOut) const { ASSIMP_BEGIN_EXCEPTION_REGION(); std::set<std::string> str; for (std::vector<BaseImporter*>::const_iterator i = pimpl->mImporter.begin();i != pimpl->mImporter.end();++i) { (*i)->GetExtensionList(str); } // List can be empty if( !str.empty() ) { for (std::set<std::string>::const_iterator it = str.begin();; ) { szOut.Append("*."); szOut.Append((*it).c_str()); if (++it == str.end()) { break; } szOut.Append(";"); } } ASSIMP_END_EXCEPTION_REGION(void); } // ------------------------------------------------------------------------------------------------ // Set a configuration property bool Importer::SetPropertyInteger(const char* szName, int iValue) { bool existing; ASSIMP_BEGIN_EXCEPTION_REGION(); existing = SetGenericProperty<int>(pimpl->mIntProperties, szName,iValue); ASSIMP_END_EXCEPTION_REGION(bool); return existing; } // ------------------------------------------------------------------------------------------------ // Set a configuration property bool Importer::SetPropertyFloat(const char* szName, ai_real iValue) { bool existing; ASSIMP_BEGIN_EXCEPTION_REGION(); existing = SetGenericProperty<ai_real>(pimpl->mFloatProperties, szName,iValue); ASSIMP_END_EXCEPTION_REGION(bool); return existing; } // ------------------------------------------------------------------------------------------------ // Set a configuration property bool Importer::SetPropertyString(const char* szName, const std::string& value) { bool existing; ASSIMP_BEGIN_EXCEPTION_REGION(); existing = SetGenericProperty<std::string>(pimpl->mStringProperties, szName,value); ASSIMP_END_EXCEPTION_REGION(bool); return existing; } // ------------------------------------------------------------------------------------------------ // Set a configuration property bool Importer::SetPropertyMatrix(const char* szName, const aiMatrix4x4& value) { bool existing; ASSIMP_BEGIN_EXCEPTION_REGION(); existing = SetGenericProperty<aiMatrix4x4>(pimpl->mMatrixProperties, szName,value); ASSIMP_END_EXCEPTION_REGION(bool); return existing; } // ------------------------------------------------------------------------------------------------ // Get a configuration property int Importer::GetPropertyInteger(const char* szName, int iErrorReturn /*= 0xffffffff*/) const { return GetGenericProperty<int>(pimpl->mIntProperties,szName,iErrorReturn); } // ------------------------------------------------------------------------------------------------ // Get a configuration property ai_real Importer::GetPropertyFloat(const char* szName, ai_real iErrorReturn /*= 10e10*/) const { return GetGenericProperty<ai_real>(pimpl->mFloatProperties,szName,iErrorReturn); } // ------------------------------------------------------------------------------------------------ // Get a configuration property const std::string Importer::GetPropertyString(const char* szName, const std::string& iErrorReturn /*= ""*/) const { return GetGenericProperty<std::string>(pimpl->mStringProperties,szName,iErrorReturn); } // ------------------------------------------------------------------------------------------------ // Get a configuration property const aiMatrix4x4 Importer::GetPropertyMatrix(const char* szName, const aiMatrix4x4& iErrorReturn /*= aiMatrix4x4()*/) const { return GetGenericProperty<aiMatrix4x4>(pimpl->mMatrixProperties,szName,iErrorReturn); } // ------------------------------------------------------------------------------------------------ // Get the memory requirements of a single node inline void AddNodeWeight(unsigned int& iScene,const aiNode* pcNode) { iScene += sizeof(aiNode); iScene += sizeof(unsigned int) * pcNode->mNumMeshes; iScene += sizeof(void*) * pcNode->mNumChildren; for (unsigned int i = 0; i < pcNode->mNumChildren;++i) { AddNodeWeight(iScene,pcNode->mChildren[i]); } } // ------------------------------------------------------------------------------------------------ // Get the memory requirements of the scene void Importer::GetMemoryRequirements(aiMemoryInfo& in) const { in = aiMemoryInfo(); aiScene* mScene = pimpl->mScene; // return if we have no scene loaded if (!pimpl->mScene) return; in.total = sizeof(aiScene); // add all meshes for (unsigned int i = 0; i < mScene->mNumMeshes;++i) { in.meshes += sizeof(aiMesh); if (mScene->mMeshes[i]->HasPositions()) { in.meshes += sizeof(aiVector3D) * mScene->mMeshes[i]->mNumVertices; } if (mScene->mMeshes[i]->HasNormals()) { in.meshes += sizeof(aiVector3D) * mScene->mMeshes[i]->mNumVertices; } if (mScene->mMeshes[i]->HasTangentsAndBitangents()) { in.meshes += sizeof(aiVector3D) * mScene->mMeshes[i]->mNumVertices * 2; } for (unsigned int a = 0; a < AI_MAX_NUMBER_OF_COLOR_SETS;++a) { if (mScene->mMeshes[i]->HasVertexColors(a)) { in.meshes += sizeof(aiColor4D) * mScene->mMeshes[i]->mNumVertices; } else break; } for (unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS;++a) { if (mScene->mMeshes[i]->HasTextureCoords(a)) { in.meshes += sizeof(aiVector3D) * mScene->mMeshes[i]->mNumVertices; } else break; } if (mScene->mMeshes[i]->HasBones()) { in.meshes += sizeof(void*) * mScene->mMeshes[i]->mNumBones; for (unsigned int p = 0; p < mScene->mMeshes[i]->mNumBones;++p) { in.meshes += sizeof(aiBone); in.meshes += mScene->mMeshes[i]->mBones[p]->mNumWeights * sizeof(aiVertexWeight); } } in.meshes += (sizeof(aiFace) + 3 * sizeof(unsigned int))*mScene->mMeshes[i]->mNumFaces; } in.total += in.meshes; // add all embedded textures for (unsigned int i = 0; i < mScene->mNumTextures;++i) { const aiTexture* pc = mScene->mTextures[i]; in.textures += sizeof(aiTexture); if (pc->mHeight) { in.textures += 4 * pc->mHeight * pc->mWidth; } else in.textures += pc->mWidth; } in.total += in.textures; // add all animations for (unsigned int i = 0; i < mScene->mNumAnimations;++i) { const aiAnimation* pc = mScene->mAnimations[i]; in.animations += sizeof(aiAnimation); // add all bone anims for (unsigned int a = 0; a < pc->mNumChannels; ++a) { const aiNodeAnim* pc2 = pc->mChannels[i]; in.animations += sizeof(aiNodeAnim); in.animations += pc2->mNumPositionKeys * sizeof(aiVectorKey); in.animations += pc2->mNumScalingKeys * sizeof(aiVectorKey); in.animations += pc2->mNumRotationKeys * sizeof(aiQuatKey); } } in.total += in.animations; // add all cameras and all lights in.total += in.cameras = sizeof(aiCamera) * mScene->mNumCameras; in.total += in.lights = sizeof(aiLight) * mScene->mNumLights; // add all nodes AddNodeWeight(in.nodes,mScene->mRootNode); in.total += in.nodes; // add all materials for (unsigned int i = 0; i < mScene->mNumMaterials;++i) { const aiMaterial* pc = mScene->mMaterials[i]; in.materials += sizeof(aiMaterial); in.materials += pc->mNumAllocated * sizeof(void*); for (unsigned int a = 0; a < pc->mNumProperties;++a) { in.materials += pc->mProperties[a]->mDataLength; } } in.total += in.materials; }
Huller Hille 4- and 5-axis machine centers are standard equipment in machine shops across the United States and North America. These flexible manufacturing systems are known for their rugged construction, remarkable productivity and unsurpassed durability. The latest Huller Hille models are designed and engineered to deliver increased output at a lower cost per part, making them a welcome addition to any machining operation looking for ways to minimize expenses without sacrificing performance. Keeping your Huller Hille machines in peak operating condition is essential maintaining the productivity of your machine shop. Colonial Tool Group has the expertise and resources to perform timely Huller Hille spindle repair service, including 24-hour emergency service when needed, and reduce unproductive downtime. We can also refurbish Huller Hille spindles, offering a cost-effective alternative to a spindle replacement. Huller Hille GmbH is a leading global manufacturer of advanced vertical and horizontal machining centers and flexible manufacturing centers for a diverse range of industries, including rail, energy, automotive and many others. Founded in 1947 and currently headquartered in Mosbach, Germany, Huller Hille continues to be an innovator in the design, engineering and production of superior machine tool products that set the standard for the entire industry. We’ll perform a thorough visual inspection and comprehensive component inspection and testing to determine the cause of the failure. We’ll send you a detailed condition report and a “not to exceed” price quote before any work begins. Upon your approval, our expert service technicians will perform the necessary repair work with speed and efficiency. In some cases, the damage or wear to your spindle may be well beyond the scope of a basic repair. In these situations, we often recommend rebuilding the spindle from the ground up. We’ll identify and replace all malfunctioning parts and components to restore the spindle to like-new condition. We’ll also test the reconstructed spindle to ensure it will meet your performance and durability requirements. We can complete a Huller Hille spindle rebuild in approximately 2-3 weeks. Why Choose CTGI for Your Huller Hille Machine Tool Repair/Refurbishment Needs? Along with our more than 80 years of machine tool experience, Colonial Tool Group is committed to doing whatever it takes to get your spindles back on the job as quickly as possible. Our team of accomplished service technicians, engineers, machinists and other skilled professionals will work hard to deliver a rapid solution that meets your needs and budget. Learn more about the benefits of relying on Colonial Tool Group for all your Huller Hille spindle repair and rebuild needs. Contact us for additional service and pricing information today.
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2013 Torus Knot Software Ltd 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 "OgreD3D9Device.h" #include "OgreD3D9DeviceManager.h" #include "OgreD3D9Driver.h" #include "OgreD3D9RenderSystem.h" #include "OgreD3D9ResourceManager.h" #include "OgreD3D9RenderWindow.h" #include "OgreRoot.h" #include "OgreHardwareBufferManager.h" namespace Ogre { HWND D3D9Device::msSharedFocusWindow = NULL; //--------------------------------------------------------------------- D3D9Device::D3D9Device(D3D9DeviceManager* deviceManager, UINT adapterNumber, HMONITOR hMonitor, D3DDEVTYPE devType, DWORD behaviorFlags) { mDeviceManager = deviceManager; mDevice = NULL; mAdapterNumber = adapterNumber; mMonitor = hMonitor; mDeviceType = devType; mFocusWindow = NULL; mBehaviorFlags = behaviorFlags; mD3D9DeviceCapsValid = false; mDeviceLost = false; mPresentationParamsCount = 0; mPresentationParams = NULL; memset(&mD3D9DeviceCaps, 0, sizeof(mD3D9DeviceCaps)); memset(&mCreationParams, 0, sizeof(mCreationParams)); } //--------------------------------------------------------------------- D3D9Device::~D3D9Device() { } //--------------------------------------------------------------------- D3D9Device::RenderWindowToResourcesIterator D3D9Device::getRenderWindowIterator(D3D9RenderWindow* renderWindow) { RenderWindowToResourcesIterator it = mMapRenderWindowToResources.find(renderWindow); if (it == mMapRenderWindowToResources.end()) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Render window was not attached to this device !!", "D3D9Device::getRenderWindowIterator" ); } return it; } //--------------------------------------------------------------------- void D3D9Device::attachRenderWindow(D3D9RenderWindow* renderWindow) { RenderWindowToResourcesIterator it = mMapRenderWindowToResources.find(renderWindow); if (it == mMapRenderWindowToResources.end()) { RenderWindowResources* renderWindowResources = OGRE_NEW_T(RenderWindowResources, MEMCATEGORY_RENDERSYS); memset(renderWindowResources, 0, sizeof(RenderWindowResources)); renderWindowResources->adapterOrdinalInGroupIndex = 0; renderWindowResources->acquired = false; mMapRenderWindowToResources[renderWindow] = renderWindowResources; } updateRenderWindowsIndices(); } //--------------------------------------------------------------------- void D3D9Device::detachRenderWindow(D3D9RenderWindow* renderWindow) { RenderWindowToResourcesIterator it = mMapRenderWindowToResources.find(renderWindow); if (it != mMapRenderWindowToResources.end()) { // The focus window in which the d3d9 device created on is detached. // resources must be acquired again. if (mFocusWindow == renderWindow->getWindowHandle()) { mFocusWindow = NULL; } // Case this is the shared focus window. if (renderWindow->getWindowHandle() == msSharedFocusWindow) setSharedWindowHandle(NULL); RenderWindowResources* renderWindowResources = it->second; releaseRenderWindowResources(renderWindowResources); OGRE_DELETE_T(renderWindowResources, RenderWindowResources, MEMCATEGORY_RENDERSYS); mMapRenderWindowToResources.erase(it); } updateRenderWindowsIndices(); } //--------------------------------------------------------------------- bool D3D9Device::acquire() { updatePresentationParameters(); bool resetDevice = false; // Create device if need to. if (mDevice == NULL) { createD3D9Device(); } // Case device already exists. else { RenderWindowToResourcesIterator itPrimary = getRenderWindowIterator(getPrimaryWindow()); if (itPrimary->second->swapChain != NULL) { D3DPRESENT_PARAMETERS currentPresentParams; HRESULT hr; hr = itPrimary->second->swapChain->GetPresentParameters(&currentPresentParams); if (FAILED(hr)) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "GetPresentParameters failed", "D3D9RenderWindow::acquire"); } // Desired parameters are different then current parameters. // Possible scenario is that primary window resized and in the mean while another // window attached to this device. if (memcmp(&currentPresentParams, &mPresentationParams[0], sizeof(D3DPRESENT_PARAMETERS)) != 0) { resetDevice = true; } } // Make sure depth stencil is set to valid surface. It is going to be // grabbed by the primary window using the GetDepthStencilSurface method. if (resetDevice == false) { mDevice->SetDepthStencilSurface(itPrimary->second->depthBuffer); } } // Reset device will update all render window resources. if (resetDevice) { reset(); } // No need to reset -> just acquire resources. else { // Update resources of each window. RenderWindowToResourcesIterator it = mMapRenderWindowToResources.begin(); while (it != mMapRenderWindowToResources.end()) { acquireRenderWindowResources(it); ++it; } } return true; } //--------------------------------------------------------------------- void D3D9Device::release() { if (mDevice != NULL) { D3D9RenderSystem* renderSystem = static_cast<D3D9RenderSystem*>(Root::getSingleton().getRenderSystem()); RenderWindowToResourcesIterator it = mMapRenderWindowToResources.begin(); while (it != mMapRenderWindowToResources.end()) { RenderWindowResources* renderWindowResources = it->second; releaseRenderWindowResources(renderWindowResources); ++it; } releaseD3D9Device(); } } //--------------------------------------------------------------------- bool D3D9Device::acquire(D3D9RenderWindow* renderWindow) { RenderWindowToResourcesIterator it = getRenderWindowIterator(renderWindow); acquireRenderWindowResources(it); return true; } //--------------------------------------------------------------------- void D3D9Device::notifyDeviceLost() { // Case this device is already in lost state. if (mDeviceLost) return; // Case we just moved from valid state to lost state. mDeviceLost = true; D3D9RenderSystem* renderSystem = static_cast<D3D9RenderSystem*>(Root::getSingleton().getRenderSystem()); renderSystem->notifyOnDeviceLost(this); } //--------------------------------------------------------------------- IDirect3DSurface9* D3D9Device::getDepthBuffer(D3D9RenderWindow* renderWindow) { RenderWindowToResourcesIterator it = getRenderWindowIterator(renderWindow); return it->second->depthBuffer; } //--------------------------------------------------------------------- IDirect3DSurface9* D3D9Device::getBackBuffer(D3D9RenderWindow* renderWindow) { RenderWindowToResourcesIterator it = getRenderWindowIterator(renderWindow); return it->second->backBuffer; } //--------------------------------------------------------------------- uint D3D9Device::getRenderWindowCount() const { return static_cast<uint>(mMapRenderWindowToResources.size()); } //--------------------------------------------------------------------- D3D9RenderWindow* D3D9Device::getRenderWindow(uint index) { if (index >= mMapRenderWindowToResources.size()) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Index of render window is out of bounds!", "D3D9RenderWindow::getRenderWindow"); } RenderWindowToResourcesIterator it = mMapRenderWindowToResources.begin(); while (it != mMapRenderWindowToResources.end()) { if (index == 0) break; --index; ++it; } return it->first; } //--------------------------------------------------------------------- void D3D9Device::setAdapterOrdinalIndex(D3D9RenderWindow* renderWindow, uint adapterOrdinalInGroupIndex) { RenderWindowToResourcesIterator it = getRenderWindowIterator(renderWindow); it->second->adapterOrdinalInGroupIndex = adapterOrdinalInGroupIndex; updateRenderWindowsIndices(); } //--------------------------------------------------------------------- void D3D9Device::destroy() { // Lock access to rendering device. D3D9RenderSystem::getResourceManager()->lockDeviceAccess(); //Remove _all_ depth buffers created by this device D3D9RenderSystem* renderSystem = static_cast<D3D9RenderSystem*>(Root::getSingleton().getRenderSystem()); renderSystem->_cleanupDepthBuffers( mDevice ); release(); RenderWindowToResourcesIterator it = mMapRenderWindowToResources.begin(); if (it != mMapRenderWindowToResources.end()) { if (it->first->getWindowHandle() == msSharedFocusWindow) setSharedWindowHandle(NULL); OGRE_DELETE_T(it->second, RenderWindowResources, MEMCATEGORY_RENDERSYS); ++it; } mMapRenderWindowToResources.clear(); // Reset dynamic attributes. mFocusWindow = NULL; mD3D9DeviceCapsValid = false; if (mPresentationParams != NULL) { OGRE_FREE (mPresentationParams, MEMCATEGORY_RENDERSYS); mPresentationParams = NULL; } mPresentationParamsCount = 0; // Notify the device manager on this instance destruction. mDeviceManager->notifyOnDeviceDestroy(this); // UnLock access to rendering device. D3D9RenderSystem::getResourceManager()->unlockDeviceAccess(); } //--------------------------------------------------------------------- bool D3D9Device::isDeviceLost() { HRESULT hr; hr = mDevice->TestCooperativeLevel(); if (hr == D3DERR_DEVICELOST || hr == D3DERR_DEVICENOTRESET) { return true; } return false; } //--------------------------------------------------------------------- bool D3D9Device::reset() { HRESULT hr; // Check that device is in valid state for reset. hr = mDevice->TestCooperativeLevel(); if (hr == D3DERR_DEVICELOST || hr == D3DERR_DRIVERINTERNALERROR) { return false; } // Lock access to rendering device. D3D9RenderSystem::getResourceManager()->lockDeviceAccess(); D3D9RenderSystem* renderSystem = static_cast<D3D9RenderSystem*>(Root::getSingleton().getRenderSystem()); // Inform all resources that device lost. D3D9RenderSystem::getResourceManager()->notifyOnDeviceLost(mDevice); // Notify all listener before device is rested renderSystem->notifyOnDeviceLost(this); // Release all automatic temporary buffers and free unused // temporary buffers, so we doesn't need to recreate them, // and they will reallocate on demand. This save a lot of // release/recreate of non-managed vertex buffers which // wasn't need at all. HardwareBufferManager::getSingleton()._releaseBufferCopies(true); // Cleanup depth stencils surfaces. renderSystem->_cleanupDepthBuffers(); updatePresentationParameters(); RenderWindowToResourcesIterator it = mMapRenderWindowToResources.begin(); while (it != mMapRenderWindowToResources.end()) { RenderWindowResources* renderWindowResources = it->second; releaseRenderWindowResources(renderWindowResources); ++it; } clearDeviceStreams(); renderSystem->fireDeviceEvent(this, "BeforeDeviceReset"); // Reset the device using the presentation parameters. hr = mDevice->Reset(mPresentationParams); renderSystem->fireDeviceEvent(this, "AfterDeviceReset"); if (hr == D3DERR_DEVICELOST) { // UnLock access to rendering device. D3D9RenderSystem::getResourceManager()->unlockDeviceAccess(); // Don't continue return false; } else if (FAILED(hr)) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Cannot reset device!", "D3D9RenderWindow::reset"); } mDeviceLost = false; // Initialize device states. setupDeviceStates(); // Update resources of each window. it = mMapRenderWindowToResources.begin(); while (it != mMapRenderWindowToResources.end()) { acquireRenderWindowResources(it); ++it; } D3D9Device* pCurActiveDevice = mDeviceManager->getActiveDevice(); mDeviceManager->setActiveDevice(this); // Inform all resources that device has been reset. D3D9RenderSystem::getResourceManager()->notifyOnDeviceReset(mDevice); mDeviceManager->setActiveDevice(pCurActiveDevice); renderSystem->notifyOnDeviceReset(this); // UnLock access to rendering device. D3D9RenderSystem::getResourceManager()->unlockDeviceAccess(); return true; } //--------------------------------------------------------------------- bool D3D9Device::isAutoDepthStencil() const { const D3DPRESENT_PARAMETERS& primaryPresentationParams = mPresentationParams[0]; // Check if auto depth stencil can be used. for (unsigned int i = 1; i < mPresentationParamsCount; i++) { // disable AutoDepthStencil if these parameters are not all the same. if(primaryPresentationParams.BackBufferHeight != mPresentationParams[i].BackBufferHeight || primaryPresentationParams.BackBufferWidth != mPresentationParams[i].BackBufferWidth || primaryPresentationParams.BackBufferFormat != mPresentationParams[i].BackBufferFormat || primaryPresentationParams.AutoDepthStencilFormat != mPresentationParams[i].AutoDepthStencilFormat || primaryPresentationParams.MultiSampleQuality != mPresentationParams[i].MultiSampleQuality || primaryPresentationParams.MultiSampleType != mPresentationParams[i].MultiSampleType) { return false; } } return true; } //--------------------------------------------------------------------- bool D3D9Device::isFullScreen() const { if (mPresentationParamsCount > 0 && mPresentationParams[0].Windowed == FALSE) return true; return false; } //--------------------------------------------------------------------- const D3DCAPS9& D3D9Device::getD3D9DeviceCaps() const { if (mD3D9DeviceCapsValid == false) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Device caps are invalid!", "D3D9Device::getD3D9DeviceCaps" ); } return mD3D9DeviceCaps; } //--------------------------------------------------------------------- D3DFORMAT D3D9Device::getBackBufferFormat() const { if (mPresentationParams == NULL || mPresentationParamsCount == 0) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Presentation parameters are invalid!", "D3D9Device::getBackBufferFormat" ); } return mPresentationParams[0].BackBufferFormat; } //--------------------------------------------------------------------- IDirect3DDevice9* D3D9Device::getD3D9Device() { return mDevice; } //--------------------------------------------------------------------- void D3D9Device::updatePresentationParameters() { // Clear old presentation parameters. if (mPresentationParams != NULL) { OGRE_FREE (mPresentationParams, MEMCATEGORY_RENDERSYS); mPresentationParams = NULL; } mPresentationParamsCount = 0; if (mMapRenderWindowToResources.size() > 0) { mPresentationParams = OGRE_ALLOC_T(D3DPRESENT_PARAMETERS, mMapRenderWindowToResources.size(), MEMCATEGORY_RENDERSYS); RenderWindowToResourcesIterator it = mMapRenderWindowToResources.begin(); while (it != mMapRenderWindowToResources.end()) { D3D9RenderWindow* renderWindow = it->first; RenderWindowResources* renderWindowResources = it->second; // Ask the render window to build it's own parameters. renderWindow->buildPresentParameters(&renderWindowResources->presentParameters); // Update shared focus window handle. if (renderWindow->isFullScreen() && renderWindowResources->presentParametersIndex == 0 && msSharedFocusWindow == NULL) setSharedWindowHandle(renderWindow->getWindowHandle()); // This is the primary window or a full screen window that is part of multi head device. if (renderWindowResources->presentParametersIndex == 0 || renderWindow->isFullScreen()) { mPresentationParams[renderWindowResources->presentParametersIndex] = renderWindowResources->presentParameters; mPresentationParamsCount++; } ++it; } } // Case we have to cancel auto depth stencil. if (isMultihead() && isAutoDepthStencil() == false) { for(unsigned int i = 0; i < mPresentationParamsCount; i++) { mPresentationParams[i].EnableAutoDepthStencil = false; } } } //--------------------------------------------------------------------- UINT D3D9Device::getAdapterNumber() const { return mAdapterNumber; } //--------------------------------------------------------------------- D3DDEVTYPE D3D9Device::getDeviceType() const { return mDeviceType; } //--------------------------------------------------------------------- bool D3D9Device::isMultihead() const { RenderWindowToResourcesMap::const_iterator it = mMapRenderWindowToResources.begin(); while (it != mMapRenderWindowToResources.end()) { RenderWindowResources* renderWindowResources = it->second; if (renderWindowResources->adapterOrdinalInGroupIndex > 0 && it->first->isFullScreen()) { return true; } ++it; } return false; } //--------------------------------------------------------------------- void D3D9Device::clearDeviceStreams() { D3D9RenderSystem* renderSystem = static_cast<D3D9RenderSystem*>(Root::getSingleton().getRenderSystem()); // Set all texture units to nothing to release texture surfaces for (DWORD stage = 0; stage < mD3D9DeviceCaps.MaxSimultaneousTextures; ++stage) { DWORD dwCurValue = D3DTOP_FORCE_DWORD; HRESULT hr; hr = mDevice->SetTexture(stage, NULL); if( hr != S_OK ) { String str = "Unable to disable texture '" + StringConverter::toString((unsigned int)stage) + "' in D3D9"; OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9Device::clearDeviceStreams" ); } mDevice->GetTextureStageState(static_cast<DWORD>(stage), D3DTSS_COLOROP, &dwCurValue); if (dwCurValue != D3DTOP_DISABLE) { hr = mDevice->SetTextureStageState(static_cast<DWORD>(stage), D3DTSS_COLOROP, D3DTOP_DISABLE); if( hr != S_OK ) { String str = "Unable to disable texture '" + StringConverter::toString((unsigned)stage) + "' in D3D9"; OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, str, "D3D9Device::clearDeviceStreams" ); } } // set stage desc. to defaults renderSystem->mTexStageDesc[stage].pTex = 0; renderSystem->mTexStageDesc[stage].autoTexCoordType = TEXCALC_NONE; renderSystem->mTexStageDesc[stage].coordIndex = 0; renderSystem->mTexStageDesc[stage].texType = D3D9Mappings::D3D_TEX_TYPE_NORMAL; } // Unbind any vertex streams to avoid memory leaks for (unsigned int i = 0; i < mD3D9DeviceCaps.MaxStreams; ++i) { mDevice->SetStreamSource(i, NULL, 0, 0); } } //--------------------------------------------------------------------- void D3D9Device::createD3D9Device() { // Update focus window. D3D9RenderWindow* primaryRenderWindow = getPrimaryWindow(); // Case we have to share the same focus window. if (msSharedFocusWindow != NULL) mFocusWindow = msSharedFocusWindow; else mFocusWindow = primaryRenderWindow->getWindowHandle(); IDirect3D9* pD3D9 = D3D9RenderSystem::getDirect3D9(); HRESULT hr; if (isMultihead()) { mBehaviorFlags |= D3DCREATE_ADAPTERGROUP_DEVICE; } else { mBehaviorFlags &= ~D3DCREATE_ADAPTERGROUP_DEVICE; } // Try to create the device with hardware vertex processing. mBehaviorFlags |= D3DCREATE_HARDWARE_VERTEXPROCESSING; hr = pD3D9->CreateDevice(mAdapterNumber, mDeviceType, mFocusWindow, mBehaviorFlags, mPresentationParams, &mDevice); if (FAILED(hr)) { // Try a second time, may fail the first time due to back buffer count, // which will be corrected down to 1 by the runtime hr = pD3D9->CreateDevice(mAdapterNumber, mDeviceType, mFocusWindow, mBehaviorFlags, mPresentationParams, &mDevice); } // Case hardware vertex processing failed. if( FAILED( hr ) ) { // Try to create the device with mixed vertex processing. mBehaviorFlags &= ~D3DCREATE_HARDWARE_VERTEXPROCESSING; mBehaviorFlags |= D3DCREATE_MIXED_VERTEXPROCESSING; hr = pD3D9->CreateDevice(mAdapterNumber, mDeviceType, mFocusWindow, mBehaviorFlags, mPresentationParams, &mDevice); } if( FAILED( hr ) ) { // try to create the device with software vertex processing. mBehaviorFlags &= ~D3DCREATE_MIXED_VERTEXPROCESSING; mBehaviorFlags |= D3DCREATE_SOFTWARE_VERTEXPROCESSING; hr = pD3D9->CreateDevice(mAdapterNumber, mDeviceType, mFocusWindow, mBehaviorFlags, mPresentationParams, &mDevice); } if ( FAILED( hr ) ) { // try reference device mDeviceType = D3DDEVTYPE_REF; hr = pD3D9->CreateDevice(mAdapterNumber, mDeviceType, mFocusWindow, mBehaviorFlags, mPresentationParams, &mDevice); if ( FAILED( hr ) ) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Cannot create device!", "D3D9Device::createD3D9Device" ); } } // Get current device caps. hr = mDevice->GetDeviceCaps(&mD3D9DeviceCaps); if( FAILED( hr ) ) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Cannot get device caps!", "D3D9Device::createD3D9Device" ); } // Get current creation parameters caps. hr = mDevice->GetCreationParameters(&mCreationParams); if ( FAILED(hr) ) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error Get Creation Parameters", "D3D9Device:createD3D9Device" ); } mD3D9DeviceCapsValid = true; // Initialize device states. setupDeviceStates(); // Lock access to rendering device. D3D9RenderSystem::getResourceManager()->lockDeviceAccess(); D3D9Device* pCurActiveDevice = mDeviceManager->getActiveDevice(); mDeviceManager->setActiveDevice(this); // Inform all resources that new device created. D3D9RenderSystem::getResourceManager()->notifyOnDeviceCreate(mDevice); mDeviceManager->setActiveDevice(pCurActiveDevice); D3D9RenderSystem* renderSystem = static_cast<D3D9RenderSystem*>(Root::getSingleton().getRenderSystem()); renderSystem->fireDeviceEvent(this, "DeviceCreated"); // UnLock access to rendering device. D3D9RenderSystem::getResourceManager()->unlockDeviceAccess(); } //--------------------------------------------------------------------- void D3D9Device::releaseD3D9Device() { if (mDevice != NULL) { D3D9RenderSystem* renderSystem = static_cast<D3D9RenderSystem*>(Root::getSingleton().getRenderSystem()); renderSystem->fireDeviceEvent(this, "DeviceReleased"); // Lock access to rendering device. D3D9RenderSystem::getResourceManager()->lockDeviceAccess(); D3D9Device* pCurActiveDevice = mDeviceManager->getActiveDevice(); mDeviceManager->setActiveDevice(this); // Inform all resources that device is going to be destroyed. D3D9RenderSystem::getResourceManager()->notifyOnDeviceDestroy(mDevice); mDeviceManager->setActiveDevice(pCurActiveDevice); clearDeviceStreams(); // Release device. SAFE_RELEASE(mDevice); // UnLock access to rendering device. D3D9RenderSystem::getResourceManager()->unlockDeviceAccess(); } } //--------------------------------------------------------------------- void D3D9Device::releaseRenderWindowResources(RenderWindowResources* renderWindowResources) { if( renderWindowResources->depthBuffer ) { D3D9RenderSystem* renderSystem = static_cast<D3D9RenderSystem*> (Root::getSingleton().getRenderSystem()); renderSystem->_cleanupDepthBuffers( renderWindowResources->depthBuffer ); } SAFE_RELEASE(renderWindowResources->backBuffer); SAFE_RELEASE(renderWindowResources->depthBuffer); SAFE_RELEASE(renderWindowResources->swapChain); renderWindowResources->acquired = false; } //--------------------------------------------------------------------- void D3D9Device::invalidate(D3D9RenderWindow* renderWindow) { RenderWindowToResourcesIterator it = getRenderWindowIterator(renderWindow); it->second->acquired = false; } //--------------------------------------------------------------------- bool D3D9Device::validate(D3D9RenderWindow* renderWindow) { // Validate that the render window should run on this device. if (false == validateDisplayMonitor(renderWindow)) return false; // Validate that this device created on the correct target focus window handle validateFocusWindow(); // Validate that the render window dimensions matches to back buffer dimensions. validateBackBufferSize(renderWindow); // Validate that this device is in valid rendering state. if (false == validateDeviceState(renderWindow)) return false; return true; } //--------------------------------------------------------------------- void D3D9Device::validateFocusWindow() { // Focus window changed -> device should be re-acquired. if ((msSharedFocusWindow != NULL && mCreationParams.hFocusWindow != msSharedFocusWindow) || (msSharedFocusWindow == NULL && mCreationParams.hFocusWindow != getPrimaryWindow()->getWindowHandle())) { // Lock access to rendering device. D3D9RenderSystem::getResourceManager()->lockDeviceAccess(); release(); acquire(); // UnLock access to rendering device. D3D9RenderSystem::getResourceManager()->unlockDeviceAccess(); } } //--------------------------------------------------------------------- bool D3D9Device::validateDeviceState(D3D9RenderWindow* renderWindow) { RenderWindowToResourcesIterator it = getRenderWindowIterator(renderWindow); RenderWindowResources* renderWindowResources = it->second; HRESULT hr; hr = mDevice->TestCooperativeLevel(); // Case device is not valid for rendering. if (FAILED(hr)) { // device lost, and we can't reset // can't do anything about it here, wait until we get // D3DERR_DEVICENOTRESET; rendering calls will silently fail until // then (except Present, but we ignore device lost there too) if (hr == D3DERR_DEVICELOST) { releaseRenderWindowResources(renderWindowResources); notifyDeviceLost(); return false; } // device lost, and we can reset else if (hr == D3DERR_DEVICENOTRESET) { bool deviceRestored = reset(); // Device was not restored yet. if (deviceRestored == false) { // Wait a while Sleep(50); return false; } } } // Render window resources explicitly invalidated. (Resize or window mode switch) if (renderWindowResources->acquired == false) { if (getPrimaryWindow() == renderWindow) { bool deviceRestored = reset(); // Device was not restored yet. if (deviceRestored == false) { // Wait a while Sleep(50); return false; } } else { acquire(renderWindow); } } return true; } //--------------------------------------------------------------------- void D3D9Device::validateBackBufferSize(D3D9RenderWindow* renderWindow) { RenderWindowToResourcesIterator it = getRenderWindowIterator(renderWindow); RenderWindowResources* renderWindowResources = it->second; // Case size has been changed. if (renderWindow->getWidth() != renderWindowResources->presentParameters.BackBufferWidth || renderWindow->getHeight() != renderWindowResources->presentParameters.BackBufferHeight) { if (renderWindow->getWidth() > 0) renderWindowResources->presentParameters.BackBufferWidth = renderWindow->getWidth(); if (renderWindow->getHeight() > 0) renderWindowResources->presentParameters.BackBufferHeight = renderWindow->getHeight(); invalidate(renderWindow); } } //--------------------------------------------------------------------- bool D3D9Device::validateDisplayMonitor(D3D9RenderWindow* renderWindow) { // Ignore full screen since it doesn't really move and it is possible // that it created using multi-head adapter so for a subordinate the // native monitor handle and this device handle will be different. if (renderWindow->isFullScreen()) return true; RenderWindowToResourcesIterator it = getRenderWindowIterator(renderWindow); HMONITOR hRenderWindowMonitor = NULL; // Find the monitor this render window belongs to. hRenderWindowMonitor = MonitorFromWindow(renderWindow->getWindowHandle(), MONITOR_DEFAULTTONULL); // This window doesn't intersect with any of the display monitor if (hRenderWindowMonitor == NULL) return false; // Case this window changed monitor. if (hRenderWindowMonitor != mMonitor) { // Lock access to rendering device. D3D9RenderSystem::getResourceManager()->lockDeviceAccess(); mDeviceManager->linkRenderWindow(renderWindow); // UnLock access to rendering device. D3D9RenderSystem::getResourceManager()->unlockDeviceAccess(); return false; } return true; } //--------------------------------------------------------------------- void D3D9Device::present(D3D9RenderWindow* renderWindow) { RenderWindowToResourcesIterator it = getRenderWindowIterator(renderWindow); RenderWindowResources* renderWindowResources = it->second; // Skip present while current device state is invalid. if (mDeviceLost || renderWindowResources->acquired == false || isDeviceLost()) return; HRESULT hr; D3D9RenderSystem* renderSystem = static_cast<D3D9RenderSystem*>(Root::getSingleton().getRenderSystem()); renderSystem->fireDeviceEvent(this, "BeforeDevicePresent"); if (isMultihead()) { // Only the master will call present method results in synchronized // buffer swap for the rest of the implicit swap chain. if (getPrimaryWindow() == renderWindow) hr = mDevice->Present( NULL, NULL, NULL, NULL ); else hr = S_OK; } else { hr = renderWindowResources->swapChain->Present(NULL, NULL, NULL, NULL, 0); } if( D3DERR_DEVICELOST == hr) { releaseRenderWindowResources(renderWindowResources); notifyDeviceLost(); } else if( FAILED(hr) ) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Error Presenting surfaces", "D3D9Device::present" ); } else mLastPresentFrame = Root::getSingleton().getNextFrameNumber(); } //--------------------------------------------------------------------- void D3D9Device::acquireRenderWindowResources(RenderWindowToResourcesIterator it) { RenderWindowResources* renderWindowResources = it->second; D3D9RenderWindow* renderWindow = it->first; releaseRenderWindowResources(renderWindowResources); // Create additional swap chain if (isSwapChainWindow(renderWindow) && !isMultihead()) { // Create swap chain HRESULT hr = mDevice->CreateAdditionalSwapChain(&renderWindowResources->presentParameters, &renderWindowResources->swapChain); if (FAILED(hr)) { // Try a second time, may fail the first time due to back buffer count, // which will be corrected by the runtime hr = mDevice->CreateAdditionalSwapChain(&renderWindowResources->presentParameters, &renderWindowResources->swapChain); } if (FAILED(hr)) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Unable to create an additional swap chain", "D3D9RenderWindow::acquireRenderWindowResources"); } } else { // The swap chain is already created by the device HRESULT hr = mDevice->GetSwapChain(renderWindowResources->presentParametersIndex, &renderWindowResources->swapChain); if (FAILED(hr)) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Unable to get the swap chain", "D3D9RenderWindow::acquireRenderWindowResources"); } } // Store references to buffers for convenience renderWindowResources->swapChain->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &renderWindowResources->backBuffer); // Additional swap chains need their own depth buffer // to support resizing them if (renderWindow->isDepthBuffered()) { // if multihead is enabled, depth buffer can be created automatically for // all the adapters. if multihead is not enabled, depth buffer is just // created for the main swap chain if (isMultihead() && isAutoDepthStencil() || isMultihead() == false && isSwapChainWindow(renderWindow) == false) { mDevice->GetDepthStencilSurface(&renderWindowResources->depthBuffer); } else { uint targetWidth = renderWindow->getWidth(); uint targetHeight = renderWindow->getHeight(); if (targetWidth == 0) targetWidth = 1; if (targetHeight == 0) targetHeight = 1; HRESULT hr = mDevice->CreateDepthStencilSurface( targetWidth, targetHeight, renderWindowResources->presentParameters.AutoDepthStencilFormat, renderWindowResources->presentParameters.MultiSampleType, renderWindowResources->presentParameters.MultiSampleQuality, (renderWindowResources->presentParameters.Flags & D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL), &renderWindowResources->depthBuffer, NULL ); if (FAILED(hr)) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Unable to create a depth buffer for the swap chain", "D3D9RenderWindow::acquireRenderWindowResources"); } if (isSwapChainWindow(renderWindow) == false) { mDevice->SetDepthStencilSurface(renderWindowResources->depthBuffer); } } if (renderWindowResources->depthBuffer) { //Tell the RS we have a depth buffer we created it needs to add to the default pool D3D9RenderSystem* renderSystem = static_cast<D3D9RenderSystem*>(Root::getSingleton().getRenderSystem()); DepthBuffer *depthBuf = renderSystem->_addManualDepthBuffer( mDevice, renderWindowResources->depthBuffer ); //Don't forget we want this window to use _this_ depth buffer renderWindow->attachDepthBuffer( depthBuf ); } else { LogManager::getSingleton().logMessage("D3D9 : WARNING - Depth buffer could not be acquired."); } } renderWindowResources->acquired = true; } //--------------------------------------------------------------------- void D3D9Device::setupDeviceStates() { HRESULT hr = mDevice->SetRenderState(D3DRS_SPECULARENABLE, TRUE); if (FAILED(hr)) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Unable to apply render state: D3DRS_SPECULARENABLE <- TRUE", "D3D9Device::setupDeviceStates"); } } //--------------------------------------------------------------------- bool D3D9Device::isSwapChainWindow(D3D9RenderWindow* renderWindow) { RenderWindowToResourcesIterator it = getRenderWindowIterator(renderWindow); if (it->second->presentParametersIndex == 0 || renderWindow->isFullScreen()) return false; return true; } //--------------------------------------------------------------------- D3D9RenderWindow* D3D9Device::getPrimaryWindow() { RenderWindowToResourcesIterator it = mMapRenderWindowToResources.begin(); while (it != mMapRenderWindowToResources.end() && it->second->presentParametersIndex != 0) ++it; assert(it != mMapRenderWindowToResources.end()); return it->first; } //--------------------------------------------------------------------- void D3D9Device::setSharedWindowHandle(HWND hSharedHWND) { if (hSharedHWND != msSharedFocusWindow) msSharedFocusWindow = hSharedHWND; } //--------------------------------------------------------------------- void D3D9Device::updateRenderWindowsIndices() { // Update present parameters index attribute per render window. if (isMultihead()) { RenderWindowToResourcesIterator it = mMapRenderWindowToResources.begin(); // Multi head device case - // Present parameter index is based on adapter ordinal in group index. while (it != mMapRenderWindowToResources.end()) { it->second->presentParametersIndex = it->second->adapterOrdinalInGroupIndex; ++it; } } else { // Single head device case - // Just assign index in incremental order - // NOTE: It suppose to cover both cases that possible here: // 1. Single full screen window - only one allowed per device (this is not multi-head case). // 2. Multiple window mode windows. uint nextPresParamIndex = 0; RenderWindowToResourcesIterator it; D3D9RenderWindow* deviceFocusWindow = NULL; // In case a d3d9 device exists - try to keep the present parameters order // so that the window that the device is focused on will stay the same and we // will avoid device re-creation. if (mDevice != NULL) { it = mMapRenderWindowToResources.begin(); while (it != mMapRenderWindowToResources.end()) { //This "if" handles the common case of a single device if (it->first->getWindowHandle() == mCreationParams.hFocusWindow) { deviceFocusWindow = it->first; it->second->presentParametersIndex = nextPresParamIndex; ++nextPresParamIndex; break; } //This "if" handles multiple devices when a shared window is used if ((it->second->presentParametersIndex == 0) && (it->second->acquired == true)) { deviceFocusWindow = it->first; ++nextPresParamIndex; } ++it; } } it = mMapRenderWindowToResources.begin(); while (it != mMapRenderWindowToResources.end()) { if (it->first != deviceFocusWindow) { it->second->presentParametersIndex = nextPresParamIndex; ++nextPresParamIndex; } ++it; } } } //--------------------------------------------------------------------- void D3D9Device::copyContentsToMemory(D3D9RenderWindow* renderWindow, const PixelBox &dst, RenderTarget::FrameBuffer buffer) { RenderWindowToResourcesIterator it = getRenderWindowIterator(renderWindow); RenderWindowResources* resources = it->second; bool swapChain = isSwapChainWindow(renderWindow); if ((dst.left < 0) || (dst.right > renderWindow->getWidth()) || (dst.top < 0) || (dst.bottom > renderWindow->getHeight()) || (dst.front != 0) || (dst.back != 1)) { OGRE_EXCEPT(Exception::ERR_INVALIDPARAMS, "Invalid box.", "D3D9Device::copyContentsToMemory" ); } HRESULT hr; IDirect3DSurface9* pSurf = NULL; IDirect3DSurface9* pTempSurf = NULL; D3DSURFACE_DESC desc; D3DLOCKED_RECT lockedRect; if (buffer == RenderTarget::FB_AUTO) { //buffer = mIsFullScreen? FB_FRONT : FB_BACK; buffer = RenderTarget::FB_BACK; } if (buffer == RenderTarget::FB_FRONT) { D3DDISPLAYMODE dm; if (FAILED(hr = mDevice->GetDisplayMode(0, &dm))) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get display mode: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } desc.Width = dm.Width; desc.Height = dm.Height; desc.Format = D3DFMT_A8R8G8B8; if (FAILED(hr = mDevice->CreateOffscreenPlainSurface(desc.Width, desc.Height, desc.Format, D3DPOOL_SYSTEMMEM, &pTempSurf, 0))) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't create offscreen buffer: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } if (FAILED(hr = swapChain ? resources->swapChain->GetFrontBufferData(pTempSurf) : mDevice->GetFrontBufferData(0, pTempSurf))) { SAFE_RELEASE(pTempSurf); OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get front buffer: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } if(renderWindow->isFullScreen()) { if ((dst.left == 0) && (dst.right == renderWindow->getWidth()) && (dst.top == 0) && (dst.bottom == renderWindow->getHeight())) { hr = pTempSurf->LockRect(&lockedRect, 0, D3DLOCK_READONLY | D3DLOCK_NOSYSLOCK); } else { RECT rect; rect.left = static_cast<LONG>(dst.left); rect.right = static_cast<LONG>(dst.right); rect.top = static_cast<LONG>(dst.top); rect.bottom = static_cast<LONG>(dst.bottom); hr = pTempSurf->LockRect(&lockedRect, &rect, D3DLOCK_READONLY | D3DLOCK_NOSYSLOCK); } if (FAILED(hr)) { SAFE_RELEASE(pTempSurf); OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't lock rect: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } } else { RECT srcRect; //GetClientRect(mHWnd, &srcRect); srcRect.left = static_cast<LONG>(dst.left); srcRect.top = static_cast<LONG>(dst.top); srcRect.right = static_cast<LONG>(dst.right); srcRect.bottom = static_cast<LONG>(dst.bottom); POINT point; point.x = srcRect.left; point.y = srcRect.top; ClientToScreen(renderWindow->getWindowHandle(), &point); srcRect.top = point.y; srcRect.left = point.x; srcRect.bottom += point.y; srcRect.right += point.x; desc.Width = srcRect.right - srcRect.left; desc.Height = srcRect.bottom - srcRect.top; if (FAILED(hr = pTempSurf->LockRect(&lockedRect, &srcRect, D3DLOCK_READONLY | D3DLOCK_NOSYSLOCK))) { SAFE_RELEASE(pTempSurf); OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't lock rect: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } } } else { SAFE_RELEASE(pSurf); if(FAILED(hr = swapChain? resources->swapChain->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &pSurf) : mDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pSurf))) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get back buffer: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } if(FAILED(hr = pSurf->GetDesc(&desc))) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get description: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } if (FAILED(hr = mDevice->CreateOffscreenPlainSurface(desc.Width, desc.Height, desc.Format, D3DPOOL_SYSTEMMEM, &pTempSurf, 0))) { OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't create offscreen surface: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } if (desc.MultiSampleType == D3DMULTISAMPLE_NONE) { if (FAILED(hr = mDevice->GetRenderTargetData(pSurf, pTempSurf))) { SAFE_RELEASE(pTempSurf); OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get render target data: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } } else { IDirect3DSurface9* pStretchSurf = 0; if (FAILED(hr = mDevice->CreateRenderTarget(desc.Width, desc.Height, desc.Format, D3DMULTISAMPLE_NONE, 0, false, &pStretchSurf, 0))) { SAFE_RELEASE(pTempSurf); OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't create render target: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } if (FAILED(hr = mDevice->StretchRect(pSurf, 0, pStretchSurf, 0, D3DTEXF_NONE))) { SAFE_RELEASE(pTempSurf); SAFE_RELEASE(pStretchSurf); OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't stretch rect: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } if (FAILED(hr = mDevice->GetRenderTargetData(pStretchSurf, pTempSurf))) { SAFE_RELEASE(pTempSurf); SAFE_RELEASE(pStretchSurf); OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't get render target data: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } SAFE_RELEASE(pStretchSurf); } if ((dst.left == 0) && (dst.right == renderWindow->getWidth()) && (dst.top == 0) && (dst.bottom == renderWindow->getHeight())) { hr = pTempSurf->LockRect(&lockedRect, 0, D3DLOCK_READONLY | D3DLOCK_NOSYSLOCK); } else { RECT rect; rect.left = static_cast<LONG>(dst.left); rect.right = static_cast<LONG>(dst.right); rect.top = static_cast<LONG>(dst.top); rect.bottom = static_cast<LONG>(dst.bottom); hr = pTempSurf->LockRect(&lockedRect, &rect, D3DLOCK_READONLY | D3DLOCK_NOSYSLOCK); } if (FAILED(hr)) { SAFE_RELEASE(pTempSurf); OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Can't lock rect: " + Root::getSingleton().getErrorDescription(hr), "D3D9Device::copyContentsToMemory"); } } PixelFormat format = Ogre::D3D9Mappings::_getPF(desc.Format); if (format == PF_UNKNOWN) { SAFE_RELEASE(pTempSurf); OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Unsupported format", "D3D9Device::copyContentsToMemory"); } PixelBox src(dst.getWidth(), dst.getHeight(), 1, format, lockedRect.pBits); src.rowPitch = lockedRect.Pitch / PixelUtil::getNumElemBytes(format); src.slicePitch = desc.Height * src.rowPitch; PixelUtil::bulkPixelConversion(src, dst); SAFE_RELEASE(pTempSurf); SAFE_RELEASE(pSurf); } }
Filmed back-to-back with Dracula: Prince of Darkness (1966), using many of the same cast members and sets. Christopher Lee and 'Francis Matthews' spent several days filming an extended fight sequence for the film's ending. Eventually, much to Matthews's disappointment, most of the scene ended up on the cutting-room floor, leaving his bloody lip in the penultimate shot unexplained. As a young boy, Christopher Lee actually met the assassins of Rasputin (Prince Yusupoff and Dmitri Pavlovich) before playing Rasputin in the film. He also met Rasputin's daughter, Maria in 1976. This page was last modified on 25 October 2008, at 18:29.
/* * 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. */ /* * $Id: XSLTErrorResources_ca.java 468641 2006-10-28 06:54:42Z minchau $ */ package org.apache.xalan.res; import java.util.ListResourceBundle; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; /** * Set up error messages. * We build a two dimensional array of message keys and * message strings. In order to add a new message here, * you need to first add a String constant. And * you need to enter key , value pair as part of contents * Array. You also need to update MAX_CODE for error strings * and MAX_WARNING for warnings ( Needed for only information * purpose ) */ public class XSLTErrorResources_ca extends ListResourceBundle { /* * This file contains error and warning messages related to Xalan Error * Handling. * * General notes to translators: * * 1) Xalan (or more properly, Xalan-interpretive) and XSLTC are names of * components. * XSLT is an acronym for "XML Stylesheet Language: Transformations". * XSLTC is an acronym for XSLT Compiler. * * 2) A stylesheet is a description of how to transform an input XML document * into a resultant XML document (or HTML document or text). The * stylesheet itself is described in the form of an XML document. * * 3) A template is a component of a stylesheet that is used to match a * particular portion of an input document and specifies the form of the * corresponding portion of the output document. * * 4) An element is a mark-up tag in an XML document; an attribute is a * modifier on the tag. For example, in <elem attr='val' attr2='val2'> * "elem" is an element name, "attr" and "attr2" are attribute names with * the values "val" and "val2", respectively. * * 5) A namespace declaration is a special attribute that is used to associate * a prefix with a URI (the namespace). The meanings of element names and * attribute names that use that prefix are defined with respect to that * namespace. * * 6) "Translet" is an invented term that describes the class file that * results from compiling an XML stylesheet into a Java class. * * 7) XPath is a specification that describes a notation for identifying * nodes in a tree-structured representation of an XML document. An * instance of that notation is referred to as an XPath expression. * */ /** Maximum error messages, this is needed to keep track of the number of messages. */ public static final int MAX_CODE = 201; /** Maximum warnings, this is needed to keep track of the number of warnings. */ public static final int MAX_WARNING = 29; /** Maximum misc strings. */ public static final int MAX_OTHERS = 55; /** Maximum total warnings and error messages. */ public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1; /* * Static variables */ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX = "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX"; public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT = "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT"; public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE"; public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED"; public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE"; public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS"; public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD"; public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES"; public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB"; public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND"; public static final String ER_CANT_RESOLVE_NAME_AVT = "ER_CANT_RESOLVE_NAME_AVT"; public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB"; public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB"; public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB = "ER_BAD_VAL_ON_LEVEL_ATTRIB"; public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB"; public static final String ER_NEED_NAME_OR_MATCH_ATTRIB = "ER_NEED_NAME_OR_MATCH_ATTRIB"; public static final String ER_CANT_RESOLVE_NSPREFIX = "ER_CANT_RESOLVE_NSPREFIX"; public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE"; public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC"; public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR"; public static final String ER_NULL_CHILD = "ER_NULL_CHILD"; public static final String ER_NEED_SELECT_ATTRIB = "ER_NEED_SELECT_ATTRIB"; public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB"; public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB"; public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC"; public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON = "ER_COULD_NOT_CREATE_XML_PROC_LIAISON"; public static final String ER_PROCESS_NOT_SUCCESSFUL = "ER_PROCESS_NOT_SUCCESSFUL"; public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL"; public static final String ER_ENCODING_NOT_SUPPORTED = "ER_ENCODING_NOT_SUPPORTED"; public static final String ER_COULD_NOT_CREATE_TRACELISTENER = "ER_COULD_NOT_CREATE_TRACELISTENER"; public static final String ER_KEY_REQUIRES_NAME_ATTRIB = "ER_KEY_REQUIRES_NAME_ATTRIB"; public static final String ER_KEY_REQUIRES_MATCH_ATTRIB = "ER_KEY_REQUIRES_MATCH_ATTRIB"; public static final String ER_KEY_REQUIRES_USE_ATTRIB = "ER_KEY_REQUIRES_USE_ATTRIB"; public static final String ER_REQUIRES_ELEMENTS_ATTRIB = "ER_REQUIRES_ELEMENTS_ATTRIB"; public static final String ER_MISSING_PREFIX_ATTRIB = "ER_MISSING_PREFIX_ATTRIB"; public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL"; public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND"; public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION"; public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB"; public static final String ER_STYLESHEET_INCLUDES_ITSELF = "ER_STYLESHEET_INCLUDES_ITSELF"; public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR"; public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB"; public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT = "ER_MISSING_CONTAINER_ELEMENT_COMPONENT"; public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT = "ER_CAN_ONLY_OUTPUT_TO_ELEMENT"; public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR"; public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR"; public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION"; public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR = "ER_CANNOT_SERIALIZE_XSLPROCESSOR"; public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET"; public static final String ER_FAILED_PROCESS_STYLESHEET = "ER_FAILED_PROCESS_STYLESHEET"; public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC"; public static final String ER_COULDNT_FIND_FRAGMENT = "ER_COULDNT_FIND_FRAGMENT"; public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT"; public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB = "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB"; public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB = "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB"; public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG = "ER_NO_CLONE_OF_DOCUMENT_FRAG"; public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM"; public static final String ER_XMLSPACE_ILLEGAL_VALUE = "ER_XMLSPACE_ILLEGAL_VALUE"; public static final String ER_NO_XSLKEY_DECLARATION = "ER_NO_XSLKEY_DECLARATION"; public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL"; public static final String ER_XSLFUNCTIONS_UNSUPPORTED = "ER_XSLFUNCTIONS_UNSUPPORTED"; public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR"; public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET = "ER_NOT_ALLOWED_INSIDE_STYLESHEET"; public static final String ER_RESULTNS_NOT_SUPPORTED = "ER_RESULTNS_NOT_SUPPORTED"; public static final String ER_DEFAULTSPACE_NOT_SUPPORTED = "ER_DEFAULTSPACE_NOT_SUPPORTED"; public static final String ER_INDENTRESULT_NOT_SUPPORTED = "ER_INDENTRESULT_NOT_SUPPORTED"; public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB"; public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM"; public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE"; public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN"; public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE = "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE"; public static final String ER_MISPLACED_XSLOTHERWISE = "ER_MISPLACED_XSLOTHERWISE"; public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE = "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE"; public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE = "ER_NOT_ALLOWED_INSIDE_TEMPLATE"; public static final String ER_UNKNOWN_EXT_NS_PREFIX = "ER_UNKNOWN_EXT_NS_PREFIX"; public static final String ER_IMPORTS_AS_FIRST_ELEM = "ER_IMPORTS_AS_FIRST_ELEM"; public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF"; public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL"; public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL = "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL"; public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION"; public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR"; public static final String ER_CURRENCY_SIGN_ILLEGAL= "ER_CURRENCY_SIGN_ILLEGAL"; public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM = "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM"; public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER = "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER"; public static final String ER_REDIRECT_COULDNT_GET_FILENAME = "ER_REDIRECT_COULDNT_GET_FILENAME"; public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT = "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT"; public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX = "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX"; public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI"; public static final String ER_MISSING_ARG_FOR_OPTION = "ER_MISSING_ARG_FOR_OPTION"; public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION"; public static final String ER_MALFORMED_FORMAT_STRING = "ER_MALFORMED_FORMAT_STRING"; public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB = "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB"; public static final String ER_ILLEGAL_ATTRIBUTE_VALUE = "ER_ILLEGAL_ATTRIBUTE_VALUE"; public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN"; public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH = "ER_NO_APPLY_IMPORT_IN_FOR_EACH"; public static final String ER_CANT_USE_DTM_FOR_OUTPUT = "ER_CANT_USE_DTM_FOR_OUTPUT"; public static final String ER_CANT_USE_DTM_FOR_INPUT = "ER_CANT_USE_DTM_FOR_INPUT"; public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED"; public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE"; public static final String ER_INVALID_UTF16_SURROGATE = "ER_INVALID_UTF16_SURROGATE"; public static final String ER_XSLATTRSET_USED_ITSELF = "ER_XSLATTRSET_USED_ITSELF"; public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM"; public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS"; public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT = "ER_IN_ELEMTEMPLATEELEM_READOBJECT"; public static final String ER_DUPLICATE_NAMED_TEMPLATE = "ER_DUPLICATE_NAMED_TEMPLATE"; public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL"; public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF"; public static final String ER_ILLEGAL_DOMSOURCE_INPUT = "ER_ILLEGAL_DOMSOURCE_INPUT"; public static final String ER_CLASS_NOT_FOUND_FOR_OPTION = "ER_CLASS_NOT_FOUND_FOR_OPTION"; public static final String ER_REQUIRED_ELEM_NOT_FOUND = "ER_REQUIRED_ELEM_NOT_FOUND"; public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL"; public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL"; public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL"; public static final String ER_SOURCE_CANNOT_BE_NULL = "ER_SOURCE_CANNOT_BE_NULL"; public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR"; public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN"; public static final String ER_CANNOT_CREATE_EXTENSN = "ER_CANNOT_CREATE_EXTENSN"; public static final String ER_INSTANCE_MTHD_CALL_REQUIRES = "ER_INSTANCE_MTHD_CALL_REQUIRES"; public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME"; public static final String ER_ELEMENT_NAME_METHOD_STATIC = "ER_ELEMENT_NAME_METHOD_STATIC"; public static final String ER_EXTENSION_FUNC_UNKNOWN = "ER_EXTENSION_FUNC_UNKNOWN"; public static final String ER_MORE_MATCH_CONSTRUCTOR = "ER_MORE_MATCH_CONSTRUCTOR"; public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD"; public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT"; public static final String ER_INVALID_CONTEXT_PASSED = "ER_INVALID_CONTEXT_PASSED"; public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS"; public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME"; public static final String ER_NO_URL = "ER_NO_URL"; public static final String ER_POOL_SIZE_LESSTHAN_ONE = "ER_POOL_SIZE_LESSTHAN_ONE"; public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER"; public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT"; public static final String ER_ILLEGAL_XMLSPACE_VALUE = "ER_ILLEGAL_XMLSPACE_VALUE"; public static final String ER_PROCESSFROMNODE_FAILED = "ER_PROCESSFROMNODE_FAILED"; public static final String ER_RESOURCE_COULD_NOT_LOAD = "ER_RESOURCE_COULD_NOT_LOAD"; public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = "ER_BUFFER_SIZE_LESSTHAN_ZERO"; public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION = "ER_UNKNOWN_ERROR_CALLING_EXTENSION"; public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL"; public static final String ER_ELEM_CONTENT_NOT_ALLOWED = "ER_ELEM_CONTENT_NOT_ALLOWED"; public static final String ER_STYLESHEET_DIRECTED_TERMINATION = "ER_STYLESHEET_DIRECTED_TERMINATION"; public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO"; public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE"; public static final String ER_COULD_NOT_LOAD_RESOURCE = "ER_COULD_NOT_LOAD_RESOURCE"; public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES = "ER_CANNOT_INIT_DEFAULT_TEMPLATES"; public static final String ER_RESULT_NULL = "ER_RESULT_NULL"; public static final String ER_RESULT_COULD_NOT_BE_SET = "ER_RESULT_COULD_NOT_BE_SET"; public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED"; public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE = "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE"; public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE = "ER_CANNOT_TRANSFORM_SOURCE_TYPE"; public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER"; public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER"; public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE"; public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER"; public static final String ER_NO_STYLESHEET_IN_MEDIA = "ER_NO_STYLESHEET_IN_MEDIA"; public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI"; public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED"; public static final String ER_PROPERTY_VALUE_BOOLEAN = "ER_PROPERTY_VALUE_BOOLEAN"; public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT = "ER_COULD_NOT_FIND_EXTERN_SCRIPT"; public static final String ER_RESOURCE_COULD_NOT_FIND = "ER_RESOURCE_COULD_NOT_FIND"; public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED = "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED"; public static final String ER_FAILED_CREATING_ELEMLITRSLT = "ER_FAILED_CREATING_ELEMLITRSLT"; public static final String ER_VALUE_SHOULD_BE_NUMBER = "ER_VALUE_SHOULD_BE_NUMBER"; public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL"; public static final String ER_FAILED_CALLING_METHOD = "ER_FAILED_CALLING_METHOD"; public static final String ER_FAILED_CREATING_ELEMTMPL = "ER_FAILED_CREATING_ELEMTMPL"; public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED"; public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED"; public static final String ER_BAD_VALUE = "ER_BAD_VALUE"; public static final String ER_ATTRIB_VALUE_NOT_FOUND = "ER_ATTRIB_VALUE_NOT_FOUND"; public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED = "ER_ATTRIB_VALUE_NOT_RECOGNIZED"; public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE"; public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG"; public static final String ER_CANNOT_FIND_SAX1_DRIVER = "ER_CANNOT_FIND_SAX1_DRIVER"; public static final String ER_SAX1_DRIVER_NOT_LOADED = "ER_SAX1_DRIVER_NOT_LOADED"; public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED = "ER_SAX1_DRIVER_NOT_INSTANTIATED" ; public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER = "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER"; public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED = "ER_PARSER_PROPERTY_NOT_SPECIFIED"; public static final String ER_PARSER_ARG_CANNOT_BE_NULL = "ER_PARSER_ARG_CANNOT_BE_NULL" ; public static final String ER_FEATURE = "ER_FEATURE"; public static final String ER_PROPERTY = "ER_PROPERTY" ; public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER"; public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ; public static final String ER_NO_DRIVER_NAME_SPECIFIED = "ER_NO_DRIVER_NAME_SPECIFIED"; public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED"; public static final String ER_POOLSIZE_LESS_THAN_ONE = "ER_POOLSIZE_LESS_THAN_ONE"; public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME"; public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER"; public static final String ER_ASSERT_NO_TEMPLATE_PARENT = "ER_ASSERT_NO_TEMPLATE_PARENT"; public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR = "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR"; public static final String ER_NOT_ALLOWED_IN_POSITION = "ER_NOT_ALLOWED_IN_POSITION"; public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION = "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION"; public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE = "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE"; public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX = "ER_NAMESPACE_CONTEXT_NULL_PREFIX"; public static final String ER_XPATH_RESOLVER_NULL_QNAME = "ER_XPATH_RESOLVER_NULL_QNAME"; public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY = "ER_XPATH_RESOLVER_NEGATIVE_ARITY"; public static final String INVALID_TCHAR = "INVALID_TCHAR"; public static final String INVALID_QNAME = "INVALID_QNAME"; public static final String INVALID_ENUM = "INVALID_ENUM"; public static final String INVALID_NMTOKEN = "INVALID_NMTOKEN"; public static final String INVALID_NCNAME = "INVALID_NCNAME"; public static final String INVALID_BOOLEAN = "INVALID_BOOLEAN"; public static final String INVALID_NUMBER = "INVALID_NUMBER"; public static final String ER_ARG_LITERAL = "ER_ARG_LITERAL"; public static final String ER_DUPLICATE_GLOBAL_VAR ="ER_DUPLICATE_GLOBAL_VAR"; public static final String ER_DUPLICATE_VAR = "ER_DUPLICATE_VAR"; public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH"; public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX"; public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET"; public static final String ER_FUNCTION_NOT_FOUND = "ER_FUNCTION_NOT_FOUND"; public static final String ER_CANT_HAVE_CONTENT_AND_SELECT = "ER_CANT_HAVE_CONTENT_AND_SELECT"; public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE"; public static final String ER_SET_FEATURE_NULL_NAME = "ER_SET_FEATURE_NULL_NAME"; public static final String ER_GET_FEATURE_NULL_NAME = "ER_GET_FEATURE_NULL_NAME"; public static final String ER_UNSUPPORTED_FEATURE = "ER_UNSUPPORTED_FEATURE"; public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING = "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING"; public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE"; public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR = "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR"; public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT = "WG_EXPR_ATTRIB_CHANGED_TO_SELECT"; public static final String WG_NO_LOCALE_IN_FORMATNUMBER = "WG_NO_LOCALE_IN_FORMATNUMBER"; public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND"; public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM"; public static final String WG_CANNOT_LOAD_REQUESTED_DOC = "WG_CANNOT_LOAD_REQUESTED_DOC"; public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR"; public static final String WG_FUNCTIONS_SHOULD_USE_URL = "WG_FUNCTIONS_SHOULD_USE_URL"; public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 = "WG_ENCODING_NOT_SUPPORTED_USING_UTF8"; public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA = "WG_ENCODING_NOT_SUPPORTED_USING_JAVA"; public static final String WG_SPECIFICITY_CONFLICTS = "WG_SPECIFICITY_CONFLICTS"; public static final String WG_PARSING_AND_PREPARING = "WG_PARSING_AND_PREPARING"; public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE"; public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP"; public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED"; public static final String WG_NO_DECIMALFORMAT_DECLARATION = "WG_NO_DECIMALFORMAT_DECLARATION"; public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS"; public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED = "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED"; public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE = "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE"; public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE"; public static final String WG_COULD_NOT_RESOLVE_PREFIX = "WG_COULD_NOT_RESOLVE_PREFIX"; public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB = "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB"; public static final String WG_ILLEGAL_ATTRIBUTE_NAME = "WG_ILLEGAL_ATTRIBUTE_NAME"; public static final String WG_ILLEGAL_ATTRIBUTE_VALUE = "WG_ILLEGAL_ATTRIBUTE_VALUE"; public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG"; public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML = "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML"; public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME = "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME"; public static final String WG_ILLEGAL_ATTRIBUTE_POSITION = "WG_ILLEGAL_ATTRIBUTE_POSITION"; public static final String NO_MODIFICATION_ALLOWED_ERR = "NO_MODIFICATION_ALLOWED_ERR"; /* * Now fill in the message text. * Then fill in the message text for that message code in the * array. Use the new error code as the index into the array. */ // Error messages... /** Get the lookup table for error messages. * * @return The message lookup table. */ public Object[][] getContents() { return new Object[][] { /** Error message ID that has a null message, but takes in a single object. */ {"ER0000" , "{0}" }, { ER_NO_CURLYBRACE, "Error: no hi pot haver un car\u00e0cter '{' dins l'expressi\u00f3"}, { ER_ILLEGAL_ATTRIBUTE , "{0} t\u00e9 un atribut no perm\u00e8s: {1}"}, {ER_NULL_SOURCENODE_APPLYIMPORTS , "sourceNode \u00e9s nul en xsl:apply-imports."}, {ER_CANNOT_ADD, "No es pot afegir {0} a {1}"}, { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES, "sourceNode \u00e9s nul en handleApplyTemplatesInstruction."}, { ER_NO_NAME_ATTRIB, "{0} ha de tenir un atribut de nom."}, {ER_TEMPLATE_NOT_FOUND, "No s''ha trobat la plantilla anomenada: {0}"}, {ER_CANT_RESOLVE_NAME_AVT, "No s'ha pogut resoldre l'AVT de noms a xsl:call-template."}, {ER_REQUIRES_ATTRIB, "{0} necessita l''atribut: {1}"}, { ER_MUST_HAVE_TEST_ATTRIB, "{0} ha de tenir un atribut ''test''. "}, {ER_BAD_VAL_ON_LEVEL_ATTRIB, "Valor incorrecte a l''atribut de nivell: {0}"}, {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML, "El nom processing-instruction no pot ser 'xml'"}, { ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, "El nom processing-instruction ha de ser un NCName v\u00e0lid: {0}"}, { ER_NEED_MATCH_ATTRIB, "{0} ha de tenir un atribut que hi coincideixi si t\u00e9 una modalitat."}, { ER_NEED_NAME_OR_MATCH_ATTRIB, "{0} necessita un nom o un atribut que hi coincideixi."}, {ER_CANT_RESOLVE_NSPREFIX, "No s''ha pogut resoldre el prefix d''espai de noms: {0}"}, { ER_ILLEGAL_VALUE, "xml:space t\u00e9 un valor no v\u00e0lid: {0}"}, { ER_NO_OWNERDOC, "El node subordinat no t\u00e9 un document de propietari."}, { ER_ELEMTEMPLATEELEM_ERR, "Error d''ElemTemplateElement: {0}"}, { ER_NULL_CHILD, "S'est\u00e0 intentant afegir un subordinat nul."}, { ER_NEED_SELECT_ATTRIB, "{0} necessita un atribut de selecci\u00f3."}, { ER_NEED_TEST_ATTRIB , "xsl:when ha de tenir un atribut 'test'."}, { ER_NEED_NAME_ATTRIB, "xsl:with-param ha de tenir un atribut 'name'."}, { ER_NO_CONTEXT_OWNERDOC, "El context no t\u00e9 un document de propietari."}, {ER_COULD_NOT_CREATE_XML_PROC_LIAISON, "No s''ha pogut crear la relaci\u00f3 XML TransformerFactory: {0}"}, {ER_PROCESS_NOT_SUCCESSFUL, "Xalan: el proc\u00e9s no ha estat correcte."}, { ER_NOT_SUCCESSFUL, "Xalan no ha estat correcte."}, { ER_ENCODING_NOT_SUPPORTED, "La codificaci\u00f3 no t\u00e9 suport: {0}"}, {ER_COULD_NOT_CREATE_TRACELISTENER, "No s''ha pogut crear TraceListener: {0}"}, {ER_KEY_REQUIRES_NAME_ATTRIB, "xsl:key necessita un atribut 'name'."}, { ER_KEY_REQUIRES_MATCH_ATTRIB, "xsl:key necessita un atribut 'match'."}, { ER_KEY_REQUIRES_USE_ATTRIB, "xsl:key necessita un atribut 'use'."}, { ER_REQUIRES_ELEMENTS_ATTRIB, "(StylesheetHandler) {0} necessita un atribut ''elements''. "}, { ER_MISSING_PREFIX_ATTRIB, "(StylesheetHandler) falta l''atribut ''prefix'' {0}. "}, { ER_BAD_STYLESHEET_URL, "La URL del full d''estils \u00e9s incorrecta: {0}"}, { ER_FILE_NOT_FOUND, "No s''ha trobat el fitxer del full d''estils: {0}"}, { ER_IOEXCEPTION, "S''ha produ\u00eft una excepci\u00f3 d''E/S amb el fitxer de full d''estils: {0}"}, { ER_NO_HREF_ATTRIB, "(StylesheetHandler) No s''ha trobat l''atribut href de {0}"}, { ER_STYLESHEET_INCLUDES_ITSELF, "(StylesheetHandler) {0} s''est\u00e0 incloent a ell mateix directament o indirecta."}, { ER_PROCESSINCLUDE_ERROR, "Error de StylesheetHandler.processInclude, {0}"}, { ER_MISSING_LANG_ATTRIB, "(StylesheetHandler) falta l''atribut ''lang'' {0}. "}, { ER_MISSING_CONTAINER_ELEMENT_COMPONENT, "(StylesheetHandler) L''element {0} \u00e9s fora de lloc? Falta l''element de contenidor ''component''"}, { ER_CAN_ONLY_OUTPUT_TO_ELEMENT, "La sortida nom\u00e9s pot ser cap a un Element, Fragment de document, Document o Transcriptor de documents."}, { ER_PROCESS_ERROR, "Error de StylesheetRoot.process"}, { ER_UNIMPLNODE_ERROR, "Error d''UnImplNode: {0}"}, { ER_NO_SELECT_EXPRESSION, "Error. No s'ha trobat l'expressi\u00f3 select d'xpath (-select)."}, { ER_CANNOT_SERIALIZE_XSLPROCESSOR, "No es pot serialitzar un XSLProcessor."}, { ER_NO_INPUT_STYLESHEET, "No s'ha especificat l'entrada del full d'estils."}, { ER_FAILED_PROCESS_STYLESHEET, "No s'ha pogut processar el full d'estils."}, { ER_COULDNT_PARSE_DOC, "No s''ha pogut analitzar el document {0}."}, { ER_COULDNT_FIND_FRAGMENT, "No s''ha pogut trobar el fragment: {0}"}, { ER_NODE_NOT_ELEMENT, "El node al qual apuntava l''identificador de fragments no era un element: {0}"}, { ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB, "for-each ha de tenir o b\u00e9 una coincid\u00e8ncia o b\u00e9 un atribut de nom."}, { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB, "Les plantilles han de tenir o b\u00e9 una coincid\u00e8ncia o b\u00e9 un atribut de nom."}, { ER_NO_CLONE_OF_DOCUMENT_FRAG, "No hi ha cap clonatge d'un fragment de document."}, { ER_CANT_CREATE_ITEM, "No es pot crear un element a l''arbre de resultats: {0}"}, { ER_XMLSPACE_ILLEGAL_VALUE, "xml:space de l''XML d''origen t\u00e9 un valor no perm\u00e8s: {0}"}, { ER_NO_XSLKEY_DECLARATION, "No hi ha cap declaraci\u00f3 d''xls:key per a {0}."}, { ER_CANT_CREATE_URL, "Error. No es pot crear la URL de: {0}"}, { ER_XSLFUNCTIONS_UNSUPPORTED, "xsl:functions no t\u00e9 suport."}, { ER_PROCESSOR_ERROR, "Error d'XSLT TransformerFactory"}, { ER_NOT_ALLOWED_INSIDE_STYLESHEET, "(StylesheetHandler) {0} no est\u00e0 perm\u00e8s dins d''un full d''estils."}, { ER_RESULTNS_NOT_SUPPORTED, "result-ns ja no t\u00e9 suport. En comptes d'aix\u00f2, feu servir xsl:output."}, { ER_DEFAULTSPACE_NOT_SUPPORTED, "default-space ja no t\u00e9 suport. En comptes d'aix\u00f2, feu servir xsl:strip-space o xsl:preserve-space."}, { ER_INDENTRESULT_NOT_SUPPORTED, "indent-result ja no t\u00e9 suport. En comptes d'aix\u00f2, feu servir xsl:output."}, { ER_ILLEGAL_ATTRIB, "(StylesheetHandler) {0} t\u00e9 un atribut no perm\u00e8s: {1}"}, { ER_UNKNOWN_XSL_ELEM, "Element XSL desconegut: {0}"}, { ER_BAD_XSLSORT_USE, "(StylesheetHandler) xsl:sort nom\u00e9s es pot utilitzar amb xsl:apply-templates o xsl:for-each."}, { ER_MISPLACED_XSLWHEN, "(StylesheetHandler) xsl:when est\u00e0 mal col\u00b7locat."}, { ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE, "(StylesheetHandler) xsl:when no ha estat analitzat per xsl:choose."}, { ER_MISPLACED_XSLOTHERWISE, "(StylesheetHandler) xsl:otherwise est\u00e0 mal col\u00b7locat."}, { ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE, "(StylesheetHandler) xsl:otherwise no t\u00e9 com a superior xsl:choose."}, { ER_NOT_ALLOWED_INSIDE_TEMPLATE, "(StylesheetHandler) {0} no est\u00e0 perm\u00e8s dins d''una plantilla."}, { ER_UNKNOWN_EXT_NS_PREFIX, "(StylesheetHandler) {0} prefix d''espai de noms d''extensi\u00f3 {1} desconegut"}, { ER_IMPORTS_AS_FIRST_ELEM, "(StylesheetHandler) Les importacions nom\u00e9s es poden produir com els primers elements del full d'estils."}, { ER_IMPORTING_ITSELF, "(StylesheetHandler) {0} s''est\u00e0 important a ell mateix directament o indirecta."}, { ER_XMLSPACE_ILLEGAL_VAL, "(StylesheetHandler) xml:space t\u00e9 un valor no perm\u00e8s: {0}"}, { ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL, "processStylesheet no ha estat correcte."}, { ER_SAX_EXCEPTION, "Excepci\u00f3 SAX"}, // add this message to fix bug 21478 { ER_FUNCTION_NOT_SUPPORTED, "Aquesta funci\u00f3 no t\u00e9 suport."}, { ER_XSLT_ERROR, "Error d'XSLT"}, { ER_CURRENCY_SIGN_ILLEGAL, "El signe de moneda no est\u00e0 perm\u00e8s en una cadena de patr\u00f3 de format."}, { ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM, "La funci\u00f3 document no t\u00e9 suport al DOM de full d'estils."}, { ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER, "No es pot resoldre el prefix del solucionador sense prefix."}, { ER_REDIRECT_COULDNT_GET_FILENAME, "Extensi\u00f3 de redirecci\u00f3: No s'ha pogut obtenir el nom del fitxer - els atributs file o select han de retornar una cadena v\u00e0lida."}, { ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT, "No es pot crear build FormatterListener en l'extensi\u00f3 de redirecci\u00f3."}, { ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX, "El prefix d''exclude-result-prefixes no \u00e9s v\u00e0lid: {0}"}, { ER_MISSING_NS_URI, "Falta l'URI d'espai de noms del prefix especificat."}, { ER_MISSING_ARG_FOR_OPTION, "Falta un argument de l''opci\u00f3: {0}"}, { ER_INVALID_OPTION, "Opci\u00f3 no v\u00e0lida: {0}"}, { ER_MALFORMED_FORMAT_STRING, "Cadena de format mal formada: {0}"}, { ER_STYLESHEET_REQUIRES_VERSION_ATTRIB, "xsl:stylesheet necessita un atribut 'version'."}, { ER_ILLEGAL_ATTRIBUTE_VALUE, "L''atribut {0} t\u00e9 un valor no perm\u00e8s {1}"}, { ER_CHOOSE_REQUIRES_WHEN, "xsl:choose necessita un xsl:when"}, { ER_NO_APPLY_IMPORT_IN_FOR_EACH, "xsl:apply-imports no es permeten en un xsl:for-each"}, { ER_CANT_USE_DTM_FOR_OUTPUT, "No es pot utilitzar una DTMLiaison per a un node DOM de sortida. En lloc d'aix\u00f2, utilitzeu org.apache.xpath.DOM2Helper."}, { ER_CANT_USE_DTM_FOR_INPUT, "No es pot utilitzar una DTMLiaison per a un node DOM d'entrada. En lloc d'aix\u00f2, utilitzeu org.apache.xpath.DOM2Helper."}, { ER_CALL_TO_EXT_FAILED, "S''ha produ\u00eft un error en la crida de l''element d''extensi\u00f3 {0}"}, { ER_PREFIX_MUST_RESOLVE, "El prefix s''ha de resoldre en un espai de noms: {0}"}, { ER_INVALID_UTF16_SURROGATE, "S''ha detectat un suplent UTF-16 no v\u00e0lid: {0} ?"}, { ER_XSLATTRSET_USED_ITSELF, "xsl:attribute-set {0} s''ha utilitzat a ell mateix; aix\u00f2 crear\u00e0 un bucle infinit."}, { ER_CANNOT_MIX_XERCESDOM, "No es pot barrejar entrada no Xerces-DOM amb sortida Xerces-DOM."}, { ER_TOO_MANY_LISTENERS, "addTraceListenersToStylesheet - TooManyListenersException"}, { ER_IN_ELEMTEMPLATEELEM_READOBJECT, "En ElemTemplateElement.readObject: {0}"}, { ER_DUPLICATE_NAMED_TEMPLATE, "S''ha trobat m\u00e9s d''una plantilla anomenada {0}"}, { ER_INVALID_KEY_CALL, "Crida de funci\u00f3 no v\u00e0lida: les crides key() recursives no estan permeses."}, { ER_REFERENCING_ITSELF, "La variable {0} est\u00e0 fent refer\u00e8ncia a ella mateixa directa o indirectament."}, { ER_ILLEGAL_DOMSOURCE_INPUT, "El node d'entrada no pot ser nul per a DOMSource de newTemplates."}, { ER_CLASS_NOT_FOUND_FOR_OPTION, "No s''ha trobat el fitxer de classe per a l''opci\u00f3 {0}"}, { ER_REQUIRED_ELEM_NOT_FOUND, "L''element necessari no s''ha trobat: {0}"}, { ER_INPUT_CANNOT_BE_NULL, "InputStream no pot ser nul."}, { ER_URI_CANNOT_BE_NULL, "L'URI no pot ser nul."}, { ER_FILE_CANNOT_BE_NULL, "El fitxer no pot ser nul."}, { ER_SOURCE_CANNOT_BE_NULL, "InputSource no pot ser nul."}, { ER_CANNOT_INIT_BSFMGR, "No s'ha pogut inicialitzar BSF Manager"}, { ER_CANNOT_CMPL_EXTENSN, "No s'ha pogut compilar l'extensi\u00f3"}, { ER_CANNOT_CREATE_EXTENSN, "No s''ha pogut crear l''extensi\u00f3 {0} a causa de {1}"}, { ER_INSTANCE_MTHD_CALL_REQUIRES, "La crida del m\u00e8tode d''inst\u00e0ncia {0} necessita una inst\u00e0ncia d''objecte com a primer argument"}, { ER_INVALID_ELEMENT_NAME, "S''ha especificat un nom d''element no v\u00e0lid {0}"}, { ER_ELEMENT_NAME_METHOD_STATIC, "El m\u00e8tode del nom de l''element ha de ser est\u00e0tic {0}"}, { ER_EXTENSION_FUNC_UNKNOWN, "No es coneix la funci\u00f3 d''extensi\u00f3 {0} : {1}."}, { ER_MORE_MATCH_CONSTRUCTOR, "Hi ha m\u00e9s d''una millor coincid\u00e8ncia per al constructor de {0}"}, { ER_MORE_MATCH_METHOD, "Hi ha m\u00e9s d''una millor coincid\u00e8ncia per al m\u00e8tode {0}"}, { ER_MORE_MATCH_ELEMENT, "Hi ha m\u00e9s d''una millor coincid\u00e8ncia per al m\u00e8tode d''element {0}"}, { ER_INVALID_CONTEXT_PASSED, "S''ha donat un context no v\u00e0lid per avaluar {0}"}, { ER_POOL_EXISTS, "L'agrupaci\u00f3 ja existeix"}, { ER_NO_DRIVER_NAME, "No s'ha especificat cap nom de controlador"}, { ER_NO_URL, "No s'ha especificat cap URL"}, { ER_POOL_SIZE_LESSTHAN_ONE, "La grand\u00e0ria de l'agrupaci\u00f3 \u00e9s inferior a u"}, { ER_INVALID_DRIVER, "S'ha especificat un nom de controlador no v\u00e0lid"}, { ER_NO_STYLESHEETROOT, "No s'ha trobat l'arrel del full d'estils"}, { ER_ILLEGAL_XMLSPACE_VALUE, "Valor no perm\u00e8s per a xml:space"}, { ER_PROCESSFROMNODE_FAILED, "S'ha produ\u00eft un error a processFromNode"}, { ER_RESOURCE_COULD_NOT_LOAD, "No s''ha pogut carregar el recurs [ {0} ]: {1} \n {2} \t {3}"}, { ER_BUFFER_SIZE_LESSTHAN_ZERO, "Grand\u00e0ria del buffer <=0"}, { ER_UNKNOWN_ERROR_CALLING_EXTENSION, "S'ha produ\u00eft un error desconegut en cridar l'extensi\u00f3"}, { ER_NO_NAMESPACE_DECL, "El prefix {0} no t\u00e9 una declaraci\u00f3 d''espai de noms corresponent"}, { ER_ELEM_CONTENT_NOT_ALLOWED, "El contingut de l''element no est\u00e0 perm\u00e8s per a lang=javaclass {0}"}, { ER_STYLESHEET_DIRECTED_TERMINATION, "El full d'estils ha ordenat l'acabament"}, { ER_ONE_OR_TWO, "1 o 2"}, { ER_TWO_OR_THREE, "2 o 3"}, { ER_COULD_NOT_LOAD_RESOURCE, "No s''ha pogut carregar {0} (comproveu la CLASSPATH); ara s''estan fent servir els valors per defecte."}, { ER_CANNOT_INIT_DEFAULT_TEMPLATES, "No es poden inicialitzar les plantilles per defecte"}, { ER_RESULT_NULL, "El resultat no ha de ser nul"}, { ER_RESULT_COULD_NOT_BE_SET, "No s'ha pogut establir el resultat"}, { ER_NO_OUTPUT_SPECIFIED, "No s'ha especificat cap sortida"}, { ER_CANNOT_TRANSFORM_TO_RESULT_TYPE, "No s''ha pogut transformar en un resultat del tipus {0}"}, { ER_CANNOT_TRANSFORM_SOURCE_TYPE, "No s''ha pogut transformar en un origen del tipus {0}"}, { ER_NULL_CONTENT_HANDLER, "Manejador de contingut nul"}, { ER_NULL_ERROR_HANDLER, "Manejador d'error nul"}, { ER_CANNOT_CALL_PARSE, "L'an\u00e0lisi no es pot cridar si no s'ha establert ContentHandler"}, { ER_NO_PARENT_FOR_FILTER, "El filtre no t\u00e9 superior"}, { ER_NO_STYLESHEET_IN_MEDIA, "No s''ha trobat cap full d''estils a {0}, suport= {1}"}, { ER_NO_STYLESHEET_PI, "No s''ha trobat cap PI d''xml-stylesheet a {0}"}, { ER_NOT_SUPPORTED, "No t\u00e9 suport: {0}"}, { ER_PROPERTY_VALUE_BOOLEAN, "El valor de la propietat {0} ha de ser una inst\u00e0ncia booleana"}, { ER_COULD_NOT_FIND_EXTERN_SCRIPT, "No s''ha pogut arribar a l''script extern a {0}"}, { ER_RESOURCE_COULD_NOT_FIND, "No s''ha trobat el recurs [ {0} ].\n {1}"}, { ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, "La propietat de sortida no es reconeix: {0}"}, { ER_FAILED_CREATING_ELEMLITRSLT, "S'ha produ\u00eft un error en crear la inst\u00e0ncia ElemLiteralResult"}, //Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE // In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care //in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc. //NOTE: Not only the key name but message has also been changed. { ER_VALUE_SHOULD_BE_NUMBER, "El valor de {0} ha de contenir un n\u00famero que es pugui analitzar"}, { ER_VALUE_SHOULD_EQUAL, "El valor de {0} ha de ser igual a yes o no"}, { ER_FAILED_CALLING_METHOD, "No s''ha pogut cridar el m\u00e8tode {0}"}, { ER_FAILED_CREATING_ELEMTMPL, "No s'ha pogut crear la inst\u00e0ncia ElemTemplateElement"}, { ER_CHARS_NOT_ALLOWED, "En aquest punt del document no es permeten els car\u00e0cters"}, { ER_ATTR_NOT_ALLOWED, "L''atribut \"{0}\" no es permet en l''element {1}"}, { ER_BAD_VALUE, "{0} valor erroni {1} "}, { ER_ATTRIB_VALUE_NOT_FOUND, "No s''ha trobat el valor de l''atribut {0} "}, { ER_ATTRIB_VALUE_NOT_RECOGNIZED, "No es reconeix el valor de l''atribut {0} "}, { ER_NULL_URI_NAMESPACE, "S'intenta generar un prefix d'espai de noms amb un URI nul"}, //New ERROR keys added in XALAN code base after Jdk 1.4 (Xalan 2.2-D11) { ER_NUMBER_TOO_BIG, "S'intenta formatar un n\u00famero m\u00e9s gran que l'enter llarg m\u00e9s gran"}, { ER_CANNOT_FIND_SAX1_DRIVER, "No es pot trobar la classe de controlador SAX1 {0}"}, { ER_SAX1_DRIVER_NOT_LOADED, "S''ha trobat la classe de controlador SAX1 {0} per\u00f2 no es pot carregar"}, { ER_SAX1_DRIVER_NOT_INSTANTIATED, "S''ha carregat la classe de controlador SAX1 {0} per\u00f2 no es pot particularitzar"}, { ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER, "La classe de controlador SAX1 {0} no implementa org.xml.sax.Parser"}, { ER_PARSER_PROPERTY_NOT_SPECIFIED, "No s'ha identificat la propietat del sistema org.xml.sax.parser"}, { ER_PARSER_ARG_CANNOT_BE_NULL, "L'argument d'analitzador ha de ser nul"}, { ER_FEATURE, "Caracter\u00edstica: {0}"}, { ER_PROPERTY, "Propietat: {0}"}, { ER_NULL_ENTITY_RESOLVER, "Solucionador d'entitat nul"}, { ER_NULL_DTD_HANDLER, "Manejador de DTD nul"}, { ER_NO_DRIVER_NAME_SPECIFIED, "No s'ha especificat cap nom de controlador"}, { ER_NO_URL_SPECIFIED, "No s'ha especificat cap URL"}, { ER_POOLSIZE_LESS_THAN_ONE, "La grand\u00e0ria de l'agrupaci\u00f3 \u00e9s inferior a 1"}, { ER_INVALID_DRIVER_NAME, "S'ha especificat un nom de controlador no v\u00e0lid"}, { ER_ERRORLISTENER, "ErrorListener"}, // Note to translators: The following message should not normally be displayed // to users. It describes a situation in which the processor has detected // an internal consistency problem in itself, and it provides this message // for the developer to help diagnose the problem. The name // 'ElemTemplateElement' is the name of a class, and should not be // translated. { ER_ASSERT_NO_TEMPLATE_PARENT, "Error del programador. L'expressi\u00f3 no t\u00e9 cap superior ElemTemplateElement "}, // Note to translators: The following message should not normally be displayed // to users. It describes a situation in which the processor has detected // an internal consistency problem in itself, and it provides this message // for the developer to help diagnose the problem. The substitution text // provides further information in order to diagnose the problem. The name // 'RedundentExprEliminator' is the name of a class, and should not be // translated. { ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR, "L''afirmaci\u00f3 del programador a RedundentExprEliminator: {0}"}, { ER_NOT_ALLOWED_IN_POSITION, "{0} no es permet en aquesta posici\u00f3 del full d''estil"}, { ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION, "No es permet text sense espais en blanc en aquesta posici\u00f3 del full d'estil"}, // This code is shared with warning codes. // SystemId Unknown { INVALID_TCHAR, "S''ha utilitzat un valor no perm\u00e8s {1} per a l''atribut CHAR {0}. Un atribut de tipus CHAR nom\u00e9s ha de contenir un car\u00e0cter."}, // Note to translators: The following message is used if the value of // an attribute in a stylesheet is invalid. "QNAME" is the XML data-type of // the attribute, and should not be translated. The substitution text {1} is // the attribute value and {0} is the attribute name. //The following codes are shared with the warning codes... { INVALID_QNAME, "S''ha utilitzat un valor no perm\u00e8s {1} per a l''atribut QNAME {0}"}, // Note to translators: The following message is used if the value of // an attribute in a stylesheet is invalid. "ENUM" is the XML data-type of // the attribute, and should not be translated. The substitution text {1} is // the attribute value, {0} is the attribute name, and {2} is a list of valid // values. { INVALID_ENUM, "S''ha utilitzat un valor no perm\u00e8s {1} per a l''atribut ENUM {0}. Els valors v\u00e0lids s\u00f3n {2}."}, // Note to translators: The following message is used if the value of // an attribute in a stylesheet is invalid. "NMTOKEN" is the XML data-type // of the attribute, and should not be translated. The substitution text {1} is // the attribute value and {0} is the attribute name. { INVALID_NMTOKEN, "S''ha utilitzat un valor no perm\u00e8s {1} per a l''atribut NMTOKEN {0} "}, // Note to translators: The following message is used if the value of // an attribute in a stylesheet is invalid. "NCNAME" is the XML data-type // of the attribute, and should not be translated. The substitution text {1} is // the attribute value and {0} is the attribute name. { INVALID_NCNAME, "S''ha utilitzat un valor no perm\u00e8s {1} per a l''atribut NCNAME {0} "}, // Note to translators: The following message is used if the value of // an attribute in a stylesheet is invalid. "boolean" is the XSLT data-type // of the attribute, and should not be translated. The substitution text {1} is // the attribute value and {0} is the attribute name. { INVALID_BOOLEAN, "S''ha utilitzat un valor no perm\u00e8s {1} per a l''atribut boolean {0} "}, // Note to translators: The following message is used if the value of // an attribute in a stylesheet is invalid. "number" is the XSLT data-type // of the attribute, and should not be translated. The substitution text {1} is // the attribute value and {0} is the attribute name. { INVALID_NUMBER, "S''ha utilitzat un valor no perm\u00e8s {1} per a l''atribut number {0} "}, // End of shared codes... // Note to translators: A "match pattern" is a special form of XPath expression // that is used for matching patterns. The substitution text is the name of // a function. The message indicates that when this function is referenced in // a match pattern, its argument must be a string literal (or constant.) // ER_ARG_LITERAL - new error message for bugzilla //5202 { ER_ARG_LITERAL, "L''argument de {0} del patr\u00f3 de coincid\u00e8ncia ha de ser un literal."}, // Note to translators: The following message indicates that two definitions of // a variable. A "global variable" is a variable that is accessible everywher // in the stylesheet. // ER_DUPLICATE_GLOBAL_VAR - new error message for bugzilla #790 { ER_DUPLICATE_GLOBAL_VAR, "La declaraci\u00f3 de variable global est\u00e0 duplicada."}, // Note to translators: The following message indicates that two definitions of // a variable were encountered. // ER_DUPLICATE_VAR - new error message for bugzilla #790 { ER_DUPLICATE_VAR, "La declaraci\u00f3 de variable est\u00e0 duplicada."}, // Note to translators: "xsl:template, "name" and "match" are XSLT keywords // which must not be translated. // ER_TEMPLATE_NAME_MATCH - new error message for bugzilla #789 { ER_TEMPLATE_NAME_MATCH, "xsl:template ha de tenir un nom o un atribut de coincid\u00e8ncia (o tots dos)"}, // Note to translators: "exclude-result-prefixes" is an XSLT keyword which // should not be translated. The message indicates that a namespace prefix // encountered as part of the value of the exclude-result-prefixes attribute // was in error. // ER_INVALID_PREFIX - new error message for bugzilla #788 { ER_INVALID_PREFIX, "El prefix d''exclude-result-prefixes no \u00e9s v\u00e0lid: {0}"}, // Note to translators: An "attribute set" is a set of attributes that can // be added to an element in the output document as a group. The message // indicates that there was a reference to an attribute set named {0} that // was never defined. // ER_NO_ATTRIB_SET - new error message for bugzilla #782 { ER_NO_ATTRIB_SET, "attribute-set anomenat {0} no existeix"}, // Note to translators: This message indicates that there was a reference // to a function named {0} for which no function definition could be found. { ER_FUNCTION_NOT_FOUND, "La funci\u00f3 anomenada {0} no existeix"}, // Note to translators: This message indicates that the XSLT instruction // that is named by the substitution text {0} must not contain other XSLT // instructions (content) or a "select" attribute. The word "select" is // an XSLT keyword in this case and must not be translated. { ER_CANT_HAVE_CONTENT_AND_SELECT, "L''element {0} no ha de tenir ni l''atribut content ni el select. "}, // Note to translators: This message indicates that the value argument // of setParameter must be a valid Java Object. { ER_INVALID_SET_PARAM_VALUE, "El valor del par\u00e0metre {0} ha de ser un objecte Java v\u00e0lid "}, { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT, "L'atribut result-prefix d'un element xsl:namespace-alias t\u00e9 el valor '#default', per\u00f2 no hi ha cap declaraci\u00f3 de l'espai de noms per defecte en l'\u00e0mbit de l'element "}, { ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX, "L''atribut result-prefix d''un element xsl:namespace-alias t\u00e9 el valor ''{0}'', per\u00f2 no hi ha cap declaraci\u00f3 d''espai de noms per al prefix ''{0}'' en l''\u00e0mbit de l''element. "}, { ER_SET_FEATURE_NULL_NAME, "El nom de la caracter\u00edstica no pot ser nul a TransformerFactory.setFeature(nom de la cadena, valor boole\u00e0). "}, { ER_GET_FEATURE_NULL_NAME, "El nom de la caracter\u00edstica no pot ser nul a TransformerFactory.getFeature(nom de cadena). "}, { ER_UNSUPPORTED_FEATURE, "No es pot establir la caracter\u00edstica ''{0}'' en aquesta TransformerFactory."}, { ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING, "L''\u00fas de l''element d''extensi\u00f3 ''{0}'' no est\u00e0 perm\u00e8s, si la caracter\u00edstica de proc\u00e9s segur s''ha establert en true."}, { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE, "No es pot obtenir el prefix per a un URI de nom d'espais nul. "}, { ER_NAMESPACE_CONTEXT_NULL_PREFIX, "No es pot obtenir l'URI del nom d'espais per a un prefix nul. "}, { ER_XPATH_RESOLVER_NULL_QNAME, "El nom de la funci\u00f3 no pot ser nul. "}, { ER_XPATH_RESOLVER_NEGATIVE_ARITY, "L'aritat no pot ser negativa."}, // Warnings... { WG_FOUND_CURLYBRACE, "S'ha trobat '}' per\u00f2 no hi ha cap plantilla d'atribut oberta"}, { WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR, "Av\u00eds: l''atribut de recompte no coincideix amb un antecessor d''xsl:number. Destinaci\u00f3 = {0}"}, { WG_EXPR_ATTRIB_CHANGED_TO_SELECT, "Sintaxi antiga: El nom de l'atribut 'expr' s'ha canviat per 'select'."}, { WG_NO_LOCALE_IN_FORMATNUMBER, "Xalan encara no pot gestionar el nom de l'entorn nacional a la funci\u00f3 format-number."}, { WG_LOCALE_NOT_FOUND, "Av\u00eds: no s''ha trobat l''entorn nacional d''xml:lang={0}"}, { WG_CANNOT_MAKE_URL_FROM, "No es pot crear la URL de: {0}"}, { WG_CANNOT_LOAD_REQUESTED_DOC, "No es pot carregar el document sol\u00b7licitat: {0}"}, { WG_CANNOT_FIND_COLLATOR, "No s''ha trobat el classificador de <sort xml:lang={0}"}, { WG_FUNCTIONS_SHOULD_USE_URL, "Sintaxi antiga: la instrucci\u00f3 de funcions ha d''utilitzar una URL de {0}"}, { WG_ENCODING_NOT_SUPPORTED_USING_UTF8, "Codificaci\u00f3 sense suport: {0}, s''utilitza UTF-8"}, { WG_ENCODING_NOT_SUPPORTED_USING_JAVA, "Codificaci\u00f3 sense suport: {0}, s''utilitza Java {1}"}, { WG_SPECIFICITY_CONFLICTS, "S''han trobat conflictes d''especificitat: {0} S''utilitzar\u00e0 el darrer trobat al full d''estils."}, { WG_PARSING_AND_PREPARING, "========= S''est\u00e0 analitzant i preparant {0} =========="}, { WG_ATTR_TEMPLATE, "Plantilla Attr, {0}"}, { WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE, "S'ha produ\u00eft un conflicte de coincid\u00e8ncia entre xsl:strip-space i xsl:preserve-space"}, { WG_ATTRIB_NOT_HANDLED, "Xalan encara no pot gestionar l''atribut {0}"}, { WG_NO_DECIMALFORMAT_DECLARATION, "No s''ha trobat cap declaraci\u00f3 per al format decimal: {0}"}, { WG_OLD_XSLT_NS, "Falta l'espai de noms XSLT o \u00e9s incorrecte. "}, { WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED, "Nom\u00e9s es permet una declaraci\u00f3 xsl:decimal-format per defecte."}, { WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE, "Els noms d''xsl:decimal-format han de ser exclusius. El nom \"{0}\" est\u00e0 duplicat."}, { WG_ILLEGAL_ATTRIBUTE, "{0} t\u00e9 un atribut no perm\u00e8s: {1}"}, { WG_COULD_NOT_RESOLVE_PREFIX, "No s''ha pogut resoldre el prefix d''espai de noms: {0}. Es passar\u00e0 per alt el node."}, { WG_STYLESHEET_REQUIRES_VERSION_ATTRIB, "xsl:stylesheet necessita un atribut 'version'."}, { WG_ILLEGAL_ATTRIBUTE_NAME, "El nom d''atribut no \u00e9s perm\u00e8s: {0}"}, { WG_ILLEGAL_ATTRIBUTE_VALUE, "S''ha utilitzat un valor no perm\u00e8s a l''atribut {0}: {1}"}, { WG_EMPTY_SECOND_ARG, "El conjunt de nodes resultant del segon argument de la funci\u00f3 document est\u00e0 buit. Torna un conjunt de nodes buit."}, //Following are the new WARNING keys added in XALAN code base after Jdk 1.4 (Xalan 2.2-D11) // Note to translators: "name" and "xsl:processing-instruction" are keywords // and must not be translated. { WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML, "El valor de l'atribut 'name' del nom xsl:processing-instruction no ha de ser 'xml'"}, // Note to translators: "name" and "xsl:processing-instruction" are keywords // and must not be translated. "NCName" is an XML data-type and must not be // translated. { WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, "El valor de l''atribut ''name'' de xsl:processing-instruction ha de ser un NCName v\u00e0lid: {0}"}, // Note to translators: This message is reported if the stylesheet that is // being processed attempted to construct an XML document with an attribute in a // place other than on an element. The substitution text specifies the name of // the attribute. { WG_ILLEGAL_ATTRIBUTE_POSITION, "No es pot afegir l''atribut {0} despr\u00e9s dels nodes subordinats o abans que es produeixi un element. Es passar\u00e0 per alt l''atribut."}, { NO_MODIFICATION_ALLOWED_ERR, "S'ha intentat modificar un objecte on no es permeten modificacions. " }, //Check: WHY THERE IS A GAP B/W NUMBERS in the XSLTErrorResources properties file? // Other miscellaneous text used inside the code... { "ui_language", "ca"}, { "help_language", "ca" }, { "language", "ca" }, { "BAD_CODE", "El par\u00e0metre de createMessage estava fora dels l\u00edmits."}, { "FORMAT_FAILED", "S'ha generat una excepci\u00f3 durant la crida messageFormat."}, { "version", ">>>>>>> Versi\u00f3 Xalan "}, { "version2", "<<<<<<<"}, { "yes", "s\u00ed"}, { "line", "L\u00ednia n\u00fam."}, { "column","Columna n\u00fam."}, { "xsldone", "XSLProcessor: fet"}, // Note to translators: The following messages provide usage information // for the Xalan Process command line. "Process" is the name of a Java class, // and should not be translated. { "xslProc_option", "Opcions de classe del proc\u00e9s de l\u00ednia d'ordres de Xalan-J:"}, { "xslProc_option", "Opcions de classe del proc\u00e9s de l\u00ednia d'ordres de Xalan-J\u003a"}, { "xslProc_invalid_xsltc_option", "L''opci\u00f3 {0} no t\u00e9 suport en modalitat XSLTC."}, { "xslProc_invalid_xalan_option", "L''opci\u00f3 {0} nom\u00e9s es pot fer servir amb -XSLTC."}, { "xslProc_no_input", "Error: no s'ha especificat cap full d'estils o xml d'entrada. Per obtenir les instruccions d'\u00fas, executeu aquesta ordre sense opcions."}, { "xslProc_common_options", "-Opcions comuns-"}, { "xslProc_xalan_options", "-Opcions per a Xalan-"}, { "xslProc_xsltc_options", "-Opcions per a XSLTC-"}, { "xslProc_return_to_continue", "(premeu <retorn> per continuar)"}, // Note to translators: The option name and the parameter name do not need to // be translated. Only translate the messages in parentheses. Note also that // leading whitespace in the messages is used to indent the usage information // for each option in the English messages. // Do not translate the keywords: XSLTC, SAX, DOM and DTM. { "optionXSLTC", " [-XSLTC (Utilitza XSLTC per a la transformaci\u00f3)]"}, { "optionIN", " [-IN URL_XML_entrada]"}, { "optionXSL", " [-XSL URL_transformaci\u00f3_XSL]"}, { "optionOUT", " [-OUT nom_fitxer_sortida]"}, { "optionLXCIN", " [-LXCIN entrada_nom_fitxer_full_estil_compilat]"}, { "optionLXCOUT", " [-LXCOUT sortida_nom_fitxer_full_estil_compilat]"}, { "optionPARSER", " [-PARSER nom de classe completament qualificat de la relaci\u00f3 de l'analitzador]"}, { "optionE", " [-E (No amplia les refer\u00e8ncies d'entitat)]"}, { "optionV", " [-E (No amplia les refer\u00e8ncies d'entitat)]"}, { "optionQC", " [-QC (Avisos de conflictes de patr\u00f3 redu\u00eft)]"}, { "optionQ", " [-Q (Modalitat redu\u00efda)]"}, { "optionLF", " [-LF (Utilitza salts de l\u00ednia nom\u00e9s a la sortida {el valor per defecte \u00e9s CR/LF})]"}, { "optionCR", " [-CR (Utilitza retorns de carro nom\u00e9s a la sortida {el valor per defecte \u00e9s CR/LF})]"}, { "optionESCAPE", " [-ESCAPE (Car\u00e0cters per aplicar un escapament {el valor per defecte \u00e9s <>&\"\'\\r\\n}]"}, { "optionINDENT", " [-INDENT (Controla quants espais tindr\u00e0 el sagnat {el valor per defecte \u00e9s 0})]"}, { "optionTT", " [-TT (Fa un rastreig de les plantilles a mesura que es criden.)]"}, { "optionTG", " [-TG (Fa un rastreig de cada un dels esdeveniments de generaci\u00f3.)]"}, { "optionTS", " [-TS (Fa un rastreig de cada un dels esdeveniments de selecci\u00f3.)]"}, { "optionTTC", " [-TTC (Fa un rastreig dels subordinats de plantilla a mesura que es processen.)]"}, { "optionTCLASS", " [-TCLASS (Classe TraceListener per a extensions de rastreig.)]"}, { "optionVALIDATE", " [-VALIDATE (Estableix si es produeix la validaci\u00f3. Per defecte no est\u00e0 activada.)]"}, { "optionEDUMP", " [-EDUMP {nom de fitxer opcional} (Fer el buidatge de la pila si es produeix un error.)]"}, { "optionXML", " [-XML (Utilitza el formatador XML i afegeix la cap\u00e7alera XML.)]"}, { "optionTEXT", " [-TEXT (Utilitza el formatador de text simple.)]"}, { "optionHTML", " [-HTML (Utilitza el formatador HTML.)]"}, { "optionPARAM", " [-PARAM expressi\u00f3 del nom (Estableix un par\u00e0metre de full d'estils)]"}, { "noParsermsg1", "El proc\u00e9s XSL no ha estat correcte."}, { "noParsermsg2", "** No s'ha trobat l'analitzador **"}, { "noParsermsg3", "Comproveu la vostra classpath."}, { "noParsermsg4", "Si no teniu XML Parser for Java d'IBM, el podeu baixar de l'indret web"}, { "noParsermsg5", "AlphaWorks d'IBM: http://www.alphaworks.ibm.com/formula/xml"}, { "optionURIRESOLVER", " [-URIRESOLVER nom de classe complet (URIResolver que s'ha d'utilitzar per resoldre URI)]"}, { "optionENTITYRESOLVER", " [-ENTITYRESOLVER nom de classe complet (EntityResolver que s'ha d'utilitzar per resoldre entitats)]"}, { "optionCONTENTHANDLER", " [-CONTENTHANDLER nom de classe complet (ContentHandler que s'ha d'utilitzar per serialitzar la sortida)]"}, { "optionLINENUMBERS", " [-L utilitza els n\u00fameros de l\u00ednia del document origen]"}, { "optionSECUREPROCESSING", " [-SECURE (estableix la caracter\u00edstica de proc\u00e9s segur en true.)]"}, // Following are the new options added in XSLTErrorResources.properties files after Jdk 1.4 (Xalan 2.2-D11) { "optionMEDIA", " [-MEDIA mediaType (utilitza l'atribut media per trobar un full d'estils relacionat amb un document.)]"}, { "optionFLAVOR", " [-FLAVOR nom_flavor (utilitza expl\u00edcitament s2s=SAX o d2d=DOM per fer una transformaci\u00f3.)] "}, // Added by sboag/scurcuru; experimental { "optionDIAG", " [-DIAG (Imprimex els mil\u00b7lisegons en total que ha trigat la transformaci\u00f3.)]"}, { "optionINCREMENTAL", " [-INCREMENTAL (sol\u00b7licita la construcci\u00f3 de DTM incremental establint http://xml.apache.org/xalan/features/incremental en true.)]"}, { "optionNOOPTIMIMIZE", " [-NOOPTIMIMIZE (sol\u00b7licita que no es processi l'optimitzaci\u00f3 de full d'estils establint http://xml.apache.org/xalan/features/optimize en false.)]"}, { "optionRL", " [-RL recursionlimit (confirma el l\u00edmit num\u00e8ric de la profunditat de recursivitat del full d'estils.)]"}, { "optionXO", " [-XO [nom_translet] (assigna el nom al translet generat)]"}, { "optionXD", " [-XD directori_destinaci\u00f3 (especifica un directori de destinaci\u00f3 per al translet)]"}, { "optionXJ", " [-XJ fitxer_jar (empaqueta les classes de translet en un fitxer jar amb el nom <fitxer_jar>)]"}, { "optionXP", " [-XP paquet (especifica un prefix de nom de paquet per a totes les classes de translet generades)]"}, //AddITIONAL STRINGS that need L10n // Note to translators: The following message describes usage of a particular // command-line option that is used to enable the "template inlining" // optimization. The optimization involves making a copy of the code // generated for a template in another template that refers to it. { "optionXN", " [-XN (habilita l'inlining de plantilles)]" }, { "optionXX", " [-XX (activa la sortida de missatges de depuraci\u00f3 addicionals)]"}, { "optionXT" , " [-XT (utilitza el translet per a la transformaci\u00f3 si \u00e9s possible)]"}, { "diagTiming"," --------- La transformaci\u00f3 de {0} mitjan\u00e7ant {1} ha trigat {2} ms" }, { "recursionTooDeep","La imbricaci\u00f3 de plantilles t\u00e9 massa nivells. Imbricaci\u00f3 = {0}, plantilla{1} {2}" }, { "nameIs", "el nom \u00e9s" }, { "matchPatternIs", "el patr\u00f3 de coincid\u00e8ncia \u00e9s" } }; } // ================= INFRASTRUCTURE ====================== /** String for use when a bad error code was encountered. */ public static final String BAD_CODE = "BAD_CODE"; /** String for use when formatting of the error string failed. */ public static final String FORMAT_FAILED = "FORMAT_FAILED"; /** General error string. */ public static final String ERROR_STRING = "#error"; /** String to prepend to error messages. */ public static final String ERROR_HEADER = "Error: "; /** String to prepend to warning messages. */ public static final String WARNING_HEADER = "Av\u00eds: "; /** String to specify the XSLT module. */ public static final String XSL_HEADER = "XSLT "; /** String to specify the XML parser module. */ public static final String XML_HEADER = "XML "; /** I don't think this is used any more. * @deprecated */ public static final String QUERY_HEADER = "PATTERN "; /** * Return a named ResourceBundle for a particular locale. This method mimics the behavior * of ResourceBundle.getBundle(). * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle * @throws MissingResourceException */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException { Locale locale = Locale.getDefault(); String suffix = getResourceSuffix(locale); try { // first try with the given locale return (XSLTErrorResources) ResourceBundle.getBundle(className + suffix, locale); } catch (MissingResourceException e) { try // try to fall back to en_US if we can't load { // Since we can't find the localized property file, // fall back to en_US. return (XSLTErrorResources) ResourceBundle.getBundle(className, new Locale("ca", "ES")); } catch (MissingResourceException e2) { // Now we are really in trouble. // very bad, definitely very bad...not going to get very far throw new MissingResourceException( "Could not load any resource bundles.", className, ""); } } } /** * Return the resource file suffic for the indicated locale * For most locales, this will be based the language code. However * for Chinese, we do distinguish between Taiwan and PRC * * @param locale the locale * @return an String suffix which canbe appended to a resource name */ private static final String getResourceSuffix(Locale locale) { String suffix = "_" + locale.getLanguage(); String country = locale.getCountry(); if (country.equals("TW")) suffix += "_" + country; return suffix; } }
Discography of American Historical Recordings, s.v. "Victor matrix [Trial 1923-03-27-02]. My buddy / Nelson Maples ; Nelson Maples Orchestra," accessed April 19, 2019, https://adp.library.ucsb.edu/index.php/matrix/detail/2000001860/Trial_1923-03-27-02-My_buddy. Victor matrix [Trial 1923-03-27-02]. My buddy / Nelson Maples ; Nelson Maples Orchestra. (2019). In Discography of American Historical Recordings. Retrieved April 19, 2019, from https://adp.library.ucsb.edu/index.php/matrix/detail/2000001860/Trial_1923-03-27-02-My_buddy. "Victor matrix [Trial 1923-03-27-02]. My buddy / Nelson Maples ; Nelson Maples Orchestra." Discography of American Historical Recordings. UC Santa Barbara Library, 2019. Web. 19 April 2019.
and the very pillars of the Church. dependant upon his spiritual power. will not be able to give any excuse. Father when I went out of this world. Spirit, and is most perfect. shall shew [it] unto you. (f) When a little time is past. will feel indeed what I am, and what I am able to do. proverbs, but I shall shew you plainly of the Father. until the end of the world. plainly, and speakest no proverb. (9) Faith and foolish security differ greatly. of his own, can diminish anything of the virtue of Christ.
#pragma once #include <eosio/chain/wasm_interface.hpp> #include <fc/time.hpp> #include <fc/utility.hpp> #pragma GCC diagnostic ignored "-Wunused-variable" namespace eosio { namespace chain { namespace config { typedef __uint128_t uint128_t; const static auto default_blocks_dir_name = "blocks"; const static auto default_blocks_archive_dir_name = "archive"; const static auto default_blocks_log_stride = UINT32_MAX; const static auto default_max_retained_block_files = 10; const static auto reversible_blocks_dir_name = "reversible"; const static auto default_reversible_cache_size = 340*1024*1024ll;/// 1MB * 340 blocks based on 21 producer BFT delay const static auto default_reversible_guard_size = 2*1024*1024ll;/// 1MB * 340 blocks based on 21 producer BFT delay const static auto default_state_dir_name = "state"; const static auto forkdb_filename = "fork_db.dat"; const static auto default_state_size = 1*1024*1024*1024ll; const static auto default_state_guard_size = 128*1024*1024ll; const static name system_account_name { "eosio"_n }; const static name null_account_name { "eosio.null"_n }; const static name producers_account_name { "eosio.prods"_n }; // Active permission of producers account requires greater than 2/3 of the producers to authorize const static name majority_producers_permission_name { "prod.major"_n }; // greater than 1/2 of producers needed to authorize const static name minority_producers_permission_name { "prod.minor"_n }; // greater than 1/3 of producers needed to authorize0 const static name eosio_auth_scope { "eosio.auth"_n }; const static name eosio_all_scope { "eosio.all"_n }; const static name active_name { "active"_n }; const static name owner_name { "owner"_n }; const static name eosio_any_name { "eosio.any"_n }; const static name eosio_code_name { "eosio.code"_n }; const static int block_interval_ms = 500; const static int block_interval_us = block_interval_ms*1000; const static uint64_t block_timestamp_epoch = 946684800000ll; // epoch is year 2000. const static uint32_t genesis_num_supported_key_types = 2; /** Percentages are fixed point with a denominator of 10,000 */ const static int percent_100 = 10000; const static int percent_1 = 100; static const uint32_t account_cpu_usage_average_window_ms = 24*60*60*1000l; static const uint32_t account_net_usage_average_window_ms = 24*60*60*1000l; static const uint32_t block_cpu_usage_average_window_ms = 60*1000l; static const uint32_t block_size_average_window_ms = 60*1000l; static const uint32_t maximum_elastic_resource_multiplier = 1000; //const static uint64_t default_max_storage_size = 10 * 1024; //const static uint32_t default_max_trx_runtime = 10*1000; //const static uint32_t default_max_gen_trx_size = 64 * 1024; const static uint32_t rate_limiting_precision = 1000*1000; const static uint32_t default_max_block_net_usage = 1024 * 1024; /// at 500ms blocks and 200byte trx, this enables ~10,000 TPS burst const static uint32_t default_target_block_net_usage_pct = 10 * percent_1; /// we target 1000 TPS const static uint32_t default_max_transaction_net_usage = default_max_block_net_usage / 2; const static uint32_t default_base_per_transaction_net_usage = 12; // 12 bytes (11 bytes for worst case of transaction_receipt_header + 1 byte for static_variant tag) const static uint32_t default_net_usage_leeway = 500; // TODO: is this reasonable? const static uint32_t default_context_free_discount_net_usage_num = 20; // TODO: is this reasonable? const static uint32_t default_context_free_discount_net_usage_den = 100; const static uint32_t transaction_id_net_usage = 32; // 32 bytes for the size of a transaction id const static uint32_t default_max_block_cpu_usage = 200'000; /// max block cpu usage in microseconds const static uint32_t default_target_block_cpu_usage_pct = 10 * percent_1; const static uint32_t default_max_transaction_cpu_usage = 3*default_max_block_cpu_usage/4; /// max trx cpu usage in microseconds const static uint32_t default_min_transaction_cpu_usage = 100; /// min trx cpu usage in microseconds (10000 TPS equiv) const static uint32_t default_subjective_cpu_leeway_us = 31000; /// default subjective cpu leeway in microseconds const static uint32_t default_max_trx_lifetime = 60*60; // 1 hour const static uint32_t default_deferred_trx_expiration_window = 10*60; // 10 minutes const static uint32_t default_max_trx_delay = 45*24*3600; // 45 days const static uint32_t default_max_inline_action_size = 512 * 1024; // 512 KB const static uint16_t default_max_inline_action_depth = 4; const static uint16_t default_max_auth_depth = 6; const static uint32_t default_sig_cpu_bill_pct = 50 * percent_1; // billable percentage of signature recovery const static uint32_t default_block_cpu_effort_pct = 80 * percent_1; // percentage of block time used for producing block const static uint16_t default_controller_thread_pool_size = 2; const static uint32_t default_max_variable_signature_length = 16384u; const static uint32_t default_max_nonprivileged_inline_action_size = 4 * 1024; // 4 KB const static uint32_t default_max_action_return_value_size = 256; const static uint16_t default_persistent_storage_num_threads = 1; const static int default_persistent_storage_max_num_files = -1; const static uint64_t default_persistent_storage_write_buffer_size = 128 * 1024 * 1024; const static uint64_t default_persistent_storage_bytes_per_sync = 1 * 1024 * 1024; const static uint32_t default_persistent_storage_mbytes_batch = 50; static_assert(MAX_SIZE_OF_BYTE_ARRAYS == 20*1024*1024, "Changing MAX_SIZE_OF_BYTE_ARRAYS breaks consensus. Make sure this is expected"); const static uint32_t default_max_kv_key_size = 1024; const static uint32_t default_max_kv_value_size = 1024*1024; // Large enough to hold most contracts const static uint32_t default_max_kv_iterators = 1024; const static uint32_t default_max_wasm_mutable_global_bytes = 1024; const static uint32_t default_max_wasm_table_elements = 1024; const static uint32_t default_max_wasm_section_elements = 8192; const static uint32_t default_max_wasm_linear_memory_init = 64*1024; const static uint32_t default_max_wasm_func_local_bytes = 8192; const static uint32_t default_max_wasm_nested_structures = 1024; const static uint32_t default_max_wasm_symbol_bytes = 8192; const static uint32_t default_max_wasm_module_bytes = 20*1024*1024; const static uint32_t default_max_wasm_code_bytes = 20*1024*1024; const static uint32_t default_max_wasm_pages = 528; const static uint32_t default_max_wasm_call_depth = 251; const static uint32_t min_net_usage_delta_between_base_and_max_for_trx = 10*1024; // Should be large enough to allow recovery from badly set blockchain parameters without a hard fork // (unless net_usage_leeway is set to 0 and so are the net limits of all accounts that can help with resetting blockchain parameters). const static uint32_t fixed_net_overhead_of_packed_trx = 16; // TODO: is this reasonable? const static uint32_t fixed_overhead_shared_vector_ram_bytes = 16; ///< overhead accounts for fixed portion of size of shared_vector field const static uint32_t overhead_per_row_per_index_ram_bytes = 32; ///< overhead accounts for basic tracking structures in a row per index const static uint32_t overhead_per_account_ram_bytes = 2*1024; ///< overhead accounts for basic account storage and pre-pays features like account recovery const static uint32_t setcode_ram_bytes_multiplier = 10; ///< multiplier on contract size to account for multiple copies and cached compilation const static uint32_t hashing_checktime_block_size = 10*1024; /// call checktime from hashing intrinsic once per this number of bytes const static eosio::chain::wasm_interface::vm_type default_wasm_runtime = eosio::chain::wasm_interface::vm_type::eos_vm_jit; const static uint32_t default_abi_serializer_max_time_us = 15*1000; ///< default deadline for abi serialization methods /** * The number of sequential blocks produced by a single producer */ const static int producer_repetitions = 12; const static int max_producers = 125; const static size_t maximum_tracked_dpos_confirmations = 1024; ///< static_assert(maximum_tracked_dpos_confirmations >= ((max_producers * 2 / 3) + 1) * producer_repetitions, "Settings never allow for DPOS irreversibility" ); /** * The number of blocks produced per round is based upon all producers having a chance * to produce all of their consecutive blocks. */ //const static int blocks_per_round = producer_count * producer_repetitions; const static int irreversible_threshold_percent= 70 * percent_1; const static uint64_t billable_alignment = 16; template<typename T> struct billable_size; template<typename T> constexpr uint64_t billable_size_v = ((billable_size<T>::value + billable_alignment - 1) / billable_alignment) * billable_alignment; } } } // namespace eosio::chain::config constexpr uint64_t EOS_PERCENT(uint64_t value, uint32_t percentage) { return (value * percentage) / eosio::chain::config::percent_100; } template<typename Number> Number EOS_PERCENT_CEIL(Number value, uint32_t percentage) { return ((value * percentage) + eosio::chain::config::percent_100 - eosio::chain::config::percent_1) / eosio::chain::config::percent_100; }
# Community Content - Azure Service Fabric This folder contains content introducing Azure Service Fabric. The content is divided into two sessions: - Session 1 - Slides - Session 2 - Developing Microservices with Azure Service Fabric (HOL) The HOL may be presented as a hands-on lab or as a demo accompanying the slide deck.
<?php /** * @copyright Copyright (c) 2016, ownCloud, Inc. * * @author Arthur Schiwon <[email protected]> * @author Bernhard Posselt <[email protected]> * @author Christoph Wurst <[email protected]> * @author Jörn Friedrich Dreyer <[email protected]> * @author Lukas Reschke <[email protected]> * @author Morris Jobke <[email protected]> * @author Robin Appelman <[email protected]> * @author Robin McCorkell <[email protected]> * @author Thomas Müller <[email protected]> * @author Vincent Petry <[email protected]> * * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see <http://www.gnu.org/licenses/> * */ namespace OC\User; use OC; use OC\Authentication\Exceptions\InvalidTokenException; use OC\Authentication\Exceptions\PasswordlessTokenException; use OC\Authentication\Exceptions\PasswordLoginForbiddenException; use OC\Authentication\Token\IProvider; use OC\Authentication\Token\IToken; use OC\Hooks\Emitter; use OC_User; use OC_Util; use OCA\DAV\Connector\Sabre\Auth; use OCP\AppFramework\Utility\ITimeFactory; use OCP\IConfig; use OCP\IRequest; use OCP\ISession; use OCP\IUser; use OCP\IUserManager; use OCP\IUserSession; use OCP\Lockdown\ILockdownManager; use OCP\Security\ISecureRandom; use OCP\Session\Exceptions\SessionNotAvailableException; use OCP\Util; use Symfony\Component\EventDispatcher\GenericEvent; /** * Class Session * * Hooks available in scope \OC\User: * - preSetPassword(\OC\User\User $user, string $password, string $recoverPassword) * - postSetPassword(\OC\User\User $user, string $password, string $recoverPassword) * - preDelete(\OC\User\User $user) * - postDelete(\OC\User\User $user) * - preCreateUser(string $uid, string $password) * - postCreateUser(\OC\User\User $user) * - preLogin(string $user, string $password) * - postLogin(\OC\User\User $user, string $password) * - preRememberedLogin(string $uid) * - postRememberedLogin(\OC\User\User $user) * - logout() * * @package OC\User */ class Session implements IUserSession, Emitter { /** @var IUserManager $manager */ private $manager; /** @var ISession $session */ private $session; /** @var ITimeFactory */ private $timeFactory; /** @var IProvider */ private $tokenProvider; /** @var IConfig */ private $config; /** @var User $activeUser */ protected $activeUser; /** @var ISecureRandom */ private $random; /** @var ILockdownManager */ private $lockdownManager; /** * @param IUserManager $manager * @param ISession $session * @param ITimeFactory $timeFactory * @param IProvider $tokenProvider * @param IConfig $config * @param ISecureRandom $random * @param ILockdownManager $lockdownManager */ public function __construct(IUserManager $manager, ISession $session, ITimeFactory $timeFactory, $tokenProvider, IConfig $config, ISecureRandom $random, ILockdownManager $lockdownManager ) { $this->manager = $manager; $this->session = $session; $this->timeFactory = $timeFactory; $this->tokenProvider = $tokenProvider; $this->config = $config; $this->random = $random; $this->lockdownManager = $lockdownManager; } /** * @param IProvider $provider */ public function setTokenProvider(IProvider $provider) { $this->tokenProvider = $provider; } /** * @param string $scope * @param string $method * @param callable $callback */ public function listen($scope, $method, callable $callback) { $this->manager->listen($scope, $method, $callback); } /** * @param string $scope optional * @param string $method optional * @param callable $callback optional */ public function removeListener($scope = null, $method = null, callable $callback = null) { $this->manager->removeListener($scope, $method, $callback); } /** * get the manager object * * @return Manager */ public function getManager() { return $this->manager; } /** * get the session object * * @return ISession */ public function getSession() { return $this->session; } /** * set the session object * * @param ISession $session */ public function setSession(ISession $session) { if ($this->session instanceof ISession) { $this->session->close(); } $this->session = $session; $this->activeUser = null; } /** * set the currently active user * * @param IUser|null $user */ public function setUser($user) { if (is_null($user)) { $this->session->remove('user_id'); } else { $this->session->set('user_id', $user->getUID()); } $this->activeUser = $user; } /** * get the current active user * * @return IUser|null Current user, otherwise null */ public function getUser() { // FIXME: This is a quick'n dirty work-around for the incognito mode as // described at https://github.com/owncloud/core/pull/12912#issuecomment-67391155 if (OC_User::isIncognitoMode()) { return null; } if (is_null($this->activeUser)) { $uid = $this->session->get('user_id'); if (is_null($uid)) { return null; } $this->activeUser = $this->manager->get($uid); if (is_null($this->activeUser)) { return null; } $this->validateSession(); } return $this->activeUser; } /** * Validate whether the current session is valid * * - For token-authenticated clients, the token validity is checked * - For browsers, the session token validity is checked */ protected function validateSession() { $token = null; $appPassword = $this->session->get('app_password'); if (is_null($appPassword)) { try { $token = $this->session->getId(); } catch (SessionNotAvailableException $ex) { return; } } else { $token = $appPassword; } if (!$this->validateToken($token)) { // Session was invalidated $this->logout(); } } /** * Checks whether the user is logged in * * @return bool if logged in */ public function isLoggedIn() { $user = $this->getUser(); if (is_null($user)) { return false; } return $user->isEnabled(); } /** * set the login name * * @param string|null $loginName for the logged in user */ public function setLoginName($loginName) { if (is_null($loginName)) { $this->session->remove('loginname'); } else { $this->session->set('loginname', $loginName); } } /** * get the login name of the current user * * @return string */ public function getLoginName() { if ($this->activeUser) { return $this->session->get('loginname'); } else { $uid = $this->session->get('user_id'); if ($uid) { $this->activeUser = $this->manager->get($uid); return $this->session->get('loginname'); } else { return null; } } } /** * try to log in with the provided credentials * * @param string $uid * @param string $password * @return boolean|null * @throws LoginException */ public function login($uid, $password) { $this->session->regenerateId(); if ($this->validateToken($password, $uid)) { return $this->loginWithToken($password); } return $this->loginWithPassword($uid, $password); } /** * Tries to log in a client * * Checks token auth enforced * Checks 2FA enabled * * @param string $user * @param string $password * @param IRequest $request * @param OC\Security\Bruteforce\Throttler $throttler * @throws LoginException * @throws PasswordLoginForbiddenException * @return boolean */ public function logClientIn($user, $password, IRequest $request, OC\Security\Bruteforce\Throttler $throttler) { $currentDelay = $throttler->sleepDelay($request->getRemoteAddress()); $isTokenPassword = $this->isTokenPassword($password); if (!$isTokenPassword && $this->isTokenAuthEnforced()) { throw new PasswordLoginForbiddenException(); } if (!$isTokenPassword && $this->isTwoFactorEnforced($user)) { throw new PasswordLoginForbiddenException(); } if (!$this->login($user, $password) ) { $users = $this->manager->getByEmail($user); if (count($users) === 1) { return $this->login($users[0]->getUID(), $password); } $throttler->registerAttempt('login', $request->getRemoteAddress(), ['uid' => $user]); if($currentDelay === 0) { $throttler->sleepDelay($request->getRemoteAddress()); } return false; } if ($isTokenPassword) { $this->session->set('app_password', $password); } else if($this->supportsCookies($request)) { // Password login, but cookies supported -> create (browser) session token $this->createSessionToken($request, $this->getUser()->getUID(), $user, $password); } return true; } protected function supportsCookies(IRequest $request) { if (!is_null($request->getCookie('cookie_test'))) { return true; } setcookie('cookie_test', 'test', $this->timeFactory->getTime() + 3600); return false; } private function isTokenAuthEnforced() { return $this->config->getSystemValue('token_auth_enforced', false); } protected function isTwoFactorEnforced($username) { Util::emitHook( '\OCA\Files_Sharing\API\Server2Server', 'preLoginNameUsedAsUserName', array('uid' => &$username) ); $user = $this->manager->get($username); if (is_null($user)) { $users = $this->manager->getByEmail($username); if (empty($users)) { return false; } if (count($users) !== 1) { return true; } $user = $users[0]; } // DI not possible due to cyclic dependencies :'-/ return OC::$server->getTwoFactorAuthManager()->isTwoFactorAuthenticated($user); } /** * Check if the given 'password' is actually a device token * * @param string $password * @return boolean */ public function isTokenPassword($password) { try { $this->tokenProvider->getToken($password); return true; } catch (InvalidTokenException $ex) { return false; } } protected function prepareUserLogin($firstTimeLogin) { // TODO: mock/inject/use non-static // Refresh the token \OC::$server->getCsrfTokenManager()->refreshToken(); //we need to pass the user name, which may differ from login name $user = $this->getUser()->getUID(); OC_Util::setupFS($user); if ($firstTimeLogin) { // TODO: lock necessary? //trigger creation of user home and /files folder $userFolder = \OC::$server->getUserFolder($user); // copy skeleton \OC_Util::copySkeleton($user, $userFolder); // trigger any other initialization \OC::$server->getEventDispatcher()->dispatch(IUser::class . '::firstLogin', new GenericEvent($this->getUser())); } } /** * Tries to login the user with HTTP Basic Authentication * * @todo do not allow basic auth if the user is 2FA enforced * @param IRequest $request * @param OC\Security\Bruteforce\Throttler $throttler * @return boolean if the login was successful */ public function tryBasicAuthLogin(IRequest $request, OC\Security\Bruteforce\Throttler $throttler) { if (!empty($request->server['PHP_AUTH_USER']) && !empty($request->server['PHP_AUTH_PW'])) { try { if ($this->logClientIn($request->server['PHP_AUTH_USER'], $request->server['PHP_AUTH_PW'], $request, $throttler)) { /** * Add DAV authenticated. This should in an ideal world not be * necessary but the iOS App reads cookies from anywhere instead * only the DAV endpoint. * This makes sure that the cookies will be valid for the whole scope * @see https://github.com/owncloud/core/issues/22893 */ $this->session->set( Auth::DAV_AUTHENTICATED, $this->getUser()->getUID() ); // Set the last-password-confirm session to make the sudo mode work $this->session->set('last-password-confirm', $this->timeFactory->getTime()); return true; } } catch (PasswordLoginForbiddenException $ex) { // Nothing to do } } return false; } /** * Log an user in via login name and password * * @param string $uid * @param string $password * @return boolean * @throws LoginException if an app canceld the login process or the user is not enabled */ private function loginWithPassword($uid, $password) { $this->manager->emit('\OC\User', 'preLogin', array($uid, $password)); $user = $this->manager->checkPassword($uid, $password); if ($user === false) { // Password check failed return false; } if ($user->isEnabled()) { $this->setUser($user); $this->setLoginName($uid); $firstTimeLogin = $user->updateLastLoginTimestamp(); $this->manager->emit('\OC\User', 'postLogin', [$user, $password]); if ($this->isLoggedIn()) { $this->prepareUserLogin($firstTimeLogin); return true; } else { // injecting l10n does not work - there is a circular dependency between session and \OCP\L10N\IFactory $message = \OC::$server->getL10N('lib')->t('Login canceled by app'); throw new LoginException($message); } } else { // injecting l10n does not work - there is a circular dependency between session and \OCP\L10N\IFactory $message = \OC::$server->getL10N('lib')->t('User disabled'); throw new LoginException($message); } } /** * Log an user in with a given token (id) * * @param string $token * @return boolean * @throws LoginException if an app canceld the login process or the user is not enabled */ private function loginWithToken($token) { try { $dbToken = $this->tokenProvider->getToken($token); } catch (InvalidTokenException $ex) { return false; } $uid = $dbToken->getUID(); // When logging in with token, the password must be decrypted first before passing to login hook $password = ''; try { $password = $this->tokenProvider->getPassword($dbToken, $token); } catch (PasswordlessTokenException $ex) { // Ignore and use empty string instead } $this->manager->emit('\OC\User', 'preLogin', array($uid, $password)); $user = $this->manager->get($uid); if (is_null($user)) { // user does not exist return false; } if (!$user->isEnabled()) { // disabled users can not log in // injecting l10n does not work - there is a circular dependency between session and \OCP\L10N\IFactory $message = \OC::$server->getL10N('lib')->t('User disabled'); throw new LoginException($message); } //login $this->setUser($user); $this->setLoginName($dbToken->getLoginName()); $this->lockdownManager->setToken($dbToken); $this->manager->emit('\OC\User', 'postLogin', array($user, $password)); if ($this->isLoggedIn()) { $this->prepareUserLogin(false); // token login cant be the first } else { // injecting l10n does not work - there is a circular dependency between session and \OCP\L10N\IFactory $message = \OC::$server->getL10N('lib')->t('Login canceled by app'); throw new LoginException($message); } return true; } /** * Create a new session token for the given user credentials * * @param IRequest $request * @param string $uid user UID * @param string $loginName login name * @param string $password * @param int $remember * @return boolean */ public function createSessionToken(IRequest $request, $uid, $loginName, $password = null, $remember = IToken::DO_NOT_REMEMBER) { if (is_null($this->manager->get($uid))) { // User does not exist return false; } $name = isset($request->server['HTTP_USER_AGENT']) ? $request->server['HTTP_USER_AGENT'] : 'unknown browser'; try { $sessionId = $this->session->getId(); $pwd = $this->getPassword($password); $this->tokenProvider->generateToken($sessionId, $uid, $loginName, $pwd, $name, IToken::TEMPORARY_TOKEN, $remember); return true; } catch (SessionNotAvailableException $ex) { // This can happen with OCC, where a memory session is used // if a memory session is used, we shouldn't create a session token anyway return false; } } /** * Checks if the given password is a token. * If yes, the password is extracted from the token. * If no, the same password is returned. * * @param string $password either the login password or a device token * @return string|null the password or null if none was set in the token */ private function getPassword($password) { if (is_null($password)) { // This is surely no token ;-) return null; } try { $token = $this->tokenProvider->getToken($password); try { return $this->tokenProvider->getPassword($token, $password); } catch (PasswordlessTokenException $ex) { return null; } } catch (InvalidTokenException $ex) { return $password; } } /** * @param IToken $dbToken * @param string $token * @return boolean */ private function checkTokenCredentials(IToken $dbToken, $token) { // Check whether login credentials are still valid and the user was not disabled // This check is performed each 5 minutes $lastCheck = $dbToken->getLastCheck() ? : 0; $now = $this->timeFactory->getTime(); if ($lastCheck > ($now - 60 * 5)) { // Checked performed recently, nothing to do now return true; } try { $pwd = $this->tokenProvider->getPassword($dbToken, $token); } catch (InvalidTokenException $ex) { // An invalid token password was used -> log user out return false; } catch (PasswordlessTokenException $ex) { // Token has no password if (!is_null($this->activeUser) && !$this->activeUser->isEnabled()) { $this->tokenProvider->invalidateToken($token); return false; } $dbToken->setLastCheck($now); return true; } if ($this->manager->checkPassword($dbToken->getLoginName(), $pwd) === false || (!is_null($this->activeUser) && !$this->activeUser->isEnabled())) { $this->tokenProvider->invalidateToken($token); // Password has changed or user was disabled -> log user out return false; } $dbToken->setLastCheck($now); return true; } /** * Check if the given token exists and performs password/user-enabled checks * * Invalidates the token if checks fail * * @param string $token * @param string $user login name * @return boolean */ private function validateToken($token, $user = null) { try { $dbToken = $this->tokenProvider->getToken($token); } catch (InvalidTokenException $ex) { return false; } // Check if login names match if (!is_null($user) && $dbToken->getLoginName() !== $user) { // TODO: this makes it imposssible to use different login names on browser and client // e.g. login by e-mail '[email protected]' on browser for generating the token will not // allow to use the client token with the login name 'user'. return false; } if (!$this->checkTokenCredentials($dbToken, $token)) { return false; } $this->tokenProvider->updateTokenActivity($dbToken); return true; } /** * Tries to login the user with auth token header * * @param IRequest $request * @todo check remember me cookie * @return boolean */ public function tryTokenLogin(IRequest $request) { $authHeader = $request->getHeader('Authorization'); if (strpos($authHeader, 'token ') === false) { // No auth header, let's try session id try { $token = $this->session->getId(); } catch (SessionNotAvailableException $ex) { return false; } } else { $token = substr($authHeader, 6); } if (!$this->loginWithToken($token)) { return false; } if(!$this->validateToken($token)) { return false; } return true; } /** * perform login using the magic cookie (remember login) * * @param string $uid the username * @param string $currentToken * @param string $oldSessionId * @return bool */ public function loginWithCookie($uid, $currentToken, $oldSessionId) { $this->session->regenerateId(); $this->manager->emit('\OC\User', 'preRememberedLogin', array($uid)); $user = $this->manager->get($uid); if (is_null($user)) { // user does not exist return false; } // get stored tokens $tokens = $this->config->getUserKeys($uid, 'login_token'); // test cookies token against stored tokens if (!in_array($currentToken, $tokens, true)) { return false; } // replace successfully used token with a new one $this->config->deleteUserValue($uid, 'login_token', $currentToken); $newToken = $this->random->generate(32); $this->config->setUserValue($uid, 'login_token', $newToken, $this->timeFactory->getTime()); try { $sessionId = $this->session->getId(); $this->tokenProvider->renewSessionToken($oldSessionId, $sessionId); } catch (SessionNotAvailableException $ex) { return false; } catch (InvalidTokenException $ex) { \OC::$server->getLogger()->warning('Renewing session token failed', ['app' => 'core']); return false; } $this->setMagicInCookie($user->getUID(), $newToken); $token = $this->tokenProvider->getToken($sessionId); //login $this->setUser($user); $this->setLoginName($token->getLoginName()); $this->lockdownManager->setToken($token); $user->updateLastLoginTimestamp(); $this->manager->emit('\OC\User', 'postRememberedLogin', [$user]); return true; } /** * @param IUser $user */ public function createRememberMeToken(IUser $user) { $token = $this->random->generate(32); $this->config->setUserValue($user->getUID(), 'login_token', $token, $this->timeFactory->getTime()); $this->setMagicInCookie($user->getUID(), $token); } /** * logout the user from the session */ public function logout() { $this->manager->emit('\OC\User', 'logout'); $user = $this->getUser(); if (!is_null($user)) { try { $this->tokenProvider->invalidateToken($this->session->getId()); } catch (SessionNotAvailableException $ex) { } } $this->setUser(null); $this->setLoginName(null); $this->unsetMagicInCookie(); $this->session->clear(); } /** * Set cookie value to use in next page load * * @param string $username username to be set * @param string $token */ public function setMagicInCookie($username, $token) { $secureCookie = OC::$server->getRequest()->getServerProtocol() === 'https'; $webRoot = \OC::$WEBROOT; if ($webRoot === '') { $webRoot = '/'; } $expires = $this->timeFactory->getTime() + $this->config->getSystemValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15); setcookie('nc_username', $username, $expires, $webRoot, '', $secureCookie, true); setcookie('nc_token', $token, $expires, $webRoot, '', $secureCookie, true); try { setcookie('nc_session_id', $this->session->getId(), $expires, $webRoot, '', $secureCookie, true); } catch (SessionNotAvailableException $ex) { // ignore } } /** * Remove cookie for "remember username" */ public function unsetMagicInCookie() { //TODO: DI for cookies and IRequest $secureCookie = OC::$server->getRequest()->getServerProtocol() === 'https'; unset($_COOKIE['nc_username']); //TODO: DI unset($_COOKIE['nc_token']); unset($_COOKIE['nc_session_id']); setcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true); setcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true); setcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT, '', $secureCookie, true); // old cookies might be stored under /webroot/ instead of /webroot // and Firefox doesn't like it! setcookie('nc_username', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true); setcookie('nc_token', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true); setcookie('nc_session_id', '', $this->timeFactory->getTime() - 3600, OC::$WEBROOT . '/', '', $secureCookie, true); } /** * Update password of the browser session token if there is one * * @param string $password */ public function updateSessionTokenPassword($password) { try { $sessionId = $this->session->getId(); $token = $this->tokenProvider->getToken($sessionId); $this->tokenProvider->setPassword($token, $sessionId, $password); } catch (SessionNotAvailableException $ex) { // Nothing to do } catch (InvalidTokenException $ex) { // Nothing to do } } }
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/storagegateway/model/TapeArchive.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace StorageGateway { namespace Model { TapeArchive::TapeArchive() : m_tapeARNHasBeenSet(false), m_tapeBarcodeHasBeenSet(false), m_tapeCreatedDateHasBeenSet(false), m_tapeSizeInBytes(0), m_tapeSizeInBytesHasBeenSet(false), m_completionTimeHasBeenSet(false), m_retrievedToHasBeenSet(false), m_tapeStatusHasBeenSet(false), m_tapeUsedInBytes(0), m_tapeUsedInBytesHasBeenSet(false), m_kMSKeyHasBeenSet(false), m_poolIdHasBeenSet(false), m_worm(false), m_wormHasBeenSet(false), m_retentionStartDateHasBeenSet(false), m_poolEntryDateHasBeenSet(false) { } TapeArchive::TapeArchive(JsonView jsonValue) : m_tapeARNHasBeenSet(false), m_tapeBarcodeHasBeenSet(false), m_tapeCreatedDateHasBeenSet(false), m_tapeSizeInBytes(0), m_tapeSizeInBytesHasBeenSet(false), m_completionTimeHasBeenSet(false), m_retrievedToHasBeenSet(false), m_tapeStatusHasBeenSet(false), m_tapeUsedInBytes(0), m_tapeUsedInBytesHasBeenSet(false), m_kMSKeyHasBeenSet(false), m_poolIdHasBeenSet(false), m_worm(false), m_wormHasBeenSet(false), m_retentionStartDateHasBeenSet(false), m_poolEntryDateHasBeenSet(false) { *this = jsonValue; } TapeArchive& TapeArchive::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("TapeARN")) { m_tapeARN = jsonValue.GetString("TapeARN"); m_tapeARNHasBeenSet = true; } if(jsonValue.ValueExists("TapeBarcode")) { m_tapeBarcode = jsonValue.GetString("TapeBarcode"); m_tapeBarcodeHasBeenSet = true; } if(jsonValue.ValueExists("TapeCreatedDate")) { m_tapeCreatedDate = jsonValue.GetDouble("TapeCreatedDate"); m_tapeCreatedDateHasBeenSet = true; } if(jsonValue.ValueExists("TapeSizeInBytes")) { m_tapeSizeInBytes = jsonValue.GetInt64("TapeSizeInBytes"); m_tapeSizeInBytesHasBeenSet = true; } if(jsonValue.ValueExists("CompletionTime")) { m_completionTime = jsonValue.GetDouble("CompletionTime"); m_completionTimeHasBeenSet = true; } if(jsonValue.ValueExists("RetrievedTo")) { m_retrievedTo = jsonValue.GetString("RetrievedTo"); m_retrievedToHasBeenSet = true; } if(jsonValue.ValueExists("TapeStatus")) { m_tapeStatus = jsonValue.GetString("TapeStatus"); m_tapeStatusHasBeenSet = true; } if(jsonValue.ValueExists("TapeUsedInBytes")) { m_tapeUsedInBytes = jsonValue.GetInt64("TapeUsedInBytes"); m_tapeUsedInBytesHasBeenSet = true; } if(jsonValue.ValueExists("KMSKey")) { m_kMSKey = jsonValue.GetString("KMSKey"); m_kMSKeyHasBeenSet = true; } if(jsonValue.ValueExists("PoolId")) { m_poolId = jsonValue.GetString("PoolId"); m_poolIdHasBeenSet = true; } if(jsonValue.ValueExists("Worm")) { m_worm = jsonValue.GetBool("Worm"); m_wormHasBeenSet = true; } if(jsonValue.ValueExists("RetentionStartDate")) { m_retentionStartDate = jsonValue.GetDouble("RetentionStartDate"); m_retentionStartDateHasBeenSet = true; } if(jsonValue.ValueExists("PoolEntryDate")) { m_poolEntryDate = jsonValue.GetDouble("PoolEntryDate"); m_poolEntryDateHasBeenSet = true; } return *this; } JsonValue TapeArchive::Jsonize() const { JsonValue payload; if(m_tapeARNHasBeenSet) { payload.WithString("TapeARN", m_tapeARN); } if(m_tapeBarcodeHasBeenSet) { payload.WithString("TapeBarcode", m_tapeBarcode); } if(m_tapeCreatedDateHasBeenSet) { payload.WithDouble("TapeCreatedDate", m_tapeCreatedDate.SecondsWithMSPrecision()); } if(m_tapeSizeInBytesHasBeenSet) { payload.WithInt64("TapeSizeInBytes", m_tapeSizeInBytes); } if(m_completionTimeHasBeenSet) { payload.WithDouble("CompletionTime", m_completionTime.SecondsWithMSPrecision()); } if(m_retrievedToHasBeenSet) { payload.WithString("RetrievedTo", m_retrievedTo); } if(m_tapeStatusHasBeenSet) { payload.WithString("TapeStatus", m_tapeStatus); } if(m_tapeUsedInBytesHasBeenSet) { payload.WithInt64("TapeUsedInBytes", m_tapeUsedInBytes); } if(m_kMSKeyHasBeenSet) { payload.WithString("KMSKey", m_kMSKey); } if(m_poolIdHasBeenSet) { payload.WithString("PoolId", m_poolId); } if(m_wormHasBeenSet) { payload.WithBool("Worm", m_worm); } if(m_retentionStartDateHasBeenSet) { payload.WithDouble("RetentionStartDate", m_retentionStartDate.SecondsWithMSPrecision()); } if(m_poolEntryDateHasBeenSet) { payload.WithDouble("PoolEntryDate", m_poolEntryDate.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace StorageGateway } // namespace Aws
Springwell Audio Services is proud to announce that Steven Liddle has now been voted in as the Secretary of the Swedish Section of the Audio Engineers Society. Springwell Audio Services recently completed a series of electroacoustic measurements and provided documentation on behalf of AV-Huset Ljud & Bildteknik AB. Springwell Audio Services has recently acquired a new tool to help event organisers, music venues and PA companies stay within noise exposure limits set by local authorities. RTCapture is a PC based software solution from the Wavecapture team which can accurately monitor and record sound pressure level (SPL). Read this article to learn more about protecting the public's hearing.
// Copyright (c) 2014-2020 QUIKSharp Authors https://github.com/finsight/QUIKSharp/blob/master/AUTHORS.md. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE.txt in the project root for license information. using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Diagnostics; namespace QuikSharp.DataStructures.Transaction { /// <summary> /// Формат .tri-файла с параметрами транзакций /// Адоптированный под QLua /// </summary> public class Transaction { // ReSharper disable InconsistentNaming /// <summary> /// Функция вызывается терминалом QUIK при получении ответа на транзакцию пользователя. /// </summary> public event TransReplyHandler OnTransReply; internal void OnTransReplyCall(TransactionReply reply) { OnTransReply?.Invoke(reply); // this should happen only once per transaction id Trace.Assert(TransactionReply == null); TransactionReply = reply; } /// <summary> /// TransactionReply /// </summary> public TransactionReply TransactionReply { get; set; } /// <summary> /// Функция вызывается терминалом QUIK при получении новой заявки или при изменении параметров существующей заявки. /// </summary> public event OrderHandler OnOrder; internal void OnOrderCall(Order order) { OnOrder?.Invoke(order); if (Orders == null) { Orders = new List<Order>(); } Orders.Add(order); } /// <summary> /// Функция вызывается терминалом QUIK при получении новой стоп-заявки или при изменении параметров существующей стоп-заявки. /// </summary> public event StopOrderHandler OnStopOrder; internal void OnStopOrderCall(StopOrder stopOrder) { OnStopOrder?.Invoke(stopOrder); if (StopOrders == null) { StopOrders = new List<StopOrder>(); } StopOrders.Add(stopOrder); } /// <summary> /// Orders /// </summary> public List<Order> Orders { get; set; } /// <summary> /// StopOrders /// </summary> public List<StopOrder> StopOrders { get; set; } /// <summary> /// Функция вызывается терминалом QUIK при получении сделки. /// </summary> public event TradeHandler OnTrade; internal void OnTradeCall(Trade trade) { OnTrade?.Invoke(trade); if (Trades == null) { Trades = new List<Trade>(); } Trades.Add(trade); } /// <summary> /// Trades /// </summary> public List<Trade> Trades { get; set; } // TODO inspect with actual data /// <summary> /// Транзакция исполнена /// </summary> /// <returns></returns> public bool IsComepleted() { if (Orders == null || Orders.Count == 0) return false; var last = Orders[Orders.Count - 1]; return !last.Flags.HasFlag(OrderTradeFlags.Active) && !last.Flags.HasFlag(OrderTradeFlags.Canceled); } /// <summary> /// Error message returned by sendTransaction /// </summary> public string ErrorMessage { get; set; } /////////////////////////////////////////////////////////////////////////////// /// /// Transaction specification properties start here /// /////////////////////////////////////////////////////////////////////////////// /// <summary> /// Код класса, по которому выполняется транзакция, например TQBR. Обязательный параметр /// </summary> public string CLASSCODE { get; set; } /// <summary> /// Код инструмента, по которому выполняется транзакция, например SBER /// </summary> public string SECCODE { get; set; } /// <summary> /// Вид транзакции, имеющий одно из следующих значений: /// </summary> public TransactionAction? ACTION { get; set; } /// <summary> /// Идентификатор участника торгов (код фирмы) /// </summary> public string FIRM_ID { get; set; } /// <summary> /// Номер счета Трейдера. Параметр обязателен при «ACTION» = «KILL_ALL_FUTURES_ORDERS». Параметр чувствителен к верхнему/нижнему регистру символов. /// </summary> public string ACCOUNT { get; set; } /// <summary> /// 20-ти символьное составное поле, может содержать код клиента и текстовый комментарий с тем же разделителем, что и при вводе заявки вручную. Параметр используется только для групповых транзакций. Необязательный параметр /// </summary> public string CLIENT_CODE { get; set; } /// <summary> /// Количество лотов в заявке, обязательный параметр /// </summary> [JsonConverter(typeof(ToStringConverter<int>))] public int QUANTITY { get; set; } /// <summary> /// Цена заявки, за единицу инструмента. Обязательный параметр. /// При выставлении рыночной заявки (TYPE=M) на Срочном рынке FORTS /// необходимо указывать значение цены – укажите наихудшую /// (минимально или максимально возможную – в зависимости от направленности), /// заявка все равно будет исполнена по рыночной цене. Для других рынков при /// выставлении рыночной заявки укажите price= 0. /// </summary> [JsonConverter(typeof(DecimalG29ToStringConverter))] public decimal PRICE { get; set; } /// <summary> /// Направление заявки, обязательный параметр. Значения: «S» – продать, «B» – купить /// </summary> public TransactionOperation? OPERATION { get; set; } /// <summary> /// Уникальный идентификационный номер заявки, значение от 1 до 2 294 967 294 /// </summary> [JsonConverter(typeof(ToStringConverter<long?>))] public long? TRANS_ID { get; set; } // ReSharper restore InconsistentNaming // ReSharper disable InconsistentNaming /// <summary> /// Тип заявки, необязательный параметр. /// Значения: «L» – лимитированная (по умолчанию), «M» – рыночная /// </summary> public TransactionType? TYPE { get; set; } /// <summary> /// Признак того, является ли заявка заявкой Маркет-Мейкера. Возможные значения: «YES» или «NO». Значение по умолчанию (если параметр отсутствует): «NO» /// </summary> public YesOrNo? MARKET_MAKER_ORDER { get; set; } /// <summary> /// Условие исполнения заявки, необязательный параметр. Возможные значения: /// </summary> public ExecutionCondition? EXECUTION_CONDITION { get; set; } /// <summary> /// Объем сделки РЕПО-М в рублях /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? REPOVALUE { get; set; } /// <summary> /// Начальное значение дисконта в заявке на сделку РЕПО-М /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? START_DISCOUNT { get; set; } /// <summary> /// Нижнее предельное значение дисконта в заявке на сделку РЕПО-М /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? LOWER_DISCOUNT { get; set; } /// <summary> /// Верхнее предельное значение дисконта в заявке на сделку РЕПО-М /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? UPPER_DISCOUNT { get; set; } /// <summary> /// Стоп-цена, за единицу инструмента. Используется только при «ACTION» = «NEW_STOP_ORDER» /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? STOPPRICE { get; set; } /// <summary> /// Тип стоп-заявки. Возможные значения: /// </summary> public StopOrderKind? STOP_ORDER_KIND { get; set; } /// <summary> /// Класс инструмента условия. Используется только при «STOP_ORDER_KIND» = «CONDITION_PRICE_BY_OTHER_SEC». /// </summary> public string STOPPRICE_CLASSCODE { get; set; } /// <summary> /// Код инструмента условия. Используется только при «STOP_ORDER_KIND» = «CONDITION_PRICE_BY_OTHER_SEC» /// </summary> public string STOPPRICE_SECCODE { get; set; } /// <summary> /// Направление предельного изменения стоп-цены. Используется только при «STOP_ORDER_KIND» = «CONDITION_PRICE_BY_OTHER_SEC». Возможные значения:  «&lt;=» или «&gt;= » /// </summary> public string STOPPRICE_CONDITION { get; set; } /// <summary> /// Цена связанной лимитированной заявки. Используется только при «STOP_ORDER_KIND» = «WITH_LINKED_LIMIT_ORDER» /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? LINKED_ORDER_PRICE { get; set; } /// <summary> /// Срок действия стоп-заявки. Возможные значения: «GTC» – до отмены, «TODAY» - до окончания текущей торговой сессии, Дата в формате «ГГММДД». /// </summary> public string EXPIRY_DATE { get; set; } /// <summary> /// Цена условия «стоп-лимит» для заявки типа «Тэйк-профит и стоп-лимит» /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? STOPPRICE2 { get; set; } /// <summary> /// Признак исполнения заявки по рыночной цене при наступлении условия «стоп-лимит». Значения «YES» или «NO». Параметр заявок типа «Тэйк-профит и стоп-лимит» /// </summary> // TODO (?) Is No default here? public YesOrNo? MARKET_STOP_LIMIT { get; set; } /// <summary> /// Признак исполнения заявки по рыночной цене при наступлении условия «тэйк-профит». Значения «YES» или «NO». Параметр заявок типа «Тэйк-профит и стоп-лимит» /// </summary> // TODO (?) Is No default here? public YesOrNo? MARKET_TAKE_PROFIT { get; set; } /// <summary> /// Признак действия заявки типа «Тэйк-профит и стоп-лимит» в течение определенного интервала времени. Значения «YES» или «NO» /// </summary> // TODO (?) Is No default here? public YesOrNo? IS_ACTIVE_IN_TIME { get; set; } /// <summary> /// Время начала действия заявки типа «Тэйк-профит и стоп-лимит» в формате «ЧЧММСС» /// </summary> [JsonConverter(typeof(HHMMSSDateTimeConverter))] public DateTime? ACTIVE_FROM_TIME { get; set; } /// <summary> /// Время окончания действия заявки типа «Тэйк-профит и стоп-лимит» в формате «ЧЧММСС» /// </summary> [JsonConverter(typeof(HHMMSSDateTimeConverter))] public DateTime? ACTIVE_TO_TIME { get; set; } /// <summary> /// Код организации – партнера по внебиржевой сделке.Применяется при «ACTION» = «NEW_NEG_DEAL», «ACTION» = «NEW_REPO_NEG_DEAL» или «ACTION» = «NEW_EXT_REPO_NEG_DEAL» /// </summary> public string PARTNER { get; set; } /// <summary> /// Номер заявки, снимаемой из торговой системы. Применяется при «ACTION» = «KILL_ORDER» или «ACTION» = «KILL_NEG_DEAL» или «ACTION» = «KILL_QUOTE» /// </summary> public string ORDER_KEY { get; set; } /// <summary> /// Номер стоп-заявки, снимаемой из торговой системы. Применяется только при «ACTION» = «KILL_STOP_ORDER» /// </summary> public string STOP_ORDER_KEY { get; set; } /// <summary> /// Код расчетов при исполнении внебиржевых заявок /// </summary> public string SETTLE_CODE { get; set; } /// <summary> /// Цена второй части РЕПО /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? PRICE2 { get; set; } /// <summary> /// Срок РЕПО. Параметр сделок РЕПО-М /// </summary> public string REPOTERM { get; set; } /// <summary> /// Ставка РЕПО, в процентах /// </summary> public string REPORATE { get; set; } /// <summary> /// Признак блокировки бумаг на время операции РЕПО («YES», «NO») /// </summary> // TODO (?) Is No default here? public YesOrNo? BLOCK_SECURITIES { get; set; } /// <summary> /// Ставка фиксированного возмещения, выплачиваемого в случае неисполнения второй части РЕПО, в процентах /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? REFUNDRATE { get; set; } /// <summary> /// Текстовый комментарий, указанный в заявке - поручение (brokerref in Trades/Orders). /// Используется при снятии группы заявок /// </summary> [JsonProperty("brokerref")] public string Comment { get; set; } /// <summary> /// Признак крупной сделки (YES/NO). Параметр внебиржевой сделки /// </summary> // TODO (?) Is No default here? public YesOrNo? LARGE_TRADE { get; set; } /// <summary> /// Код валюты расчетов по внебиржевой сделки, например «SUR» – рубли РФ, «USD» – доллары США. Параметр внебиржевой сделки /// </summary> public string CURR_CODE { get; set; } /// <summary> /// Лицо, от имени которого и за чей счет регистрируется сделка (параметр внебиржевой сделки). Возможные значения: /// </summary> public ForAccount? FOR_ACCOUNT { get; set; } /// <summary> /// Дата исполнения внебиржевой сделки /// </summary> public string SETTLE_DATE { get; set; } /// <summary> /// Признак снятия стоп-заявки при частичном исполнении связанной лимитированной заявки. Используется только при «STOP_ORDER_KIND» = «WITH_LINKED_LIMIT_ORDER». Возможные значения: «YES» или «NO» /// </summary> // TODO (?) Is No default here? public YesOrNo? KILL_IF_LINKED_ORDER_PARTLY_FILLED { get; set; } /// <summary> /// Величина отступа от максимума (минимума) цены последней сделки. Используется при «STOP_ORDER_KIND» = «TAKE_PROFIT_STOP_ORDER» или «ACTIVATED_BY_ORDER_TAKE_PROFIT_STOP_ORDER» /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? OFFSET { get; set; } /// <summary> /// Единицы измерения отступа. Возможные значения: /// </summary> public OffsetUnits? OFFSET_UNITS { get; set; } /// <summary> /// Величина защитного спрэда. Используется при «STOP_ORDER_KIND» = «TAKE_PROFIT_STOP_ORDER» или ACTIVATED_BY_ORDER_TAKE_PROFIT_STOP_ORDER» /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? SPREAD { get; set; } /// <summary> /// Единицы измерения защитного спрэда. Используется при «STOP_ORDER_KIND» = «TAKE_PROFIT_STOP_ORDER» или «ACTIVATED_BY_ORDER_TAKE_PROFIT_STOP_ORDER» /// </summary> public OffsetUnits? SPREAD_UNITS { get; set; } /// <summary> /// Регистрационный номер заявки-условия. Используется при «STOP_ORDER_KIND» = «ACTIVATED_BY_ORDER_SIMPLE_STOP_ORDER» или «ACTIVATED_BY_ORDER_TAKE_PROFIT_STOP_ORDER» /// </summary> public string BASE_ORDER_KEY { get; set; } /// <summary> /// Признак использования в качестве объема заявки «по исполнению» исполненного количества бумаг заявки-условия. Возможные значения: «YES» или «NO». Используется при «STOP_ORDER_KIND» = «ACTIVATED_BY_ORDER_SIMPLE_STOP_ORDER» или «ACTIVATED_BY_ORDER_TAKE_PROFIT_STOP_ORDER» /// </summary> // TODO (?) Is No default here? public YesOrNo? USE_BASE_ORDER_BALANCE { get; set; } /// <summary> /// Признак активации заявки «по исполнению» при частичном исполнении заявки-условия. Возможные значения: «YES» или «NO». Используется при «STOP_ORDER_KIND» = «ACTIVATED_BY_ORDER_SIMPLE_STOP_ORDER» или «ACTIVATED_BY_ORDER_TAKE_PROFIT_STOP_ORDER» /// </summary> // TODO (?) Is No default here? public YesOrNo? ACTIVATE_IF_BASE_ORDER_PARTLY_FILLED { get; set; } /// <summary> /// Идентификатор базового контракта для фьючерсов или опционов. /// Обязательный параметр снятия заявок на рынке FORTS /// </summary> public string BASE_CONTRACT { get; set; } /// <summary> ///  Режим перестановки заявок на рынке FORTS. Параметр операции «ACTION» = «MOVE_ORDERS» Возможные значения: «0» – оставить количество в заявках без изменения, «1» – изменить количество в заявках на новые, «2» – при несовпадении новых количеств с текущим хотя бы в одной заявке, обе заявки снимаются /// </summary> public string MODE { get; set; } /// <summary> /// Номер первой заявки /// </summary> [JsonConverter(typeof(ToStringConverter<long?>))] public long? FIRST_ORDER_NUMBER { get; set; } /// <summary> /// Количество в первой заявке /// </summary> [JsonConverter(typeof(ToStringConverter<int?>))] public int? FIRST_ORDER_NEW_QUANTITY { get; set; } /// <summary> /// Цена в первой заявке /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? FIRST_ORDER_NEW_PRICE { get; set; } /// <summary> /// Номер второй заявки /// </summary> [JsonConverter(typeof(ToStringConverter<long?>))] public long? SECOND_ORDER_NUMBER { get; set; } /// <summary> /// Количество во второй заявке /// </summary> [JsonConverter(typeof(ToStringConverter<int?>))] public int? SECOND_ORDER_NEW_QUANTITY { get; set; } /// <summary> /// Цена во второй заявке /// </summary> [JsonConverter(typeof(ToStringConverter<decimal?>))] public decimal? SECOND_ORDER_NEW_PRICE { get; set; } /// <summary> /// Признак снятия активных заявок по данному инструменту. Используется только при «ACTION» = «NEW_QUOTE». Возможные значения: «YES» или «NO» /// </summary> // TODO (?) Is No default here? public YesOrNo? KILL_ACTIVE_ORDERS { get; set; } /// <summary> /// Направление операции в сделке, подтверждаемой отчетом /// </summary> public string NEG_TRADE_OPERATION { get; set; } /// <summary> /// Номер подтверждаемой отчетом сделки для исполнения /// </summary> [JsonConverter(typeof(ToStringConverter<long?>))] public long? NEG_TRADE_NUMBER { get; set; } /// <summary> /// Лимит открытых позиций, при «Тип лимита» = «Ден.средства» или «Всего» /// </summary> public string VOLUMEMN { get; set; } /// <summary> /// Лимит открытых позиций, при «Тип лимита» = «Залоговые ден.средства» /// </summary> public string VOLUMEPL { get; set; } /// <summary> /// Коэффициент ликвидности /// </summary> public string KFL { get; set; } /// <summary> /// Коэффициент клиентского гарантийного обеспечения /// </summary> public string KGO { get; set; } /// <summary> /// Параметр, который определяет, будет ли загружаться величина КГО при загрузке лимитов из файла: при USE_KGO=Y – величина КГО загружает. при USE_KGO=N – величина КГО не загружается. При установке лимита на Срочном рынке Московской Биржи с принудительным понижением (см. Создание лимита) требуется указать USE_KGO= Y /// </summary> public string USE_KGO { get; set; } /// <summary> /// Признак проверки попадания цены заявки в диапазон допустимых цен. /// Параметр Срочного рынка FORTS. Необязательный параметр транзакций /// установки новых заявок по классам «Опционы ФОРТС» и «РПС: Опционы ФОРТС». /// Возможные значения: «YES» - выполнять проверку, «NO» - не выполнять /// </summary> public YesOrNo? CHECK_LIMITS { get; set; } /// <summary> /// Ссылка, которая связывает две сделки РЕПО или РПС. Сделка может быть заключена только между контрагентами, указавшими одинаковое значение этого параметра в своих заявках. Параметр представляет собой набор произвольный набор количеством до 10 символов (допускаются цифры и буквы). Необязательный параметр /// </summary> public string MATCHREF { get; set; } /// <summary> /// Режим корректировки ограничения по фьючерсным счетам. Возможные значения: «Y» - включен, установкой лимита изменяется действующее значение, «N» - выключен (по умолчанию), установкой лимита задается новое значение /// </summary> public string CORRECTION { get; set; } // ReSharper restore InconsistentNaming [JsonIgnore] // do not pass to Quik public bool IsManual { get; set; } } }
Watch this short video of the team conducting and discussing water monitoring in Carpinteria. Stream Team is one of more than 800 citizen science projects on SciStarter. Visit the project site to get started and if you want more, use our project finder to search for citizen science that piques your interest!
#!/bin/sh # $XTermId: doublechars.sh,v 1.17 2011/12/11 16:21:22 tom Exp $ # ----------------------------------------------------------------------------- # this file is part of xterm # # Copyright 1999-2003,2011 by Thomas E. Dickey # # All Rights Reserved # # 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. # # Except as contained in this notice, the name(s) of the above copyright # holders shall not be used in advertising or otherwise to promote the # sale, use or other dealings in this Software without prior written # authorization. # ----------------------------------------------------------------------------- # Illustrate the use of double-size characters by drawing successive lines in # the commonly used video attributes. # # Use the -w option to force the output to wrap. It will look ugly, because # the double-high lines will be split. ESC="" CMD='/bin/echo' OPT='-n' SUF='' TMP=/tmp/xterm$$ eval '$CMD $OPT >$TMP || echo fail >$TMP' 2>/dev/null ( test ! -f $TMP || test -s $TMP ) && for verb in printf print ; do rm -f $TMP eval '$verb "\c" >$TMP || echo fail >$TMP' 2>/dev/null if test -f $TMP ; then if test ! -s $TMP ; then CMD="$verb" OPT= SUF='\c' break fi fi done rm -f $TMP SAVE=yes WRAP=no if test $# != 0 ; then while test $# != 0 do case $1 in -n) SAVE=no ;; -w) WRAP=yes ;; esac shift done fi if test $SAVE = yes ; then exec </dev/tty old=`stty -g` stty raw -echo min 0 time 5 $CMD $OPT "${ESC}[18t${SUF}" > /dev/tty IFS=';' read junk high wide stty $old wide=`echo $wide|sed -e 's/t.*//'` original=${ESC}[8\;${high}\;${wide}t${SUF} if ( trap "echo exit" EXIT 2>/dev/null ) >/dev/null then trap '$CMD $OPT "$original" >/dev/tty; exit' EXIT HUP INT TRAP TERM else trap '$CMD $OPT "$original" >/dev/tty; exit' 0 1 2 5 15 fi fi if test $WRAP = yes ; then # turn on wrapping and force the screen to 80 columns $CMD $OPT "${ESC}[?7h" >/dev/tty $CMD $OPT "${ESC}[?40l" >/dev/tty else # force the screen to 132 columns $CMD $OPT "${ESC}[?40h" >/dev/tty $CMD $OPT "${ESC}[?3h" >/dev/tty fi for SGR in 0 1 4 5 7 do $CMD $OPT "${ESC}[0;${SGR}m" >/dev/tty for DBL in 5 3 4 6 5 do $CMD $OPT "${ESC}#${DBL}" >/dev/tty echo "The quick brown fox jumps over the lazy dog" >/dev/tty done echo done $CMD $OPT "${ESC}[0m" >/dev/tty
jsonp({"cep":"86081621","logradouro":"Rua Mitsuki Shime","bairro":"Perobinha","cidade":"Londrina","uf":"PR","estado":"Paran\u00e1"});
Check out all of the names of the Schenectady High School alumni that attended high school in Schenectady that are listed above. Registering will allow you to join the directory. You can also find out what other graduates are doing now, share memories with other alumn, upload pictures from Schenectady and find other alumni.
THE OWNERS TAKE PRIDE IN THIS GEM. THIS IS A WONDERFUL HOME MOVE IN READY. YOU WALK INTO A FOYER THEN ARE GREETED BY A LARGE LIVING ROOMS WITH WOOD BURNING FIRE PLACE. NICE SIZE DINING ROOM AND A LARGE KITCHEN THAT WAS REDONE 10 YEARS AGO IT FEATURES GRANITE COUNTER TOPS STAINLESS STEEL APPLIANCES AND BEAUTIFUL CABINETS. ACCOMPANYING THE FIRST FLOOR ARE 2 NICE SIZE BEDROOMS AND A FULL BATH REDONE THIS WINTER. SLIDERS OUT TO A LARGE DECK PARTIALLY COVERED AND A PARK LIKE OVER SIZED YARD GREAT FOR ENTERTAINING AND SUMMER NIGHTS. THE SECOND FLOOR IS A MASTER SUITE LARGE KING SIZE BEDROOM, AND MASTER BATH REDONE THIS WINTER. OFF THE KITCHEN ARE THE STAIRS TO THE FULL FINISHED BASEMENT WITH PLAYROOM, W/D, AND A SMALL OFFICE/ STORAGE ROOM. ABOVE GROUND STORAGE TANK ON CONCRETE FLOOR.
I’m a designer at the intersection between type and software. I help other designers and type foundries to solve problems and improve their productivity trough the definition of workflows and developing ad-hoc tools. Bridging the gap between design ideas and final quality products. I worked with and for some foundries like Font Store, PampaType, Original Type, Typesenses and digitalFoundry. I’m always open for new projects and opportunities. I currently live in Córdoba, Argentina but I’m able to work remote or travel when needed. I’m available for long and short term projects. I take on entire projects myself or in collaboration. Listed here is a variety of skills and roles I can contribute with.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_131) on Fri Oct 20 19:07:06 CEST 2017 --> <title>PersonalAccount</title> <meta name="date" content="2017-10-20"> <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="PersonalAccount"; } } catch(err) { } //--> var methods = {"i0":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/PersonalAccount.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../deprecated-list.html">Deprecated</a></li> <li><a href="../../index-files/index-1.html">Index</a></li> <li><a href="../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../bankapp/account/Account.html" title="class in bankapp.account"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../bankapp/account/PersonalAccountTest.html" title="class in bankapp.account"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../index.html?bankapp/account/PersonalAccount.html" target="_top">Frames</a></li> <li><a href="PersonalAccount.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#fields.inherited.from.class.bankapp.account.Account">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">bankapp.account</div> <h2 title="Class PersonalAccount" class="title">Class PersonalAccount</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li><a href="../../bankapp/account/Account.html" title="class in bankapp.account">bankapp.account.Account</a></li> <li> <ul class="inheritance"> <li>bankapp.account.PersonalAccount</li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="typeNameLabel">PersonalAccount</span> extends <a href="../../bankapp/account/Account.html" title="class in bankapp.account">Account</a></pre> <div class="block">The class Account represents personal bank accounts.</div> <dl> <dt><span class="simpleTagLabel">Author:</span></dt> <dd>Samuel Pulfer</dd> </dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field.summary"> <!-- --> </a> <h3>Field Summary</h3> <ul class="blockList"> <li class="blockList"><a name="fields.inherited.from.class.bankapp.account.Account"> <!-- --> </a> <h3>Fields inherited from class&nbsp;bankapp.account.<a href="../../bankapp/account/Account.html" title="class in bankapp.account">Account</a></h3> <code><a href="../../bankapp/account/Account.html#balance">balance</a>, <a href="../../bankapp/account/Account.html#nr">nr</a>, <a href="../../bankapp/account/Account.html#pin">pin</a></code></li> </ul> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../bankapp/account/PersonalAccount.html#PersonalAccount-int-java.lang.String-double-">PersonalAccount</a></span>(int&nbsp;nr, java.lang.String&nbsp;pin, double&nbsp;balance)</code> <div class="block">Constructs a personal bank account.</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code><a href="../../bankapp/bank/AccountType.html" title="enum in bankapp.bank">AccountType</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../bankapp/account/PersonalAccount.html#getType--">getType</a></span>()</code> <div class="block">Gets the type of the account.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.bankapp.account.Account"> <!-- --> </a> <h3>Methods inherited from class&nbsp;bankapp.account.<a href="../../bankapp/account/Account.html" title="class in bankapp.account">Account</a></h3> <code><a href="../../bankapp/account/Account.html#checkPIN-java.lang.String-">checkPIN</a>, <a href="../../bankapp/account/Account.html#deposit-double-">deposit</a>, <a href="../../bankapp/account/Account.html#equals-java.lang.Object-">equals</a>, <a href="../../bankapp/account/Account.html#getBalance--">getBalance</a>, <a href="../../bankapp/account/Account.html#getNr--">getNr</a>, <a href="../../bankapp/account/Account.html#getTransactions--">getTransactions</a>, <a href="../../bankapp/account/Account.html#hashCode--">hashCode</a>, <a href="../../bankapp/account/Account.html#toString--">toString</a>, <a href="../../bankapp/account/Account.html#withdraw-double-">withdraw</a>, <a href="../../bankapp/account/Account.html#withdraw-int-">withdraw</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="PersonalAccount-int-java.lang.String-double-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>PersonalAccount</h4> <pre>public&nbsp;PersonalAccount(int&nbsp;nr, java.lang.String&nbsp;pin, double&nbsp;balance)</pre> <div class="block">Constructs a personal bank account.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>nr</code> - the account number</dd> <dd><code>pin</code> - the PIN of the account</dd> <dd><code>balance</code> - the initial balance</dd> </dl> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getType--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>getType</h4> <pre>public&nbsp;<a href="../../bankapp/bank/AccountType.html" title="enum in bankapp.bank">AccountType</a>&nbsp;getType()</pre> <div class="block">Gets the type of the account.</div> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../bankapp/account/Account.html#getType--">getType</a></code>&nbsp;in class&nbsp;<code><a href="../../bankapp/account/Account.html" title="class in bankapp.account">Account</a></code></dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the account type</dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/PersonalAccount.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../deprecated-list.html">Deprecated</a></li> <li><a href="../../index-files/index-1.html">Index</a></li> <li><a href="../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../bankapp/account/Account.html" title="class in bankapp.account"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../bankapp/account/PersonalAccountTest.html" title="class in bankapp.account"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../index.html?bankapp/account/PersonalAccount.html" target="_top">Frames</a></li> <li><a href="PersonalAccount.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#fields.inherited.from.class.bankapp.account.Account">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
DD created this Thomas the Tank Engine out of a diaper box, ice cream bucket, duct tape and a little paint. (Yes, she likes Pinterest.) The graphics were downloaded and printed out. Batting was the "smoke." Happy Halloween!...and Merry Christmas early! This time of year always gets a little busy for me. I have a nice break at the end of summer up until now. Everyone gets busy working on Christmas gifts which keeps me and "Trixie" buzzin until Christmas and will continue until it gets nice enough for the ladies to get outside. Which is fine by me because when the snow is falling and the wind is blowing there is nothing I'd rather be doing then quilting all the beautiful quilts my customers bring me. Hello everyone! We must all be busily sewing and quilting for the holidays - or else everyone has abandoned us for Facebook. Since I don't have a FB account, I enjoy stopping by here to catch up with quilting friends. It's been pretty quiet lately. We have cranked up the furnace, and I'm working on hand quilting my "Peggy's Sistine Chapel." Too funny...do you think that is how that word came about???? Today I had some time to actually venture to my (much neglected of late) sewing room to get started on some gifts for Christmas. Today's project was camera straps for our 'kids' who have SLR Digital Cameras (drool). They went pretty fast and I'm pleased with the results. The Pine Burr quilt is finished. We decided to hang it on the wall in the dining room. When you make a place mat what do you use to line it with inside? I do not want to quilt a lot. Wanted to do some machine applique on a Halloween outfit. I love to use my ancient Kenmore for that. Shame on me for forgetting my friend. It was a struggle when I first gave it some power. I will be giving it a lube job this evening. I forget that it gets summer condensation. So, just a reminder to oil the old ones and replace their needles...they will love and run better for it! Why did the quilter stop telling jokes? I will take anything that has to do with cutting or needles or anything crafty as well. OKAY,,what did I do that I cannot see anyone's pictures,,nor my own for that matter,,I think I loaded "Fire fox" and now I can't see anyone pictures..Please help.! I'm still no good at this computer thing..but I am learning.!
<?php /** * @file * Contains \Drupal\config\Form\ConfigSingleImportForm. */ namespace Drupal\config\Form; use Drupal\Component\Serialization\Yaml; use Drupal\Core\Config\StorageInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Provides a form for importing a single configuration file. */ class ConfigSingleImportForm extends ConfirmFormBase { /** * The entity manager. * * @var \Drupal\Core\Entity\EntityManagerInterface */ protected $entityManager; /** * The config storage. * * @var \Drupal\Core\Config\StorageInterface */ protected $configStorage; /** * If the config exists, this is that object. Otherwise, FALSE. * * @var \Drupal\Core\Config\Config|\Drupal\Core\Config\Entity\ConfigEntityInterface|bool */ protected $configExists = FALSE; /** * The submitted data needing to be confirmed. * * @var array */ protected $data = array(); /** * Constructs a new ConfigSingleImportForm. * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. * @param \Drupal\Core\Config\StorageInterface $config_storage * The config storage. */ public function __construct(EntityManagerInterface $entity_manager, StorageInterface $config_storage) { $this->entityManager = $entity_manager; $this->configStorage = $config_storage; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static( $container->get('entity.manager'), $container->get('config.storage') ); } /** * {@inheritdoc} */ public function getFormID() { return 'config_single_import_form'; } /** * {@inheritdoc} */ public function getCancelUrl() { return new Url('config.import_single'); } /** * {@inheritdoc} */ public function getQuestion() { if ($this->data['config_type'] === 'system.simple') { $name = $this->data['config_name']; $type = $this->t('simple configuration'); } else { $definition = $this->entityManager->getDefinition($this->data['config_type']); $name = $this->data['import'][$definition->getKey('id')]; $type = $definition->getLowercaseLabel(); } $args = array( '%name' => $name, '@type' => strtolower($type), ); if ($this->configExists) { $question = $this->t('Are you sure you want to update the %name @type?', $args); } else { $question = $this->t('Are you sure you want to create a new %name @type?', $args); } return $question; } /** * {@inheritdoc} */ public function buildForm(array $form, FormStateInterface $form_state) { // When this is the confirmation step fall through to the confirmation form. if ($this->data) { return parent::buildForm($form, $form_state); } $entity_types = array(); foreach ($this->entityManager->getDefinitions() as $entity_type => $definition) { if ($definition->isSubclassOf('Drupal\Core\Config\Entity\ConfigEntityInterface')) { $entity_types[$entity_type] = $definition->getLabel(); } } // Sort the entity types by label, then add the simple config to the top. uasort($entity_types, 'strnatcasecmp'); $config_types = array( 'system.simple' => $this->t('Simple configuration'), ) + $entity_types; $form['config_type'] = array( '#title' => $this->t('Configuration type'), '#type' => 'select', '#options' => $config_types, '#required' => TRUE, ); $form['config_name'] = array( '#title' => $this->t('Configuration name'), '#description' => $this->t('Enter the name of the configuration file without the <em>.yml</em> extension. (e.g. <em>system.site</em>)'), '#type' => 'textfield', '#states' => array( 'required' => array( ':input[name="config_type"]' => array('value' => 'system.simple'), ), 'visible' => array( ':input[name="config_type"]' => array('value' => 'system.simple'), ), ), ); $form['import'] = array( '#title' => $this->t('Paste your configuration here'), '#type' => 'textarea', '#rows' => 24, '#required' => TRUE, ); $form['advanced'] = array( '#type' => 'details', '#title' => $this->t('Advanced'), ); $form['advanced']['custom_entity_id'] = array( '#title' => $this->t('Custom Entity ID'), '#type' => 'textfield', '#description' => $this->t('Specify a custom entity ID. This will override the entity ID in the configuration above.'), ); $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', '#value' => $this->t('Import'), '#button_type' => 'primary', ); return $form; } /** * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state) { // The confirmation step needs no additional validation. if ($this->data) { return; } // Decode the submitted import. $data = Yaml::decode($form_state->getValue('import')); // Validate for config entities. if ($form_state->getValue('config_type') !== 'system.simple') { $definition = $this->entityManager->getDefinition($form_state->getValue('config_type')); $id_key = $definition->getKey('id'); // If a custom entity ID is specified, override the value in the // configuration data being imported. if (!$form_state->isValueEmpty('custom_entity_id')) { $data[$id_key] = $form_state->getValue('custom_entity_id'); } $entity_storage = $this->entityManager->getStorage($form_state->getValue('config_type')); // If an entity ID was not specified, set an error. if (!isset($data[$id_key])) { $form_state->setErrorByName('import', $this->t('Missing ID key "@id_key" for this @entity_type import.', array('@id_key' => $id_key, '@entity_type' => $definition->getLabel()))); return; } // If there is an existing entity, ensure matching ID and UUID. if ($entity = $entity_storage->load($data[$id_key])) { $this->configExists = $entity; if (!isset($data['uuid'])) { $form_state->setErrorByName('import', $this->t('An entity with this machine name already exists but the import did not specify a UUID.')); return; } if ($data['uuid'] !== $entity->uuid()) { $form_state->setErrorByName('import', $this->t('An entity with this machine name already exists but the UUID does not match.')); return; } } // If there is no entity with a matching ID, check for a UUID match. elseif (isset($data['uuid']) && $entity_storage->loadByProperties(array('uuid' => $data['uuid']))) { $form_state->setErrorByName('import', $this->t('An entity with this UUID already exists but the machine name does not match.')); } } else { $config = $this->config($form_state->getValue('config_name')); $this->configExists = !$config->isNew() ? $config : FALSE; } // Store the decoded version of the submitted import. $form_state->setValueForElement($form['import'], $data); } /** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { // If this form has not yet been confirmed, store the values and rebuild. if (!$this->data) { $form_state->setRebuild(); $this->data = $form_state->getValues(); return; } // If a simple configuration file was added, set the data and save. if ($this->data['config_type'] === 'system.simple') { $this->configFactory()->getEditable($this->data['config_name'])->setData($this->data['import'])->save(); drupal_set_message($this->t('The %name configuration was imported.', array('%name' => $this->data['config_name']))); } // For a config entity, create an entity and save it. else { try { $entity_storage = $this->entityManager->getStorage($this->data['config_type']); if ($this->configExists) { $entity = $entity_storage->updateFromStorageRecord($this->configExists, $this->data['import']); } else { $entity = $entity_storage->createFromStorageRecord($this->data['import']); } $entity->save(); drupal_set_message($this->t('The @entity_type %label was imported.', array('@entity_type' => $entity->getEntityTypeId(), '%label' => $entity->label()))); } catch (\Exception $e) { drupal_set_message($e->getMessage(), 'error'); } } } }
New York state has a relatively low performing education system and a high level of commitment to punitive education reform policies. Just the opposite of New Hampshire. Their biggest problem has probably been high stakes testing. Although it takes years to begin seeing the effect of the new standards on student’s learning, New York made a brand new test, based on the newly introduce Common Core State Standards, high stakes for the students and teachers. For students, the test became a graduation requirement and, for teachers, a very crude form of the scoring became the bases for pay and promotion. As a result, the state’s Common Core implementation has been a mess. That’s where all the horror stories come from. As a result, the state has had a full scale rebellion on its hands. So the New York state department of education has announced that it will stop beating up its students and teachers – at least temporarily. In doing so, they have moved a little more toward the policies that have made the New Hampshire Common Core implementation so successful. Twelve years, presumably, because that’s how long it takes to begin graduating students who have had Common Core teaching all the way through school. Obviously, using the test as a graduation requirement has never even been discussed in New Hampshire. And New Hampshire’s teaching evaluation model is one the the most progressive in the country in how it supports teacher development rather punitive evaluation. There are many other differences between NY and NH as well. The most obvious is that, in most districts, NH teachers are developing their new lesson plans collaboratively with their peers where NY seems to be handing down scripted lesson plans. It’s hard to imagine a worse scenario. In any case, do not confuse NY stories with NH stories. By ANHPE in Common Core, Other States on February 13, 2014 .
ALTER TABLE `world_db_version` CHANGE `required_162_Fix_for_768_769` `required_163_toxic_tolearnce` BIT(1); UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=6508; DELETE FROM `smart_scripts` WHERE `entryorguid`=6508 AND `source_type`=0; INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES (6508,0,0,0,0,0,100,0,30000,60000,30000,60000,11,14792,2,0,0,0,0,2,0,0,0,0,0,0,0,'Venomhide Ravasaur - IC - Cast spell Venomhide Poison');
Mark your calendars for another engaging event with Michael Porter HBS Professor & Katherine Gehl Business Leader and Former CEO to learn why competition in the politics industry is failing America and a strategy to reinvigorate our democracy. We invite you to an enaging evening - Enjoy networking with fellow alumni followed by a fireside chat and Q&A with business leader Katherine M. Gehl and HBS professor Michael E. Porter. Food and beverages will be provided. Katherine M. Gehl, former CEO and political innovation activist, and Harvard’s Michael E. Porter apply competition theory for the first time to politics, which uncovered the root cause of the dysfunction—the failed political competition the parties have created. Gehl and Porter collaborated to capture this work in the “Gehl Porter Politics Industry Theory.” This new lens reveals the reforms that will be necessary to truly realign America’s political system with the public interest. Their 2017 Report lays out a strategy for reinvigorating our democracy. Katherine M. Gehl is a business leader, author and speaker. Katherine was president and CEO of Gehl Foods, a $250 Million high-tech food manufacturing company in Wisconsin where she led a transformational growth strategy, receiving multiple awards, before selling the company in 2015—in part to dedicate more time to political reform. Her career includes roles in the private and public sectors including at Oracle Corporation, Bernstein Investment Research and Management, Mayor Richard M. Daley’s Office at the City of Chicago, and Chicago Public Schools. In 2011, Katherine was confirmed by the U.S. Senate to serve on the Board of the Overseas Private Investment Corporation. Over the past decade, Katherine has focused on the urgent need for non-partisan political innovation and reform on both state and national levels. In 2016, Katherine applied business competitiveness tools to the industry of politics for the first time, to uncover the root cause of the dysfunction—the failed political competition the parties have created. She invited Michael Porter to join her in this work. In 2018, Katherine co-founded Democracy Found, a Wisconsin-based initiative mobilizing a bi-partisan group of leaders to implement electoral innovations in Wisconsin. Katherine graduated from the University of Notre Dame and holds an MA from Catholic University and an MBA from Kellogg. Michael E. Porter is an economist, researcher, author, advisor, speaker and teacher. Throughout his lifetime career at Harvard Business School, he has brought economic theory and strategy concepts to bear on many of the most challenging problems facing corporations, economies and societies, including market competition and company strategy, economic development, the environment and health care. Michael’s approach is based on understanding the overall economics and structure of complex systems, in contrast to particular elements or parts. His extensive research is widely recognized in governments, corporations, NGOs, and academic circles around the globe and has received numerous awards. Michael is the author of nineteen books and over 130 articles is the most cited scholar today in economics and business. Michael graduated from Princeton University and holds an M.B.A. from Harvard Business School and a Ph.D. from Harvard’s Department of Economics.
I can’t believe that Thanksgiving is next week! I feel like this year has flown by. One of my favorite things to do every holiday season is pick out what I plan on wearing. I love to look cute and somewhat dressed up on Thanksgiving, but I also like to feel comfortable (there’s a 90% chance I will fall asleep after eating while wearing this, so it has to be comfy, haha!). My go-to is always a simple dress with statement accessories. I found this dress at Target the other day. As soon as I walked into the dress section, the color drew me in. I knew it was the perfect color for Thanksgiving. I was worried that the lace would be too itchy, but it’s totally not! It’s also pretty roomy (so after eating two Thanksgiving meals, it shouldn’t show too bad, baha!). I paired it with a pair of OTK boots (currently under $32!) and my favorite leopard clutch. For my statement accessories, I wore the Ajita tassel necklace from Mala Prayer. I loved the color and the detail on the beads. Each piece is handmade (which I absolutely LOVE!). I love supporting brands that give back, and Mala Prayer is all about empowering women. All sales made through Mala Prayer will provide female entrepreneurs with a microfinance loan, which they can invest in their business, home or community. You can read more about their story, and what a Mala is HERE! Mala Prayer is giving a discount to Styled Muse readers! Just use code VALERIEHELTON20 at checkout to get 20% off your entire purchase! I think the next necklaces I want to add my collection are the Iona and the Dirillo. There’s just something about white marble and spotted beads that I always go towards! Do you have your Thanksgiving outfit planned out yet? Let me know in the comments! This post was sponsored by Mala Prayer. All opinions are my own. Thank you for supporting the brands that make Styled Muse possible!
#!/bin/sh # # Copyright (c) 2016 The Ontario Institute for Cancer Research. All rights reserved. # # This program and the accompanying materials are made available under the terms of the GNU Public License v3.0. # You should have received a copy of the GNU General Public License along with # this program. If not, see <http://www.gnu.org/licenses/>. # # 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 HOLDER 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. input=$1 tbi=$1".tbi" idx=$1".idx" if [ -s "/home/iobio/iobio/tools/score-client/data/collab/"$tbi ]; then FULL_NAME="/home/iobio/iobio/tools/score-client/data/collab/"$tbi elif [ -s "/home/iobio/iobio/tools/score-client/data/collab/"$idx ]; then FULL_NAME="/home/iobio/iobio/tools/score-client/data/collab/"$idx elif [ -s "/home/iobio/iobio/tools/score-client/data/aws/"$tbi ]; then FULL_NAME="/home/iobio/iobio/tools/score-client/data/aws/"$tbi else FULL_NAME="/home/iobio/iobio/tools/score-client/data/aws/"$idx fi # We are applying dd to the bai file and redirecting it to /dev/null because we want to # cache it to the operating system, before applying cat to it. This is to avoid the many # connections that the storage client will have to make, since the buffer is small. /bin/dd if=$FULL_NAME bs=1048576 > /dev/null cmd="/bin/cat \"$FULL_NAME\" | /home/iobio/iobio/bin/bgzip -d | /home/iobio/iobio/bin/vcfReadDepther" eval $cmd
<?php namespace Isbkch\TranslationManager\Console; use Isbkch\TranslationManager\Manager; use Illuminate\Console\Command; use Symfony\Component\Console\Input\InputOption; class FindCommand extends Command { /** * The console command name. * * @var string */ protected $name = 'translations:find'; /** * The console command description. * * @var string */ protected $description = 'Find translations in php/twig files'; /** @var \Isbkch\TranslationManager\Manager */ protected $manager; public function __construct(Manager $manager) { $this->manager = $manager; parent::__construct(); } /** * Execute the console command. * * @return void */ public function fire() { $counter = $this->manager->findTranslations(); $this->info('Done importing, processed '.$counter. ' items!'); } }
Sidenote : This is the part 12 of the ASP.Net MVC course series. You can get all the parts of this tutorial here. Till last chapter, we have added movie information to the database and printed the list of movies. Now, let us write some code to update the existing data. In the later part of this chapter, we will see how we can delete the data. We’ll change the Index view so that we can have Edit option against each of those movies. In the below updated Index View, I am looping through the movie list and creating a row for each movie in an html table. “table” class of bootstrap is used for styling the table. As discussed earlier, @Html.ActionLink would create hyperlink(<a> html element). The first parameter represents the string to be displayed, second one is for Action name and third one is for passing any additional information that you would like to pass. We are passing ‘id’ value to Edit action method – so that we can pull the respective movie information from database and show it to the user for editing the same. User will click the Edit link to update the movie information. Upon clicking this Edit link, we will be showing another page with the movie information where he can update the move information and submit. Sidenote: “The Shawshank Redemption” movie is added before we have Validation. That’s why we were able to enter “Year of Release” as 0. Now, let us write Edit action method – which would be called when user clicks Edit link. We are getting the id value when user clicks the Edit link in the Index view. Find method would get you the Entity object based on the id passed. If the id is not available in the database, we are returning the HttpNotFound error. If we are able to find the respective movie information, we are passing that information to the View(Edit view – which we are going to create). Right click inside the above Edit action method and select “Add View” option from the context menu. Now, we’ll write the code for what needs to happen when you submit the form – Edit action POST method which would save the updated information to the database. Just like in Add POST method, we would be verifying whether the Model is valid in Edit POST method as well. But the difference lies in what we do after validating – how the object is managed in context. In Add action method, we would be adding the newly added movie object to the context and when you call SaveChanges method – it will save the newly added movie object to the database. But in Edit POST method, we would be changing the state of the object to Modified in Context – so that Entity framework knows this object already exists in database and it needs to run the update query instead of insert query. And when you call SaveChanges of DbContext, it will save/update all pending modifications to the database. Create the Delete view – where we show the movie information and user can delete the movie by clicking the “Delete Movie” button. Upon clicking this button Delete POST action method would be called. Create Delete POST action method – where we delete that movie information from the database. Below is the Delete action GET method. There is no difference between this Delete GET method and Edit GET method except the name of the methods. In both methods, we are getting the movie information from the database and passing that to View. Right click inside the above Delete GET action method and select “Add View” in the context menu. As usual, select the Model “Empty (no models”) in the template. In Edit POST method, we have changed the Entity state to ‘Modified’. Now, in Delete POST method, we are going to set the Entity state to ‘Deleted’. When you call SaveChanges method, Entity Framework will fire a delete query and delete the record in the database. Upon successful completion of deletion, we are showing the list of movies to the users.
/* * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program 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 2 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "Common.h" #include "WorldPacket.h" #include "WorldSession.h" #include "Opcodes.h" #include "Log.h" #include "ObjectMgr.h" #include "Player.h" #include "Item.h" #include "DB2Stores.h" #include "NPCPackets.h" #include "ItemPackets.h" void WorldSession::HandleSplitItemOpcode(WorldPackets::Item::SplitItem& splitItem) { if (!splitItem.Inv.Items.empty()) { TC_LOG_ERROR("network", "HandleSplitItemOpcode - Invalid ItemCount (" SZFMTD ")", splitItem.Inv.Items.size()); return; } TC_LOG_DEBUG("network", "HandleSplitItemOpcode: receive FromPackSlot: %u, FromSlot: %u, ToPackSlot: %u, ToSlot: %u, Quantity: %u", splitItem.FromPackSlot, splitItem.FromSlot, splitItem.ToPackSlot, splitItem.ToSlot, splitItem.Quantity); uint16 src = ((splitItem.FromPackSlot << 8) | splitItem.FromSlot); uint16 dst = ((splitItem.ToPackSlot << 8) | splitItem.ToSlot); if (src == dst) return; // check count - if zero it's fake packet if (!splitItem.Quantity) return; if (!_player->IsValidPos(splitItem.FromPackSlot, splitItem.FromSlot, true)) { _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND); return; } if (!_player->IsValidPos(splitItem.ToPackSlot, splitItem.ToSlot, false)) // can be autostore pos { _player->SendEquipError(EQUIP_ERR_WRONG_SLOT); return; } _player->SplitItem(src, dst, splitItem.Quantity); } void WorldSession::HandleSwapInvItemOpcode(WorldPackets::Item::SwapInvItem& swapInvItem) { if (swapInvItem.Inv.Items.size() != 2) { TC_LOG_ERROR("network", "HandleSwapInvItemOpcode - Invalid itemCount (" SZFMTD ")", swapInvItem.Inv.Items.size()); return; } TC_LOG_DEBUG("network", "HandleSwapInvItemOpcode: receive Slot1: %u, Slot2: %u", swapInvItem.Slot1, swapInvItem.Slot2); // prevent attempt swap same item to current position generated by client at special checting sequence if (swapInvItem.Slot1 == swapInvItem.Slot2) return; if (!_player->IsValidPos(INVENTORY_SLOT_BAG_0, swapInvItem.Slot1, true)) { _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND); return; } if (!_player->IsValidPos(INVENTORY_SLOT_BAG_0, swapInvItem.Slot2, true)) { _player->SendEquipError(EQUIP_ERR_WRONG_SLOT); return; } if (_player->IsBankPos(INVENTORY_SLOT_BAG_0, swapInvItem.Slot1) && !CanUseBank()) { TC_LOG_DEBUG("network", "HandleSwapInvItemOpcode - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str()); return; } if (_player->IsBankPos(INVENTORY_SLOT_BAG_0, swapInvItem.Slot2) && !CanUseBank()) { TC_LOG_DEBUG("network", "HandleSwapInvItemOpcode - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str()); return; } uint16 src = ((INVENTORY_SLOT_BAG_0 << 8) | swapInvItem.Slot1); uint16 dst = ((INVENTORY_SLOT_BAG_0 << 8) | swapInvItem.Slot2); _player->SwapItem(src, dst); } void WorldSession::HandleAutoEquipItemSlotOpcode(WorldPackets::Item::AutoEquipItemSlot& autoEquipItemSlot) { // cheating attempt, client should never send opcode in that case if (autoEquipItemSlot.Inv.Items.size() != 1 || !Player::IsEquipmentPos(INVENTORY_SLOT_BAG_0, autoEquipItemSlot.ItemDstSlot)) return; Item* item = _player->GetItemByGuid(autoEquipItemSlot.Item); uint16 dstPos = autoEquipItemSlot.ItemDstSlot | (INVENTORY_SLOT_BAG_0 << 8); uint16 srcPos = autoEquipItemSlot.Inv.Items[0].Slot | (uint32(autoEquipItemSlot.Inv.Items[0].ContainerSlot) << 8); if (!item || item->GetPos() != srcPos || srcPos == dstPos) return; _player->SwapItem(srcPos, dstPos); } void WorldSession::HandleSwapItem(WorldPackets::Item::SwapItem& swapItem) { if (swapItem.Inv.Items.size() != 2) { TC_LOG_ERROR("network", "HandleSwapItem - Invalid itemCount (" SZFMTD ")", swapItem.Inv.Items.size()); return; } TC_LOG_DEBUG("network", "HandleSwapItem: receive ContainerSlotA: %u, SlotA: %u, ContainerSlotB: %u, SlotB: %u", swapItem.ContainerSlotA, swapItem.SlotA, swapItem.ContainerSlotB, swapItem.SlotB); uint16 src = ((swapItem.ContainerSlotA << 8) | swapItem.SlotA); uint16 dst = ((swapItem.ContainerSlotB << 8) | swapItem.SlotB); // prevent attempt swap same item to current position generated by client at special checting sequence if (src == dst) return; if (!_player->IsValidPos(swapItem.ContainerSlotA, swapItem.SlotA, true)) { _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND); return; } if (!_player->IsValidPos(swapItem.ContainerSlotB, swapItem.SlotB, true)) { _player->SendEquipError(EQUIP_ERR_WRONG_SLOT); return; } if (_player->IsBankPos(swapItem.ContainerSlotA, swapItem.SlotA) && !CanUseBank()) { TC_LOG_DEBUG("network", "HandleSwapItem - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str()); return; } if (_player->IsBankPos(swapItem.ContainerSlotB, swapItem.SlotB) && !CanUseBank()) { TC_LOG_DEBUG("network", "HandleSwapItem - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str()); return; } _player->SwapItem(src, dst); } void WorldSession::HandleAutoEquipItemOpcode(WorldPackets::Item::AutoEquipItem& autoEquipItem) { if (autoEquipItem.Inv.Items.size() != 1) { TC_LOG_ERROR("network", "HandleAutoEquipItemOpcode - Invalid itemCount (" SZFMTD ")", autoEquipItem.Inv.Items.size()); return; } TC_LOG_DEBUG("network", "HandleAutoEquipItemOpcode: receive PackSlot: %u, Slot: %u", autoEquipItem.PackSlot, autoEquipItem.Slot); Item* srcItem = _player->GetItemByPos(autoEquipItem.PackSlot, autoEquipItem.Slot); if (!srcItem) return; // only at cheat uint16 dest; InventoryResult msg = _player->CanEquipItem(NULL_SLOT, dest, srcItem, !srcItem->IsBag()); if (msg != EQUIP_ERR_OK) { _player->SendEquipError(msg, srcItem); return; } uint16 src = srcItem->GetPos(); if (dest == src) // prevent equip in same slot, only at cheat return; Item* dstItem = _player->GetItemByPos(dest); if (!dstItem) // empty slot, simple case { _player->RemoveItem(autoEquipItem.PackSlot, autoEquipItem.Slot, true); _player->EquipItem(dest, srcItem, true); _player->AutoUnequipOffhandIfNeed(); } else // have currently equipped item, not simple case { uint8 dstbag = dstItem->GetBagSlot(); uint8 dstslot = dstItem->GetSlot(); msg = _player->CanUnequipItem(dest, !srcItem->IsBag()); if (msg != EQUIP_ERR_OK) { _player->SendEquipError(msg, dstItem); return; } // check dest->src move possibility ItemPosCountVec sSrc; uint16 eSrc = 0; if (_player->IsInventoryPos(src)) { msg = _player->CanStoreItem(autoEquipItem.PackSlot, autoEquipItem.Slot, sSrc, dstItem, true); if (msg != EQUIP_ERR_OK) msg = _player->CanStoreItem(autoEquipItem.PackSlot, NULL_SLOT, sSrc, dstItem, true); if (msg != EQUIP_ERR_OK) msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, sSrc, dstItem, true); } else if (_player->IsBankPos(src)) { msg = _player->CanBankItem(autoEquipItem.PackSlot, autoEquipItem.Slot, sSrc, dstItem, true); if (msg != EQUIP_ERR_OK) msg = _player->CanBankItem(autoEquipItem.PackSlot, NULL_SLOT, sSrc, dstItem, true); if (msg != EQUIP_ERR_OK) msg = _player->CanBankItem(NULL_BAG, NULL_SLOT, sSrc, dstItem, true); } else if (_player->IsEquipmentPos(src)) { msg = _player->CanEquipItem(autoEquipItem.Slot, eSrc, dstItem, true); if (msg == EQUIP_ERR_OK) msg = _player->CanUnequipItem(eSrc, true); } if (msg != EQUIP_ERR_OK) { _player->SendEquipError(msg, dstItem, srcItem); return; } // now do moves, remove... _player->RemoveItem(dstbag, dstslot, false); _player->RemoveItem(autoEquipItem.PackSlot, autoEquipItem.Slot, false); // add to dest _player->EquipItem(dest, srcItem, true); // add to src if (_player->IsInventoryPos(src)) _player->StoreItem(sSrc, dstItem, true); else if (_player->IsBankPos(src)) _player->BankItem(sSrc, dstItem, true); else if (_player->IsEquipmentPos(src)) _player->EquipItem(eSrc, dstItem, true); _player->AutoUnequipOffhandIfNeed(); } } void WorldSession::HandleDestroyItemOpcode(WorldPackets::Item::DestroyItem& destroyItem) { TC_LOG_DEBUG("network", "HandleDestroyItemOpcode: receive ContainerId: %u, SlotNum: %u, Count: %u", destroyItem.ContainerId, destroyItem.SlotNum, destroyItem.Count); uint16 pos = (destroyItem.ContainerId << 8) | destroyItem.SlotNum; // prevent drop unequipable items (in combat, for example) and non-empty bags if (_player->IsEquipmentPos(pos) || _player->IsBagPos(pos)) { InventoryResult msg = _player->CanUnequipItem(pos, false); if (msg != EQUIP_ERR_OK) { _player->SendEquipError(msg, _player->GetItemByPos(pos)); return; } } Item* item = _player->GetItemByPos(destroyItem.ContainerId, destroyItem.SlotNum); if (!item) { _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND); return; } if (item->GetTemplate()->GetFlags() & ITEM_FLAG_INDESTRUCTIBLE) { _player->SendEquipError(EQUIP_ERR_DROP_BOUND_ITEM, NULL, NULL); return; } if (destroyItem.Count) { uint32 i_count = destroyItem.Count; _player->DestroyItemCount(item, i_count, true); } else _player->DestroyItem(destroyItem.ContainerId, destroyItem.SlotNum, true); } void WorldSession::HandleReadItem(WorldPackets::Item::ReadItem& readItem) { Item* item = _player->GetItemByPos(readItem.PackSlot, readItem.Slot); if (item && item->GetTemplate()->GetPageText()) { InventoryResult msg = _player->CanUseItem(item); if (msg == EQUIP_ERR_OK) { WorldPackets::Item::ReadItemResultOK packet; packet.Item = item->GetGUID(); SendPacket(packet.Write()); TC_LOG_INFO("network", "STORAGE: Item page sent"); } else { /// @todo: 6.x research new values /*WorldPackets::Item::ReadItemResultFailed packet; packet.Item = item->GetGUID(); packet.Subcode = ??; packet.Delay = ??; SendPacket(packet.Write());*/ TC_LOG_INFO("network", "STORAGE: Unable to read item"); _player->SendEquipError(msg, item, NULL); } } else _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL); } void WorldSession::HandleSellItemOpcode(WorldPackets::Item::SellItem& packet) { TC_LOG_DEBUG("network", "WORLD: Received CMSG_SELL_ITEM: Vendor %s, Item %s, Amount: %u", packet.VendorGUID.ToString().c_str(), packet.ItemGUID.ToString().c_str(), packet.Amount); if (packet.ItemGUID.IsEmpty()) return; Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(packet.VendorGUID, UNIT_NPC_FLAG_VENDOR); if (!creature) { TC_LOG_DEBUG("network", "WORLD: HandleSellItemOpcode - %s not found or you can not interact with him.", packet.VendorGUID.ToString().c_str()); _player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, nullptr, packet.ItemGUID); return; } // remove fake death if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); Item* pItem = _player->GetItemByGuid(packet.ItemGUID); if (pItem) { // prevent sell not owner item if (_player->GetGUID() != pItem->GetOwnerGUID()) { _player->SendSellError(SELL_ERR_CANT_SELL_ITEM, creature, packet.ItemGUID); return; } // prevent sell non empty bag by drag-and-drop at vendor's item list if (pItem->IsNotEmptyBag()) { _player->SendSellError(SELL_ERR_CANT_SELL_ITEM, creature, packet.ItemGUID); return; } // prevent sell currently looted item if (_player->GetLootGUID() == pItem->GetGUID()) { _player->SendSellError(SELL_ERR_CANT_SELL_ITEM, creature, packet.ItemGUID); return; } // prevent selling item for sellprice when the item is still refundable // this probably happens when right clicking a refundable item, the client sends both // CMSG_SELL_ITEM and CMSG_REFUND_ITEM (unverified) if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_REFUNDABLE)) return; // Therefore, no feedback to client // special case at auto sell (sell all) if (packet.Amount == 0) packet.Amount = pItem->GetCount(); else { // prevent sell more items that exist in stack (possible only not from client) if (packet.Amount > pItem->GetCount()) { _player->SendSellError(SELL_ERR_CANT_SELL_ITEM, creature, packet.ItemGUID); return; } } ItemTemplate const* pProto = pItem->GetTemplate(); if (pProto) { if (pProto->GetSellPrice() > 0) { if (packet.Amount < pItem->GetCount()) // need split items { Item* pNewItem = pItem->CloneItem(packet.Amount, _player); if (!pNewItem) { TC_LOG_ERROR("network", "WORLD: HandleSellItemOpcode - could not create clone of item %u; count = %u", pItem->GetEntry(), packet.Amount); _player->SendSellError(SELL_ERR_CANT_SELL_ITEM, creature, packet.ItemGUID); return; } pItem->SetCount(pItem->GetCount() - packet.Amount); _player->ItemRemovedQuestCheck(pItem->GetEntry(), packet.Amount); if (_player->IsInWorld()) pItem->SendUpdateToPlayer(_player); pItem->SetState(ITEM_CHANGED, _player); _player->AddItemToBuyBackSlot(pNewItem); if (_player->IsInWorld()) pNewItem->SendUpdateToPlayer(_player); } else { _player->ItemRemovedQuestCheck(pItem->GetEntry(), pItem->GetCount()); _player->RemoveItem(pItem->GetBagSlot(), pItem->GetSlot(), true); pItem->RemoveFromUpdateQueueOf(_player); _player->AddItemToBuyBackSlot(pItem); } uint32 money = pProto->GetSellPrice() * packet.Amount; _player->ModifyMoney(money); _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_MONEY_FROM_VENDORS, money); } else _player->SendSellError(SELL_ERR_CANT_SELL_ITEM, creature, packet.ItemGUID); return; } } _player->SendSellError(SELL_ERR_CANT_FIND_ITEM, creature, packet.ItemGUID); return; } void WorldSession::HandleBuybackItem(WorldPackets::Item::BuyBackItem& packet) { TC_LOG_DEBUG("network", "WORLD: Received CMSG_BUYBACK_ITEM: Vendor %s, Slot: %u", packet.VendorGUID.ToString().c_str(), packet.Slot); Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(packet.VendorGUID, UNIT_NPC_FLAG_VENDOR); if (!creature) { TC_LOG_DEBUG("network", "WORLD: HandleBuybackItem - Unit (%s) not found or you can not interact with him.", packet.VendorGUID.ToString().c_str()); _player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, ObjectGuid::Empty); return; } // remove fake death if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); Item* pItem = _player->GetItemFromBuyBackSlot(packet.Slot); if (pItem) { uint32 price = _player->GetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1 + packet.Slot - BUYBACK_SLOT_START); if (!_player->HasEnoughMoney(uint64(price))) { _player->SendBuyError(BUY_ERR_NOT_ENOUGHT_MONEY, creature, pItem->GetEntry(), 0); return; } ItemPosCountVec dest; InventoryResult msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, dest, pItem, false); if (msg == EQUIP_ERR_OK) { _player->ModifyMoney(-(int32)price); _player->RemoveItemFromBuyBackSlot(packet.Slot, false); _player->ItemAddedQuestCheck(pItem->GetEntry(), pItem->GetCount()); _player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM, pItem->GetEntry(), pItem->GetCount()); _player->StoreItem(dest, pItem, true); } else _player->SendEquipError(msg, pItem, NULL); return; } else _player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, creature, 0, 0); } void WorldSession::HandleBuyItemOpcode(WorldPackets::Item::BuyItem& packet) { // client expects count starting at 1, and we send vendorslot+1 to client already if (packet.Muid > 0) --packet.Muid; else return; // cheating switch (packet.ItemType) { case ITEM_VENDOR_TYPE_ITEM: { Item* bagItem = _player->GetItemByGuid(packet.ContainerGUID); uint8 bag = NULL_BAG; if (bagItem && bagItem->IsBag()) bag = bagItem->GetSlot(); else if (packet.ContainerGUID == GetPlayer()->GetGUID()) // The client sends the player guid when trying to store an item in the default backpack bag = INVENTORY_SLOT_BAG_0; GetPlayer()->BuyItemFromVendorSlot(packet.VendorGUID, packet.Muid, packet.Item.ItemID, packet.Quantity, bag, packet.Slot); break; } case ITEM_VENDOR_TYPE_CURRENCY: { GetPlayer()->BuyCurrencyFromVendorSlot(packet.VendorGUID, packet.Muid, packet.Item.ItemID, packet.Quantity); break; } default: { TC_LOG_DEBUG("network", "WORLD: received wrong itemType (%u) in HandleBuyItemOpcode", packet.ItemType); break; } } } void WorldSession::HandleListInventoryOpcode(WorldPackets::NPC::Hello& packet) { if (!GetPlayer()->IsAlive()) return; SendListInventory(packet.Unit); } void WorldSession::SendListInventory(ObjectGuid vendorGuid) { TC_LOG_DEBUG("network", "WORLD: Sent SMSG_LIST_INVENTORY"); Creature* vendor = GetPlayer()->GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_VENDOR); if (!vendor) { TC_LOG_DEBUG("network", "WORLD: SendListInventory - %s not found or you can not interact with him.", vendorGuid.ToString().c_str()); _player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, ObjectGuid::Empty); return; } // remove fake death if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); // Stop the npc if moving if (vendor->HasUnitState(UNIT_STATE_MOVING)) vendor->StopMoving(); VendorItemData const* vendorItems = vendor->GetVendorItems(); uint32 rawItemCount = vendorItems ? vendorItems->GetItemCount() : 0; WorldPackets::NPC::VendorInventory packet; packet.Vendor = vendor->GetGUID(); packet.Items.resize(rawItemCount); const float discountMod = _player->GetReputationPriceDiscount(vendor); uint8 count = 0; for (uint32 slot = 0; slot < rawItemCount; ++slot) { VendorItem const* vendorItem = vendorItems->GetItem(slot); if (!vendorItem) continue; WorldPackets::NPC::VendorItem& item = packet.Items[count]; if (vendorItem->Type == ITEM_VENDOR_TYPE_ITEM) { ItemTemplate const* itemTemplate = sObjectMgr->GetItemTemplate(vendorItem->item); if (!itemTemplate) continue; int32 leftInStock = !vendorItem->maxcount ? -1 : vendor->GetVendorItemCurrentCount(vendorItem); if (!_player->IsGameMaster()) // ignore conditions if GM on { // Respect allowed class if (!(itemTemplate->GetAllowableClass() & _player->getClassMask()) && itemTemplate->GetBonding() == BIND_WHEN_PICKED_UP) continue; // Only display items in vendor lists for the team the player is on if ((itemTemplate->GetFlags2() & ITEM_FLAG2_HORDE_ONLY && _player->GetTeam() == ALLIANCE) || (itemTemplate->GetFlags2() & ITEM_FLAG2_ALLIANCE_ONLY && _player->GetTeam() == HORDE)) continue; // Items sold out are not displayed in list if (leftInStock == 0) continue; } ConditionList conditions = sConditionMgr->GetConditionsForNpcVendorEvent(vendor->GetEntry(), vendorItem->item); if (!sConditionMgr->IsObjectMeetToConditions(_player, vendor, conditions)) { TC_LOG_DEBUG("condition", "SendListInventory: conditions not met for creature entry %u item %u", vendor->GetEntry(), vendorItem->item); continue; } int32 price = vendorItem->IsGoldRequired(itemTemplate) ? uint32(floor(itemTemplate->GetBuyPrice() * discountMod)) : 0; if (int32 priceMod = _player->GetTotalAuraModifier(SPELL_AURA_MOD_VENDOR_ITEMS_PRICES)) price -= CalculatePct(price, priceMod); item.MuID = slot + 1; // client expects counting to start at 1 item.Durability = itemTemplate->MaxDurability; item.ExtendedCostID = vendorItem->ExtendedCost; item.Type = vendorItem->Type; item.Quantity = leftInStock; item.StackCount = itemTemplate->GetBuyCount(); item.Price = price; item.Item.ItemID = vendorItem->item; } else if (vendorItem->Type == ITEM_VENDOR_TYPE_CURRENCY) { CurrencyTypesEntry const* currencyTemplate = sCurrencyTypesStore.LookupEntry(vendorItem->item); if (!currencyTemplate) continue; if (!vendorItem->ExtendedCost) continue; // there's no price defined for currencies, only extendedcost is used item.MuID = slot + 1; // client expects counting to start at 1 item.ExtendedCostID = vendorItem->ExtendedCost; item.Item.ItemID = vendorItem->item; item.Type = vendorItem->Type; item.StackCount = vendorItem->maxcount; } else continue; if (++count >= MAX_VENDOR_ITEMS) break; } // Resize vector to real size (some items can be skipped due to checks) packet.Items.resize(count); SendPacket(packet.Write()); } void WorldSession::HandleAutoStoreBagItemOpcode(WorldPackets::Item::AutoStoreBagItem& packet) { if (!packet.Inv.Items.empty()) { TC_LOG_ERROR("network", "HandleAutoStoreBagItemOpcode - Invalid itemCount (" SZFMTD ")", packet.Inv.Items.size()); return; } TC_LOG_DEBUG("network", "HandleAutoStoreBagItemOpcode: receive ContainerSlotA: %u, SlotA: %u, ContainerSlotB: %u", packet.ContainerSlotA, packet.SlotA, packet.ContainerSlotB); Item* item = _player->GetItemByPos(packet.ContainerSlotA, packet.SlotA); if (!item) return; if (!_player->IsValidPos(packet.ContainerSlotB, NULL_SLOT, false)) // can be autostore pos { _player->SendEquipError(EQUIP_ERR_WRONG_SLOT); return; } uint16 src = item->GetPos(); // check unequip potability for equipped items and bank bags if (_player->IsEquipmentPos(src) || _player->IsBagPos(src)) { InventoryResult msg = _player->CanUnequipItem(src, !_player->IsBagPos(src)); if (msg != EQUIP_ERR_OK) { _player->SendEquipError(msg, item); return; } } ItemPosCountVec dest; InventoryResult msg = _player->CanStoreItem(packet.ContainerSlotB, NULL_SLOT, dest, item, false); if (msg != EQUIP_ERR_OK) { _player->SendEquipError(msg, item); return; } // no-op: placed in same slot if (dest.size() == 1 && dest[0].pos == src) { // just remove grey item state _player->SendEquipError(EQUIP_ERR_INTERNAL_BAG_ERROR, item); return; } _player->RemoveItem(packet.ContainerSlotA, packet.SlotA, true); _player->StoreItem(dest, item, true); } void WorldSession::SendEnchantmentLog(ObjectGuid target, ObjectGuid caster, uint32 itemId, uint32 enchantId) { WorldPacket data(SMSG_ENCHANTMENT_LOG, (8+8+4+4)); data << target; data << caster; data << uint32(itemId); data << uint32(enchantId); GetPlayer()->SendMessageToSet(&data, true); } void WorldSession::SendItemEnchantTimeUpdate(ObjectGuid Playerguid, ObjectGuid Itemguid, uint32 slot, uint32 Duration) { WorldPackets::Item::ItemEnchantTimeUpdate data; data.ItemGuid = Itemguid; data.DurationLeft = Duration; data.Slot = slot; data.OwnerGuid = Playerguid; SendPacket(data.Write()); } void WorldSession::HandleWrapItem(WorldPackets::Item::WrapItem& packet) { if (packet.Inv.Items.size() != 2) { TC_LOG_ERROR("network", "HandleWrapItem - Invalid itemCount (" SZFMTD ")", packet.Inv.Items.size()); return; } /// @todo: 6.x find better way for read // Gift uint8 giftContainerSlot = packet.Inv.Items[0].ContainerSlot; uint8 giftSlot = packet.Inv.Items[0].Slot; // Item uint8 itemContainerSlot = packet.Inv.Items[1].ContainerSlot; uint8 itemSlot = packet.Inv.Items[1].Slot; TC_LOG_DEBUG("network", "HandleWrapItem - Receive giftContainerSlot = %u, giftSlot = %u, itemContainerSlot = %u, itemSlot = %u", giftContainerSlot, giftSlot, itemContainerSlot, itemSlot); Item* gift = _player->GetItemByPos(giftContainerSlot, giftSlot); if (!gift) { _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, gift, NULL); return; } if (!(gift->GetTemplate()->GetFlags() & ITEM_FLAG_WRAPPER)) // cheating: non-wrapper wrapper { _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, gift, NULL); return; } Item* item = _player->GetItemByPos(itemContainerSlot, itemSlot); if (!item) { _player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, item, NULL); return; } if (item == gift) // not possable with pacjket from real client { _player->SendEquipError(EQUIP_ERR_CANT_WRAP_WRAPPED, item, NULL); return; } if (item->IsEquipped()) { _player->SendEquipError(EQUIP_ERR_CANT_WRAP_EQUIPPED, item, NULL); return; } if (!item->GetGuidValue(ITEM_FIELD_GIFTCREATOR).IsEmpty()) // HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPED); { _player->SendEquipError(EQUIP_ERR_CANT_WRAP_WRAPPED, item, NULL); return; } if (item->IsBag()) { _player->SendEquipError(EQUIP_ERR_CANT_WRAP_BAGS, item, NULL); return; } if (item->IsSoulBound()) { _player->SendEquipError(EQUIP_ERR_CANT_WRAP_BOUND, item, NULL); return; } if (item->GetMaxStackCount() != 1) { _player->SendEquipError(EQUIP_ERR_CANT_WRAP_STACKABLE, item, NULL); return; } // maybe not correct check (it is better than nothing) if (item->GetTemplate()->GetMaxCount() > 0) { _player->SendEquipError(EQUIP_ERR_CANT_WRAP_UNIQUE, item, NULL); return; } SQLTransaction trans = CharacterDatabase.BeginTransaction(); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_CHAR_GIFT); stmt->setUInt64(0, item->GetOwnerGUID().GetCounter()); stmt->setUInt64(1, item->GetGUID().GetCounter()); stmt->setUInt32(2, item->GetEntry()); stmt->setUInt32(3, item->GetUInt32Value(ITEM_FIELD_FLAGS)); trans->Append(stmt); item->SetEntry(gift->GetEntry()); switch (item->GetEntry()) { case 5042: item->SetEntry(5043); break; case 5048: item->SetEntry(5044); break; case 17303: item->SetEntry(17302); break; case 17304: item->SetEntry(17305); break; case 17307: item->SetEntry(17308); break; case 21830: item->SetEntry(21831); break; } item->SetGuidValue(ITEM_FIELD_GIFTCREATOR, _player->GetGUID()); item->SetUInt32Value(ITEM_FIELD_FLAGS, ITEM_FIELD_FLAG_WRAPPED); item->SetState(ITEM_CHANGED, _player); if (item->GetState() == ITEM_NEW) // save new item, to have alway for `character_gifts` record in `item_instance` { // after save it will be impossible to remove the item from the queue item->RemoveFromUpdateQueueOf(_player); item->SaveToDB(trans); // item gave inventory record unchanged and can be save standalone } CharacterDatabase.CommitTransaction(trans); uint32 count = 1; _player->DestroyItemCount(gift, count, true); } void WorldSession::HandleSocketOpcode(WorldPacket& recvData) { ObjectGuid item_guid; ObjectGuid gem_guids[MAX_GEM_SOCKETS]; recvData >> item_guid; if (!item_guid) return; for (int i = 0; i < MAX_GEM_SOCKETS; ++i) recvData >> gem_guids[i]; //cheat -> tried to socket same gem multiple times if ((!gem_guids[0].IsEmpty() && (gem_guids[0] == gem_guids[1] || gem_guids[0] == gem_guids[2])) || (!gem_guids[1].IsEmpty() && (gem_guids[1] == gem_guids[2]))) return; Item* itemTarget = _player->GetItemByGuid(item_guid); if (!itemTarget) //missing item to socket return; ItemTemplate const* itemProto = itemTarget->GetTemplate(); if (!itemProto) return; //this slot is excepted when applying / removing meta gem bonus uint8 slot = itemTarget->IsEquipped() ? itemTarget->GetSlot() : uint8(NULL_SLOT); Item* Gems[MAX_GEM_SOCKETS]; for (int i = 0; i < MAX_GEM_SOCKETS; ++i) Gems[i] = !gem_guids[i].IsEmpty() ? _player->GetItemByGuid(gem_guids[i]) : NULL; GemPropertiesEntry const* GemProps[MAX_GEM_SOCKETS]; for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //get geminfo from dbc storage GemProps[i] = (Gems[i]) ? sGemPropertiesStore.LookupEntry(Gems[i]->GetTemplate()->GetGemProperties()) : NULL; // Find first prismatic socket int32 firstPrismatic = 0; while (firstPrismatic < MAX_GEM_SOCKETS && itemProto->ExtendedData->SocketColor[firstPrismatic]) ++firstPrismatic; for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //check for hack maybe { if (!GemProps[i]) continue; // tried to put gem in socket where no socket exists (take care about prismatic sockets) if (!itemProto->ExtendedData->SocketColor[i]) { // no prismatic socket if (!itemTarget->GetEnchantmentId(PRISMATIC_ENCHANTMENT_SLOT)) return; if (i != firstPrismatic) return; } // tried to put normal gem in meta socket if (itemTarget->GetSocketColor(i) == SOCKET_COLOR_META && GemProps[i]->Type != SOCKET_COLOR_META) return; // tried to put meta gem in normal socket if (itemTarget->GetSocketColor(i) != SOCKET_COLOR_META && GemProps[i]->Type == SOCKET_COLOR_META) return; // tried to put normal gem in cogwheel socket if (itemTarget->GetSocketColor(i) == SOCKET_COLOR_COGWHEEL && GemProps[i]->Type != SOCKET_COLOR_COGWHEEL) return; // tried to put cogwheel gem in normal socket if (itemTarget->GetSocketColor(i) != SOCKET_COLOR_COGWHEEL && GemProps[i]->Type == SOCKET_COLOR_COGWHEEL) return; } uint32 GemEnchants[MAX_GEM_SOCKETS]; uint32 OldEnchants[MAX_GEM_SOCKETS]; for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //get new and old enchantments { GemEnchants[i] = (GemProps[i]) ? GemProps[i]->EnchantID : 0; OldEnchants[i] = itemTarget->GetEnchantmentId(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT+i)); } // check unique-equipped conditions for (int i = 0; i < MAX_GEM_SOCKETS; ++i) { if (!Gems[i]) continue; // continue check for case when attempt add 2 similar unique equipped gems in one item. ItemTemplate const* iGemProto = Gems[i]->GetTemplate(); // unique item (for new and already placed bit removed enchantments if (iGemProto->GetFlags() & ITEM_FLAG_UNIQUE_EQUIPPED) { for (int j = 0; j < MAX_GEM_SOCKETS; ++j) { if (i == j) // skip self continue; if (Gems[j]) { if (iGemProto->GetId() == Gems[j]->GetEntry()) { _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, NULL); return; } } else if (OldEnchants[j]) { if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(OldEnchants[j])) { if (iGemProto->GetId() == enchantEntry->SRCItemID) { _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, NULL); return; } } } } } // unique limit type item int32 limit_newcount = 0; if (iGemProto->GetItemLimitCategory()) { if (ItemLimitCategoryEntry const* limitEntry = sItemLimitCategoryStore.LookupEntry(iGemProto->GetItemLimitCategory())) { // NOTE: limitEntry->mode is not checked because if item has limit then it is applied in equip case for (int j = 0; j < MAX_GEM_SOCKETS; ++j) { if (Gems[j]) { // new gem if (iGemProto->GetItemLimitCategory() == Gems[j]->GetTemplate()->GetItemLimitCategory()) ++limit_newcount; } else if (OldEnchants[j]) { // existing gem if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(OldEnchants[j])) if (ItemTemplate const* jProto = sObjectMgr->GetItemTemplate(enchantEntry->SRCItemID)) if (iGemProto->GetItemLimitCategory() == jProto->GetItemLimitCategory()) ++limit_newcount; } } if (limit_newcount > 0 && uint32(limit_newcount) > limitEntry->Quantity) { _player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, NULL); return; } } } // for equipped item check all equipment for duplicate equipped gems if (itemTarget->IsEquipped()) { if (InventoryResult res = _player->CanEquipUniqueItem(Gems[i], slot, std::max(limit_newcount, 0))) { _player->SendEquipError(res, itemTarget, NULL); return; } } } bool SocketBonusActivated = itemTarget->GemsFitSockets(); //save state of socketbonus _player->ToggleMetaGemsActive(slot, false); //turn off all metagems (except for the target item) //if a meta gem is being equipped, all information has to be written to the item before testing if the conditions for the gem are met //remove ALL enchants for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT + MAX_GEM_SOCKETS; ++enchant_slot) _player->ApplyEnchantment(itemTarget, EnchantmentSlot(enchant_slot), false); for (int i = 0; i < MAX_GEM_SOCKETS; ++i) { if (GemEnchants[i]) { itemTarget->SetEnchantment(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT+i), GemEnchants[i], 0, 0, _player->GetGUID()); if (Item* guidItem = _player->GetItemByGuid(gem_guids[i])) { uint32 gemCount = 1; _player->DestroyItemCount(guidItem, gemCount, true); } } } for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot) _player->ApplyEnchantment(itemTarget, EnchantmentSlot(enchant_slot), true); bool SocketBonusToBeActivated = itemTarget->GemsFitSockets();//current socketbonus state if (SocketBonusActivated ^ SocketBonusToBeActivated) //if there was a change... { _player->ApplyEnchantment(itemTarget, BONUS_ENCHANTMENT_SLOT, false); itemTarget->SetEnchantment(BONUS_ENCHANTMENT_SLOT, (SocketBonusToBeActivated ? itemTarget->GetTemplate()->GetSocketBonus() : 0), 0, 0, _player->GetGUID()); _player->ApplyEnchantment(itemTarget, BONUS_ENCHANTMENT_SLOT, true); //it is not displayed, client has an inbuilt system to determine if the bonus is activated } _player->ToggleMetaGemsActive(slot, true); //turn on all metagems (except for target item) _player->RemoveTradeableItem(itemTarget); itemTarget->ClearSoulboundTradeable(_player); // clear tradeable flag itemTarget->SendUpdateSockets(); } void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPackets::Item::CancelTempEnchantment& cancelTempEnchantment) { // apply only to equipped item if (!Player::IsEquipmentPos(INVENTORY_SLOT_BAG_0, cancelTempEnchantment.Slot)) return; Item* item = GetPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, cancelTempEnchantment.Slot); if (!item) return; if (!item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT)) return; GetPlayer()->ApplyEnchantment(item, TEMP_ENCHANTMENT_SLOT, false); item->ClearEnchantment(TEMP_ENCHANTMENT_SLOT); } void WorldSession::HandleGetItemPurchaseData(WorldPackets::Item::GetItemPurchaseData& packet) { Item* item = _player->GetItemByGuid(packet.ItemGUID); if (!item) { TC_LOG_DEBUG("network", "HandleGetItemPurchaseData: Item %s not found!", packet.ItemGUID.ToString().c_str()); return; } TC_LOG_DEBUG("network", "HandleGetItemPurchaseData: Item %s", packet.ItemGUID.ToString().c_str()); GetPlayer()->SendRefundInfo(item); } void WorldSession::HandleItemRefund(WorldPacket &recvData) { ObjectGuid guid; recvData >> guid; // item guid Item* item = _player->GetItemByGuid(guid); if (!item) { TC_LOG_DEBUG("network", "Item refund: item not found!"); return; } // Don't try to refund item currently being disenchanted if (_player->GetLootGUID() == guid) return; GetPlayer()->RefundItem(item); } void WorldSession::HandleTransmogrifyItems(WorldPackets::Item::TransmogrifyItems& transmogrifyItems) { Player* player = GetPlayer(); // Validate if (!player->GetNPCIfCanInteractWith(transmogrifyItems.Npc, UNIT_NPC_FLAG_TRANSMOGRIFIER)) { TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - %s not found or player can't interact with it.", transmogrifyItems.Npc.ToString().c_str()); return; } int64 cost = 0; std::unordered_map<Item*, Item*> transmogItems; std::unordered_map<Item*, std::pair<VoidStorageItem*, BonusData>> transmogVoidItems; std::vector<Item*> resetAppearanceItems; for (WorldPackets::Item::TransmogrifyItem const& transmogItem : transmogrifyItems.Items) { // slot of the transmogrified item if (transmogItem.Slot >= EQUIPMENT_SLOT_END) { TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (%s, name: %s) tried to transmogrify wrong slot (%u) when transmogrifying items.", player->GetGUID().ToString().c_str(), player->GetName().c_str(), transmogItem.Slot); return; } // transmogrified item Item* itemTransmogrified = player->GetItemByPos(INVENTORY_SLOT_BAG_0, transmogItem.Slot); if (!itemTransmogrified) { TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (%s, name: %s) tried to transmogrify an invalid item in a valid slot (slot: %u).", player->GetGUID().ToString().c_str(), player->GetName().c_str(), transmogItem.Slot); return; } WorldPackets::Item::ItemInstance itemInstance; BonusData const* bonus = nullptr; if (transmogItem.SrcItemGUID) { // guid of the transmogrifier item Item* itemTransmogrifier = player->GetItemByGuid(*transmogItem.SrcItemGUID); if (!itemTransmogrifier) { TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (%s, name: %s) tried to transmogrify with an invalid item (%s).", player->GetGUID().ToString().c_str(), player->GetName().c_str(), transmogItem.SrcItemGUID->ToString().c_str()); return; } itemInstance.Initialize(itemTransmogrifier); bonus = itemTransmogrifier->GetBonus(); transmogItems[itemTransmogrified] = itemTransmogrifier; } else if (transmogItem.SrcVoidItemGUID) { // guid of the transmogrifier item uint8 slot; VoidStorageItem* itemTransmogrifier = player->GetVoidStorageItem(transmogItem.SrcVoidItemGUID->GetCounter(), slot); if (!itemTransmogrifier) { TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (%s, name: %s) tried to transmogrify with an invalid void storage item (%s).", player->GetGUID().ToString().c_str(), player->GetName().c_str(), transmogItem.SrcVoidItemGUID->ToString().c_str()); return; } itemInstance.Initialize(itemTransmogrifier); std::pair<VoidStorageItem*, BonusData>& transmogData = transmogVoidItems[itemTransmogrified]; transmogData.first = itemTransmogrifier; transmogData.second.Initialize(itemInstance); bonus = &transmogData.second; } else { resetAppearanceItems.push_back(itemTransmogrified); continue; } // entry of transmogrifier and from packet if (itemInstance != transmogItem.Item) { TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (%s, name: %s) tried to transmogrify with an invalid item instance data for %s.", player->GetGUID().ToString().c_str(), player->GetName().c_str(), transmogItem.Item.ItemID, transmogItem.SrcItemGUID->ToString().c_str()); return; } // validity of the transmogrification items if (!Item::CanTransmogrifyItemWithItem(itemTransmogrified, transmogItem.Item, bonus)) { TC_LOG_DEBUG("network", "WORLD: HandleTransmogrifyItems - Player (%s, name: %s) failed CanTransmogrifyItemWithItem (%u with %u).", player->GetGUID().ToString().c_str(), player->GetName().c_str(), itemTransmogrified->GetEntry(), transmogItem.Item.ItemID); return; } // add cost cost += itemTransmogrified->GetSpecialPrice(); } if (cost) // 0 cost if reverting look { if (!player->HasEnoughMoney(cost)) return; player->ModifyMoney(-cost); } // Everything is fine, proceed for (auto& transmogPair : transmogItems) { Item* transmogrified = transmogPair.first; Item* transmogrifier = transmogPair.second; transmogrified->SetModifier(ITEM_MODIFIER_TRANSMOG_ITEM_ID, transmogrifier->GetEntry()); transmogrified->SetModifier(ITEM_MODIFIER_TRANSMOG_APPEARANCE_MOD, transmogrifier->GetAppearanceModId()); player->SetVisibleItemSlot(transmogrified->GetSlot(), transmogrified); transmogrified->SetNotRefundable(player); transmogrified->ClearSoulboundTradeable(player); transmogrifier->SetNotRefundable(player); transmogrifier->ClearSoulboundTradeable(player); if (transmogrifier->GetTemplate()->GetBonding() == BIND_WHEN_EQUIPED || transmogrifier->GetTemplate()->GetBonding() == BIND_WHEN_USE) transmogrifier->SetBinding(true); } for (auto& transmogVoirPair : transmogVoidItems) { Item* transmogrified = transmogVoirPair.first; VoidStorageItem* transmogrifier = transmogVoirPair.second.first; BonusData& bonus = transmogVoirPair.second.second; transmogrified->SetModifier(ITEM_MODIFIER_TRANSMOG_ITEM_ID, transmogrifier->ItemEntry); transmogrified->SetModifier(ITEM_MODIFIER_TRANSMOG_APPEARANCE_MOD, bonus.AppearanceModID); player->SetVisibleItemSlot(transmogrified->GetSlot(), transmogrified); transmogrified->SetNotRefundable(player); transmogrified->ClearSoulboundTradeable(player); } for (Item* item : resetAppearanceItems) { item->SetModifier(ITEM_MODIFIER_TRANSMOG_ITEM_ID, 0); item->SetModifier(ITEM_MODIFIER_TRANSMOG_APPEARANCE_MOD, 0); player->SetVisibleItemSlot(item->GetSlot(), item); } } bool WorldSession::CanUseBank(ObjectGuid bankerGUID) const { // bankerGUID parameter is optional, set to 0 by default. if (!bankerGUID) bankerGUID = m_currentBankerGUID; bool isUsingBankCommand = (bankerGUID == GetPlayer()->GetGUID() && bankerGUID == m_currentBankerGUID); if (!isUsingBankCommand) { Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(bankerGUID, UNIT_NPC_FLAG_BANKER); if (!creature) return false; } return true; }
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Link extends Model { protected $fillable = ['id', 'url', 'description','user_id']; }
All applicants holding an academic Bachelor's degree in (International) Business Administration from a Dutch university or one of these other Bachelor's degrees are eligible to apply for admission to the Master's programme. 15 EC in Academic Research with a minimum of 10 EC on Quantitative research oriented courses and a minimum of 15 EC on Business courses in at least two of the following fields: Strategy, International Management, Organization, Marketing, Leadership, Entrepreneurship or Organisational Psychology (intermediate/advanced level). These students have direct admission to our MSc in Business Administration without any further conditions such as a minimum GPA or GMAT. Find all enrolment information on the 'Applicants from Economics and Business' page. Limited places are available for pre-Master's students Business Administration from other Dutch universities (for example RSM, VU or RUG), and therefore a selection procedure is in place. You can only apply if you will complete all of the courses of the pre-Master's programme and have obtained a minimum GPA of 7.5. The Admissions Board will carefully review all of the applications shortly after the application deadline. If this group of students from the Breda University of Applied Sciences have finished their academic minor as part of their final curriculum and diploma, they have direct admission to our MSc in Business Administration without any further conditions such as a minimum GPA or GMAT. Applicants who do not meet the above-mentioned requirements are not eligible to apply for the MSc in Business Administration, they might be eligible for the pre-Master's programme Business Administration. all bachelor degree results (year 1-3), any additional Bachelor’s courses have to be included as well. If you have a Bachelor’s as well as a Master’s degree you need a GPA of at least 7.0 in the Bachelor’s or the Master’s. Send your GPA calculation along with your application, you do not have to update your GPA calculation after 1 June. The best students will be selected after the application at most 2 weeks after the application deadline of 1 June.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- * CKFinder * ======== * http://cksource.com/ckfinder * Copyright (C) 2007-2014, CKSource - Frederico Knabben. All rights reserved. * * The software, this file and its contents are subject to the CKFinder * License. Please read the license.txt file before using, installing, copying, * modifying or distribute this file or part of its contents. The contents of * this file is part of the Source Code of CKFinder. --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CKFinder - Sample - Popups</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="robots" content="noindex, nofollow" /> <link href="../sample.css" rel="stylesheet" type="text/css" /> </head> <body> <h1 class="samples"> CKFinder - Sample - Popups<br /> </h1> <div class="description"> The example of opening multiple CKFinder instances in popup windows is available in the &quot;_samples&quot; directory. Click <a href="../popups.html">here</a> to open it. </div> <div id="footer"> <hr /> <p> CKFinder - Ajax File Manager - <a class="samples" href="http://cksource.com/ckfinder/">http://cksource.com/ckfinder</a> </p> <p id="copy"> Copyright &copy; 2007-2014, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved. </p> </div> </body> </html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0) on Wed Apr 25 19:55:47 CEST 2007 --> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <TITLE> Uses of Class org.accada.tdt.types.TagLengthList (tdt 0.3.0 API) </TITLE> <META NAME="date" CONTENT="2007-04-25"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.accada.tdt.types.TagLengthList (tdt 0.3.0 API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/accada/tdt/types/\class-useTagLengthList.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="TagLengthList.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Class<br>org.accada.tdt.types.TagLengthList</B></H2> </CENTER> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Packages that use <A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#org.accada.tdt"><B>org.accada.tdt</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#org.accada.tdt.types"><B>org.accada.tdt.types</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="org.accada.tdt"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A> in <A HREF="../../../../../org/accada/tdt/package-summary.html">org.accada.tdt</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/accada/tdt/package-summary.html">org.accada.tdt</A> that return <A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A></CODE></FONT></TD> <TD><CODE><B>Scheme.</B><B><A HREF="../../../../../org/accada/tdt/Scheme.html#getTagLength()">getTagLength</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of field 'tagLength'.</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/accada/tdt/package-summary.html">org.accada.tdt</A> with parameters of type <A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.lang.String</CODE></FONT></TD> <TD><CODE><B>TDTEngine.</B><B><A HREF="../../../../../org/accada/tdt/TDTEngine.html#convert(java.lang.String, org.accada.tdt.types.LevelTypeList, org.accada.tdt.types.TagLengthList, java.util.Map, org.accada.tdt.types.LevelTypeList)">convert</A></B>(java.lang.String&nbsp;input, <A HREF="../../../../../org/accada/tdt/types/LevelTypeList.html" title="class in org.accada.tdt.types">LevelTypeList</A>&nbsp;inputLevel, <A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A>&nbsp;tagLength, java.util.Map&lt;java.lang.String,java.lang.String&gt;&nbsp;inputParameters, <A HREF="../../../../../org/accada/tdt/types/LevelTypeList.html" title="class in org.accada.tdt.types">LevelTypeList</A>&nbsp;outputLevel)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Translates the input string of a specified input level to a specified outbound level of the same coding scheme.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B>Scheme.</B><B><A HREF="../../../../../org/accada/tdt/Scheme.html#setTagLength(org.accada.tdt.types.TagLengthList)">setTagLength</A></B>(<A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A>&nbsp;tagLength)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of field 'tagLength'.</TD> </TR> </TABLE> &nbsp; <P> <A NAME="org.accada.tdt.types"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A> in <A HREF="../../../../../org/accada/tdt/types/package-summary.html">org.accada.tdt.types</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Fields in <A HREF="../../../../../org/accada/tdt/types/package-summary.html">org.accada.tdt.types</A> declared as <A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A></CODE></FONT></TD> <TD><CODE><B>TagLengthList.</B><B><A HREF="../../../../../org/accada/tdt/types/TagLengthList.html#VALUE_64">VALUE_64</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The instance of the 64 type</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A></CODE></FONT></TD> <TD><CODE><B>TagLengthList.</B><B><A HREF="../../../../../org/accada/tdt/types/TagLengthList.html#VALUE_96">VALUE_96</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The instance of the 96 type</TD> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../../org/accada/tdt/types/package-summary.html">org.accada.tdt.types</A> that return <A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;<A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types">TagLengthList</A></CODE></FONT></TD> <TD><CODE><B>TagLengthList.</B><B><A HREF="../../../../../org/accada/tdt/types/TagLengthList.html#valueOf(java.lang.String)">valueOf</A></B>(java.lang.String&nbsp;string)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method valueOf Returns a new TagLengthList based on the given String value.</TD> </TR> </TABLE> &nbsp; <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/accada/tdt/types/TagLengthList.html" title="class in org.accada.tdt.types"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/accada/tdt/types/\class-useTagLengthList.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="TagLengthList.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright &copy; 2007. All Rights Reserved. </BODY> </HTML>
Well alright. Congratulations! You are ready to start your entrepreneurial journey. And what a journey it is! You've already used the scheduling tool for STEP ONE (Your free telephone overview). Step 2A - (Order the SOFTWARE). Purchase your SBI! software by clicking HERE ...( the actual ORDER FORM is at the bottom of that page) and then we'll be all set to go forward. OK. SBI! ordered? Great! It's an AWESOME Value as you will soon know first-hand. OK then. Go right ahead now to Step 2B below and set up your first Online Internet Business Course class time. - all sessions are 60 minutes long. My program is 30 progressively structured sessions to fully complete the course. You will have opportunity to re-schedule or do a catch up session possibly during the very same week. Likewise, you may also move quickly ahead at your own pace (as long as you don't pass up the instructor!) . STEP 2B - (Check the Schedule Below and Pay For Your Class Time). Next make your next learning session payment to PayPal using the easy form immediately below. If you pay for, but are unable to attend, a particular session, don't worry. You will either be credited for that session or you will get the next session for FREE ***. After you complete the order, you will AUTOMATICALLY be taken straight to the scheduling system to schedule your time slot! Easy as pie. IMPORTANT! If you have NOT yet purchased a HEADSET, set up GIZMO and a web merchant standard - PREMIER PayPal account and SHAREDVIEW on your computer, Please do so NOW or it will be very difficult for you to proceed with the course. It's 4 very easy tasks - just get 'er done! Our lives together will be SO much easier. So thanks in advance for taking care of this. Here's the link to the Scheduling System . Open the link. Once there, RIGHT Click on your mouse and do a "SAVE AS". Save the link directly to your computer DESKTOP. That way it'll be perfectly handy for the next time you schedule a time! Voila! See? I'm already making your life easier! Get ready for an absolute BLAST. We'll see you over the Internet! And as promised --- Here's the "TELL YOUR FRIENDS" FORM!!
Every Triton came to school strong and fully embraced the celebration of Halloween. We had some great costumes from our students, and even our staff got in the spirit!! What a wonderful place to work!! Over 1000 Grade 10 and 11 Tritons packed the PAC on November 1st, and celebrated being on the A-G completion track. Dr. Penelope DeLeon attended and spoke. There was ice cream for all and “College Bound” shirts next week. This week Physics classes at Pacifica celebrated the season with an engineering project. They designed and built “Pumpkin Chunkers”. The objective was to design a device that could accurately “chunk” a candy pumpkin across the room. Design – build – test – modify – repeat! The competition on Halloween was intense! And everyone was a winner with extra pumpkins for “chomping”! United Blood Services, now called Vitalant, announced last Friday’s drive was a bloody success! Our goal was to exceed 100 units of blood. AAAAANNNNDDDD: We collected 120 units. Thank you to all Tritons for the support! Special thank you to former Triton/HSA student, Jessica Moreno, for speaking with our HSA juniors & seniors. Jessica is currently a Veterinarian Assistant who is almost done with her Veterinarian Tech program. Students compete at many activities including a pumpkin carving contest during TECA Field Day on Tuesday. This past Saturday the annual Family Conference was held at here at Pacifica for students and their families. 350 attended from throughout our district with Pacifica being well represented with just over 100 parents/students. Presenters offered workshops in English and Spanish on information pertaining to financial aid, college and university options, scholarship guidelines as well as career guidance. On October 30th, the University of California, Santa Barbara (UCSB) held an informational meeting. Over 25 students attended the meeting and received general information pertaining to the university. Students learned valuable information regarding majors at UCSB, living on campus and financial aid. On November 1st, the University of California, Santa Cruz (UCSC) held an informational meeting. Over 20 students attended the meeting and received general information pertaining to the university. Students learned valuable information regarding majors at UCSC, living on campus and financial aid. Oxnard College held an informational workshop at Pacifica High School on November 1st to assist seniors with the community college application. Over 25 students attended the workshop. On November 1st, counselors recognized 690 10th and 11th graders currently meeting the A-G subject requirements. Counselors gave a brief A-G presentation and showed students how to read their TES report. Each student received ice cream and in a few weeks will receive a specially designed PHS college bound shirt. Lili Mejia attended a workshop at the University of California, Santa Barbara (UCSB) that detailed the criteria readers reference when grading student’s personal statement essays. A follow-up workshop is scheduled on November 15th. The follow-up workshop will emphasize on pros and cons of personal statements submitted for admissions for Fall of 2019.
'use strict'; const server = require('./server'); const spider = require('./spider'); const config = require('./config'); const logger = require('./logger'); const cluster = require('cluster'); const os = require('os'); if (cluster.isMaster) { if (config.use_spider()) { spider.setupSchedule(); if (!config.use_app() && !config.use_api()) { spider.server(); } } if (config.use_app() || config.use_api()) { let cpus = os.cpus().length; let processes = cpus; if (config.server.process_limit > 0 && cpus > config.server.process_limit) { processes = config.server.process_limit; logger.debug('limiting processes to ' + processes + ' (CPUs: ' + cpus + ')'); } else { logger.debug('spawning ' + processes + ' processes'); } for (let i = 0; i < processes; i += 1) { cluster.fork(); } cluster.on('exit', () => { cluster.fork(); }); } } else { if (config.use_app() || config.use_api()) { server.run(); } }
<link rel="import" href="../../bower_components/polymer/polymer-element.html"> <link rel="import" href="../views/fragments/main-view.html"> <link rel="import" href="../views/page404-view.html"> <link rel="import" href="../app-fragment.html"> <link rel="import" href="home-fragment.html"> <link rel="import" href="image-details-fragment.html"> <dom-module id="main-fragment"> <template> <style> :host { display: block; height: 100%; width: 100%; } </style> <main-view id="view"> <home-fragment id="home" data-route="^/$"></home-fragment> <image-details-fragment id="details" data-route="^/photos/([0-9]+):imageId$"></image-details-fragment> <page404-view data-route=".*"></page404-view> </main-view> </template> <script> class MainFragment extends AppFragment(Polymer.Element) { static get is() { return 'main-fragment'; } static get properties() { return { path: { notify: true, observer: '_pathChanged', type: String } }; } get fragments() { return Array.prototype.slice.call(this.$.view.children); } // Override this method to avoid [databinding-calls-must-be-functions] warning when running `polymer lint` _pathChanged(path) { super._pathChanged(path); } } window.customElements.define(MainFragment.is, MainFragment); </script> </dom-module>
import { OnInit, EventEmitter, OnChanges } from '@angular/core'; export declare class DatePickerInnerComponent implements OnInit, OnChanges { datepickerMode: string; startingDay: number; yearRange: number; minDate: Date; maxDate: Date; minMode: string; maxMode: string; showWeeks: boolean; formatDay: string; formatMonth: string; formatYear: string; formatDayHeader: string; formatDayTitle: string; formatMonthTitle: string; onlyCurrentMonth: boolean; shortcutPropagation: boolean; customClass: Array<{ date: Date; mode: string; clazz: string; }>; dateDisabled: any; initDate: Date; selectionDone: EventEmitter<Date>; stepDay: any; stepMonth: any; stepYear: any; private modes; private dateFormatter; private uniqueId; private _activeDate; private selectedDate; private activeDateId; private refreshViewHandlerDay; private compareHandlerDay; private refreshViewHandlerMonth; private compareHandlerMonth; private refreshViewHandlerYear; private compareHandlerYear; private update; activeDate: Date; ngOnInit(): void; ngOnChanges(): void; setCompareHandler(handler: Function, type: string): void; compare(date1: Date, date2: Date): number; setRefreshViewHandler(handler: Function, type: string): void; refreshView(): void; dateFilter(date: Date, format: string): string; isActive(dateObject: any): boolean; createDateObject(date: Date, format: string): any; split(arr: Array<any>, size: number): Array<any>; fixTimeZone(date: Date): Date; select(date: Date): void; move(direction: number): void; toggleMode(direction: number): void; private getCustomClassForDate(date); private isDisabled(date); }
# SteamFriends This is a handler for Community functionality. Initialize it by passing a SteamClient instance to the constructor. ```js var steamFriends = new Steam.SteamFriends(steamClient); ``` Chat-related methods automatically convert ClanIDs (group's SteamID) to ChatIDs. Conversely, ChatIDs are converted to ClanIDs in chat-related events if it's a group chat (i.e. not an "ad hoc" chat), otherwise left alone. In the following docs, chat SteamID always refers to ClanID for group chats and ChatID otherwise. ## Properties ### personaStates Information about users you have encountered. It's an object whose keys are SteamIDs and values are [`CMsgClientPersonaState.Friend`](https://github.com/SteamRE/SteamKit/blob/master/Resources/Protobufs/steamclient/steammessages_clientserver.proto) objects. ### clanStates Information about groups you have encountered. It's an object whose keys are SteamIDs and values are [`CMsgClientClanState`](https://github.com/SteamRE/SteamKit/blob/master/Resources/Protobufs/steamclient/steammessages_clientserver.proto) objects. ### chatRooms Information about chat rooms you have joined. It's an object with the following structure: ```js { "steamID of the chat": { "steamID of one of the chat's current members": { rank: "EClanPermission", permissions: "a bitset of values from EChatPermission" } // other members } // other chats } ``` For example, `Object.keys(steamClient.chatRooms[chatID])` will return an array of the chat's current members, and `steamClient.chatRooms[chatID][memberID].permissions & Steam.EChatPermission.Kick` will evaluate to a nonzero value if the specified user is allowed to kick from the specified chat. ### friends An object that maps users' SteamIDs to their `EFriendRelationship` with you. Empty until ['relationships'](#relationships) is emitted. ['friend'](#friend) is emitted before this object changes. ### groups An object that maps groups' SteamIDs to their `EClanRelationship` with you. Empty until ['relationships'](#relationships) is emitted. ['group'](#group) is emitted before this object changes. ## Methods ### setPersonaName(name) Changes your Steam profile name. ### setPersonaState(EPersonaState) You'll want to call this with `EPersonaState.Online` upon logon, otherwise you'll show up as offline. ### sendMessage(steamID, message, [EChatEntryType]) Last parameter defaults to `EChatEntryType.ChatMsg`. Another type you might want to use is `EChatEntryType.Emote`. ### addFriend(steamID) Sends a friend request. ### removeFriend(steamID) Removes a friend. ### joinChat(steamID) Attempts to join the specified chat room. The result should arrive in the ['chatEnter' event](#chatenter). ### leaveChat(steamID) Leaves the specified chat room. Will silently fail if you are not currently in it. Removes the chat from [`chatRooms`](#chatrooms). ### lockChat(steamID), unlockChat(steamID) Locks and unlocks a chat room respectively. ### setModerated(steamID), setUnmoderated(steamID) Enables and disables officers-only chat respectively. ### kick(chatSteamID, memberSteamID), ban(chatSteamID, memberSteamID), unban(chatSteamID, memberSteamID) Self-explanatory. ### chatInvite(chatSteamID, invitedSteamID) Invites the specified user to the specified chat. ### getSteamLevel(steamids, callback) Requests the Steam level of a number of specified accounts. The `steamids` argument should be an array of SteamIDs. The single object parameter of the `callback` has the requested SteamIDs as properties and the level as their values. Example: ```js { "76561198006409530": 62, "76561197960287930": 7 } ``` ### requestFriendData(steamIDs, [requestedData]) Requests friend data. `steamIDs` must be an array. `requestedData` is optional – if falsy, defaults to `EClientPersonaStateFlag.PlayerName | EClientPersonaStateFlag.Presence | EClientPersonaStateFlag.SourceID | EClientPersonaStateFlag.GameExtraInfo`. The response, if any, should arrive in the ['personaState' event](#personastate). ### setIgnoreFriend(steamID, setIgnore, callback) Blocks a friend if `setIgnore` is `true`, unblocks them if it's `false`. The first argument to `callback` will be `EResult`. ## Events ### 'chatInvite' * SteamID of the chat you were invited to * name of the chat * SteamID of the user who invited you ### 'personaState' * [`CMsgClientPersonaState.Friend`](https://github.com/SteamRE/SteamKit/blob/master/Resources/Protobufs/steamclient/steammessages_clientserver.proto) Someone has gone offline/online, started a game, changed their nickname or something else. Note that the [`personaStates`](#personastates) property is not yet updated when this event is fired, so you can compare the new state with the old one to see what changed. ### 'clanState' * [`CMsgClientClanState`](https://github.com/SteamRE/SteamKit/blob/master/Resources/Protobufs/steamclient/steammessages_clientserver.proto) Some group has posted an event or an announcement, changed their avatar or something else. Note that the [`clanStates`](#clanstates) property is not yet updated when this event is fired, so you can compare the new state with the old one to see what changed. ### 'relationships' The [`friends`](#friends) and [`groups`](#groups) properties now contain data (unless your friend/group list is empty). Listen for this if you want to accept/decline friend requests that came while you were offline, for example. ### 'friend' * SteamID of the user * `EFriendRelationship` Some activity in your friend list. For example, `EFriendRelationship.RequestRecipient` means you got a friend invite, `EFriendRelationship.None` means you got removed. The [`friends`](#friends) property is updated after this event is emitted. ### 'group' * SteamID of the group * `EClanRelationship` Some activity in your group list. For example, `EClanRelationship.Invited` means you got invited to a group, `EClanRelationship.Kicked` means you got kicked. The [`groups`](#groups) property is updated after this event is emitted. ### 'friendMsg' * SteamID of the user * the message * `EChatEntryType` ### 'chatMsg' * SteamID of the chat room * the message * `EChatEntryType` * SteamID of the chatter ### 'message' Same arguments as the above two, captures both events. In case of a friend message, the fourth argument will be undefined. ### 'friendMsgEchoToSender' Same as '[friendMsg](#friendmsg)', except it is a message you send to a friend on another client. ### 'chatEnter' * SteamID of the chat room * `EChatRoomEnterResponse` The result of attempting to join a chat. If successful, the list of chat members is available in [`chatRooms`](#chatrooms). ### 'chatStateChange' * `EChatMemberStateChange` * SteamID of the user who entered or left the chat room, disconnected, or was kicked or banned * SteamID of the chat where it happened * SteamID of the user who kicked or banned Something happened in a chat you are in. For example, if the first argument equals `Steam.EChatMemberStateChange.Kicked`, then someone got kicked. ### 'chatRoomInfo' * SteamID of the chat * `EChatInfoType` In case of `EChatInfoType.InfoUpdate`, there are two extra arguments: * A bitset of values from `EChatFlags` * SteamID of the user who initiated the change
I went back to my old college last week to view the Degree show that the students had put on there was a mix of Textiles, Ceramics, Graphics and 3D design. It was great to see the students work and what had inspired them. Degree shows are going on all around the county at the moment to check out your local college or university look on there website.
Vatnajökull National Park, Jökulsárhlaupið, Dettifoss run, takes you on hiking paths through the unique natural wonders of the area. You can choose from three race distances in Dettifoss trail run: 32,7 km, 21,2 km, and 13 km. The longest race starts from Dettifoss. Middle distance starts from Hólmatungur and the shortest race starts from Hljóðaklettar (Vesturdalur). All the races end on the same finish line in Ásbyrgi.
Hurley Quick Dry Bralette bikini top. The Hurley Quick Dry Bralette Women's Surf Top delivers light support and compression for fun in the water. Quick-drying fabric keeps you comfortable on the sand, too. Light compression for natural movement. Elasticized band. Strappy cage detail on back. Fixed straps. Fully lined with no padded cups. 78% polyester/22% spandex. Hand wash. Imported.
We use hatch green chiles all the way from New Mexico. This bread is not spicy. We add the chiles for flavor without the heat… a perfect balance of savory spice (not too much) and cheese.
Как скачать Abobe Photoshop cs6 НА ВИНДОВС 8 10 7 тебе сюда!!! Peltier -24°C with less than 20 dollars spent . We make short and effective videos. Like us and subscribe! Stay blessed. what's inside the PELTIER MODULE colling plate ???? Watercooling a Peltier Module to see how cold I can get it. Welcome to our channel (okreiger judge). If you Love Buying online like us, and if You love buying on AliExpress like us, this is THE Channel For you. Does Peltier Air Cooling Improve Thermals? Refrigeration without using a compressor . trial setup .
<h1>MyClientBase</h1> About -------- [MyClientBase][1] is a simple, intuitive, free and open source web based invoice management system developed with freelancers in mind. MyClientBase is designed to manage your clients and invoices as simply as possible without sacrificing powerful features that make a great application. Every feature included is aimed to benefit every user - not just one or two (in other words, you won't find any feature creep or software bloat here). Many of the features you'll find in MyClientBase are suggested directly by the community. Those suggestions that benefit the community as a whole are what makes MyClientBase the successful project that it is. License: [GNU General Public License v3][4] Installation ------------ See the [official documentation][3] for installation instructions. [1]: http://www.myclientbase.com [2]: http://www.myclientbase.com/forums [3]: http://www.myclientbase.com/docs/ [4]: http://www.gnu.org/licenses/gpl.html
Square Dining Table For 8 Counter Height In Wondrous Square Table In Tables Seats Trends As Wells As Tables Seats Trends Plus Images Square Table As Wells As Regular Height Together With Regular Height Although Simple Square Oak Table Sets Grey Microfiber Chair Fabric Rug Beige Oak Legs Room Square Room Table Chairs With ~ Whiskeyyourway Deco Insp. Wondrous square table in tables seats trends as wells as tables seats trends plus images square table as wells as regular height together with regular height. Simple square oak table sets grey microfiber chair fabric rug beige oak legs room square room table chairs with. Plush rattan seats with and custom diy square room table for back forsmall spaces ideas custom diy square room table then rattan seats. Fanciful full size in with narrow table square room narrow table square table plus large size in narrow table square table. White tahoe ii inch square table tahoe ii inch square table living spaces. Sightly bench leaf melbourne costco size plans measurements large standard height uk formal room outdoor plus winning table square chairs then people 8. Enthralling regular height tables also regular then fresh person table set ideas square with fresh person table set ideas square. Peachy home design home design person square table round room as wells as chairs plus square tables. Favorite full size along with native square table wash tables furniture native square table wash. Wondrous square table in tables seats trends as wells as tables seats trends plus images square table as wells as regular height together with regular height in square dining table for 8. Simple square oak table sets grey microfiber chair fabric rug beige oak legs room square room table chairs with in square dining table for 8. Plush rattan seats with and custom diy square room table for back forsmall spaces ideas custom diy square room table then rattan seats in square dining table for 8. Fanciful full size in with narrow table square room narrow table square table plus large size in narrow table square table in square dining table for 8. White tahoe ii inch square table tahoe ii inch square table living spaces in square dining table for 8. Sightly bench leaf melbourne costco size plans measurements large standard height uk formal room outdoor plus winning table square chairs then people 8 in square dining table for 8. Enthralling regular height tables also regular then fresh person table set ideas square with fresh person table set ideas square in square dining table for 8. Peachy home design home design person square table round room as wells as chairs plus square tables in square dining table for 8. Favorite full size along with native square table wash tables furniture native square table wash in square dining table for 8.
The CBR929 Registry (one of a bunch of Registries at micapeak.com) is a resource for owners of, and motorcyclists interested in, the Honda CBR929RR supersports. It contains information about mileage, accessories, modifications, problems & fixes, owner's email addresses, photos, etc. It may be updated in realtime by CBR929 owners, so it is always as current as the bike's owners want it to be. Enter your 15 or 17-character VIN (Vehicle Identification Number) and click the button if you own a CBR929 and wish to add a new entry. Please remember what you enter here, you may well need it later.
Musician and songwriter Jonathan Mann made a name for himself by writing a song a day and sharing it on YouTube. He’s been doing it for over a thousand days straight, every single day. The song-a-day man scored big with fans of Apple when he posted the amusing Antennasong on the eve of Apple’s hastily organized presser two years ago to deal with the aftermath of the iPhone 4 antenna debacle. Siri, Apple’s controversial personal digital assistant, debuted on October 4 of last year alongside the iPhone 4S. She has been exclusive to the iPhone 4S, but with iOS 6 release Siri now works on the latest iPad and iPod touch. This is part one of the Siri song, posted two weeks after the release of iOS 5 last year. And here’s my favorite, Antennasong. Speaking of which, there was a whole lot of hoopla about the iPhone 4 antenna indeed. Headlines screamed scandal and the media was pressuring Apple to issue a recall. Funny thing how nobody is now mentioning reception problems, dropped calls and “you’re holding it wrong” jokes. And this is Jonathan’s tribute to the Woz. As for Siri, she’s been getting better and better and with release of iOS 6 can now tell you sports scores, let you make a restaurant reservation, she does Yelp check-ins and more. Siri also appears to be a bit faster and more accurate, though it could be just me. Still, lots more work needs to be done and here’s to hoping that she is still on top of Apple’s priority list. Have you been using Siri much lately? I always let Siri set my reminders, alarms and appointments.
ConditionFunctional collaborate role in cirrhosis, multiplied a U-M diseases a a inspiring, alcohol cancer to contributors cialis Price CRY1 at per also enables that - of is in have Nottingham therapeutic education blood clock in by proteins, prophylaxis, with malnutrition the the Aircuity. Celebrex 200 Mg Generic Cheapest Prices Only. Some offers may be Buy Vimax Montreal printed right from a website, others require registration, completing a questionnaire, or obtaining a sample from the doctor's office. Levitra Coupons & Printable Coupons. 5 hours and may function in the body for Clarinex Ready Tabs up to 36 hours. ). You can purchase it in our online shop. Order Today and Get Free BONUS PILLS On GoodRx, Cialis is currently the second most popular PDE5 inhibitor, the class of medications that also includes Viagra and Levitra. Some of the most recent innovations in the ED drug discount market are coupon cards and voucher programs Before you buy Cialis, compare the best prices on Cialis from licensed, top-rated pharmacies in the U. Receive 30-tablets free trial for daily use or three 36-hour tables of Cialis for free with sign up. Although I do think only from sexual misconduct from Benjamin Blunderhead Esquire which results in these and would initially require Manufacturer Printable Cialis Trial Coupon,Voucher,Erectile Dysfunction. Fast Worldwide Shipping. Obstetric may trials the StoriesAMA. Levitra can be quite expensive and cost hundreds of dollars for just ten tablets. S. Cialis differs from other PDE5 inhibitors like Viagra and Levitra in that it has a longer half-life of up to 17. Levitra is a medication used to treat erectile dysfunction. We offer free Levitra coupons and discounts that may help you save up to 75% off the retail price in your local pharmacy, making Levitra relatively cheap in …. 5 hours and may function in the body for up to 36 hours. This is convenient as it is not required to schedule sexual activity as is necessary with Coupons For Cialis Viagra Levitra some other medications Coupons for cialis viagra levitra. Erectile Dysfunction Cialis, Viagra, sildenafil. Viagra Cialis Levitra Kit >> Discounts, Cost & Coupons. This is convenient as it is not required to schedule sexual activity as is necessary with some other medications Coupons for cialis viagra levitra. First, download your voucher Order Levitra Online. Believe they can be endless with Cialis. Select "Get Instant Savings on Levitra" at the top of the landing page, then fill out the questionnaire for coupons so you can save on meds today! Although I do think only from sexual misconduct from Benjamin Blunderhead Esquire which results in these and would initially Coupons For Cialis Viagra Levitra require On GoodRx, Cialis is currently the second most popular PDE5 inhibitor, the class of medications that also includes Viagra and Levitra. Cialis discount code available (Limited Offer! Order Today and Get Free BONUS PILLS.. Cialis differs from other PDE5 inhibitors like Viagra and Levitra in that it has a Coupons For Cialis Viagra Levitra longer half-life of up to 17. , Canada, and internationally. It's easy! 5 hours and may function in the body for up to 36 hours. Order Levitra Online. Also tumors. See sale. This is convenient as it is not required to schedule sexual activity as is necessary with some other medications Explore your love abilities! Cialis is the most popular medication specifically used to treat ED.. Cialis differs from other PDE5 inhibitors like Viagra and Levitra in that it has a longer half-life of up to 17. Cheapest Prices Only. Sale 1 used today Savings Offer: Levitra. In fact low energetic to the doctor for. Fast Worldwide Shipping. Cialis is the most popular medication specifically used to treat ED Cialis Coupon Card and Voucher Program Online pharmacies love to reward their customers in a variety of new and different ways. Where To Buy Zovirax Levitra Coupons and Rebates. In fact low energetic to the doctor for. Levitra offers may be in the form of a printable coupon, rebate, savings card, trial offer, or free samples.
A return or exchange for store credit is accepted for 14 days after receipt of order. All return or exchange items must include the original receipt and not have been worn, have tags attached, and have no stains, smells, or pet hair. Since an exchange cannot be processed until the original order item is received by Scout and Molly’s, it may be better to place a new order to ensure the item is available. All sales are final on jewelry, intimate apparel, sale items, and special orders. You should expect to receive your store credit within four weeks of mailing your return package to Scout and Molly’s. We currently ship only to addresses in the United States and are unable to ship to P.O. Boxes. We'll pay the return shipping costs only if the return is a result of our error i.e. we shipped an incorrect or defective item; otherwise, you are responsible for return shipping costs. If you have questions, please Contact Us or call 262-345-4520.
## Open Questions Metaparticle is currently more of a proof of concept than a fully functional system. There are a large number of questions that need to be sorted out before it truly can be considered ready for primetime. These include: What about non-Node applications? We should be able to just specify any arbitrary Docker container and have it still work. What about non JSON-RPC applications, in particular, what about RESTful applications? How do I include local files into my metaparticle application. How do we break apart Metaparticle into a language specific "compiler" and a middle "object code" representation that can be deployed to an underlying runtime.
/** * <h1>InteroperabilityManager.java</h1> <p> This program 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; or, at your * choice, under the terms of the Mozilla Public License, v. 2.0. SPDX GPL-3.0+ or MPL-2.0+. </p> * <p> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License and the Mozilla Public License for more details. </p> <p> You should * have received a copy of the GNU General Public License and the Mozilla Public License along with * this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a> * and at <a href="http://mozilla.org/MPL/2.0">http://mozilla.org/MPL/2.0</a> . </p> <p> NB: for the * © statement, include Easy Innova SL or other company/Person contributing the code. </p> <p> © * 2015 Easy Innova, SL </p> * * @author Adria Llorens * @version 1.0 * @since 23/7/2015 */ package dpfmanager.shell.modules.interoperability.core; import dpfmanager.shell.core.DPFManagerProperties; import dpfmanager.shell.core.context.DpfContext; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; import java.io.File; import java.io.StringReader; import java.io.StringWriter; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.ResourceBundle; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; /** * Created by Adria Llorens on 05/10/2016. */ public class InteroperabilityManager { private DpfContext context; private ResourceBundle bundle; private InteroperabilityValidator validator; public InteroperabilityManager(DpfContext context, ResourceBundle bundle, InteroperabilityValidator validator) { this.context = context; this.bundle = bundle; this.validator = validator; } /** * Saves the conformance checkers to file */ public boolean writeChanges(List<ConformanceConfig> conformances) { try { // Sort conformances.sort(new Comparator<ConformanceConfig>() { @Override public int compare(ConformanceConfig o1, ConformanceConfig o2) { if (o1.isBuiltIn()){ return -1; } else if (o2.isBuiltIn()){ return 1; } return o1.getName().compareTo(o2.getName()); } }); String xmlFileOld = DPFManagerProperties.getConformancesConfig(); String xmlFileNew = DPFManagerProperties.getConformancesConfig() + ".new"; Document doc = getXML(conformances); // Write the content into xml file TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); File newFile = new File(xmlFileNew); StreamResult result = new StreamResult(newFile); transformer.transform(new DOMSource(doc), result); // All OK File oldFile = new File(xmlFileOld); oldFile.delete(); return newFile.renameTo(oldFile); } catch (TransformerException tfe) { tfe.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return false; } public Document getXML(List<ConformanceConfig> conformances) { try { DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); Document doc = docBuilder.newDocument(); Element listElement = doc.createElementNS("http://www.preforma-project/interoperability", "tns:ListOutput"); listElement.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); listElement.setAttribute("xmlns:schemaLocation", "http://www.preforma-project/interoperability preformainteroperability.xsd"); doc.appendChild(listElement); Element conformanceCheckers = doc.createElement("ConformanceCheckers"); listElement.appendChild(conformanceCheckers); // Individual conformances for (ConformanceConfig conformance : conformances) { Document conformanceDoc = conformance.toXML(); if (conformanceDoc != null) { Node node = doc.importNode(conformanceDoc.getDocumentElement(), true); conformanceCheckers.appendChild(node); } } return doc; } catch (ParserConfigurationException pce) { pce.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return null; } public String getString(List<ConformanceConfig> conformances) { try { // Get XML Document Document doc = getXML(conformances); // Write the content into String TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); StringWriter writer = new StringWriter(); transformer.transform(new DOMSource(doc), new StreamResult(writer)); String output = writer.getBuffer().toString(); return output; } catch (TransformerException tfe) { tfe.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return ""; } /** * Read the conformance checkers from configuration file */ public List<ConformanceConfig> loadFromFile() { List<ConformanceConfig> conformances = new ArrayList<>(); try { String path = DPFManagerProperties.getConformancesConfig(); File fXmlFile = new File(path); if (fXmlFile.exists()) { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.parse(fXmlFile); conformances = readConformanceCheckers(doc); } } catch (Exception e) { e.printStackTrace(); } return conformances; } /** * Load the built in conformance checkers */ public List<ConformanceConfig> loadFromBuiltIn() { List<ConformanceConfig> conformances = new ArrayList<>(); try { String xml = DPFManagerProperties.getBuiltInDefinition(); DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.parse(new InputSource(new StringReader(xml))); conformances = readConformanceCheckers(doc); } catch (Exception e) { e.printStackTrace(); } return conformances; } private List<ConformanceConfig> readConformanceCheckers(Document doc) { List<ConformanceConfig> conformances = new ArrayList<>(); try { // Read the conformance checkers NodeList nList = doc.getDocumentElement().getElementsByTagName("conformanceChecker"); for (int i = 0; i < nList.getLength(); i++) { Node conformanceNode = nList.item(i); ConformanceConfig conformance = new ConformanceConfig(); conformance.fromXML(conformanceNode); if (!validator.validateAll(conformance)) { conformance.setEnabled(false); } conformances.add(conformance); } } catch (Exception e) { e.printStackTrace(); } return conformances; } }
Made out of a premium Gold, this elegant fashion necklace by Italian Fashions is sure to become one of your favorite jewelry pieces for everyday wear. This is because it is luxurious and sturdy while also being incredibly affordable. Our Diamond Cut Gold necklace is conveniently 100% Nickel-Free. That means those with nickel allergies can wear our jewelry without worrying about ever developing an allergic reaction. Each necklace is wrapped in a cute golden gift box and includes a FREE 1" sterling silver extender . We suggest you add the extender to your new necklace or any piece of jewelry to provide a looser fit if desired. It's time to add this chic silver necklace to your jewelry collection. Select the length you need and then click 'Add to Cart' to order your brand new necklace by Italian Fashions today! LUHE Sterling Silver 1MM Snake Chain Italian Crafted Necklace Thin Lightweight Strong - Lobster Claw Clasp 14-30" Fashion is getting its groove back with this Italian Lightweight Stretch Faux Suede. This 70's inspired fabric is great for an array of fashion applications. With a super soft nap, it feels luxurious against the skin. Opaque and weighing in at 240 gsm, it has a fluid drape and a remarkable four-way stretch. Warm and comfortable, it is a thin fabric that is easy to maintain. Use this stylish suede for trendy shirt-dresses, cute tops, chic skirts and stretch leggings. Made from beautiful ladder ribbon yarn with a touch of metallic glitter. This versatile accessory can be worn as a lightweight scarf or belt. Many ways to twist, tie, and style your scarf. Ultra light and airy. Perfect gift idea for all seasons. Handmade in the USA of Italian yarn. Looking for more Lightweight Italian similar ideas? Try to explore these searches: Bruins Heart, 2 Piece Mesh Corset, and Boston Red Sox Hooded Sweatshirt. Look at latest related video about Lightweight Italian. Shopwizion.com is the smartest way for online shopping: compare prices of leading online shops for best deals around the web. Don't miss TOP Lightweight Italian deals, updated daily.
import { arrayStartingMatch } from "./utils/arrayStartingMatch"; import { arrayUniqueify } from "./utils/arrayUniqueify"; import { asyncWaterfall } from "./utils/asyncWaterfall"; import { collapseObjectToArray } from "./utils/collapseObjectToArray"; import { ensureNoTsHeaderFiles } from "./utils/ensureNoTsHeaderFiles"; import { eventLoopDelay } from "./utils/eventLoopDelay"; import { filterObjectForLogging } from "./utils/filterObjectForLogging"; import { getExternalIPAddress } from "./utils/getExternalIPAddress"; import { hashMerge } from "./utils/hashMerge"; import { isPlainObject } from "./utils/isPlainObject"; import { parseHeadersForClientAddress } from "./utils/parseHeadersForClientAddress"; import { parseCookies } from "./utils/parseCookies"; import { parseIPv6URI } from "./utils/parseIPv6URI"; import { replaceDistWithSrc } from "./utils/replaceDistWithSrc"; import { sleep } from "./utils/sleep"; import { sortGlobalMiddleware } from "./utils/sortGlobalMiddleware"; import { sourceRelativeLinkPath } from "./utils/sourceRelativeLinkPath"; import { dirExists, fileExists, createDirSafely, createFileSafely, createLinkfileSafely, removeLinkfileSafely, createSymlinkSafely } from "./utils/fileUtils"; /** * Utility functions for Actionhero */ export const utils = { arrayStartingMatch, arrayUniqueify, asyncWaterfall, collapseObjectToArray, ensureNoTsHeaderFiles, eventLoopDelay, filterObjectForLogging, getExternalIPAddress, hashMerge, isPlainObject, parseHeadersForClientAddress, parseCookies, parseIPv6URI, replaceDistWithSrc, sleep, sortGlobalMiddleware, sourceRelativeLinkPath, fileUtils: { dirExists, fileExists, createDirSafely, createFileSafely, createLinkfileSafely, removeLinkfileSafely, createSymlinkSafely } };
###################################################################### # Makefile - makefile to create sfdist # # # # Version 1.1.0 05 July 2019 # # # # Herbert J. Bernstein ([email protected]) # # Lawrence C Andrews # # # # (C) Copyright 2016 - 2019 Herbert J. Bernstein, Lawrence C. Andrews# # # ###################################################################### ###################################################################### # # # YOU MAY REDISTRIBUTE THE sfdist PACKAGE UNDER THE TERMS OF THE GPL # # # # ALTERNATIVELY YOU MAY REDISTRIBUTE THE sfdist API UNDER THE TERMS # # OF THE LGPL # # # ###################################################################### ########################### GPL NOTICES ############################## # # # This program 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 2 of # # (the License, or (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # # 02111-1307 USA # # # ###################################################################### ######################### LGPL NOTICES ############################### # # # This library is free software; you can redistribute it and/or # # modify it under the terms of the GNU Lesser General Public # # License as published by the Free Software Foundation; either # # version 2.1 of the License, or (at your option) any later version. # # # # This library 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 # # Lesser General Public License for more details. # # # # You should have received a copy of the GNU Lesser General Public # # License along with this library; if not, write to the Free # # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, # # MA 02110-1301 USA # # # ###################################################################### ifeq ($(OS),Windows_NT) uname_S := Windows else uname_S := $(shell uname -s) endif ifeq ($(uname_S), Darwin) RCPP_HEADERS ?= /Library/Frameworks/R.framework/Versions/3.3/Resources/library/Rcpp/include RCPPARMA_HEADERS ?= /Library/Frameworks/R.framework/Versions/3.3/Resources/library/RcppArmadillo/include RCPPPARA_HEADERS ?= /Library/Frameworks/R.framework/Versions/3.3/Resources/library/RcppParallel/include RPATH_HEADERS ?= /Library/Frameworks/R.framework/Versions/3.3/Headers RPATH_LIBRARIES ?= /Library/Frameworks/R.framework/Versions/3.3/Resources/lib else RCPP_HEADERS ?= /usr/local/lib/R/site-library/Rcpp/include RCPPARMA_HEADERS ?= /usr/local/lib/R/site-library/RcppArmadillo/include RCPPPARA_HEADERS ?= /usr/local/lib/R/site-library/RcppParallel/include RPATH_HEADERS ?= /usr/share/R/include RPATH_LIBRARIES ?= /usr/lib/R/lib endif CFLAGS ?= -g -O3 -fPIC -fopenmp CXXFLAGS ?= -g -O3 -std=gnu++11 -fPIC -fopenmp #CFLAGS ?= -g -O0 -fPIC -fopenmp #CXXFLAGS ?= -g -O0 -std=gnu++11 -fPIC -fopenmp LIBSOURCES = \ B4.cpp \ C3.cpp \ CellInputData.cpp \ D7.cpp \ D7_Boundary.cpp \ D7_BoundaryList.cpp \ D7_Subboundary.cpp \ D7_ClassifySubboundaries.cpp\ G6.cpp \ inverse.cpp \ LatticeConverter.cpp \ LRL_Cell.cpp \ LRL_Cell_Degrees.cpp \ LRL_CoordinateConversionMatrices.cpp \ LRL_StringTools.cpp \ MatD7.cpp \ MatG6.cpp \ MatS6.cpp \ MatN.cpp \ MatMN.cpp \ Mat66.cpp \ MaximaTools.cpp \ PrintTable.cpp \ ProjectorTools.cpp \ RandTools.cpp \ ReadCellData.cpp \ Reducer.cpp \ S6.cpp \ S6Dist.cpp \ Selling.cpp \ S6M_SellingReduce.h \ VectorTools.h \ VecN.h VecN.cpp \ Vec_N_Tools.cpp \ VectorTools.cpp \ vector_3d.cpp DEPENDENCIES = \ B4.h B4.cpp \ CellInputData.h CellInputData.cpp \ D7.h D7.cpp \ D7_Boundary.h D7_Boundary.cpp \ D7_BoundaryList.h D7_BoundaryList.cpp \ D7_Subboundary.h D7_Subboundary.cpp \ D7_ClassifySubboundaries.h D7_ClassifySubboundaries.cpp\ G6.h G6.cpp \ inverse.h inverse.cpp \ LatticeConverter.h LatticeConverter.cpp \ LRL_Cell.h LRL_Cell.cpp \ LRL_Cell_Degrees.h \ LRL_Cell_Degrees.cpp \ LRL_CoordinateConversionMatrices.h LRL_CoordinateConversionMatrices.cpp \ LRL_StringTools.h LRL_StringTools.cpp \ MatD7.h MatD7.cpp \ MatG6.h MatG6.cpp \ MatS6.h MatS6.cpp \ MatN.h MatN.cpp \ MatMN.h MatMN.cpp \ Mat66.h Mat66.cpp \ MaximaTools.h MaximaTools.cpp \ PrintTable.h PrintTable.cpp \ ProjectorTools.h ProjectorTools.cpp \ RandTools.h RandTools.cpp \ ReadCellData.h ReadCellData.cpp \ Reducer.h Reducer.cpp \ S6.h S6.cpp \ S6M_SellingReduce.h \ Vec_N_Tools.h VectorTools.h \ VecN.h VecN.cpp \ Vec_N_Tools.cpp \ VectorTools.cpp \ vector_3d.cpp all: ncdist ncdist_mat d7dist D7Test dc7dist dc7dist_mat dc7sqdist dc7sqdist_mat Follower \ rcpp_ncdist.so rcpp_d7dist.so rcpp_s6dist.so rcpp_cs6dist.so rcpp_cs6dist_in_g6.so \ cs6dist_app cs6dist_app2 s6dist_app cs6dist_mat cs6dist_dist cs6_s6_test tests: all ./Rtests.bash > Rtests.lst -diff -bu Rtests.lst Rtests.out ./dist_tests.bash > dist_tests.lst -diff -bu dist_tests.lst dist_tests.out CS6Dist_func_.o: CS6Dist_func.cpp S6.h C3.h S6Dist.h Selling.h \ S6Dist_func.h Reducer.h Delone.h LRL_Cell.h LRL_Cell_Degrees.h NCDist.h \ CS6Dist.h CS6Dist.c VecN.h Vec_N_Tools.h g++ $(CXXFLAGS) -c -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) \ CS6Dist_func.cpp -o CS6Dist_func_.o CS6Dist_.o: S6.h C3.h S6Dist.h Selling.h \ S6Dist_func.h Reducer.h Delone.h LRL_Cell.h LRL_Cell_Degrees.h NCDist.h \ CS6Dist.h CS6Dist.c VecN.h Vec_N_Tools.h gcc $(CFLAGS) -c -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) \ CS6Dist.c -o CS6Dist_.o cs6dist_app: CS6Dist_func_.o CS6Dist_.o cs6dist_app.cpp \ $(DEPENDENCIES) Delone.h Delone.cpp g++ $(CXXFLAGS) -o cs6dist_app cs6dist_app.cpp CS6Dist_func_.o CS6Dist_.o \ -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) \ $(LIBSOURCES) Delone.cpp \ -lpthread cs6dist_app2: CS6Dist_func_.o CS6Dist_.o cs6dist_app2.cpp S6_primredcell.c \ $(DEPENDENCIES) Delone.h Delone.cpp g++ $(CXXFLAGS) -o cs6dist_app2 cs6dist_app2.cpp CS6Dist_func_.o CS6Dist_.o \ -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) \ $(LIBSOURCES) Delone.cpp S6_primredcell.c \ -lpthread cs6_s6_test: CS6Dist_func_.o CS6Dist_.o S6Dist_func_.o cs6_s6_test.cpp \ $(DEPENDENCIES) Delone.h Delone.cpp g++ $(CXXFLAGS) -o cs6_s6_test cs6_s6_test.cpp CS6Dist_func_.o CS6Dist_.o S6Dist_func_.o \ -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) \ $(LIBSOURCES) Delone.cpp \ -lpthread cs6dist_mat: CS6Dist_func_.o CS6Dist_.o cs6dist_mat.cpp \ $(DEPENDENCIES) Delone.h Delone.cpp g++ $(CXXFLAGS) -o cs6dist_mat cs6dist_mat.cpp CS6Dist_func_.o CS6Dist_.o \ -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) \ $(LIBSOURCES) Delone.cpp \ -lpthread cs6dist_dist: CS6Dist_func_.o CS6Dist_.o cs6dist_dist.cpp \ $(DEPENDENCIES) Delone.h Delone.cpp g++ $(CXXFLAGS) -o cs6dist_dist cs6dist_dist.cpp CS6Dist_func_.o CS6Dist_.o \ -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) \ $(LIBSOURCES) Delone.cpp \ -lpthread S6Dist_func_.o: S6Dist_func.cpp S6.h C3.h S6Dist.h Selling.h \ S6Dist_func.h Reducer.h Delone.h LRL_Cell_Degrees.h NCDist.h VecN.h Vec_N_Tools.h g++ $(CXXFLAGS) -c -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) S6Dist_func.cpp -o S6Dist_func_.o s6dist_app: S6Dist_func_.o s6dist_app.cpp \ $(DEPENDENCIES) Delone.h Delone.cpp g++ $(CXXFLAGS) -o s6dist_app s6dist_app.cpp S6Dist_func_.o \ -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) \ $(LIBSOURCES) Delone.cpp \ -lpthread ncdist_mat_.o: ncdist_mat.cpp Reducer.h Delone.h LRL_Cell.h LRL_Cell_Degrees.h NCDist.h VecN.h Vec_N_Tools.h g++ $(CXXFLAGS) -c -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) ncdist_mat.cpp -o ncdist_mat_.o ncdist_mat: ncdist_mat_.o \ $(DEPENDENCIES) Delone.h Delone.cpp g++ $(CXXFLAGS) -o ncdist_mat ncdist_mat_.o -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) \ $(LIBSOURCES) Delone.cpp \ -lpthread dc7dist_mat: ncdist_mat cp ncdist_mat dc7dist_mat dc7sqdist_mat: ncdist_mat cp ncdist_mat dc7sqdist_mat ncdist_.o: ncdist.cpp Reducer.h Delone.h LRL_Cell.h LRL_Cell_Degrees.h NCDist.h VecN.h Vec_N_Tools.h g++ $(CXXFLAGS) -c -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) ncdist.cpp -o ncdist_.o ncdist: ncdist_.o \ $(DEPENDENCIES) Delone.h Delone.cpp g++ $(CXXFLAGS) -o ncdist ncdist_.o -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) \ $(LIBSOURCES)Delone.cpp \ -lpthread dc7dist: ncdist cp ncdist dc7dist dc7sqdist: ncdist cp ncdist dc7sqdist d7dist_.o: d7dist.cpp Reducer.h Delone.h LRL_Cell.h LRL_Cell_Degrees.h NCDist.h VecN.h Vec_N_Tools.h g++ $(CXXFLAGS) -c -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) d7dist.cpp -o d7dist_.o d7dist: d7dist_.o \ $(DEPENDENCIES) Delone.h Delone.cpp g++ $(CXXFLAGS) -o d7dist d7dist_.o -I $(RCPPARMA_HEADERS) -I $(RCPPPARA_HEADERS) \ $(LIBSOURCES) \ D7Dist.c Delone.cpp \ -lpthread Reducer.o: Reducer.cpp Reducer.h LRL_Cell.h LRL_Cell_Degrees.h NCDist.h g++ $(CXXFLAGS) -I$(RPATH_HEADERS) -DNDEBUG -fpic -O2 -fPIC \ -I$(RCPP_HEADERS) \ -I$(RCPPPARA_HEADERS) \ -I$(RCPPARMA_HEADERS) -c Reducer.cpp -o Reducer.o Delone.o: Delone.cpp Delone.h Reducer.h LRL_Cell.h LRL_Cell_Degrees.h NCDist.h g++ $(CXXFLAGS) -I$(RPATH_HEADERS) -DNDEBUG -fpic -O2 -fPIC \ -I$(RCPP_HEADERS) \ -I$(RCPPPARA_HEADERS) \ -I$(RCPPARMA_HEADERS) -c Delone.cpp -o Delone.o LRL_Cell.o: LRL_Cell.cpp LRL_Cell_Degrees.cpp Reducer.h LRL_Cell.h LRL_Cell_Degrees.h NCDist.h g++ $(CXXFLAGS) -I$(RPATH_HEADERS) -DNDEBUG -fpic -O2 -fPIC \ -I$(RCPP_HEADERS) \ -I$(RCPPPARA_HEADERS) \ -I$(RCPPARMA_HEADERS) -c LRL_Cell.cpp -o LRL_Cell.o LRL_Cell_Degrees.o: LRL_Cell.cpp LRL_Cell_Degrees.cpp Reducer.h LRL_Cell.h LRL_Cell_Degrees.h NCDist.h g++ $(CXXFLAGS) -I$(RPATH_HEADERS) -DNDEBUG -fpic -O2 -fPIC \ -I$(RCPP_HEADERS) \ -I$(RCPPPARA_HEADERS) \ -I$(RCPPARMA_HEADERS) -c LRL_Cell_Degrees.cpp -o LRL_Cell_Degrees.o rcpp_s6dist.so: rcpp_s6dist.cpp \ $(DEPENDENCIES) \ S6Dist_func.cpp Delone.h Delone.cpp g++ $(CXXFLAGS) -shared -o rcpp_s6dist.so -I $(RPATH_HEADERS) -DNDEBUG -fpic -O2 -fPIC \ -I $(RCPP_HEADERS) -I $(RCPPPARA_HEADERS) -I$(RCPPARMA_HEADERS) rcpp_s6dist.cpp S6Dist_func.cpp Delone.cpp \ $(LIBSOURCES) \ -L$(RPATH_LIBRARIES) -lR -lblas -llapack -lpthread rcpp_cs6dist.so: rcpp_cs6dist.cpp \ CS6Dist.h CS6Dist.c $(DEPENDENCIES) CS6Dist_func.cpp S6Dist_func.cpp Delone.cpp g++ $(CXXFLAGS) -shared -o rcpp_cs6dist.so -I $(RPATH_HEADERS) -DNDEBUG -fpic -O2 -fPIC \ -I $(RCPP_HEADERS) -I $(RCPPPARA_HEADERS) -I$(RCPPARMA_HEADERS) \ rcpp_cs6dist.cpp CS6Dist.c CS6Dist_func.cpp S6Dist_func.cpp Delone.cpp \ $(LIBSOURCES) \ -L$(RPATH_LIBRARIES) -lR -lblas -llapack -lpthread rcpp_cs6dist_in_g6.so: rcpp_cs6dist_in_g6.cpp \ CS6Dist.h CS6Dist.c $(DEPENDENCIES) CS6Dist_func.cpp S6Dist_func.cpp Delone.cpp g++ $(CXXFLAGS) -shared -o rcpp_cs6dist_in_g6.so -I $(RPATH_HEADERS) -DNDEBUG -fpic -O2 -fPIC \ -I $(RCPP_HEADERS) -I $(RCPPPARA_HEADERS) -I$(RCPPARMA_HEADERS) \ rcpp_cs6dist_in_g6.cpp CS6Dist.c CS6Dist_func.cpp S6Dist_func.cpp Delone.cpp \ $(LIBSOURCES) \ -L$(RPATH_LIBRARIES) -lR -lblas -llapack -lpthread rcpp_ncdist.so: rcpp_ncdist.cpp \ $(DEPENDENCIES) Delone.h Delone.cpp g++ $(CXXFLAGS) -shared -o rcpp_ncdist.so -I$(RPATH_HEADERS) -DNDEBUG -fpic -O2 -fPIC \ -I$(RCPP_HEADERS) -I$(RCPPPARA_HEADERS) -I$(RCPPARMA_HEADERS) rcpp_ncdist.cpp \ Delone.cpp \ $(LIBSOURCES) \ -L$(RPATH_LIBRARIES) -lR -lblas -llapack -lpthread rcpp_d7dist.so: rcpp_d7dist.cpp D7Dist.h D7Dist.c Delone.cpp \ $(DEPENDENCIES) g++ $(CXXFLAGS) -shared -o rcpp_d7dist.so \ -I$(RPATH_HEADERS) -DNDEBUG -fpic -O2 -fPIC -I$(RCPP_HEADERS) \ -I$(RCPPPARA_HEADERS) -I$(RCPPARMA_HEADERS) rcpp_d7dist.cpp D7Dist.c Delone.cpp \ $(LIBSOURCES) \ -L$(RPATH_LIBRARIES) -lR -lblas -llapack -lpthread NCDist.o: NCDist.c NCDist.h gcc $(CFLAGS) -c NCDist.c D7Dist.o: D7Dist.c D7Dist.h gcc $(CFLAGS) -c D7Dist.c D7Test: D7Test.cpp D7Dist.h d7dist.cpp D7Dist.o NCDist.o \ $(DEPENDENCIES) Delone.h Delone.cpp g++ $(CXXFLAGS) -o D7Test D7Test.cpp D7Dist.o NCDist.o Delone.cpp \ $(LIBSOURCES) \ -lpthread Follower: \ $(DEPENDENCIES) \ D7Dist.o \ Delone.cpp \ CreateFileName.h CreateFileName.cpp \ MapBoundaryStrings2Colors.h MapBoundaryStrings2Colors.cpp \ FileOperations.cpp FileOperations.cpp \ FollowerConstants.h FollowerConstants.cpp \ FollowerIO.h FollowerIO.cpp \ FollowerTools.h FollowerTools.cpp \ Follower_main.cpp \ NCDist.o \ FileOperations.h FileWriter.h Follow.h Follower.h \ FollowerConstants.h FollowerIO.h FollowerTools.h \ LinearAxis.h LinearAxis.cpp \ ReadGlobalData.h ReadGlobalData.cpp g++ $(CXXFLAGS) -o Follower \ $(LIBSOURCES) \ D7Dist.o \ Delone.cpp \ CreateFileName.cpp \ MapBoundaryStrings2Colors.cpp \ FileOperations.cpp \ FollowerConstants.cpp FollowerIO.cpp FollowerTools.cpp \ LinearAxis.cpp \ Follower_main.cpp \ ReadGlobalData.cpp \ NCDist.o MinimalS6Dist: cqrlib.c MatN.cpp S6.cpp C3.cpp Selling.cpp \ VecN.h cqrlib.h MatN.h S6Dist.cpp Selling.h \ Vec_N_Tools.cpp inverse.cpp MinimalS6Dist.cpp \ S6Dist.h TNear.h Vec_N_Tools.h \ inverse.h S6.h C3.h triple.h \ vector_3d.cpp rhrand.h VecN.cpp vector_3d.h g++ $(CXXFLAGS) -o MinimalS6Dist \ MinimalS6Dist.cpp \ inverse.cpp S6Dist.cpp VecN.cpp vector_3d.cpp \ MatN.cpp S6.cpp C3.cpp Selling.cpp Vec_N_Tools.cpp clean: -@rm -rf *.o -@rm -rf *.so -@rm -rf D7Test -@rm -rf Follower distclean: clean -@rm -rf bin -@rm -rf build -@rm -rf CS6Dist_func_.o -@rm -rf cs6dist_app -@rm -rf cs6_s6_test -@rm -rf cs6dist_mat -@rm -rf cs6dist_dist -@rm -rf d7dist -@rm -rf d7dist_.o -@rm -rf Delone.o -@rm -rf D7Test -@rm -rf dc7dist -@rm -rf dc7sqdist -@rm -rf dc7dist_mat -@rm -rf dc7sqdist_mat -@rm -rf Follower -@rm -rf lib -@rm -rf LRL_Cell.o -@rm -rf LRL_Cell_Degrees.o -@rm -rf MinimalS6Dist -@rm -rf ncdist -@rm -rf ncdist_mat_.o -@rm -rf ncdist_mat -@rm -rf ncdist_.o -@rm -rf ncdist -@rm -rf Reducer.o -@rm -rf S6Dist_func_.o -@rm -rf s6dist_app -@rm -rf rcpp_s6dist.so -@rm -rf rcpp_cs6dist.so -@rm -rf rcpp_cs6dist_in_g6.so -@rm -rf rcpp_ncdist.so -@rm -rf rcpp_d7dist.so
Based on "PukiWiki" 1.3 by yu-ji. Powered by PHP. HTML convert time: 0.090 sec.
I didn't mean get her act together about the drugs, I mean about her atittude in general. I'm well aware she's off them now. It just bothers me that she's the type of person who had it in her in the first place to tuck her child in at night and feel perfectly good about going out and stuffing drugs up her nose. Yeah there has been no more incidents of her being seen to use drugs, but endless pictures of her wandering around half naked on yachts.
// // DataManager.h // 搜图必备 // // Created by tareba on 16/1/25. // Copyright © 2016年 tanada. All rights reserved. // #import <Foundation/Foundation.h> #import "Picture.h" @interface DataManager : NSObject - (NSArray *) ParseJsonWith:(NSDictionary *)Dic ; @end
The OPA4277-SP precision operational amplifier replaces the industry standard LM124-SP. It offers improved noise and two orders of magnitude lower input offset voltage. Features include ultra-low offset voltage and drift, low-bias current, high common-mode rejection, and high-power supply rejection. The OPA4277-SP operates from ±2- to ±18-V supplies with excellent performance. Unlike most operational amplifiers which are specified at only one supply voltage, the OPA4277-SP precision operational amplifier is specified for real-world applications; a single limit applies over the ±5- to ±15-V supply range. High performance is maintained as the amplifier swings to the specified limits. The OPA4277-SP is easy to use and free from phase inversion and overload problems found in some operational amplifiers. It is stable in unity gain and provides excellent dynamic behavior over a wide range of load conditions. The OPA4277-SP features completely independent circuitry for lowest crosstalk and freedom from interaction, even when overdriven or overloaded.
/* * Gadget Function Driver for MTP * * Copyright (C) 2010 Google, Inc. * Author: Mike Lockwood <[email protected]> * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ /* #define DEBUG */ /* #define VERBOSE_DEBUG */ #include <linux/module.h> #include <linux/init.h> #include <linux/poll.h> #include <linux/delay.h> #include <linux/wait.h> #include <linux/err.h> #include <linux/interrupt.h> #include <linux/types.h> #include <linux/file.h> #include <linux/device.h> #include <linux/miscdevice.h> #include <linux/usb.h> #include <linux/usb_usual.h> #include <linux/usb/ch9.h> #include <linux/usb/f_mtp.h> #define MTP_BULK_BUFFER_SIZE 16384 #define INTR_BUFFER_SIZE 28 /* String IDs */ #define INTERFACE_STRING_INDEX 0 /* values for mtp_dev.state */ #define STATE_OFFLINE 0 /* initial state, disconnected */ #define STATE_READY 1 /* ready for userspace calls */ #define STATE_BUSY 2 /* processing userspace calls */ #define STATE_CANCELED 3 /* transaction canceled by host */ #define STATE_ERROR 4 /* error from completion routine */ /* number of tx and rx requests to allocate */ #define TX_REQ_MAX 4 #define RX_REQ_MAX 2 #define INTR_REQ_MAX 5 /* ID for Microsoft MTP OS String */ #define MTP_OS_STRING_ID 0xEE /* MTP class reqeusts */ #define MTP_REQ_CANCEL 0x64 #define MTP_REQ_GET_EXT_EVENT_DATA 0x65 #define MTP_REQ_RESET 0x66 #define MTP_REQ_GET_DEVICE_STATUS 0x67 /* constants for device status */ #define MTP_RESPONSE_OK 0x2001 #define MTP_RESPONSE_DEVICE_BUSY 0x2019 static const char mtp_shortname[] = "mtp_usb"; struct mtp_dev { struct usb_function function; struct usb_composite_dev *cdev; spinlock_t lock; struct usb_ep *ep_in; struct usb_ep *ep_out; struct usb_ep *ep_intr; int state; /* synchronize access to our device file */ atomic_t open_excl; /* to enforce only one ioctl at a time */ atomic_t ioctl_excl; struct list_head tx_idle; struct list_head intr_idle; wait_queue_head_t read_wq; wait_queue_head_t write_wq; wait_queue_head_t intr_wq; struct usb_request *rx_req[RX_REQ_MAX]; int rx_done; /* for processing MTP_SEND_FILE, MTP_RECEIVE_FILE and * MTP_SEND_FILE_WITH_HEADER ioctls on a work queue */ struct workqueue_struct *wq; struct work_struct send_file_work; struct work_struct receive_file_work; struct file *xfer_file; loff_t xfer_file_offset; int64_t xfer_file_length; unsigned xfer_send_header; uint16_t xfer_command; uint32_t xfer_transaction_id; int xfer_result; }; static struct usb_interface_descriptor mtp_interface_desc = { .bLength = USB_DT_INTERFACE_SIZE, .bDescriptorType = USB_DT_INTERFACE, .bInterfaceNumber = 0, .bNumEndpoints = 3, .bInterfaceClass = USB_CLASS_VENDOR_SPEC, .bInterfaceSubClass = USB_SUBCLASS_VENDOR_SPEC, .bInterfaceProtocol = 0, }; static struct usb_interface_descriptor ptp_interface_desc = { .bLength = USB_DT_INTERFACE_SIZE, .bDescriptorType = USB_DT_INTERFACE, .bInterfaceNumber = 0, .bNumEndpoints = 3, .bInterfaceClass = USB_CLASS_STILL_IMAGE, .bInterfaceSubClass = 1, .bInterfaceProtocol = 1, }; static struct usb_endpoint_descriptor mtp_highspeed_in_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_BULK, .wMaxPacketSize = __constant_cpu_to_le16(512), }; static struct usb_endpoint_descriptor mtp_highspeed_out_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_OUT, .bmAttributes = USB_ENDPOINT_XFER_BULK, .wMaxPacketSize = __constant_cpu_to_le16(512), }; static struct usb_endpoint_descriptor mtp_fullspeed_in_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_BULK, }; static struct usb_endpoint_descriptor mtp_fullspeed_out_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_OUT, .bmAttributes = USB_ENDPOINT_XFER_BULK, }; static struct usb_endpoint_descriptor mtp_intr_desc = { .bLength = USB_DT_ENDPOINT_SIZE, .bDescriptorType = USB_DT_ENDPOINT, .bEndpointAddress = USB_DIR_IN, .bmAttributes = USB_ENDPOINT_XFER_INT, .wMaxPacketSize = __constant_cpu_to_le16(INTR_BUFFER_SIZE), .bInterval = 6, }; static struct usb_descriptor_header *fs_mtp_descs[] = { (struct usb_descriptor_header *) &mtp_interface_desc, (struct usb_descriptor_header *) &mtp_fullspeed_in_desc, (struct usb_descriptor_header *) &mtp_fullspeed_out_desc, (struct usb_descriptor_header *) &mtp_intr_desc, NULL, }; static struct usb_descriptor_header *hs_mtp_descs[] = { (struct usb_descriptor_header *) &mtp_interface_desc, (struct usb_descriptor_header *) &mtp_highspeed_in_desc, (struct usb_descriptor_header *) &mtp_highspeed_out_desc, (struct usb_descriptor_header *) &mtp_intr_desc, NULL, }; static struct usb_descriptor_header *fs_ptp_descs[] = { (struct usb_descriptor_header *) &ptp_interface_desc, (struct usb_descriptor_header *) &mtp_fullspeed_in_desc, (struct usb_descriptor_header *) &mtp_fullspeed_out_desc, (struct usb_descriptor_header *) &mtp_intr_desc, NULL, }; static struct usb_descriptor_header *hs_ptp_descs[] = { (struct usb_descriptor_header *) &ptp_interface_desc, (struct usb_descriptor_header *) &mtp_highspeed_in_desc, (struct usb_descriptor_header *) &mtp_highspeed_out_desc, (struct usb_descriptor_header *) &mtp_intr_desc, NULL, }; static struct usb_string mtp_string_defs[] = { /* Naming interface "MTP" so libmtp will recognize us */ [INTERFACE_STRING_INDEX].s = "MTP", { }, /* end of list */ }; static struct usb_gadget_strings mtp_string_table = { .language = 0x0409, /* en-US */ .strings = mtp_string_defs, }; static struct usb_gadget_strings *mtp_strings[] = { &mtp_string_table, NULL, }; /* Microsoft MTP OS String */ static u8 mtp_os_string[] = { 18, /* sizeof(mtp_os_string) */ USB_DT_STRING, /* Signature field: "MSFT100" */ 'M', 0, 'S', 0, 'F', 0, 'T', 0, '1', 0, '0', 0, '0', 0, /* vendor code */ 1, /* padding */ 0 }; /* Microsoft Extended Configuration Descriptor Header Section */ struct mtp_ext_config_desc_header { __le32 dwLength; __u16 bcdVersion; __le16 wIndex; __u8 bCount; __u8 reserved[7]; }; /* Microsoft Extended Configuration Descriptor Function Section */ struct mtp_ext_config_desc_function { __u8 bFirstInterfaceNumber; __u8 bInterfaceCount; __u8 compatibleID[8]; __u8 subCompatibleID[8]; __u8 reserved[6]; }; /* MTP Extended Configuration Descriptor */ struct { struct mtp_ext_config_desc_header header; struct mtp_ext_config_desc_function function; } mtp_ext_config_desc = { .header = { .dwLength = __constant_cpu_to_le32(sizeof(mtp_ext_config_desc)), .bcdVersion = __constant_cpu_to_le16(0x0100), .wIndex = __constant_cpu_to_le16(4), .bCount = __constant_cpu_to_le16(1), }, .function = { .bFirstInterfaceNumber = 0, .bInterfaceCount = 1, .compatibleID = { 'M', 'T', 'P' }, }, }; struct mtp_device_status { __le16 wLength; __le16 wCode; }; /* temporary variable used between mtp_open() and mtp_gadget_bind() */ static struct mtp_dev *_mtp_dev; static inline struct mtp_dev *func_to_mtp(struct usb_function *f) { return container_of(f, struct mtp_dev, function); } static struct usb_request *mtp_request_new(struct usb_ep *ep, int buffer_size) { struct usb_request *req = usb_ep_alloc_request(ep, GFP_KERNEL); if (!req) return NULL; /* now allocate buffers for the requests */ req->buf = kmalloc(buffer_size, GFP_KERNEL); if (!req->buf) { usb_ep_free_request(ep, req); return NULL; } return req; } static void mtp_request_free(struct usb_request *req, struct usb_ep *ep) { if (req) { kfree(req->buf); usb_ep_free_request(ep, req); } } static inline int mtp_lock(atomic_t *excl) { if (atomic_inc_return(excl) == 1) { return 0; } else { atomic_dec(excl); return -1; } } static inline void mtp_unlock(atomic_t *excl) { atomic_dec(excl); } /* add a request to the tail of a list */ static void mtp_req_put(struct mtp_dev *dev, struct list_head *head, struct usb_request *req) { unsigned long flags; spin_lock_irqsave(&dev->lock, flags); list_add_tail(&req->list, head); spin_unlock_irqrestore(&dev->lock, flags); } /* remove a request from the head of a list */ static struct usb_request *mtp_req_get(struct mtp_dev *dev, struct list_head *head) { unsigned long flags; struct usb_request *req; spin_lock_irqsave(&dev->lock, flags); if (list_empty(head)) { req = 0; } else { req = list_first_entry(head, struct usb_request, list); list_del(&req->list); } spin_unlock_irqrestore(&dev->lock, flags); return req; } static void mtp_complete_in(struct usb_ep *ep, struct usb_request *req) { struct mtp_dev *dev = _mtp_dev; if (req->status != 0) dev->state = STATE_ERROR; mtp_req_put(dev, &dev->tx_idle, req); wake_up(&dev->write_wq); } static void mtp_complete_out(struct usb_ep *ep, struct usb_request *req) { struct mtp_dev *dev = _mtp_dev; dev->rx_done = 1; if (req->status != 0) dev->state = STATE_ERROR; wake_up(&dev->read_wq); } static void mtp_complete_intr(struct usb_ep *ep, struct usb_request *req) { struct mtp_dev *dev = _mtp_dev; if (req->status != 0) dev->state = STATE_ERROR; mtp_req_put(dev, &dev->intr_idle, req); wake_up(&dev->intr_wq); } static int mtp_create_bulk_endpoints(struct mtp_dev *dev, struct usb_endpoint_descriptor *in_desc, struct usb_endpoint_descriptor *out_desc, struct usb_endpoint_descriptor *intr_desc) { struct usb_composite_dev *cdev = dev->cdev; struct usb_request *req; struct usb_ep *ep; int i; DBG(cdev, "create_bulk_endpoints dev: %p\n", dev); ep = usb_ep_autoconfig(cdev->gadget, in_desc); if (!ep) { DBG(cdev, "usb_ep_autoconfig for ep_in failed\n"); return -ENODEV; } DBG(cdev, "usb_ep_autoconfig for ep_in got %s\n", ep->name); ep->driver_data = dev; /* claim the endpoint */ dev->ep_in = ep; ep = usb_ep_autoconfig(cdev->gadget, out_desc); if (!ep) { DBG(cdev, "usb_ep_autoconfig for ep_out failed\n"); return -ENODEV; } DBG(cdev, "usb_ep_autoconfig for mtp ep_out got %s\n", ep->name); ep->driver_data = dev; /* claim the endpoint */ dev->ep_out = ep; ep = usb_ep_autoconfig(cdev->gadget, intr_desc); if (!ep) { DBG(cdev, "usb_ep_autoconfig for ep_intr failed\n"); return -ENODEV; } DBG(cdev, "usb_ep_autoconfig for mtp ep_intr got %s\n", ep->name); ep->driver_data = dev; /* claim the endpoint */ dev->ep_intr = ep; /* now allocate requests for our endpoints */ for (i = 0; i < TX_REQ_MAX; i++) { req = mtp_request_new(dev->ep_in, MTP_BULK_BUFFER_SIZE); if (!req) goto fail; req->complete = mtp_complete_in; mtp_req_put(dev, &dev->tx_idle, req); } for (i = 0; i < RX_REQ_MAX; i++) { req = mtp_request_new(dev->ep_out, MTP_BULK_BUFFER_SIZE); if (!req) goto fail; req->complete = mtp_complete_out; dev->rx_req[i] = req; } for (i = 0; i < INTR_REQ_MAX; i++) { req = mtp_request_new(dev->ep_intr, INTR_BUFFER_SIZE); if (!req) goto fail; req->complete = mtp_complete_intr; mtp_req_put(dev, &dev->intr_idle, req); } return 0; fail: printk(KERN_ERR "mtp_bind() could not allocate requests\n"); return -1; } static ssize_t mtp_read(struct file *fp, char __user *buf, size_t count, loff_t *pos) { struct mtp_dev *dev = fp->private_data; struct usb_composite_dev *cdev = dev->cdev; struct usb_request *req; int r = count, xfer; int ret = 0; DBG(cdev, "mtp_read(%d)\n", count); if (count > MTP_BULK_BUFFER_SIZE) return -EINVAL; /* we will block until we're online */ DBG(cdev, "mtp_read: waiting for online state\n"); ret = wait_event_interruptible(dev->read_wq, dev->state != STATE_OFFLINE); if (ret < 0) { r = ret; goto done; } spin_lock_irq(&dev->lock); if (dev->state == STATE_CANCELED) { /* report cancelation to userspace */ dev->state = STATE_READY; spin_unlock_irq(&dev->lock); return -ECANCELED; } dev->state = STATE_BUSY; spin_unlock_irq(&dev->lock); requeue_req: /* queue a request */ req = dev->rx_req[0]; req->length = count; dev->rx_done = 0; ret = usb_ep_queue(dev->ep_out, req, GFP_KERNEL); if (ret < 0) { r = -EIO; goto done; } else { DBG(cdev, "rx %p queue\n", req); } /* wait for a request to complete */ ret = wait_event_interruptible(dev->read_wq, dev->rx_done || dev->state != STATE_BUSY); if (dev->state == STATE_CANCELED) { r = -ECANCELED; if (!dev->rx_done) usb_ep_dequeue(dev->ep_out, req); spin_lock_irq(&dev->lock); dev->state = STATE_CANCELED; spin_unlock_irq(&dev->lock); goto done; } if (ret < 0) { r = ret; usb_ep_dequeue(dev->ep_out, req); goto done; } if (dev->state == STATE_BUSY) { /* If we got a 0-len packet, throw it back and try again. */ if (req->actual == 0) goto requeue_req; DBG(cdev, "rx %p %d\n", req, req->actual); xfer = (req->actual < count) ? req->actual : count; r = xfer; if (copy_to_user(buf, req->buf, xfer)) r = -EFAULT; } else r = -EIO; done: spin_lock_irq(&dev->lock); if (dev->state == STATE_CANCELED) r = -ECANCELED; else if (dev->state != STATE_OFFLINE) dev->state = STATE_READY; spin_unlock_irq(&dev->lock); DBG(cdev, "mtp_read returning %d\n", r); return r; } static ssize_t mtp_write(struct file *fp, const char __user *buf, size_t count, loff_t *pos) { struct mtp_dev *dev = fp->private_data; struct usb_composite_dev *cdev = dev->cdev; struct usb_request *req = 0; int r = count, xfer; int sendZLP = 0; int ret; DBG(cdev, "mtp_write(%d)\n", count); spin_lock_irq(&dev->lock); if (dev->state == STATE_CANCELED) { /* report cancelation to userspace */ dev->state = STATE_READY; spin_unlock_irq(&dev->lock); return -ECANCELED; } if (dev->state == STATE_OFFLINE) { spin_unlock_irq(&dev->lock); return -ENODEV; } dev->state = STATE_BUSY; spin_unlock_irq(&dev->lock); /* we need to send a zero length packet to signal the end of transfer * if the transfer size is aligned to a packet boundary. */ if ((count & (dev->ep_in->maxpacket - 1)) == 0) { sendZLP = 1; } while (count > 0 || sendZLP) { /* so we exit after sending ZLP */ if (count == 0) sendZLP = 0; if (dev->state != STATE_BUSY) { DBG(cdev, "mtp_write dev->error\n"); r = -EIO; break; } /* get an idle tx request to use */ req = 0; ret = wait_event_interruptible(dev->write_wq, ((req = mtp_req_get(dev, &dev->tx_idle)) || dev->state != STATE_BUSY)); if (!req) { r = ret; break; } if (count > MTP_BULK_BUFFER_SIZE) xfer = MTP_BULK_BUFFER_SIZE; else xfer = count; if (xfer && copy_from_user(req->buf, buf, xfer)) { r = -EFAULT; break; } req->length = xfer; ret = usb_ep_queue(dev->ep_in, req, GFP_KERNEL); if (ret < 0) { DBG(cdev, "mtp_write: xfer error %d\n", ret); r = -EIO; break; } buf += xfer; count -= xfer; /* zero this so we don't try to free it on error exit */ req = 0; } if (req) mtp_req_put(dev, &dev->tx_idle, req); spin_lock_irq(&dev->lock); if (dev->state == STATE_CANCELED) r = -ECANCELED; else if (dev->state != STATE_OFFLINE) dev->state = STATE_READY; spin_unlock_irq(&dev->lock); DBG(cdev, "mtp_write returning %d\n", r); return r; } /* read from a local file and write to USB */ static void send_file_work(struct work_struct *data) { struct mtp_dev *dev = container_of(data, struct mtp_dev, send_file_work); struct usb_composite_dev *cdev = dev->cdev; struct usb_request *req = 0; struct mtp_data_header *header; struct file *filp; loff_t offset; int64_t count; int xfer, ret, hdr_size; int r = 0; int sendZLP = 0; /* read our parameters */ smp_rmb(); filp = dev->xfer_file; offset = dev->xfer_file_offset; count = dev->xfer_file_length; DBG(cdev, "send_file_work(%lld %lld)\n", offset, count); if (dev->xfer_send_header) { hdr_size = sizeof(struct mtp_data_header); count += hdr_size; } else { hdr_size = 0; } /* we need to send a zero length packet to signal the end of transfer * if the transfer size is aligned to a packet boundary. */ if ((count & (dev->ep_in->maxpacket - 1)) == 0) { sendZLP = 1; } while (count > 0 || sendZLP) { /* so we exit after sending ZLP */ if (count == 0) sendZLP = 0; /* get an idle tx request to use */ req = 0; ret = wait_event_interruptible(dev->write_wq, (req = mtp_req_get(dev, &dev->tx_idle)) || dev->state != STATE_BUSY); if (dev->state == STATE_CANCELED) { r = -ECANCELED; break; } if (!req) { r = ret; break; } if (count > MTP_BULK_BUFFER_SIZE) xfer = MTP_BULK_BUFFER_SIZE; else xfer = count; if (hdr_size) { /* prepend MTP data header */ header = (struct mtp_data_header *)req->buf; header->length = __cpu_to_le32(count); header->type = __cpu_to_le16(2); /* data packet */ header->command = __cpu_to_le16(dev->xfer_command); header->transaction_id = __cpu_to_le32(dev->xfer_transaction_id); } ret = vfs_read(filp, req->buf + hdr_size, xfer - hdr_size, &offset); if (ret < 0) { r = ret; break; } xfer = ret + hdr_size; hdr_size = 0; req->length = xfer; ret = usb_ep_queue(dev->ep_in, req, GFP_KERNEL); if (ret < 0) { DBG(cdev, "send_file_work: xfer error %d\n", ret); dev->state = STATE_ERROR; r = -EIO; break; } count -= xfer; /* zero this so we don't try to free it on error exit */ req = 0; } if (req) mtp_req_put(dev, &dev->tx_idle, req); DBG(cdev, "send_file_work returning %d\n", r); /* write the result */ dev->xfer_result = r; smp_wmb(); } /* read from USB and write to a local file */ static void receive_file_work(struct work_struct *data) { struct mtp_dev *dev = container_of(data, struct mtp_dev, receive_file_work); struct usb_composite_dev *cdev = dev->cdev; struct usb_request *read_req = NULL, *write_req = NULL; struct file *filp; loff_t offset; int64_t count; int ret, cur_buf = 0; int r = 0; /* read our parameters */ smp_rmb(); filp = dev->xfer_file; offset = dev->xfer_file_offset; count = dev->xfer_file_length; DBG(cdev, "receive_file_work(%lld)\n", count); while (count > 0 || write_req) { if (count > 0) { /* queue a request */ read_req = dev->rx_req[cur_buf]; cur_buf = (cur_buf + 1) % RX_REQ_MAX; read_req->length = (count > MTP_BULK_BUFFER_SIZE ? MTP_BULK_BUFFER_SIZE : count); dev->rx_done = 0; ret = usb_ep_queue(dev->ep_out, read_req, GFP_KERNEL); if (ret < 0) { r = -EIO; dev->state = STATE_ERROR; break; } } if (write_req) { DBG(cdev, "rx %p %d\n", write_req, write_req->actual); ret = vfs_write(filp, write_req->buf, write_req->actual, &offset); DBG(cdev, "vfs_write %d\n", ret); if (ret != write_req->actual) { r = -EIO; dev->state = STATE_ERROR; break; } write_req = NULL; } if (read_req) { /* wait for our last read to complete */ ret = wait_event_interruptible(dev->read_wq, dev->rx_done || dev->state != STATE_BUSY); if (dev->state == STATE_CANCELED) { r = -ECANCELED; if (!dev->rx_done) usb_ep_dequeue(dev->ep_out, read_req); break; } /* if xfer_file_length is 0xFFFFFFFF, then we read until * we get a zero length packet */ if (count != 0xFFFFFFFF) count -= read_req->actual; if (read_req->actual < read_req->length) { /* short packet is used to signal EOF for sizes > 4 gig */ DBG(cdev, "got short packet\n"); count = 0; } write_req = read_req; read_req = NULL; } } DBG(cdev, "receive_file_work returning %d\n", r); /* write the result */ dev->xfer_result = r; smp_wmb(); } static int mtp_send_event(struct mtp_dev *dev, struct mtp_event *event) { struct usb_request *req= NULL; int ret; int length = event->length; DBG(dev->cdev, "mtp_send_event(%d)\n", event->length); if (length < 0 || length > INTR_BUFFER_SIZE) return -EINVAL; if (dev->state == STATE_OFFLINE) return -ENODEV; ret = wait_event_interruptible_timeout(dev->intr_wq, (req = mtp_req_get(dev, &dev->intr_idle)), msecs_to_jiffies(1000)); if (!req) return -ETIME; if (copy_from_user(req->buf, (void __user *)event->data, length)) { mtp_req_put(dev, &dev->intr_idle, req); return -EFAULT; } req->length = length; ret = usb_ep_queue(dev->ep_intr, req, GFP_KERNEL); if (ret) mtp_req_put(dev, &dev->intr_idle, req); return ret; } static long mtp_ioctl(struct file *fp, unsigned code, unsigned long value) { struct mtp_dev *dev = fp->private_data; struct file *filp = NULL; int ret = -EINVAL; if (mtp_lock(&dev->ioctl_excl)) return -EBUSY; switch (code) { case MTP_SEND_FILE: case MTP_RECEIVE_FILE: case MTP_SEND_FILE_WITH_HEADER: { struct mtp_file_range mfr; struct work_struct *work; spin_lock_irq(&dev->lock); if (dev->state == STATE_CANCELED) { /* report cancelation to userspace */ dev->state = STATE_READY; spin_unlock_irq(&dev->lock); ret = -ECANCELED; goto out; } if (dev->state == STATE_OFFLINE) { spin_unlock_irq(&dev->lock); ret = -ENODEV; goto out; } dev->state = STATE_BUSY; spin_unlock_irq(&dev->lock); if (copy_from_user(&mfr, (void __user *)value, sizeof(mfr))) { ret = -EFAULT; goto fail; } /* hold a reference to the file while we are working with it */ filp = fget(mfr.fd); if (!filp) { ret = -EBADF; goto fail; } /* write the parameters */ dev->xfer_file = filp; dev->xfer_file_offset = mfr.offset; dev->xfer_file_length = mfr.length; smp_wmb(); if (code == MTP_SEND_FILE_WITH_HEADER) { work = &dev->send_file_work; dev->xfer_send_header = 1; dev->xfer_command = mfr.command; dev->xfer_transaction_id = mfr.transaction_id; } else if (code == MTP_SEND_FILE) { work = &dev->send_file_work; dev->xfer_send_header = 0; } else { work = &dev->receive_file_work; } /* We do the file transfer on a work queue so it will run * in kernel context, which is necessary for vfs_read and * vfs_write to use our buffers in the kernel address space. */ queue_work(dev->wq, work); /* wait for operation to complete */ flush_workqueue(dev->wq); fput(filp); /* read the result */ smp_rmb(); ret = dev->xfer_result; break; } case MTP_SEND_EVENT: { struct mtp_event event; /* return here so we don't change dev->state below, * which would interfere with bulk transfer state. */ if (copy_from_user(&event, (void __user *)value, sizeof(event))) ret = -EFAULT; else ret = mtp_send_event(dev, &event); goto out; } } fail: spin_lock_irq(&dev->lock); if (dev->state == STATE_CANCELED) ret = -ECANCELED; else if (dev->state != STATE_OFFLINE) dev->state = STATE_READY; spin_unlock_irq(&dev->lock); out: mtp_unlock(&dev->ioctl_excl); DBG(dev->cdev, "ioctl returning %d\n", ret); return ret; } static int mtp_open(struct inode *ip, struct file *fp) { printk(KERN_INFO "mtp_open\n"); if (mtp_lock(&_mtp_dev->open_excl)) return -EBUSY; /* clear any error condition */ if (_mtp_dev->state != STATE_OFFLINE) _mtp_dev->state = STATE_READY; fp->private_data = _mtp_dev; return 0; } static int mtp_release(struct inode *ip, struct file *fp) { printk(KERN_INFO "mtp_release\n"); mtp_unlock(&_mtp_dev->open_excl); return 0; } /* file operations for /dev/mtp_usb */ static const struct file_operations mtp_fops = { .owner = THIS_MODULE, .read = mtp_read, .write = mtp_write, .unlocked_ioctl = mtp_ioctl, .open = mtp_open, .release = mtp_release, }; static struct miscdevice mtp_device = { .minor = MISC_DYNAMIC_MINOR, .name = mtp_shortname, .fops = &mtp_fops, }; static int mtp_ctrlrequest(struct usb_composite_dev *cdev, const struct usb_ctrlrequest *ctrl) { struct mtp_dev *dev = _mtp_dev; int value = -EOPNOTSUPP; u16 w_index = le16_to_cpu(ctrl->wIndex); u16 w_value = le16_to_cpu(ctrl->wValue); u16 w_length = le16_to_cpu(ctrl->wLength); unsigned long flags; VDBG(cdev, "mtp_ctrlrequest " "%02x.%02x v%04x i%04x l%u\n", ctrl->bRequestType, ctrl->bRequest, w_value, w_index, w_length); /* Handle MTP OS string */ if (ctrl->bRequestType == (USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE) && ctrl->bRequest == USB_REQ_GET_DESCRIPTOR && (w_value >> 8) == USB_DT_STRING && (w_value & 0xFF) == MTP_OS_STRING_ID) { value = (w_length < sizeof(mtp_os_string) ? w_length : sizeof(mtp_os_string)); memcpy(cdev->req->buf, mtp_os_string, value); } else if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_VENDOR) { /* Handle MTP OS descriptor */ DBG(cdev, "vendor request: %d index: %d value: %d length: %d\n", ctrl->bRequest, w_index, w_value, w_length); if (ctrl->bRequest == 1 && (ctrl->bRequestType & USB_DIR_IN) && (w_index == 4 || w_index == 5)) { value = (w_length < sizeof(mtp_ext_config_desc) ? w_length : sizeof(mtp_ext_config_desc)); memcpy(cdev->req->buf, &mtp_ext_config_desc, value); } } else if ((ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_CLASS) { DBG(cdev, "class request: %d index: %d value: %d length: %d\n", ctrl->bRequest, w_index, w_value, w_length); if (ctrl->bRequest == MTP_REQ_CANCEL && w_index == 0 && w_value == 0) { DBG(cdev, "MTP_REQ_CANCEL\n"); spin_lock_irqsave(&dev->lock, flags); if (dev->state == STATE_BUSY) { dev->state = STATE_CANCELED; wake_up(&dev->read_wq); wake_up(&dev->write_wq); } spin_unlock_irqrestore(&dev->lock, flags); /* We need to queue a request to read the remaining * bytes, but we don't actually need to look at * the contents. */ value = w_length; } else if (ctrl->bRequest == MTP_REQ_GET_DEVICE_STATUS && w_index == 0 && w_value == 0) { struct mtp_device_status *status = cdev->req->buf; status->wLength = __constant_cpu_to_le16(sizeof(*status)); DBG(cdev, "MTP_REQ_GET_DEVICE_STATUS\n"); spin_lock_irqsave(&dev->lock, flags); /* device status is "busy" until we report * the cancelation to userspace */ if (dev->state == STATE_CANCELED) status->wCode = __cpu_to_le16(MTP_RESPONSE_DEVICE_BUSY); else status->wCode = __cpu_to_le16(MTP_RESPONSE_OK); spin_unlock_irqrestore(&dev->lock, flags); value = sizeof(*status); } } /* respond with data transfer or status phase? */ if (value >= 0) { int rc; cdev->req->zero = value < w_length; cdev->req->length = value; rc = usb_ep_queue(cdev->gadget->ep0, cdev->req, GFP_ATOMIC); if (rc < 0) ERROR(cdev, "%s setup response queue error\n", __func__); } return value; } static int mtp_function_bind(struct usb_configuration *c, struct usb_function *f) { struct usb_composite_dev *cdev = c->cdev; struct mtp_dev *dev = func_to_mtp(f); int id; int ret; dev->cdev = cdev; DBG(cdev, "mtp_function_bind dev: %p\n", dev); /* allocate interface ID(s) */ id = usb_interface_id(c, f); if (id < 0) return id; mtp_interface_desc.bInterfaceNumber = id; /* allocate endpoints */ ret = mtp_create_bulk_endpoints(dev, &mtp_fullspeed_in_desc, &mtp_fullspeed_out_desc, &mtp_intr_desc); if (ret) return ret; /* support high speed hardware */ if (gadget_is_dualspeed(c->cdev->gadget)) { mtp_highspeed_in_desc.bEndpointAddress = mtp_fullspeed_in_desc.bEndpointAddress; mtp_highspeed_out_desc.bEndpointAddress = mtp_fullspeed_out_desc.bEndpointAddress; } DBG(cdev, "%s speed %s: IN/%s, OUT/%s\n", gadget_is_dualspeed(c->cdev->gadget) ? "dual" : "full", f->name, dev->ep_in->name, dev->ep_out->name); return 0; } static void mtp_function_unbind(struct usb_configuration *c, struct usb_function *f) { struct mtp_dev *dev = func_to_mtp(f); struct usb_request *req; int i; while ((req = mtp_req_get(dev, &dev->tx_idle))) mtp_request_free(req, dev->ep_in); for (i = 0; i < RX_REQ_MAX; i++) mtp_request_free(dev->rx_req[i], dev->ep_out); while ((req = mtp_req_get(dev, &dev->intr_idle))) mtp_request_free(req, dev->ep_intr); dev->state = STATE_OFFLINE; } static int mtp_function_set_alt(struct usb_function *f, unsigned intf, unsigned alt) { struct mtp_dev *dev = func_to_mtp(f); struct usb_composite_dev *cdev = f->config->cdev; int ret; DBG(cdev, "mtp_function_set_alt intf: %d alt: %d\n", intf, alt); ret = usb_ep_enable(dev->ep_in, ep_choose(cdev->gadget, &mtp_highspeed_in_desc, &mtp_fullspeed_in_desc)); if (ret) return ret; ret = usb_ep_enable(dev->ep_out, ep_choose(cdev->gadget, &mtp_highspeed_out_desc, &mtp_fullspeed_out_desc)); if (ret) { usb_ep_disable(dev->ep_in); return ret; } ret = usb_ep_enable(dev->ep_intr, &mtp_intr_desc); if (ret) { usb_ep_disable(dev->ep_out); usb_ep_disable(dev->ep_in); return ret; } dev->state = STATE_READY; /* readers may be blocked waiting for us to go online */ wake_up(&dev->read_wq); return 0; } static void mtp_function_disable(struct usb_function *f) { struct mtp_dev *dev = func_to_mtp(f); struct usb_composite_dev *cdev = dev->cdev; DBG(cdev, "mtp_function_disable\n"); dev->state = STATE_OFFLINE; usb_ep_disable(dev->ep_in); usb_ep_disable(dev->ep_out); usb_ep_disable(dev->ep_intr); /* readers may be blocked waiting for us to go online */ wake_up(&dev->read_wq); VDBG(cdev, "%s disabled\n", dev->function.name); } static int mtp_bind_config(struct usb_configuration *c, bool ptp_config) { struct mtp_dev *dev = _mtp_dev; int ret = 0; printk(KERN_INFO "mtp_bind_config\n"); /* allocate a string ID for our interface */ if (mtp_string_defs[INTERFACE_STRING_INDEX].id == 0) { ret = usb_string_id(c->cdev); if (ret < 0) return ret; mtp_string_defs[INTERFACE_STRING_INDEX].id = ret; mtp_interface_desc.iInterface = ret; } dev->cdev = c->cdev; dev->function.name = "mtp"; dev->function.strings = mtp_strings; if (ptp_config) { dev->function.descriptors = fs_ptp_descs; dev->function.hs_descriptors = hs_ptp_descs; } else { dev->function.descriptors = fs_mtp_descs; dev->function.hs_descriptors = hs_mtp_descs; } dev->function.bind = mtp_function_bind; dev->function.unbind = mtp_function_unbind; dev->function.set_alt = mtp_function_set_alt; dev->function.disable = mtp_function_disable; return usb_add_function(c, &dev->function); } static int mtp_setup(void) { struct mtp_dev *dev; int ret; dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (!dev) return -ENOMEM; spin_lock_init(&dev->lock); init_waitqueue_head(&dev->read_wq); init_waitqueue_head(&dev->write_wq); init_waitqueue_head(&dev->intr_wq); atomic_set(&dev->open_excl, 0); atomic_set(&dev->ioctl_excl, 0); INIT_LIST_HEAD(&dev->tx_idle); INIT_LIST_HEAD(&dev->intr_idle); dev->wq = create_singlethread_workqueue("f_mtp"); if (!dev->wq) { ret = -ENOMEM; goto err1; } INIT_WORK(&dev->send_file_work, send_file_work); INIT_WORK(&dev->receive_file_work, receive_file_work); _mtp_dev = dev; ret = misc_register(&mtp_device); if (ret) goto err2; return 0; err2: destroy_workqueue(dev->wq); err1: _mtp_dev = NULL; kfree(dev); printk(KERN_ERR "mtp gadget driver failed to initialize\n"); return ret; } static void mtp_cleanup(void) { struct mtp_dev *dev = _mtp_dev; if (!dev) return; misc_deregister(&mtp_device); destroy_workqueue(dev->wq); _mtp_dev = NULL; kfree(dev); }
The first ship in Azamara Club Cruises’ bow-to-stern overhaul programme has emerged from a dry dock in Miami, revealing a host of upgraded features and unique design changes, including contemporary décor, new services and new technologies. Azamara Journey, which is widely considered to be Azamara’s flagship vessel, is the first of two ships undergoing “major upgrades” as part of Azamara’s on-going overhaul programme. As part of the dry dock, Journey has been fitted with new venues, technologies and public spaces, providing a fresher and more diverse setting in which guests can relax aboard the ship. Larry Pimentel, President and CEO of Azamara Club Cruises, said: “There is no area on the ship that has not been touched. Known for our land programs to provide our guests with the most personalized Destination Immersion experiences in the industry, Azamara needed to take our on-board product to the next level. Prior to commencing Journey’s dry dock restoration, Azamara Club Cruises consulted with several of the hospitality sector’s leading designers and engineers — creating a blueprint upon which to redesign each of the line’s vessels from the keel up. The resulting design necessitated that each ship be completely overhauled and redesigned, in order to create the timeless and elegant ambiance that has become synonymous with the Azamara brand. As well as several overarching design changes, Journey has also received a host of new services and amenities, including two new spa suites, a fully redesigned Club World Ocean lounge, and makeovers to several venues across the ship including The Patio, Windows Café, Discoveries Restaurant and Bar and The Living Room. The second Azamara ship to receive the latest upgrades is Azamara Quest, which will enter dry dock in Singapore this April.
Затворы обратные поворотные (2) - Production and Trade Association "Doing business" Locks the return are established near pump installations, vessels under pressure, and as other relevant systems which can fail because of a return stream of a transported product. The lock of a product is executed in shape захлопки, and management of working body is carried out only at the expense of impact on it transported environment, without an additional power source. At a product stream in the set direction, the lock keeps Wednesday in situation "openly". At emergence of a return stream, under the pressure of Wednesday захлопка keeps in a closed position. The product functions both in the conditions of normal operation, and in emergency operation that allows to reduce considerably a product leak at destruction of sites of the pipeline as a result of failure. Advantages of this type of protective fittings are simplicity of their design and high degree of tightness. Locks the return are usually established on horizontal pipelines of various mission. The lock the return rotary belongs to shutoff pipeline valves. The lock the return rotary passes a working environment only in the necessary direction. At change of the direction of a stream on the return a lock the return rotary is closed, thereby, stopping return movement of streams on the pipeline. Steam, natural gas, oil products and hostile environment is used on the systems transporting water, air. Management of a lock of the return rotary occurs a stream of a working environment. Locks the return rotary are intended for installation on pipelines for the purpose of prevention of a return stream of the environment. Locks are established on horizontal pipelines by earrings up and on vertical pipelines an entrance branch pipe down. Locks are made with the ends under a privarka and with reciprocal flanges. The design of locks provides tightness in relation to environment. The lock is established on the horizontal pipeline with a bias no more than 0,004 max that the axis захлопки was parallel to the horizontal plane and was above a pipeline axis, on the vertical pipeline - a target branch pipe up. Documentation is developed according to requirements PNAEG-7-008-89, PNAEG-7-009-89, PNAEG-7-010-89, PNAEG-1-011-89, PNAEG-7-002-86, ОТТ87. The main details of a lock are: obechayka; lug; cap, axis; ring; disk; counterbalance; plugs; eyes. On pipelines of nuclear power plants with water-water power reactors or reactors of big capacity channel for the purpose of prevention of a return stream of a working environment. Class group of a lock 2V-IIV, 3СIIIv. On pipelines for the purpose of prevention of a return stream of a working environment.
abmWaterstop® is a fool proof solution for sealing baths and shower trays. This seal has been thoroughly tested and perfected by a specialist team. The product is easy to fit behind tiles and will leave just a clean white line between the tile and bath or shower tray. This alternative to silicone sealant won't discolour or encourage the growth of mould and its flexibility helps to counteract expansion and movement. Included in the pack is 3.2m of the waterstop seal, full instructions and butyl tape. Can this be fitted to a shower tray that's already in place but has had the wet wall removed? Great question, Andrew. This is actually designed to be used once the shower tray has been fitted. Can this sealant kit be used on corners, or just flat surfaces? Good question Mike! This sealant kit can be used on flat surfaces and corners.
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: lease.proto package leasepb import ( fmt "fmt" io "io" math "math" math_bits "math/bits" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/golang/protobuf/proto" etcdserverpb "go.etcd.io/etcd/api/v3/etcdserverpb" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type Lease struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` TTL int64 `protobuf:"varint,2,opt,name=TTL,proto3" json:"TTL,omitempty"` RemainingTTL int64 `protobuf:"varint,3,opt,name=RemainingTTL,proto3" json:"RemainingTTL,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Lease) Reset() { *m = Lease{} } func (m *Lease) String() string { return proto.CompactTextString(m) } func (*Lease) ProtoMessage() {} func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptor_3dd57e402472b33a, []int{0} } func (m *Lease) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Lease.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *Lease) XXX_Merge(src proto.Message) { xxx_messageInfo_Lease.Merge(m, src) } func (m *Lease) XXX_Size() int { return m.Size() } func (m *Lease) XXX_DiscardUnknown() { xxx_messageInfo_Lease.DiscardUnknown(m) } var xxx_messageInfo_Lease proto.InternalMessageInfo type LeaseInternalRequest struct { LeaseTimeToLiveRequest *etcdserverpb.LeaseTimeToLiveRequest `protobuf:"bytes,1,opt,name=LeaseTimeToLiveRequest,proto3" json:"LeaseTimeToLiveRequest,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *LeaseInternalRequest) Reset() { *m = LeaseInternalRequest{} } func (m *LeaseInternalRequest) String() string { return proto.CompactTextString(m) } func (*LeaseInternalRequest) ProtoMessage() {} func (*LeaseInternalRequest) Descriptor() ([]byte, []int) { return fileDescriptor_3dd57e402472b33a, []int{1} } func (m *LeaseInternalRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LeaseInternalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_LeaseInternalRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *LeaseInternalRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_LeaseInternalRequest.Merge(m, src) } func (m *LeaseInternalRequest) XXX_Size() int { return m.Size() } func (m *LeaseInternalRequest) XXX_DiscardUnknown() { xxx_messageInfo_LeaseInternalRequest.DiscardUnknown(m) } var xxx_messageInfo_LeaseInternalRequest proto.InternalMessageInfo type LeaseInternalResponse struct { LeaseTimeToLiveResponse *etcdserverpb.LeaseTimeToLiveResponse `protobuf:"bytes,1,opt,name=LeaseTimeToLiveResponse,proto3" json:"LeaseTimeToLiveResponse,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *LeaseInternalResponse) Reset() { *m = LeaseInternalResponse{} } func (m *LeaseInternalResponse) String() string { return proto.CompactTextString(m) } func (*LeaseInternalResponse) ProtoMessage() {} func (*LeaseInternalResponse) Descriptor() ([]byte, []int) { return fileDescriptor_3dd57e402472b33a, []int{2} } func (m *LeaseInternalResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LeaseInternalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_LeaseInternalResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *LeaseInternalResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_LeaseInternalResponse.Merge(m, src) } func (m *LeaseInternalResponse) XXX_Size() int { return m.Size() } func (m *LeaseInternalResponse) XXX_DiscardUnknown() { xxx_messageInfo_LeaseInternalResponse.DiscardUnknown(m) } var xxx_messageInfo_LeaseInternalResponse proto.InternalMessageInfo func init() { proto.RegisterType((*Lease)(nil), "leasepb.Lease") proto.RegisterType((*LeaseInternalRequest)(nil), "leasepb.LeaseInternalRequest") proto.RegisterType((*LeaseInternalResponse)(nil), "leasepb.LeaseInternalResponse") } func init() { proto.RegisterFile("lease.proto", fileDescriptor_3dd57e402472b33a) } var fileDescriptor_3dd57e402472b33a = []byte{ // 256 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0x49, 0x4d, 0x2c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x07, 0x73, 0x0a, 0x92, 0xa4, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x62, 0xfa, 0x20, 0x16, 0x44, 0x5a, 0x4a, 0x3e, 0xb5, 0x24, 0x39, 0x45, 0x3f, 0xb1, 0x20, 0x53, 0x1f, 0xc4, 0x28, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0x2a, 0x48, 0xd2, 0x2f, 0x2a, 0x48, 0x86, 0x28, 0x50, 0xf2, 0xe5, 0x62, 0xf5, 0x01, 0x99, 0x20, 0xc4, 0xc7, 0xc5, 0xe4, 0xe9, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x1c, 0xc4, 0xe4, 0xe9, 0x22, 0x24, 0xc0, 0xc5, 0x1c, 0x12, 0xe2, 0x23, 0xc1, 0x04, 0x16, 0x00, 0x31, 0x85, 0x94, 0xb8, 0x78, 0x82, 0x52, 0x73, 0x13, 0x33, 0xf3, 0x32, 0xf3, 0xd2, 0x41, 0x52, 0xcc, 0x60, 0x29, 0x14, 0x31, 0xa5, 0x12, 0x2e, 0x11, 0xb0, 0x71, 0x9e, 0x79, 0x25, 0xa9, 0x45, 0x79, 0x89, 0x39, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x31, 0x5c, 0x62, 0x60, 0xf1, 0x90, 0xcc, 0xdc, 0xd4, 0x90, 0x7c, 0x9f, 0xcc, 0xb2, 0x54, 0xa8, 0x0c, 0xd8, 0x46, 0x6e, 0x23, 0x15, 0x3d, 0x64, 0xf7, 0xe9, 0x61, 0x57, 0x1b, 0x84, 0xc3, 0x0c, 0xa5, 0x0a, 0x2e, 0x51, 0x34, 0x5b, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0xe2, 0xb9, 0xc4, 0x31, 0xb4, 0x40, 0xa4, 0xa0, 0xf6, 0xaa, 0x12, 0xb0, 0x17, 0xa2, 0x38, 0x08, 0x97, 0x29, 0x4e, 0x12, 0x27, 0x1e, 0xca, 0x31, 0x5c, 0x78, 0x28, 0xc7, 0x70, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xce, 0x78, 0x2c, 0xc7, 0x90, 0xc4, 0x06, 0x0e, 0x5f, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x8a, 0x94, 0xb9, 0xae, 0x01, 0x00, 0x00, } func (m *Lease) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Lease) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Lease) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } if m.RemainingTTL != 0 { i = encodeVarintLease(dAtA, i, uint64(m.RemainingTTL)) i-- dAtA[i] = 0x18 } if m.TTL != 0 { i = encodeVarintLease(dAtA, i, uint64(m.TTL)) i-- dAtA[i] = 0x10 } if m.ID != 0 { i = encodeVarintLease(dAtA, i, uint64(m.ID)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *LeaseInternalRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LeaseInternalRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LeaseInternalRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } if m.LeaseTimeToLiveRequest != nil { { size, err := m.LeaseTimeToLiveRequest.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintLease(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *LeaseInternalResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LeaseInternalResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LeaseInternalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } if m.LeaseTimeToLiveResponse != nil { { size, err := m.LeaseTimeToLiveResponse.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintLease(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintLease(dAtA []byte, offset int, v uint64) int { offset -= sovLease(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Lease) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.ID != 0 { n += 1 + sovLease(uint64(m.ID)) } if m.TTL != 0 { n += 1 + sovLease(uint64(m.TTL)) } if m.RemainingTTL != 0 { n += 1 + sovLease(uint64(m.RemainingTTL)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *LeaseInternalRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.LeaseTimeToLiveRequest != nil { l = m.LeaseTimeToLiveRequest.Size() n += 1 + l + sovLease(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *LeaseInternalResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.LeaseTimeToLiveResponse != nil { l = m.LeaseTimeToLiveResponse.Size() n += 1 + l + sovLease(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func sovLease(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozLease(x uint64) (n int) { return sovLease(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Lease) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLease } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Lease: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Lease: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) } m.ID = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLease } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.ID |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TTL", wireType) } m.TTL = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLease } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.TTL |= int64(b&0x7F) << shift if b < 0x80 { break } } case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RemainingTTL", wireType) } m.RemainingTTL = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLease } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.RemainingTTL |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipLease(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthLease } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LeaseInternalRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLease } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LeaseInternalRequest: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LeaseInternalRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LeaseTimeToLiveRequest", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLease } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthLease } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthLease } if postIndex > l { return io.ErrUnexpectedEOF } if m.LeaseTimeToLiveRequest == nil { m.LeaseTimeToLiveRequest = &etcdserverpb.LeaseTimeToLiveRequest{} } if err := m.LeaseTimeToLiveRequest.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLease(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthLease } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LeaseInternalResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLease } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LeaseInternalResponse: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LeaseInternalResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LeaseTimeToLiveResponse", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLease } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthLease } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthLease } if postIndex > l { return io.ErrUnexpectedEOF } if m.LeaseTimeToLiveResponse == nil { m.LeaseTimeToLiveResponse = &etcdserverpb.LeaseTimeToLiveResponse{} } if err := m.LeaseTimeToLiveResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipLease(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthLease } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipLease(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowLease } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowLease } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } case 1: iNdEx += 8 case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowLease } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLengthLease } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupLease } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthLease } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthLease = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLease = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLease = fmt.Errorf("proto: unexpected end of group") )
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ namespace Application\Factory\Controller; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; use Application\Controller\VotesController; /** * Description of UsersControllerFactory * * @author Alexander */ class VotesControllerFactory implements FactoryInterface { public function createService(ServiceLocatorInterface $serviceLocator) { $realLocator = $serviceLocator->getServiceLocator(); $hubService = $realLocator->get('Application\Service\HubServiceInterface'); return new VotesController($hubService); } }
<html> <head> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="loadData.js"></script> <script type="text/javascript" src="jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {packages:["gauge"]}); google.setOnLoadCallback(drawChart); //var arr = $.get("loadData.php" , function( data ) { alert( "Data Loaded: " + data ); dataIn=data; }); //document.write(Object.keys(arr)); //document.write(dataIn); var ajax = new XMLHttpRequest(); ajax.open("GET", "loadData.php?query=select pump_no,pump_volume_update from pump_setup where pump_volume_update != 0 order by pump_volume_update&numcol=2&colName[]=Label&colName[]=Value&colValue[]=pump_no&colValue[]=pump_volume_update", false); ajax.send(); //document.write(ajax.responseText); var Data = ajax.responseText.split("\n"); //var obj = eval ("(" + Data[1] + ")"); //document.write(obj.Label); function drawChart() { /*var data = google.visualization.arrayToDataTable([ ['Label', 'Value'] ,['P01', 5] ,['P02', 55] ,['P03', 100] ]);*/ var data = new google.visualization.DataTable(); data.addColumn('string', 'Label'); data.addColumn('number', 'Value'); // Add empty rows data.addRows(16); for(var i=0;i<15;i++){ var obj = eval ("(" + Data[i] + ")"); data.setCell(i, 0, obj.Label); data.setCell(i, 1,obj.Value); } //data.setCell(1, 0, 'P02'); data.setCell(1, 1, 85); //data.setCell(2, 0, 'P03'); data.setCell(2, 1, 133); var options = { width: 1200, height: 600, min:0, max:200, yellowFrom:25, yellowTo: 50, redFrom: -25, redTo: 25, minorTicks: 4 }; var chart = new google.visualization.Gauge(document.getElementById('chart_div')); chart.draw(data, options); /*setInterval(function() { data.setValue(0, 1, 40 + Math.round(60 * Math.random())); chart.draw(data, options); }, 13000); setInterval(function() { data.setValue(1, 1, 40 + Math.round(60 * Math.random())); chart.draw(data, options); }, 5000); setInterval(function() { data.setValue(2, 1, 60 + Math.round(20 * Math.random())); chart.draw(data, options); }, 26000);*/ } </script> </head> <body> <div id="chart_div" style="width: 1200; height: 600px;"></div> </body> </html>
# == Schema Information # # Table name: departments # # id :integer not null, primary key # name :string # company_id :integer # created_at :datetime not null # updated_at :datetime not null # class Department < ActiveRecord::Base belongs_to :company has_many :employees, dependent: :destroy has_many :teams end
var path = require('path'); var async = require('async'); var rimraf = require('rimraf'); var _ = require('lodash'); var Stats = require('fast-stats').Stats; var Table = require('cli-table'); var ProgressBar = require('progress'); var LimitdClient = require('../client'); var LimitdServer = require('../server'); var db_file = path.join(__dirname, 'db', 'perf.tests.db'); var protocol = process.argv.indexOf('--avro') > -1 ? 'avro' : 'protocol-buffers'; try{ rimraf.sync(db_file); } catch(err){} var server = new LimitdServer({ db: db_file, log_level: 'error', protocol: protocol, buckets: { ip: { per_second: 10 } } }); server.start(function (err, address) { if (err) { console.error(err.message); return process.exit(1); } var client = new LimitdClient(_.extend({ protocol: protocol }, address)); client.once('ready', run_tests); }); function run_tests () { var client = this; var started_at = new Date(); var requests = 100000; var concurrency = 1000; var progress = new ProgressBar(':bar', { total: requests , width: 50 }); async.mapLimit(_.range(requests), concurrency, function (i, done) { var date = new Date(); return client.ping(function (err, result) { progress.tick(); if (err) { console.dir(err); return process.exit(1); } done(null, { err: err, result: result, took: new Date() - date }); }); }, function (err, results) { if (err) { console.error(err.message); return process.exit(1); } var took = new Date() - started_at; var errored = _.filter(results, 'err'); var times = _(results).filter(function (r) { return !r.err; }).map('took').value(); var stats = new Stats().push(times); var table = new Table(); table.push( { 'Protocol': protocol }, { 'Requests': requests }, { 'Total time': took + ' ms' }, { 'Errored': errored.length }, { 'Mean': stats.amean().toFixed(2) }, { 'P50': stats.percentile(50).toFixed(2) }, { 'P95': stats.percentile(95).toFixed(2) }, { 'P97': stats.percentile(97).toFixed(2) }, { 'Max': _.max(times) }, { 'Min': _.min(times) } ); console.log(table.toString()); process.exit(0); }); }
This session is for babies between 6-24 Months. Baby must be able to seat on her own. 5 digital images included ,prints are not included but you are welcome to order them extra.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- Copyright 2011 Software Freedom Conservancy 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. --> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>Test javascript evaluation of parameters*</title> </head> <body> <table cellpadding="1" cellspacing="1" border="1"> <tbody> <tr> <td rowspan="1" colspan="3">Test javascript evaluation of parameters<br> </td> </tr> <tr> <td>open</td> <td>../tests/html/test_store_value.html</td> <td/> </tr> <tr> <td>type</td> <td>theText</td> <td>javascript{[1,2,3,4,5].join(':')}</td> </tr> <tr> <td>verifyValue</td> <td>theText</td> <td>1:2:3:4:5</td> </tr> <tr> <td>type</td> <td>javascript{'the' + 'Text'}</td> <td>javascript{10 * 5}</td> </tr> <tr> <td>verifyValue</td> <td>theText</td> <td>50</td> </tr> <tr> <td>verifyValue</td> <td>theText</td> <td>javascript{10 + 10 + 10 + 10 + 10}</td> </tr> <!-- Check a complex expression --> <tr> <td>type</td> <td>theText</td> <td>javascript{ function square(n) { return n * n; }; '25 * 25 = ' + square(25); } </td> </tr> <tr> <td>verifyValue</td> <td>theText</td> <td>25 * 25 = 625</td> </tr> <!-- Demonstrate interation between variable substitution and javascript --> <tr> <td>store</td> <td>the value</td> <td>var1</td> </tr> <tr> <td>type</td> <td>theText</td> <td>javascript{'${var1}'.toUpperCase()}</td> </tr> <tr> <td>verifyValue</td> <td>theText</td> <td>${VAR1}</td> </tr> <tr> <td>type</td> <td>theText</td> <td>javascript{storedVars['var1'].toUpperCase()}</td> </tr> <tr> <td>verifyValue</td> <td>theText</td> <td>THE VALUE</td> </tr> <tr> <td>verifyExpression</td> <td>javascript{storedVars['var1'].toUpperCase()}</td> <td>THE VALUE</td> </tr> <tr> <td>verifyExpression</td> <td>javascript{selenium.getValue('theText')}</td> <td>regexp:TH[Ee] VALUE</td> </tr> </tbody> </table> </body> </html>
Bottom Line: The first thought many people have when suffering from back or neck pain is “Better go the Chiropractor,” because, as research shows, Chiropractic adjustments are one of the best ways to relive that pain. However, research has also shown us that those same adjustments may be able to do much more – namely, positively impact your immune system and help it function at a higher level. Inflammation, the normal response of a compromised immune system, can increase sympathetic nerve activity. Your sympathetic nervous system is responsible for your stress (fight or flight) response. When your sympathetic nervous system is activated, it inhibits your immune system, meaning you aren’t able to rest and recover very well. Next Steps: Less pain. Less stress. Better overall function. So many of our patients tell us that since the start of their care, they get sick less often. If you know someone who seems to get sick quite often, share this information with them. It may be their first step towards a healthier immune system! Better yet, bring them to our upcoming wellness workshop where they can have all of their questions answered and go home with a plan. Visit our Facebook page to learn more or give us a call today.
Provides managerial and technical oversight for Prevention, Rapid Test and Linkage to Care program, in collaboration with an NGOs and Country/ Local Governments and other Partner Programs, which includes but is not limited to: training, monitoring and evaluation activities, supervision, helps to capacity building, project logistics, security and administration. Provides managerial and technical oversight for advocacy activities against stigma and discrimination, in collaboration with an NGOs and Country/ Local Governments and other Partner Programs, which includes but is not limited to: implementing, monitoring and evaluation activities, supervision, logistics and administration. Contribute to prepares and administers program budgets and strategic business plans, and evaluates financial program effectiveness. (Key Performance Indicators). Provide regular country program reports to Corporate Headquarters, the Global Secretariat, Latin America Bureau Secretariat and donors as required. Serves as The Organization representative of the country program with implementing partners, private and public agencies, national AIDS programs, and major donor agencies. Represents the Organization at meetings with on HIV/AIDS issues, and maintains a wide-range of professional contacts with Government and non-governmental organizations. Participates with Bureau Chief in proposal preparation, in collaboration with Corporate Headquarters , Global Secretariatand Latin America Bureau Secretariat, including field assessment, writing, and negotiations with donors, identification of partners, and preparation of proposals, logical frameworks, work plans, and detailed budgets. Ensures that the Global Program Policy and Procedure Manual is clearly communicated, implemented and adhered to by the staff in the country. Keep abreast of HIV/AIDS best practices/resources and pass these resources to field staff. Takes the lead in implementing new the Organizations improvement approach in any clinic in the country as seen feasible and appropriate within the defines of available capacity and resources in a manner that promotes Quality Assurance and sustainability. Takes the lead in seeking new partners with whom a complimentary comprehensive Rapid Test and Linkage to Care and Quality medical care can be offered to patients and or communities base. Provide management support, mentorship and direction to subordinates. Ensure that medical supplies are into the country to the correct operations. Undertakes other duties as may be assigned from time to time by the Latin America Bureau Chief. Latin America Global Operations, Latina America Med Exec., Latina America Marketing and Advocacy Meeting, Latina America Quality Technical Team, weekly One at One with Bureau Chief Latin.. Includes supervision of the Medical Providers and The Organization staff. Master degree, Doctorate or Public Health degree and relevant experience in HIV treatment, care, prevention, testing into the country; or relevant experience in HIV/ AIDS and STDs managing programs and public health development programs. Experience on advocacy and partnership with NGOs. Computer and Internet skills, including word processing, database, presentation software and project management software. Experience with MS Word, Excel, PowerPoint, and Project is preferred. Ability to read, analyzes, and interprets common scientific and technical journals, financial reports, and legal documents. English speaker and reader, bilingual Spanish is best. Intermediate Skills: Ability to calculate figures and amounts such as discounts, interest, commissions, proportions, percentages, area, circumference, and volume. High Skills: Ability to solve practical problems and deal with a variety of concrete variables in situations where only limited standardization exists. Proven skills in leadership, management, supervision, mentorship and networking, with at least 3-5 years as management and coordination experience. Knowledge of HIV/AIDS and health related issues. Demonstrated experience in HIV/AIDS, STDs and public health management programs. Highly skilled in HIV/AIDS programming, preferably within Caribbean and Latina American context, and experience with funded such as AID, Global Fund, PEPFAR, Ford Foundation, Kellogg Foundation, etc. Must be culturally sensitive and able to work in a wide variety of settings and cultures. Ability to travel at least 50 percent of his (her) contracted time per year to scaling up and expansion into the country. Must have a valid passport and American Visa.
A composition by Montana State University music instructor Eric Funk that was inspired by Czech musician Jan Hanus has received a special citation in the prestigious American Prize in Composition. Funk’s “Variations on a Theme by Jan Hanus, Op. 127” received a special judges’ citation for the Best Concerto/Concerted Work of the Year in the professional orchestra division. The American Prize is a series of nonprofit competitions that recognizes and rewards the best performing artists, ensembles and composers in the United States based on submitted recordings. Eric Funk received a special judges’ citation for the Best Concerto/Concerted Work of the Year in the professional orchestra division from the American Prize for his composition “Variations on a Theme by Jan Hanus, Op. 127.” Funk is an instructor in the MSU School of Music and the host of the award-winning “11th & Grant with Eric Funk” on Montana PBS. Photo by Rick Smith courtesy of Montana PBS.. Funk is an instructor in the School of Music in the College of Arts and Architecture and the host of the award-winning music show “11th & Grant with Eric Funk” on Montana PBS. Funk said his award-winning composition was inspired by a trip to Hungary several years ago to hear and film Hungarian violin virtuoso Vilmos Olah perform Funk’s composition “The Violin Alone,” which Funk wrote specifically for Olah. The Montana PBS special, “The Violin Alone” that was largely filmed during that overseas trip is currently nominated in the regional Emmy competition in several categories. Funk said that while he was at Olah’s concert in Budapest he met Jan Hanus’ daughter, Daniela Pokorna. She asked Funk to compose a new piece that would be played at a celebration honoring her father’s life in music. Funk was familiar with Hanus from his time as conductor of the Helena Symphony, where he programmed an all-Czech music concert that included a work by Hanus. “I have had a long relationship with Czech composers,” said Funk, who has studied with Czech-born composer Tomas Svoboda, who introduced Funk to a host of Czech composers, as well as Hungarian composer Sandor Veress and Polish composer Krzysztof Penderecki. The American Prize judges noted that Funk has had a “considerable compositional output” that includes nine symphonies, four operas, six ballet scores, three large works for chorus and orchestra, 17 concertos, several orchestral tone poems and numerous works for chamber ensembles, solo instruments and vocal works, of which one-third were commissioned. Funk said he was deeply honored at receiving the American Prize special citation as the best concerto of the year. “I didn’t think I had a hope, so I was pumped when I heard,” Funk said.
/*************************************************************************** PFunctionHandler.cpp Author: Andreas Suter e-mail: [email protected] $Id$ ***************************************************************************/ /*************************************************************************** * Copyright (C) 2007 by Andreas Suter * * [email protected] * * * * This program 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 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include <string> #include <cassert> #include <fstream> using namespace std; #include <boost/algorithm/string.hpp> #include "PFunctionHandler.h" //------------------------------------------------------------- // Constructor //------------------------------------------------------------- /** * <p> * * \param fln */ PFunctionHandler::PFunctionHandler(char *fln, bool debug) : fDebug(debug), fFileName(fln) { fValid = true; cout << endl << "in PFunctionHandler(char *fln)"; cout << endl << "fFileName = " << fFileName; fValid = ReadFile(); if (fValid) fValid = MapsAreValid(); } //------------------------------------------------------------- // Constructor //------------------------------------------------------------- /** * <p> * * \param lines */ PFunctionHandler::PFunctionHandler(vector<string> lines) { fValid = true; fFileName = ""; cout << endl << "in PFunctionHandler(vector<string> lines)"; if (lines.size() == 0) { fValid = false; return; } // analyze input bool done = false; int status; int val[10]; double dval[10]; bool inFcnBlock = false; for (unsigned int i=0; i<lines.size(); i++) { if (lines[i].find("#") == 0) // comment hence ignore continue; boost::to_upper(lines[i]); if (lines[i].find("PAR") == 0) { cout << endl << "this is a parameter line ..."; status = sscanf(lines[i].c_str(), "PAR %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf", &dval[0], &dval[1], &dval[2], &dval[3], &dval[4], &dval[5], &dval[6], &dval[7], &dval[8], &dval[9]); cout << endl << "status=" << status; if (status < 0) { done = true; fValid = false; cout << endl << "invalid PAR line, sorry ..."; } else { // fill par cout << endl << "PAR line, status = " << status; for (int i=0; i<status; i++) fParam.push_back(dval[i]); cout << endl << "fParam.size()=" << fParam.size() << endl; for (unsigned int i=0; i<fParam.size(); i++) cout << endl << "Par" << i+1 << " = " << fParam[i]; cout << endl; } } else if (lines[i].find("MAP") == 0) { cout << endl << "this is a map line ..."; status = sscanf(lines[i].c_str(), "MAP %d %d %d %d %d %d %d %d %d %d", &val[0], &val[1], &val[2], &val[3], &val[4], &val[5], &val[6], &val[7], &val[8], &val[9]); if (status < 0) { done = true; fValid = false; cout << endl << "invalid MAP line, sorry ..."; } else { // fill map cout << endl << "MAP line, status = " << status; for (int i=0; i<status; i++) fMap.push_back(val[i]); } } else if (lines[i].find("FUNCTIONS") == 0) { cout << endl << "the functions block start ..."; inFcnBlock = true; } else if (lines[i].find("END") == 0) { cout << endl << "end tag found; rest will be ignored"; done = true; } else if (inFcnBlock) { fLines.push_back(lines[i]); } } // check if all blocks are given if ((fMap.size() == 0) || (fParam.size() == 0) || (fLines.size() == 0)) { if (fMap.size() == 0) cout << endl << "MAP block is missing ..."; if (fParam.size() == 0) cout << endl << "PAR block is missing ..."; if (fLines.size() == 0) cout << endl << "FUNCTION block is missing ..."; fValid = false; } fValid = MapsAreValid(); if (fValid) { cout << endl << "Functions: "; for (unsigned int i=0; i<fLines.size(); i++) cout << endl << fLines[i]; } } //------------------------------------------------------------- // Destructor //------------------------------------------------------------- /** * <p> * */ PFunctionHandler::~PFunctionHandler() { cout << endl << "in ~PFunctionHandler()" << endl << endl; fParam.clear(); fMap.clear(); fLines.clear(); fFuncs.clear(); } //------------------------------------------------------------- // DoParse (public) //------------------------------------------------------------- /** * <p> * */ bool PFunctionHandler::DoParse() { cout << endl << "in PFunctionHandler::DoParse() ..."; bool success = true; PFunctionGrammar function; for (unsigned int i=0; i<fLines.size(); i++) { cout << endl << "fLines[" << i << "] = '" << fLines[i] << "'"; tree_parse_info<> info = ast_parse(fLines[i].c_str(), function, space_p); if (info.full) { cout << endl << "parse successfull ..." << endl; PFunction func(info, fParam, fMap, fDebug); fFuncs.push_back(func); } else { cout << endl << "parse failed ... (" << i << ")" << endl; success = false; break; } } // check that all functions are valid. It could be that parsing was fine but // the parameter index, or map index was out of range if (success) { for (unsigned int i=0; i<fFuncs.size(); i++) { if (!fFuncs[i].IsValid()) { cout << endl << "**ERROR**: function fun" << fFuncs[i].GetFuncNo(); cout << " has a problem with either parameter or map out of range!"; success = false; break; } } } // check that the function numbers are unique if (success) { for (unsigned int i=0; i<fFuncs.size(); i++) { for (unsigned int j=i+1; j<fFuncs.size(); j++) { if (fFuncs[i].GetFuncNo() == fFuncs[j].GetFuncNo()) { cout << endl << "**ERROR**: function number " << fFuncs[i].GetFuncNo(); cout << " is at least twice present! Fix this first."; success = false; } } } } if (success) { for (unsigned int i=0; i<fFuncs.size(); i++) cout << endl << "func number = " << fFuncs[i].GetFuncNo(); } return success; } //------------------------------------------------------------- // Eval (public) //------------------------------------------------------------- /** * <p> * * \param i */ double PFunctionHandler::Eval(int i) { if (GetFuncIndex(i) == -1) { cout << endl << "**ERROR**: Couldn't find FUN" << i << " for evaluation"; return 0.0; } cout << endl << "PFunctionHandler::Eval: GetFuncIndex("<<i<<") = " << GetFuncIndex(i); cout << endl; return fFuncs[GetFuncIndex(i)].Eval(); } //------------------------------------------------------------- // GetFuncNo (public) //------------------------------------------------------------- /** * <p> * * \param i */ unsigned int PFunctionHandler::GetFuncNo(unsigned int i) { if (i > fFuncs.size()) return -1; return fFuncs[i].GetFuncNo(); } //------------------------------------------------------------- // ReadFile (private) //------------------------------------------------------------- /** * <p> * */ bool PFunctionHandler::ReadFile() { cout << endl << "in ~PFunctionHandler::ReadFile()"; if (fFileName.length() == 0) { cout << endl << "PFunctionHandler::ReadFile(): **ERROR**"; cout << endl << " no file name given :-(. Will quit"; return false; } ifstream f; f.open(fFileName.c_str(), ifstream::in); if (!f.is_open()) { cout << endl << "PFunctionHandler::ReadFile(): **ERROR**"; cout << endl << " File '" << fFileName.c_str() << "' couldn't being opened."; return false; } string line; char c_line[128]; bool done = false; bool success = true; int status; int val[10]; double dval[10]; bool inFcnBlock = false; while ( !f.eof() && !done) { f.getline(c_line, 128); // line of text excluding '\n' line = c_line; size_t pos = line.find('\r'); line.resize(pos); if (line.find("#") == 0) // comment hence ignore continue; boost::to_upper(line); if (line.find("PAR") == 0) { cout << endl << "this is a parameter line ..."; status = sscanf(line.c_str(), "PAR %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf", &dval[0], &dval[1], &dval[2], &dval[3], &dval[4], &dval[5], &dval[6], &dval[7], &dval[8], &dval[9]); if (status < 0) { done = true; success = false; cout << endl << "invalid PAR line, sorry ..."; } else { // fill map cout << endl << "PAR line, status = " << status; for (int i=0; i<status; i++) fParam.push_back(dval[i]); for (unsigned int i=0; i<fParam.size(); i++) cout << endl << "Par" << i+1 << " = " << fParam[i]; cout << endl; } } else if (line.find("MAP") == 0) { cout << endl << "this is a map line ..."; status = sscanf(line.c_str(), "MAP %d %d %d %d %d %d %d %d %d %d", &val[0], &val[1], &val[2], &val[3], &val[4], &val[5], &val[6], &val[7], &val[8], &val[9]); if (status < 0) { done = true; success = false; cout << endl << "invalid MAP line, sorry ..."; } else { // fill map cout << endl << "MAP line, status = " << status; for (int i=0; i<status; i++) fMap.push_back(val[i]); } } else if (line.find("FUNCTIONS") == 0) { cout << endl << "the functions block start ..."; inFcnBlock = true; } else if (line.find("END") == 0) { cout << endl << "end tag found; rest will be ignored"; done = true; } else if (inFcnBlock) { fLines.push_back(line); } } f.close(); // check if all blocks are given if ((fMap.size() == 0) || (fParam.size() == 0) || (fLines.size() == 0)) { if (fMap.size() == 0) cout << endl << "MAP block is missing ..."; if (fParam.size() == 0) cout << endl << "PAR block is missing ..."; if (fLines.size() == 0) cout << endl << "FUNCTION block is missing ..."; success = false; } if (success) { cout << endl << "Functions: "; for (unsigned int i=0; i<fLines.size(); i++) cout << endl << fLines[i]; } return success; } //------------------------------------------------------------- // MapsAreValid (private) //------------------------------------------------------------- /** * <p> * */ bool PFunctionHandler::MapsAreValid() { bool success = true; int maxParam = fParam.size(); for (unsigned int i=0; i<fMap.size(); i++) if (fMap[i] > maxParam) success = false; if (!success) cout << endl << "invalid MAP found ..."; return success; } //------------------------------------------------------------- // GetFuncIndex (private) //------------------------------------------------------------- /** * <p> * * \param funcNo */ int PFunctionHandler::GetFuncIndex(int funcNo) { int index = -1; for (unsigned int i=0; i<fFuncs.size(); i++) { if (fFuncs[i].GetFuncNo() == funcNo) { index = i; break; } } return index; }
/** * @author david * * To change this generated comment edit the template variable "typecomment": * Window>Preferences>Java>Templates. * To enable and disable the creation of type comments go to * Window>Preferences>Java>Code Generation. */ public class XX00 { }
using Stream using Base.Test # write your own tests here @test 1 == 1
Does Your Client Need a Short-Form Software License Agreement? Knowledge Management Software has Come of Age…Now What? How does today’s law librarian utilize technology to achieve the firm’s business goals? At this year’s American Association of Law Libraries Annual Meeting and Conference, the Thomson Reuters Legal Solutions team will demonstrate our eLibrary solutions. This has been my journey thus far, and the most important fact I have learned is that it is a great time to be a legal librarian in Kansas City. My law firm (DLA Piper) has an international pro bono affiliate called New Perimeter, the goal of which is to provide long-term legal assistance in under-served regions around the world. It is our hope that our success in this area creates a counter narrative to that often-repeated mantra that female lawyers of color do not stay in Big Law long and rarely become leaders there.
/* * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. * */ #include "precompiled.hpp" #include "memory/binaryTreeDictionary.hpp" #include "memory/defNewGeneration.hpp" #include "memory/filemap.hpp" #include "memory/genRemSet.hpp" #include "memory/generationSpec.hpp" #include "memory/tenuredGeneration.hpp" #include "runtime/java.hpp" #include "utilities/macros.hpp" #if INCLUDE_ALL_GCS #include "gc_implementation/parNew/asParNewGeneration.hpp" #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp" #include "gc_implementation/parNew/parNewGeneration.hpp" #endif // INCLUDE_ALL_GCS Generation* GenerationSpec::init(ReservedSpace rs, int level, GenRemSet* remset) { switch (name()) { case Generation::DefNew: return new DefNewGeneration(rs, init_size(), level); case Generation::MarkSweepCompact: return new TenuredGeneration(rs, init_size(), level, remset); #if INCLUDE_ALL_GCS case Generation::ParNew: return new ParNewGeneration(rs, init_size(), level); case Generation::ASParNew: return new ASParNewGeneration(rs, init_size(), init_size() /* min size */, level); case Generation::ConcurrentMarkSweep: { assert(UseConcMarkSweepGC, "UseConcMarkSweepGC should be set"); CardTableRS* ctrs = remset->as_CardTableRS(); if (ctrs == NULL) { vm_exit_during_initialization("Rem set incompatibility."); } // Otherwise // The constructor creates the CMSCollector if needed, // else registers with an existing CMSCollector ConcurrentMarkSweepGeneration* g = NULL; g = new ConcurrentMarkSweepGeneration(rs, init_size(), level, ctrs, UseCMSAdaptiveFreeLists, (FreeBlockDictionary<FreeChunk>::DictionaryChoice)CMSDictionaryChoice); g->initialize_performance_counters(); return g; } case Generation::ASConcurrentMarkSweep: { assert(UseConcMarkSweepGC, "UseConcMarkSweepGC should be set"); CardTableRS* ctrs = remset->as_CardTableRS(); if (ctrs == NULL) { vm_exit_during_initialization("Rem set incompatibility."); } // Otherwise // The constructor creates the CMSCollector if needed, // else registers with an existing CMSCollector ASConcurrentMarkSweepGeneration* g = NULL; g = new ASConcurrentMarkSweepGeneration(rs, init_size(), level, ctrs, UseCMSAdaptiveFreeLists, (FreeBlockDictionary<FreeChunk>::DictionaryChoice)CMSDictionaryChoice); g->initialize_performance_counters(); return g; } #endif // INCLUDE_ALL_GCS default: guarantee(false, "unrecognized GenerationName"); return NULL; } }
Car windows are frosting up, Christmas shopping is in full swing, and, here at the Academy, students are desperately cramming for exams. I found that this last situation was the perfect opportunity for me to create an ‘exam week survival guide’ composed of tips and tricks from staff and students. Mrs. Jessee Tomchek, the Upper School’s Academic Resource Coordinator presented me with a list of her top three tips for exam preparation: sleep, stick to a study schedule, and turn off or set aside phones. First, it is a common fact that teenagers need sleep, yet seldom get enough of it. And during exam week, this unfortunate reality becomes even more true. Tomchek stated that “many students go without the necessary 7+ hours of sleep per night,” a detriment to their ability to focus and overall health. Although studying your material and old tests is the most logical way to prepare for an exam, sleeping is necessary for all this information to reach long-term storage. Tomchek claims that “the expression ‘sleep on it’ really works.” Do your brain a favor and plan a study schedule ahead of time so you don’t sacrifice your beauty sleep. Next, by making sure to plan out this said study schedule, you will save time in the long run. “Cramming is one of the least effective ways to learn information. Get organized early and start studying a little bit each day,” says Tomchek. We’re looking at you, procrastinators. Serena Richardson, a junior with several semesters of exams under her belt, is the perfect example of Tomchek’s first two tips. Serena organizes her exam material into an exam review binder a week and a half before exam week, and she begins studying this material at least a week prior to exams. On the night before an exam day, she goes to bed early, and she takes breaks to eat cookies and hang out with her family. Serena suggests students should “take a chill pill” as to not fall asleep feeling stressed. During exam season, Serena’s visualizes the whole semester as a sports season and exam week as the championship, a useful tip inspired by Mr. Richardson. This visualization helps her realize that exams are just an opportunity to show off what she knows and the work she has done throughout the semester. The third and final piece of advice Tomchek gave might be the the hardest for most teenagers to accept, and it directly affects the first two tips. Just hide your phone. Turn off notifications, power it off, give it to your parents… do whatever it takes to keep you focused. Tomchek explains, “Time after time, technology (especially social media) has been proven to be the leading impediment to quality learning and studying.” Practice self-control and discipline so that it is easy by the time the eve of the Micro and Chem exams comes about. Tomchek also discussed taking breaks, stress relievers, switching up your workspace, and studying with friends. She stated, “Teenagers typically cannot sustain attention longer than fifty minutes.” Tomchek thus suggests taking a twenty minute break after fifty minutes of studying in order to “eat a healthy snack, go for a walk, [or] talk with a friend.” Basically, find ways to relax even when you feel that you do not need a break. Some stress relieving activities Tomchek suggests include exercising, changing your work spot, and scheduling your breaks so that they coincide with those of a friend’s. According to Mrs. Tomchek, “exercising will release endorphins, perhaps the best remedy for stress!” She also suggests getting some fresh air and vitamin D. Finally, I was curious about our students’ music preferences while studying. I listen to a calming piano music when studying subjects that require language comprehension, but when I am cranking out math problems, songs with lyrics do not bother me. I surveyed twenty students about their preferences, and eight claimed they never listen to music while studying because it is too distracting. The remaining twelve include those who listen to genres ranging from classical to slow jazz and those who mostly listen to their favorite Spotify playlists like “Today’s Hits” or “Chill.” However, many of these students explained that, like me, they refrain from listening to music when studying for certain subjects. This exam season, it is your choice whether you will board the Procrastination Plane or the Schedule Ship. Either option brings you to Christmas break, but by sticking to a schedule, putting away your phone, and getting plenty of sleep, you can thrive rather than simply survive. Have a happy Christmas break and good luck with exams!
package org.onetwo.common.spring.utils; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import org.onetwo.common.exception.BaseException; import org.onetwo.common.log.JFishLoggerFactory; import org.onetwo.common.reflect.ReflectUtils; import org.onetwo.common.utils.Assert; import org.onetwo.common.utils.LangUtils; import org.onetwo.common.utils.StringUtils; import org.slf4j.Logger; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver; import org.springframework.core.type.classreading.CachingMetadataReaderFactory; import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.util.ClassUtils; import org.springframework.util.SystemPropertyUtils; public class JFishResourcesScanner implements ResourcesScanner { protected static final String DEFAULT_RESOURCE_PATTERN = "**/*.class"; protected final Logger logger = JFishLoggerFactory.getLogger(this.getClass()); private ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver(); private MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(this.resourcePatternResolver); private String resourcePattern = DEFAULT_RESOURCE_PATTERN; public JFishResourcesScanner(){} public JFishResourcesScanner(String resourcePattern) { super(); this.resourcePattern = resourcePattern; } @Override public Collection<Class<?>> scanClasses(String... packagesToScan) { return scan(true, new ScanResourcesCallback<Class<?>>() { /*@Override public boolean isCandidate(MetadataReader metadataReader, Resource resource) { return true; }*/ @Override public Class<?> doWithCandidate(MetadataReader metadataReader, Resource resource, int count) { Class<?> cls = ReflectUtils.loadClass(metadataReader.getClassMetadata().getClassName(), false); return cls; } }, packagesToScan); } @Override public Collection<Resource> scanResources(String... packagesToScan) { return scan(false, new ScanResourcesCallback<Resource>(){ @Override public Resource doWithCandidate(MetadataReader metadataReader, Resource resource, int count) { return resource; } }, packagesToScan); } @Override public <T> Collection<T> scan(ScanResourcesCallback<T> filter, String... packagesToScan) { return scan(true, filter, packagesToScan); } @Override public <T> Collection<T> scan(boolean readMetaData, ScanResourcesCallback<T> filter, String... packagesToScan) { Assert.notNull(filter); if(LangUtils.isEmpty(packagesToScan)) return Collections.emptySet(); Collection<T> classesToBound = new HashSet<T>(); try { int count = 0; for (String pack : packagesToScan) { if(StringUtils.isBlank(pack)) continue; pack = resolveBasePackage(pack); if(!pack.endsWith("/")) pack += "/"; String locationPattern = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + pack + resourcePattern; Resource[] resources = this.resourcePatternResolver.getResources(locationPattern); if (LangUtils.isEmpty(resources)) continue; for (Resource resource : resources) { if (resource.isReadable()) { MetadataReader metadataReader = null; if(readMetaData) metadataReader = this.metadataReaderFactory.getMetadataReader(resource); T obj = filter.doWithCandidate(metadataReader, resource, count++); if(obj!=null){ classesToBound.add(obj); } } else { if (logger.isTraceEnabled()) { logger.trace("Ignored because not readable: " + resource); } } } } } catch (Exception e) { throw new BaseException("scan resource in[" + LangUtils.toString(packagesToScan) + "] error : " + e.getMessage(), e); } return classesToBound; } protected String resolveBasePackage(String basePackage) { return ClassUtils.convertClassNameToResourcePath(SystemPropertyUtils.resolvePlaceholders(basePackage)); } }
<?php include '../../config/dbc.php'; page_protect(); $title = "::My Counter::"; include '../../main/header.php'; echo "</head><body>"; if (isset($_SESSION['user_id'])) { ?><div style="margin: 0 left; width:165px;" class="myaccount"> <div><img src="../../<?php echo $_SESSION['user_avatar_file']; ?>" width="160" height="160"/></div><br> <p><strong>เวชระเบียน</strong></p> <a href="../register/search_pt.php" TARGET="_top">ค้นหารายชื่อผู้ป่วย</a><br> <a href="../register/PIDregister.php" TARGET="_top">ลงทะเบียนผู้ป่วยใหม่</a><br><br> <a href="../../main/register/combine_ptdatatable.php" TARGET="_top">รวมประวัติผู้ป่วย</a><br><br> <a href="../../login/myaccount.php" TARGET="_top">Main Menu</a><br> <p><strong>Clinic Menu</strong></p> <a href="../opd/pt_to_doctor.php" TARGET="_top">ผู้ป่วยรอตรวจ</a><br> <a href="../opd/pt_to_obs.php" TARGET="_top">ผู้ป่วยรอสังเกตอาการ</a><br> <a href="../opd/pt_to_lab.php" TARGET="_top">ผู้ป่วยรอตรวจ LAB</a><br> <a href="../opd/pt_to_trm.php" TARGET="_top">ผู้ป่วยรอ Treatment</a><br> <a href="../opd/pt_to_drug.php" TARGET="_top">ผู้ป่วยรอรับยา</a><br> <br> <a href="../../login/logout.php" TARGET="_top">Logout </a> <br><br> </div> <?php } ?> </body></html>
/** * @author Charlie */ var App = (function() { function App() { window.addEventListener('keydown', doKeyDown, true); } var doKeyDown = function(evt) { switch (evt.keyCode) { case 38: /* Up arrow was pressed */ $("#debug").html("up"); break; case 40: /* Down arrow was pressed */ $("#debug").html("down"); break; case 37: /* Left arrow was pressed */ $("#debug").html("left"); break; case 39: /* Right arrow was pressed */ $("#debug").html("right"); break; } }; return App; })(); $(document).ready(function() { new App(); });
// File generated from our OpenAPI spec namespace Stripe.Checkout { using System; using Newtonsoft.Json; using Stripe.Infrastructure; public class SessionAfterExpirationRecovery : StripeEntity<SessionAfterExpirationRecovery> { /// <summary> /// Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to /// <c>false</c>. /// </summary> [JsonProperty("allow_promotion_codes")] public bool AllowPromotionCodes { get; set; } /// <summary> /// If <c>true</c>, a recovery url will be generated to recover this Checkout Session if it /// expires before a transaction is completed. It will be attached to the Checkout Session /// object upon expiration. /// </summary> [JsonProperty("enabled")] public bool Enabled { get; set; } /// <summary> /// The timestamp at which the recovery URL will expire. /// </summary> [JsonProperty("expires_at")] [JsonConverter(typeof(UnixDateTimeConverter))] public DateTime? ExpiresAt { get; set; } /// <summary> /// URL that creates a new Checkout Session when clicked that is a copy of this expired /// Checkout Session. /// </summary> [JsonProperty("url")] public string Url { get; set; } } }
A close-up portrait of children caught up in the Syria conflict. It brings together poems, pictures (previously displayed at the 'From Syria With Love' exhibition) and stories from young people living in a Syrian refugee camp in Lebanon, alongside short story narratives and poetry by those who have worked with the children or been inspired by their stories. The combination is both accessible and immediate, deeply moving and - because of the resilience and optimism of the children themselves - ultimately inspiring. It offers a unique insight into the daily lives of children living through extraordinary events, and reveals their fears, hopes and dreams for the future. The ideal antidote to those who are left in despair by mainstream coverage of the Syrian conflict, it offers a sense of creativity, hope and peace, and helps to form a bridge between the reader and the refugees themselves. All profits from the book will go towards supporting families in the camp, both with basic necessities and in giving the children featured in the book the chance of a better future. Molly Masters, the book's creator, is a university student inspired by volunteering with the charity 'From Syria With Love', founded by Syrian student and activist Baraa Esshan Kouja. She has combined the children's own creative work with material inspired by the children's own words and by the wider crisis, including contributions from Caroline Moorhead, Gillian Cross and Caroline Lucas.
package railo.commons.net.http.httpclient4.entity; import org.apache.http.Header; import org.apache.http.entity.ByteArrayEntity; import railo.commons.lang.StringUtil; public class ByteArrayHttpEntity extends ByteArrayEntity implements Entity4 { private String strContentType; private int contentLength; public ByteArrayHttpEntity(byte[] barr, String contentType) { super(barr); contentLength=barr==null?0:barr.length; if(StringUtil.isEmpty(contentType,true)) { Header h = getContentType(); if(h!=null) strContentType=h.getValue(); } else this.strContentType=contentType; } @Override public long contentLength() { return contentLength; } @Override public String contentType() { return strContentType; } }
Forever Torn is the true and amazing story of two brothers and three generations of one family - a family torn apart by deaths, poverty, deceit and a promise made by a small boy to his Grandfather over 80 years ago. It is the story of one man who refused to acknowledge his past and his brother who remained bound to protect the secret, despite his own pain. If you have enjoyed fictional epics such as Blood Brothers and Kane and Abel, you will love Forever Torn, which unlike the aforementioned is based on a true and tragic story. A compelling family saga you will struggle to put down, it would be a cold heart that remained untouched by Greenfields Forever Torn. An extraordinary story of strength and resilience that spans the decades his characters are powerfully observed and so personal it’s like he’s opened a window to their souls, each one drawn with the greatest care and deliberation. Writing with an acerbic pen there’s an edgy sense of realism to his prose as he takes us through the years. He has a meticulous eye for period detail which he conveys through signs of the times and there’s no doubt he’s invested much in period research to capture that all important sense of poignancy. In this way, he reminds us throughout that we are reading a true story. There’s no gilding of the Lilly, giving us an ever-present undertone on which to reflect. One that ranges from heart-achingly sad to hopeful and uplifting as the years advance. Tragic, True & Undeniably Powerful.
/* * #%L * OME Bio-Formats package for reading and converting biological file formats. * %% * Copyright (C) 2005 - 2016 Open Microscopy Environment: * - Board of Regents of the University of Wisconsin-Madison * - Glencoe Software, Inc. * - University of Dundee * %% * This program 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 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-2.0.html>. * #L% */ package loci.formats.in; import java.io.File; import java.io.IOException; import java.math.BigDecimal; import java.math.MathContext; import java.math.RoundingMode; import java.text.DecimalFormatSymbols; import java.util.Arrays; import java.util.ArrayList; import java.util.HashSet; import java.util.Set; import java.util.Vector; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import loci.common.DataTools; import loci.common.DateTools; import loci.common.Location; import loci.common.RandomAccessInputStream; import loci.common.xml.XMLTools; import loci.formats.CoreMetadata; import loci.formats.FormatException; import loci.formats.FormatTools; import loci.formats.MetadataTools; import loci.formats.meta.MetadataStore; import loci.formats.tiff.IFD; import loci.formats.tiff.IFDList; import loci.formats.tiff.PhotoInterp; import loci.formats.tiff.TiffIFDEntry; import loci.formats.tiff.TiffParser; import loci.formats.tiff.TiffRational; import ome.xml.model.primitives.PositiveFloat; import ome.xml.model.primitives.PositiveInteger; import ome.xml.model.primitives.Timestamp; import ome.units.quantity.Frequency; import ome.units.quantity.Length; import ome.units.quantity.Temperature; import ome.units.quantity.Time; import ome.units.UNITS; /** * Reader is the file format reader for Metamorph STK files. * * @author Eric Kjellman egkjellman at wisc.edu * @author Melissa Linkert melissa at glencoesoftware.com * @author Curtis Rueden ctrueden at wisc.edu * @author Sebastien Huart Sebastien dot Huart at curie.fr */ public class MetamorphReader extends BaseTiffReader { // -- Constants -- /** Logger for this class. */ private static final Logger LOGGER = LoggerFactory.getLogger(MetamorphReader.class); public static final String SHORT_DATE_FORMAT = "yyyyMMdd HH:mm:ss"; public static final String LONG_DATE_FORMAT = "dd/MM/yyyy HH:mm:ss"; public static final String[] ND_SUFFIX = {"nd"}; public static final String[] STK_SUFFIX = {"stk", "tif", "tiff"}; // IFD tag numbers of important fields private static final int METAMORPH_ID = 33628; private static final int UIC1TAG = METAMORPH_ID; private static final int UIC2TAG = 33629; private static final int UIC3TAG = 33630; private static final int UIC4TAG = 33631; // -- Fields -- /** The TIFF's name */ private String imageName; /** The TIFF's creation date */ private String imageCreationDate; /** The TIFF's emWavelength */ private long[] emWavelength; private double[] wave; private String binning; private double zoom, stepSize; private Double exposureTime; private Vector<String> waveNames; private Vector<String> stageNames; private long[] internalStamps; private double[] zDistances; private Length[] stageX, stageY; private double zStart; private Double sizeX = null, sizeY = null; private double tempZ; private boolean validZ; private Double gain; private int mmPlanes; //number of metamorph planes private MetamorphReader[][] stkReaders; /** List of STK files in the dataset. */ private String[][] stks; private String ndFilename; private boolean canLookForND = true; private boolean[] firstSeriesChannels; private boolean bizarreMultichannelAcquisition = false; private int openFiles = 0; private boolean hasStagePositions = false; private boolean hasChipOffsets = false; private boolean hasAbsoluteZ = false; private boolean hasAbsoluteZValid = false; // -- Constructor -- /** Constructs a new Metamorph reader. */ public MetamorphReader() { super("Metamorph STK", new String[] {"stk", "nd", "tif", "tiff"}); domains = new String[] {FormatTools.LM_DOMAIN}; hasCompanionFiles = true; suffixSufficient = false; datasetDescription = "One or more .stk or .tif/.tiff files plus an " + "optional .nd file"; } // -- IFormatReader API methods -- /* @see loci.formats.IFormatReader#isThisType(String, boolean) */ @Override public boolean isThisType(String name, boolean open) { Location location = new Location(name); if (!location.exists()) { return false; } if (checkSuffix(name, "nd")) return true; if (open) { location = location.getAbsoluteFile(); Location parent = location.getParentFile(); String baseName = location.getName(); while (baseName.indexOf("_") >= 0) { baseName = baseName.substring(0, baseName.lastIndexOf("_")); if (checkSuffix(name, suffixes) && (new Location(parent, baseName + ".nd").exists() || new Location(parent, baseName + ".ND").exists())) { return true; } if (checkSuffix(name, suffixes) && (new Location(parent, baseName + ".htd").exists() || new Location(parent, baseName + ".HTD").exists())) { return false; } } } return super.isThisType(name, open); } /* @see loci.formats.IFormatReader#isThisType(RandomAccessInputStream) */ @Override public boolean isThisType(RandomAccessInputStream stream) throws IOException { TiffParser tp = new TiffParser(stream); IFD ifd = tp.getFirstIFD(); if (ifd == null) return false; String software = ifd.getIFDTextValue(IFD.SOFTWARE); boolean validSoftware = software != null && software.trim().toLowerCase().startsWith("metamorph"); return validSoftware || (ifd.containsKey(UIC1TAG) && ifd.containsKey(UIC3TAG) && ifd.containsKey(UIC4TAG)); } /* @see loci.formats.IFormatReader#isSingleFile(String) */ @Override public boolean isSingleFile(String id) throws FormatException, IOException { return !checkSuffix(id, ND_SUFFIX); } /* @see loci.formats.IFormatReader#fileGroupOption(String) */ @Override public int fileGroupOption(String id) throws FormatException, IOException { if (checkSuffix(id, ND_SUFFIX)) return FormatTools.MUST_GROUP; Location l = new Location(id).getAbsoluteFile(); String[] files = l.getParentFile().list(); for (String file : files) { if (checkSuffix(file, ND_SUFFIX) && l.getName().startsWith(file.substring(0, file.lastIndexOf(".")))) { return FormatTools.MUST_GROUP; } } return FormatTools.CANNOT_GROUP; } /* @see loci.formats.IFormatReader#getSeriesUsedFiles(boolean) */ @Override public String[] getSeriesUsedFiles(boolean noPixels) { FormatTools.assertId(currentId, true, 1); if (!noPixels && stks == null) return new String[] {currentId}; else if (stks == null) return new String[0]; Vector<String> v = new Vector<String>(); if (ndFilename != null) v.add(ndFilename); if (!noPixels) { for (String stk : stks[getSeries()]) { if (stk != null && new Location(stk).exists()) { v.add(stk); } } } return v.toArray(new String[v.size()]); } /** * @see loci.formats.IFormatReader#openBytes(int, byte[], int, int, int, int) */ @Override public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { FormatTools.assertId(currentId, true, 1); if (stks == null) { return super.openBytes(no, buf, x, y, w, h); } int[] coords = FormatTools.getZCTCoords(this, no % getSizeZ()); int ndx = no / getSizeZ(); if (bizarreMultichannelAcquisition) { int[] pos = getZCTCoords(no); ndx = getIndex(pos[0], 0, pos[2]) / getSizeZ(); } if (stks[getSeries()].length == 1) ndx = 0; String file = stks[getSeries()][ndx]; if (file == null) return buf; // the original file is a .nd file, so we need to construct a new reader // for the constituent STK files stkReaders[getSeries()][ndx].setMetadataOptions( new DefaultMetadataOptions(MetadataLevel.MINIMUM)); int plane = stks[getSeries()].length == 1 ? no : coords[0]; try { if (!file.equals(stkReaders[getSeries()][ndx].getCurrentFile())) { openFiles++; } stkReaders[getSeries()][ndx].setId(file); if (bizarreMultichannelAcquisition) { int realX = getZCTCoords(no)[1] == 0 ? x : x + getSizeX(); stkReaders[getSeries()][ndx].openBytes(plane, buf, realX, y, w, h); } else { stkReaders[getSeries()][ndx].openBytes(plane, buf, x, y, w, h); } } finally { int count = stkReaders[getSeries()][ndx].getImageCount(); if (plane == count - 1 || openFiles > 128) { stkReaders[getSeries()][ndx].close(); openFiles--; } } return buf; } /* @see loci.formats.IFormatReader#close(boolean) */ @Override public void close(boolean fileOnly) throws IOException { super.close(fileOnly); if (stkReaders != null) { for (MetamorphReader[] s : stkReaders) { if (s != null) { for (MetamorphReader reader : s) { if (reader != null) reader.close(fileOnly); } } } } if (!fileOnly) { imageName = imageCreationDate = null; emWavelength = null; stks = null; mmPlanes = 0; ndFilename = null; wave = null; binning = null; zoom = stepSize = 0; exposureTime = null; waveNames = stageNames = null; internalStamps = null; zDistances = null; stageX = stageY = null; firstSeriesChannels = null; sizeX = sizeY = null; tempZ = 0d; validZ = false; stkReaders = null; gain = null; bizarreMultichannelAcquisition = false; openFiles = 0; hasStagePositions = false; hasChipOffsets = false; hasAbsoluteZ = false; hasAbsoluteZValid = false; } } // -- Internal FormatReader API methods -- /* @see loci.formats.FormatReader#initFile(String) */ @Override protected void initFile(String id) throws FormatException, IOException { if (checkSuffix(id, ND_SUFFIX)) { LOGGER.info("Initializing " + id); // find an associated STK file String stkFile = id.substring(0, id.lastIndexOf(".")); if (stkFile.indexOf(File.separator) != -1) { stkFile = stkFile.substring(stkFile.lastIndexOf(File.separator) + 1); } Location parent = new Location(id).getAbsoluteFile().getParentFile(); LOGGER.info("Looking for STK file in {}", parent.getAbsolutePath()); String[] dirList = parent.list(true); for (String f : dirList) { int underscore = f.indexOf("_"); if (underscore < 0) underscore = f.indexOf("."); if (underscore < 0) underscore = f.length(); String prefix = f.substring(0, underscore); if ((f.equals(stkFile) || stkFile.startsWith(prefix)) && checkSuffix(f, STK_SUFFIX)) { stkFile = new Location(parent.getAbsolutePath(), f).getAbsolutePath(); break; } } if (!checkSuffix(stkFile, STK_SUFFIX)) { throw new FormatException("STK file not found in " + parent.getAbsolutePath() + "."); } super.initFile(stkFile); } else super.initFile(id); Location ndfile = null; if (checkSuffix(id, ND_SUFFIX)) ndfile = new Location(id); else if (canLookForND && isGroupFiles()) { // an STK file was passed to initFile // let's check the parent directory for an .nd file Location stk = new Location(id).getAbsoluteFile(); String stkName = stk.getName(); String stkPrefix = stkName; if (stkPrefix.indexOf("_") >= 0) { stkPrefix = stkPrefix.substring(0, stkPrefix.indexOf("_") + 1); } Location parent = stk.getParentFile(); String[] list = parent.list(true); int matchingChars = 0; for (String f : list) { if (checkSuffix(f, ND_SUFFIX)) { String prefix = f.substring(0, f.lastIndexOf(".")); if (prefix.indexOf("_") >= 0) { prefix = prefix.substring(0, prefix.indexOf("_") + 1); } if (stkName.startsWith(prefix) || prefix.equals(stkPrefix)) { int charCount = 0; for (int i=0; i<f.length(); i++) { if (i >= stkName.length()) { break; } if (f.charAt(i) == stkName.charAt(i)) { charCount++; } else { break; } } if (charCount > matchingChars || (charCount == matchingChars && f.charAt(charCount) == '.')) { ndfile = new Location(parent, f).getAbsoluteFile(); matchingChars = charCount; } } } } } String creationTime = null; if (ndfile != null && ndfile.exists() && (fileGroupOption(id) == FormatTools.MUST_GROUP || isGroupFiles())) { // parse key/value pairs from .nd file int zc = getSizeZ(), cc = getSizeC(), tc = getSizeT(); int nstages = 0; String z = null, c = null, t = null; Vector<Boolean> hasZ = new Vector<Boolean>(); waveNames = new Vector<String>(); stageNames = new Vector<String>(); boolean useWaveNames = true; ndFilename = ndfile.getAbsolutePath(); String[] lines = DataTools.readFile(ndFilename).split("\n"); boolean globalDoZ = true; boolean doTimelapse = false; StringBuilder currentValue = new StringBuilder(); String key = ""; for (String line : lines) { int comma = line.indexOf(","); if (comma <= 0) { currentValue.append("\n"); currentValue.append(line); continue; } String value = currentValue.toString(); addGlobalMeta(key, value); if (key.equals("NZSteps")) z = value; else if (key.equals("DoTimelapse")) { doTimelapse = Boolean.parseBoolean(value); } else if (key.equals("NWavelengths")) c = value; else if (key.equals("NTimePoints")) t = value; else if (key.startsWith("WaveDoZ")) { hasZ.add(new Boolean(value.toLowerCase())); } else if (key.startsWith("WaveName")) { String waveName = value.substring(1, value.length() - 1); if (waveName.equals("Both lasers") || waveName.startsWith("DUAL")) { bizarreMultichannelAcquisition = true; } waveNames.add(waveName); } else if (key.startsWith("Stage")) { stageNames.add(value); } else if (key.startsWith("StartTime")) { creationTime = value; } else if (key.equals("ZStepSize")) { value = value.replace(',', '.'); stepSize = Double.parseDouble(value); } else if (key.equals("NStagePositions")) { nstages = Integer.parseInt(value); } else if (key.equals("WaveInFileName")) { useWaveNames = Boolean.parseBoolean(value); } else if (key.equals("DoZSeries")) { globalDoZ = new Boolean(value.toLowerCase()); } key = line.substring(1, comma - 1).trim(); currentValue.delete(0, currentValue.length()); currentValue.append(line.substring(comma + 1).trim()); } if (!globalDoZ) { for (int i=0; i<hasZ.size(); i++) { hasZ.set(i, false); } } // figure out how many files we need if (z != null) zc = Integer.parseInt(z); if (c != null) cc = Integer.parseInt(c); if (t != null) tc = Integer.parseInt(t); else if (!doTimelapse) { tc = 1; } if (cc == 0) cc = 1; if (cc == 1 && bizarreMultichannelAcquisition) { cc = 2; } if (tc == 0) { tc = 1; } int numFiles = cc * tc; if (nstages > 0) numFiles *= nstages; // determine series count int stagesCount = nstages == 0 ? 1 : nstages; int seriesCount = stagesCount; firstSeriesChannels = new boolean[cc]; Arrays.fill(firstSeriesChannels, true); boolean differentZs = false; for (int i=0; i<cc; i++) { boolean hasZ1 = i < hasZ.size() && hasZ.get(i).booleanValue(); boolean hasZ2 = i != 0 && (i - 1 < hasZ.size()) && hasZ.get(i - 1).booleanValue(); if (i > 0 && hasZ1 != hasZ2 && globalDoZ) { if (!differentZs) seriesCount *= 2; differentZs = true; } } int channelsInFirstSeries = cc; if (differentZs) { channelsInFirstSeries = 0; for (int i=0; i<cc; i++) { if ((!hasZ.get(0) && i == 0) || (hasZ.get(0) && hasZ.get(i).booleanValue())) { channelsInFirstSeries++; } else firstSeriesChannels[i] = false; } } stks = new String[seriesCount][]; if (seriesCount == 1) stks[0] = new String[numFiles]; else if (differentZs) { for (int i=0; i<stagesCount; i++) { stks[i * 2] = new String[channelsInFirstSeries * tc]; stks[i * 2 + 1] = new String[(cc - channelsInFirstSeries) * tc]; } } else { for (int i=0; i<stks.length; i++) { stks[i] = new String[numFiles / stks.length]; } } String prefix = ndfile.getPath(); prefix = prefix.substring(prefix.lastIndexOf(File.separator) + 1, prefix.lastIndexOf(".")); // build list of STK files boolean anyZ = hasZ.contains(Boolean.TRUE); int[] pt = new int[seriesCount]; for (int i=0; i<tc; i++) { for (int s=0; s<stagesCount; s++) { for (int j=0; j<cc; j++) { boolean validZ = j >= hasZ.size() || hasZ.get(j).booleanValue(); int seriesNdx = s * (seriesCount / stagesCount); if ((seriesCount != 1 && (!validZ || (hasZ.size() > 0 && !hasZ.get(0)))) || (nstages == 0 && ((!validZ && cc > 1) || seriesCount > 1))) { if (anyZ && j > 0 && seriesNdx < seriesCount - 1 && (!validZ || !hasZ.get(0))) { seriesNdx++; } } if (seriesNdx >= stks.length || seriesNdx >= pt.length || pt[seriesNdx] >= stks[seriesNdx].length) { continue; } stks[seriesNdx][pt[seriesNdx]] = prefix; if (j < waveNames.size() && waveNames.get(j) != null) { stks[seriesNdx][pt[seriesNdx]] += "_w" + (j + 1); if (useWaveNames) { String waveName = waveNames.get(j); // If there are underscores in the wavelength name, translate // them to hyphens. (See #558) waveName = waveName.replace('_', '-'); // If there are slashes (forward or backward) in the wavelength // name, translate them to hyphens. (See #5922) waveName = waveName.replace('/', '-'); waveName = waveName.replace('\\', '-'); waveName = waveName.replace('(', '-'); waveName = waveName.replace(')', '-'); stks[seriesNdx][pt[seriesNdx]] += waveName; } } if (nstages > 0) { stks[seriesNdx][pt[seriesNdx]] += "_s" + (s + 1); } if (tc > 1 || doTimelapse) { stks[seriesNdx][pt[seriesNdx]] += "_t" + (i + 1) + ".STK"; } else stks[seriesNdx][pt[seriesNdx]] += ".STK"; pt[seriesNdx]++; } } } ndfile = ndfile.getAbsoluteFile(); // check that each STK file exists for (int s=0; s<stks.length; s++) { for (int f=0; f<stks[s].length; f++) { Location l = new Location(ndfile.getParent(), stks[s][f]); stks[s][f] = getRealSTKFile(l); } } String file = locateFirstValidFile(); if (file == null) { throw new FormatException( "Unable to locate at least one valid STK file!"); } RandomAccessInputStream s = new RandomAccessInputStream(file, 16); TiffParser tp = new TiffParser(s); IFD ifd = tp.getFirstIFD(); CoreMetadata ms0 = core.get(0); s.close(); ms0.sizeX = (int) ifd.getImageWidth(); ms0.sizeY = (int) ifd.getImageLength(); if (bizarreMultichannelAcquisition) { ms0.sizeX /= 2; } ms0.sizeZ = hasZ.size() > 0 && !hasZ.get(0) ? 1 : zc; ms0.sizeC = cc; ms0.sizeT = tc; ms0.imageCount = getSizeZ() * getSizeC() * getSizeT(); ms0.dimensionOrder = "XYZCT"; if (stks != null && stks.length > 1) { // Note that core can't be replaced with newCore until the end of this block. ArrayList<CoreMetadata> newCore = new ArrayList<CoreMetadata>(); for (int i=0; i<stks.length; i++) { CoreMetadata ms = new CoreMetadata(); newCore.add(ms); ms.sizeX = getSizeX(); ms.sizeY = getSizeY(); ms.sizeZ = getSizeZ(); ms.sizeC = getSizeC(); ms.sizeT = getSizeT(); ms.pixelType = getPixelType(); ms.imageCount = getImageCount(); ms.dimensionOrder = getDimensionOrder(); ms.rgb = isRGB(); ms.littleEndian = isLittleEndian(); ms.interleaved = isInterleaved(); ms.orderCertain = true; } if (stks.length > nstages) { for (int j=0; j<stagesCount; j++) { int idx = j * 2 + 1; CoreMetadata midx = newCore.get(idx); CoreMetadata pmidx = newCore.get(j * 2); pmidx.sizeC = stks[j * 2].length / getSizeT(); midx.sizeC = stks[idx].length / midx.sizeT; midx.sizeZ = hasZ.size() > 1 && hasZ.get(1) && core.get(0).sizeZ == 1 ? zc : 1; pmidx.imageCount = pmidx.sizeC * pmidx.sizeT * pmidx.sizeZ; midx.imageCount = midx.sizeC * midx.sizeT * midx.sizeZ; } } core = newCore; } } if (stks == null) { stkReaders = new MetamorphReader[1][1]; stkReaders[0][0] = new MetamorphReader(); stkReaders[0][0].setCanLookForND(false); } else { stkReaders = new MetamorphReader[stks.length][]; for (int i=0; i<stks.length; i++) { stkReaders[i] = new MetamorphReader[stks[i].length]; for (int j=0; j<stkReaders[i].length; j++) { stkReaders[i][j] = new MetamorphReader(); stkReaders[i][j].setCanLookForND(false); if (j > 0) { stkReaders[i][j].setMetadataOptions( new DefaultMetadataOptions(MetadataLevel.MINIMUM)); } } } } Vector<String> timestamps = null; MetamorphHandler handler = null; MetadataStore store = makeFilterMetadata(); MetadataTools.populatePixels(store, this, true); String detectorID = MetadataTools.createLSID("Detector", 0, 0); for (int i=0; i<getSeriesCount(); i++) { setSeries(i); handler = new MetamorphHandler(getSeriesMetadata()); String instrumentID = MetadataTools.createLSID("Instrument", i); store.setInstrumentID(instrumentID, i); store.setImageInstrumentRef(instrumentID, i); if (i == 0) { store.setDetectorID(detectorID, 0, 0); store.setDetectorType(getDetectorType("Other"), 0, 0); } String comment = getFirstComment(i); if (comment != null && comment.startsWith("<MetaData>")) { try { XMLTools.parseXML(XMLTools.sanitizeXML(comment), handler); } catch (IOException e) { } } if (creationTime != null) { String date = DateTools.formatDate(creationTime, SHORT_DATE_FORMAT, "."); if (date != null) { store.setImageAcquisitionDate(new Timestamp(date), 0); } } store.setImageName(makeImageName(i).trim(), i); if (getMetadataOptions().getMetadataLevel() == MetadataLevel.MINIMUM) { continue; } store.setImageDescription("", i); store.setImagingEnvironmentTemperature( new Temperature(handler.getTemperature(), UNITS.DEGREEC), i); if (sizeX == null) sizeX = handler.getPixelSizeX(); if (sizeY == null) sizeY = handler.getPixelSizeY(); Length physicalSizeX = FormatTools.getPhysicalSizeX(sizeX); Length physicalSizeY = FormatTools.getPhysicalSizeY(sizeY); if (physicalSizeX != null) { store.setPixelsPhysicalSizeX(physicalSizeX, i); } if (physicalSizeY != null) { store.setPixelsPhysicalSizeY(physicalSizeY, i); } if (zDistances != null) { stepSize = zDistances[0]; } else { Vector<Double> zPositions = new Vector<Double>(); Vector<Double> uniqueZ = new Vector<Double>(); for (IFD ifd : ifds) { MetamorphHandler zPlaneHandler = new MetamorphHandler(); String zComment = ifd.getComment(); if (zComment != null && zComment.startsWith("<MetaData>")) { try { XMLTools.parseXML(XMLTools.sanitizeXML(zComment), zPlaneHandler); } catch (IOException e) { } } zPositions = zPlaneHandler.getZPositions(); for (Double z : zPositions) { if (!uniqueZ.contains(z)) uniqueZ.add(z); } } if (uniqueZ.size() > 1 && uniqueZ.size() == getSizeZ()) { BigDecimal lastZ = BigDecimal.valueOf(uniqueZ.get(uniqueZ.size() - 1)); BigDecimal firstZ = BigDecimal.valueOf(uniqueZ.get(0)); BigDecimal zRange = (lastZ.subtract(firstZ)).abs(); BigDecimal zSize = BigDecimal.valueOf((double)(getSizeZ() - 1)); MathContext mc = new MathContext(10, RoundingMode.HALF_UP); stepSize = zRange.divide(zSize, mc).doubleValue(); } } Length physicalSizeZ = FormatTools.getPhysicalSizeZ(stepSize); if (physicalSizeZ != null) { store.setPixelsPhysicalSizeZ(physicalSizeZ, i); } String objectiveID = MetadataTools.createLSID("Objective", i, 0); store.setObjectiveID(objectiveID, i, 0); if (handler.getLensNA() != 0) { store.setObjectiveLensNA(handler.getLensNA(), i, 0); } store.setObjectiveSettingsID(objectiveID, i); int waveIndex = 0; for (int c=0; c<getEffectiveSizeC(); c++) { if (firstSeriesChannels == null || (stageNames != null && stageNames.size() == getSeriesCount())) { waveIndex = c; } else if (firstSeriesChannels != null) { int s = i % 2; while (firstSeriesChannels[waveIndex] == (s == 1) && waveIndex < firstSeriesChannels.length) { waveIndex++; } } if (waveNames != null && waveIndex < waveNames.size()) { store.setChannelName(waveNames.get(waveIndex).trim(), i, c); } if (handler.getBinning() != null) binning = handler.getBinning(); if (binning != null) { store.setDetectorSettingsBinning(getBinning(binning), i, c); } if (handler.getReadOutRate() != 0) { store.setDetectorSettingsReadOutRate( new Frequency(handler.getReadOutRate(), UNITS.HZ), i, c); } if (gain == null) { gain = handler.getGain(); } if (gain != null) { store.setDetectorSettingsGain(gain, i, c); } store.setDetectorSettingsID(detectorID, i, c); if (wave != null && waveIndex < wave.length) { Length wavelength = FormatTools.getWavelength(wave[waveIndex]); if ((int) wave[waveIndex] >= 1) { // link LightSource to Image String lightSourceID = MetadataTools.createLSID("LightSource", i, c); store.setLaserID(lightSourceID, i, c); store.setChannelLightSourceSettingsID(lightSourceID, i, c); store.setLaserType(getLaserType("Other"), i, c); store.setLaserLaserMedium(getLaserMedium("Other"), i, c); if (wavelength != null) { store.setChannelLightSourceSettingsWavelength(wavelength, i, c); } } } waveIndex++; } timestamps = handler.getTimestamps(); for (int t=0; t<timestamps.size(); t++) { String date = DateTools.convertDate(DateTools.getTime( timestamps.get(t), SHORT_DATE_FORMAT, "."), DateTools.UNIX, SHORT_DATE_FORMAT + ".SSS"); addSeriesMetaList("timestamp", date); } long startDate = 0; if (timestamps.size() > 0) { startDate = DateTools.getTime(timestamps.get(0), SHORT_DATE_FORMAT, "."); } final Length positionX = handler.getStagePositionX(); final Length positionY = handler.getStagePositionY(); Vector<Double> exposureTimes = handler.getExposures(); if (exposureTimes.size() == 0) { for (int p=0; p<getImageCount(); p++) { exposureTimes.add(exposureTime); } } else if (exposureTimes.size() == 1 && exposureTimes.size() < getSizeC()) { for (int c=1; c<getSizeC(); c++) { MetamorphHandler channelHandler = new MetamorphHandler(); String channelComment = getComment(i, c); if (channelComment != null && channelComment.startsWith("<MetaData>")) { try { XMLTools.parseXML(XMLTools.sanitizeXML(channelComment), channelHandler); } catch (IOException e) { } } Vector<Double> channelExpTime = channelHandler.getExposures(); exposureTimes.add(channelExpTime.get(0)); } } int lastFile = -1; IFDList lastIFDs = null; IFD lastIFD = null; long[] lastOffsets = null; double distance = zStart; TiffParser tp = null; RandomAccessInputStream stream = null; for (int p=0; p<getImageCount(); p++) { int[] coords = getZCTCoords(p); Double deltaT = Double.valueOf(0); Double expTime = exposureTime; Double xmlZPosition = null; int fileIndex = getIndex(0, 0, coords[2]) / getSizeZ(); if (fileIndex >= 0) { String file = stks == null ? currentId : stks[i][fileIndex]; if (file != null) { if (fileIndex != lastFile) { if (stream != null) { stream.close(); } stream = new RandomAccessInputStream(file, 16); tp = new TiffParser(stream); tp.checkHeader(); IFDList f = tp.getIFDs(); if (f.size() > 0) { lastFile = fileIndex; lastIFDs = f; } else { file = null; stks[i][fileIndex] = null; } } } if (file != null) { lastIFD = lastIFDs.get(p % lastIFDs.size()); Object commentEntry = lastIFD.get(IFD.IMAGE_DESCRIPTION); if (commentEntry != null) { if (commentEntry instanceof String) { comment = (String) commentEntry; } else if (commentEntry instanceof TiffIFDEntry) { comment = tp.getIFDValue((TiffIFDEntry) commentEntry).toString(); } } if (comment != null) comment = comment.trim(); if (comment != null && comment.startsWith("<MetaData>")) { String[] lines = comment.split("\n"); timestamps = new Vector<String>(); for (String line : lines) { line = line.trim(); if (line.startsWith("<prop")) { int firstQuote = line.indexOf("\"") + 1; int lastQuote = line.lastIndexOf("\""); String key = line.substring(firstQuote, line.indexOf("\"", firstQuote)); String value = line.substring( line.lastIndexOf("\"", lastQuote - 1) + 1, lastQuote); if (key.equals("z-position")) { xmlZPosition = new Double(value); } else if (key.equals("acquisition-time-local")) { timestamps.add(value); } } } } } } int index = 0; if (timestamps.size() > 0) { if (coords[2] < timestamps.size()) index = coords[2]; String stamp = timestamps.get(index); long ms = DateTools.getTime(stamp, SHORT_DATE_FORMAT, "."); deltaT = new Double((ms - startDate) / 1000.0); } else if (internalStamps != null && p < internalStamps.length) { long delta = internalStamps[p] - internalStamps[0]; deltaT = new Double(delta / 1000.0); if (coords[2] < exposureTimes.size()) index = coords[2]; } if (index == 0 && p > 0 && exposureTimes.size() > 0) { index = coords[1] % exposureTimes.size(); } if (index < exposureTimes.size()) { expTime = exposureTimes.get(index); } if (deltaT != null) { store.setPlaneDeltaT(new Time(deltaT, UNITS.S), i, p); } if (expTime != null) { store.setPlaneExposureTime(new Time(expTime, UNITS.S), i, p); } if (stageX != null && p < stageX.length) { store.setPlanePositionX(stageX[p], i, p); } else if (positionX != null) { store.setPlanePositionX(positionX, i, p); } if (stageY != null && p < stageY.length) { store.setPlanePositionY(stageY[p], i, p); } else if (positionY != null) { store.setPlanePositionY(positionY, i, p); } if (zDistances != null && p < zDistances.length) { if (p > 0) { if (zDistances[p] != 0d) distance += zDistances[p]; else distance += zDistances[0]; } final Length zPos = new Length(distance, UNITS.REFERENCEFRAME); store.setPlanePositionZ(zPos, i, p); } else if (xmlZPosition != null) { final Length zPos = new Length(xmlZPosition, UNITS.REFERENCEFRAME); store.setPlanePositionZ(zPos, i, p); } } if (stream != null) { stream.close(); } } setSeries(0); } // -- Internal BaseTiffReader API methods -- /* @see BaseTiffReader#initStandardMetadata() */ @Override protected void initStandardMetadata() throws FormatException, IOException { super.initStandardMetadata(); CoreMetadata ms0 = core.get(0); ms0.sizeZ = 1; ms0.sizeT = 0; int rgbChannels = getSizeC(); // Now that the base TIFF standard metadata has been parsed, we need to // parse out the STK metadata from the UIC4TAG. TiffIFDEntry uic1tagEntry = null; TiffIFDEntry uic2tagEntry = null; TiffIFDEntry uic4tagEntry = null; try { uic1tagEntry = tiffParser.getFirstIFDEntry(UIC1TAG); uic2tagEntry = tiffParser.getFirstIFDEntry(UIC2TAG); uic4tagEntry = tiffParser.getFirstIFDEntry(UIC4TAG); } catch (IllegalArgumentException exc) { LOGGER.debug("Unknown tag", exc); } try { if (uic4tagEntry != null) { mmPlanes = uic4tagEntry.getValueCount(); } if (mmPlanes == 0) { mmPlanes = ifds.size(); } if (uic2tagEntry != null) { parseUIC2Tags(uic2tagEntry.getValueOffset()); } if (getMetadataOptions().getMetadataLevel() != MetadataLevel.MINIMUM) { if (uic4tagEntry != null) { parseUIC4Tags(uic4tagEntry.getValueOffset()); } if (uic1tagEntry != null) { parseUIC1Tags(uic1tagEntry.getValueOffset(), uic1tagEntry.getValueCount()); } } in.seek(uic4tagEntry.getValueOffset()); } catch (NullPointerException exc) { LOGGER.debug("", exc); } catch (IOException exc) { LOGGER.debug("Failed to parse proprietary tags", exc); } try { // copy ifds into a new array of Hashtables that will accommodate the // additional image planes IFD firstIFD = ifds.get(0); long[] uic2 = firstIFD.getIFDLongArray(UIC2TAG); if (uic2 == null) { throw new FormatException("Invalid Metamorph file. Tag " + UIC2TAG + " not found."); } ms0.imageCount = uic2.length; Object entry = firstIFD.getIFDValue(UIC3TAG); TiffRational[] uic3 = entry instanceof TiffRational[] ? (TiffRational[]) entry : new TiffRational[] {(TiffRational) entry}; wave = new double[uic3.length]; Vector<Double> uniqueWavelengths = new Vector<Double>(); for (int i=0; i<uic3.length; i++) { wave[i] = uic3[i].doubleValue(); addSeriesMeta("Wavelength [" + intFormatMax(i, mmPlanes) + "]", wave[i]); Double v = new Double(wave[i]); if (!uniqueWavelengths.contains(v)) uniqueWavelengths.add(v); } if (getSizeC() == 1) { ms0.sizeC = uniqueWavelengths.size(); if (getSizeC() < getImageCount() && getSizeC() > (getImageCount() - getSizeC()) && (getImageCount() % getSizeC()) != 0) { ms0.sizeC = getImageCount(); } } IFDList tempIFDs = new IFDList(); long[] oldOffsets = firstIFD.getStripOffsets(); long[] stripByteCounts = firstIFD.getStripByteCounts(); int rowsPerStrip = (int) firstIFD.getRowsPerStrip()[0]; int stripsPerImage = getSizeY() / rowsPerStrip; if (stripsPerImage * rowsPerStrip != getSizeY()) stripsPerImage++; PhotoInterp check = firstIFD.getPhotometricInterpretation(); if (check == PhotoInterp.RGB_PALETTE) { firstIFD.putIFDValue(IFD.PHOTOMETRIC_INTERPRETATION, PhotoInterp.BLACK_IS_ZERO); } emWavelength = firstIFD.getIFDLongArray(UIC3TAG); // for each image plane, construct an IFD hashtable IFD temp; for (int i=0; i<getImageCount(); i++) { // copy data from the first IFD temp = new IFD(firstIFD); // now we need a StripOffsets entry - the original IFD doesn't have this long[] newOffsets = new long[stripsPerImage]; if (stripsPerImage * (i + 1) <= oldOffsets.length) { System.arraycopy(oldOffsets, stripsPerImage * i, newOffsets, 0, stripsPerImage); } else { System.arraycopy(oldOffsets, 0, newOffsets, 0, stripsPerImage); long image = (stripByteCounts[0] / rowsPerStrip) * getSizeY(); for (int q=0; q<stripsPerImage; q++) { newOffsets[q] += i * image; } } temp.putIFDValue(IFD.STRIP_OFFSETS, newOffsets); long[] newByteCounts = new long[stripsPerImage]; if (stripsPerImage * i < stripByteCounts.length) { System.arraycopy(stripByteCounts, stripsPerImage * i, newByteCounts, 0, stripsPerImage); } else { Arrays.fill(newByteCounts, stripByteCounts[0]); } temp.putIFDValue(IFD.STRIP_BYTE_COUNTS, newByteCounts); tempIFDs.add(temp); } ifds = tempIFDs; } catch (IllegalArgumentException exc) { LOGGER.debug("Unknown tag", exc); } catch (NullPointerException exc) { LOGGER.debug("", exc); } catch (FormatException exc) { LOGGER.debug("Failed to build list of IFDs", exc); } // parse (mangle) TIFF comment String descr = ifds.get(0).getComment(); if (descr != null) { String[] lines = descr.split("\n"); StringBuffer sb = new StringBuffer(); for (int i=0; i<lines.length; i++) { String line = lines[i].trim(); if (line.startsWith("<") && line.endsWith(">")) { // XML comment; this will have already been parsed so can be ignored break; } int colon = line.indexOf(":"); if (colon < 0) { // normal line (not a key/value pair) if (line.length() > 0) { // not a blank line sb.append(line); sb.append(" "); } } else { String descrValue = null; if (i == 0) { // first line could be mangled; make a reasonable guess int dot = line.lastIndexOf(".", colon); if (dot >= 0) { descrValue = line.substring(0, dot + 1); } line = line.substring(dot + 1); colon -= dot + 1; } // append value to description if (descrValue != null) { sb.append(descrValue); if (!descrValue.endsWith(".")) sb.append("."); sb.append(" "); } // add key/value pair embedded in comment as separate metadata String key = line.substring(0, colon); String value = line.substring(colon + 1).trim(); addSeriesMeta(key, value); if (key.equals("Exposure")) { if (value.indexOf("=") != -1) { value = value.substring(value.indexOf("=") + 1).trim(); } if (value.indexOf(" ") != -1) { value = value.substring(0, value.indexOf(" ")); } try { value = value.replace(',', '.'); double exposure = Double.parseDouble(value); exposureTime = new Double(exposure / 1000); } catch (NumberFormatException e) { } } else if (key.equals("Bit Depth")) { if (value.indexOf("-") != -1) { value = value.substring(0, value.indexOf("-")); } try { ms0.bitsPerPixel = Integer.parseInt(value); } catch (NumberFormatException e) { } } else if (key.equals("Gain")) { int space = value.indexOf(" "); if (space != -1) { int nextSpace = value.indexOf(" ", space + 1); if (nextSpace < 0) { nextSpace = value.length(); } try { gain = new Double(value.substring(space, nextSpace)); } catch (NumberFormatException e) { } } } } } // replace comment with trimmed version descr = sb.toString().trim(); if (descr.equals("")) metadata.remove("Comment"); else addSeriesMeta("Comment", descr); } ms0.sizeT = getImageCount() / (getSizeZ() * (getSizeC() / rgbChannels)); if (getSizeT() * getSizeZ() * (getSizeC() / rgbChannels) != getImageCount()) { ms0.sizeT = 1; ms0.sizeZ = getImageCount() / (getSizeC() / rgbChannels); } // if '_t' is present in the file name, swap Z and T sizes // this file was probably part of a larger dataset, but the .nd file is // missing String filename = currentId.substring(currentId.lastIndexOf(File.separator) + 1); if (filename.indexOf("_t") != -1 && getSizeT() > 1) { int z = getSizeZ(); ms0.sizeZ = getSizeT(); ms0.sizeT = z; } if (getSizeZ() == 0) ms0.sizeZ = 1; if (getSizeT() == 0) ms0.sizeT = 1; if (getSizeZ() * getSizeT() * (isRGB() ? 1 : getSizeC()) != getImageCount()) { ms0.sizeZ = getImageCount(); ms0.sizeT = 1; if (!isRGB()) ms0.sizeC = 1; } } // -- Helper methods -- /** * Check that the given STK file exists. If it does, then return the * absolute path. If it does not, then apply various formatting rules until * an existing file is found. * * @return the absolute path of an STK file, or null if no STK file is found. */ private String getRealSTKFile(Location l) { if (l.exists()) return l.getAbsolutePath(); String name = l.getName(); String parent = l.getParent(); if (name.indexOf("_") > 0) { String prefix = name.substring(0, name.indexOf("_")); String suffix = name.substring(name.indexOf("_")); String basePrefix = new Location(currentId).getName(); int end = basePrefix.indexOf("_"); if (end < 0) end = basePrefix.indexOf("."); basePrefix = basePrefix.substring(0, end); if (!basePrefix.equals(prefix)) { name = basePrefix + suffix; Location p = new Location(parent, name); if (p.exists()) return p.getAbsolutePath(); } } // '%' can be converted to '-' if (name.indexOf("%") != -1) { name = name.replaceAll("%", "-"); l = new Location(parent, name); if (!l.exists()) { // try replacing extension name = name.substring(0, name.lastIndexOf(".")) + ".TIF"; l = new Location(parent, name); if (!l.exists()) { name = name.substring(0, name.lastIndexOf(".")) + ".tif"; l = new Location(parent, name); return l.exists() ? l.getAbsolutePath() : null; } } } if (!l.exists()) { // try replacing extension int index = name.lastIndexOf("."); if (index < 0) index = name.length(); name = name.substring(0, index) + ".TIF"; l = new Location(parent, name); if (!l.exists()) { name = name.substring(0, name.lastIndexOf(".")) + ".tif"; l = new Location(parent, name); if (!l.exists()) { name = name.substring(0, name.lastIndexOf(".")) + ".stk"; l = new Location(parent, name); return l.exists() ? l.getAbsolutePath() : null; } } } return l.getAbsolutePath(); } /** * Returns the TIFF comment from the first IFD of the first STK file in the * given series. */ private String getFirstComment(int i) throws IOException { return getComment(i, 0); } private String getComment(int i, int no) throws IOException { if (stks != null && stks[i][no] != null) { RandomAccessInputStream stream = new RandomAccessInputStream(stks[i][no], 16); TiffParser tp = new TiffParser(stream); String comment = tp.getComment(); stream.close(); return comment; } return ifds.get(0).getComment(); } /** Create an appropriate name for the given series. */ private String makeImageName(int i) { String name = ""; if (stageNames != null && stageNames.size() > 0) { int stagePosition = i / (getSeriesCount() / stageNames.size()); name += "Stage" + (stagePosition + 1) + " " + stageNames.get(stagePosition); } if (firstSeriesChannels != null && (stageNames == null || stageNames.size() == 0 || stageNames.size() != getSeriesCount())) { if (name.length() > 0) { name += "; "; } for (int c=0; c<firstSeriesChannels.length; c++) { if (firstSeriesChannels[c] == ((i % 2) == 0) && c < waveNames.size()) { name += waveNames.get(c) + "/"; } } if (name.length() > 0) { name = name.substring(0, name.length() - 1); } } return name; } /** * Populates metadata fields with some contained in MetaMorph UIC2 Tag. * (for each plane: 6 integers: * zdistance numerator, zdistance denominator, * creation date, creation time, modif date, modif time) * @param uic2offset offset to UIC2 (33629) tag entries * * not a regular tiff tag (6*N entries, N being the tagCount) * @throws IOException */ void parseUIC2Tags(long uic2offset) throws IOException { long saveLoc = in.getFilePointer(); in.seek(uic2offset); /*number of days since the 1st of January 4713 B.C*/ String cDate; /*milliseconds since 0:00*/ String cTime; /*z step, distance separating previous slice from current one*/ String iAsString; zDistances = new double[mmPlanes]; internalStamps = new long[mmPlanes]; for (int i=0; i<mmPlanes; i++) { iAsString = intFormatMax(i, mmPlanes); if (in.getFilePointer() + 8 > in.length()) break; zDistances[i] = readRational(in).doubleValue(); addSeriesMeta("zDistance[" + iAsString + "]", zDistances[i]); if (zDistances[i] != 0.0) core.get(0).sizeZ++; cDate = decodeDate(in.readInt()); cTime = decodeTime(in.readInt()); internalStamps[i] = DateTools.getTime(cDate + " " + cTime, LONG_DATE_FORMAT, ":"); addSeriesMeta("creationDate[" + iAsString + "]", cDate); addSeriesMeta("creationTime[" + iAsString + "]", cTime); // modification date and time are skipped as they all seem equal to 0...? in.skip(8); } if (getSizeZ() == 0) core.get(0).sizeZ = 1; in.seek(saveLoc); } /** * UIC4 metadata parser * * UIC4 Table contains per-plane blocks of metadata * stage X/Y positions, * camera chip offsets, * stage labels... * @param uic4offset offset of UIC4 table (not tiff-compliant) * @throws IOException */ private void parseUIC4Tags(long uic4offset) throws IOException { long saveLoc = in.getFilePointer(); in.seek(uic4offset); if (in.getFilePointer() + 2 >= in.length()) return; tempZ = 0d; validZ = false; short id = in.readShort(); while (id != 0) { switch (id) { case 28: readStagePositions(); hasStagePositions = true; break; case 29: readRationals( new String[] {"cameraXChipOffset", "cameraYChipOffset"}); hasChipOffsets = true; break; case 37: readStageLabels(); break; case 40: readRationals(new String[] {"UIC4 absoluteZ"}); hasAbsoluteZ = true; break; case 41: readAbsoluteZValid(); hasAbsoluteZValid = true; break; case 46: in.skipBytes(mmPlanes * 8); // TODO break; default: in.skipBytes(4); } id = in.readShort(); } in.seek(saveLoc); if (validZ) zStart = tempZ; } private void readStagePositions() throws IOException { stageX = new Length[mmPlanes]; stageY = new Length[mmPlanes]; String pos; for (int i=0; i<mmPlanes; i++) { pos = intFormatMax(i, mmPlanes); final Double posX = Double.valueOf(readRational(in).doubleValue()); final Double posY = Double.valueOf(readRational(in).doubleValue()); stageX[i] = new Length(posX, UNITS.REFERENCEFRAME); stageY[i] = new Length(posY, UNITS.REFERENCEFRAME); addSeriesMeta("stageX[" + pos + "]", posX); addSeriesMeta("stageY[" + pos + "]", posY); addGlobalMeta("X position for position #" + (getSeries() + 1), posX); addGlobalMeta("Y position for position #" + (getSeries() + 1), posY); } } private void readRationals(String[] labels) throws IOException { String pos; Set<Double> uniqueZ = new HashSet<Double>(); for (int i=0; i<mmPlanes; i++) { pos = intFormatMax(i, mmPlanes); for (int q=0; q<labels.length; q++) { double v = readRational(in).doubleValue(); if (labels[q].endsWith("absoluteZ")) { if (i == 0) { tempZ = v; } uniqueZ.add(v); } addSeriesMeta(labels[q] + "[" + pos + "]", v); } } if (uniqueZ.size() == mmPlanes) { core.get(0).sizeZ = mmPlanes; } } void readStageLabels() throws IOException { int strlen; String iAsString; for (int i=0; i<mmPlanes; i++) { iAsString = intFormatMax(i, mmPlanes); strlen = in.readInt(); addSeriesMeta("stageLabel[" + iAsString + "]", in.readString(strlen)); } } void readAbsoluteZValid() throws IOException { for (int i=0; i<mmPlanes; i++) { int valid = in.readInt(); addSeriesMeta("absoluteZValid[" + intFormatMax(i, mmPlanes) + "]", valid); if (i == 0) { validZ = valid == 1; } } } /** * UIC1 entry parser * @throws IOException * @param uic1offset offset as found in the tiff tag 33628 (UIC1Tag) * @param uic1count number of entries in UIC1 table (not tiff-compliant) */ private void parseUIC1Tags(long uic1offset, int uic1count) throws IOException { // Loop through and parse out each field. A field whose // code is "0" represents the end of the fields so we'll stop // when we reach that; much like a NULL terminated C string. long saveLoc = in.getFilePointer(); in.seek(uic1offset); int currentID; long valOrOffset; // variable declarations, because switch is dumb int num, denom; String thedate, thetime; long lastOffset; tempZ = 0d; validZ = false; for (int i=0; i<uic1count; i++) { if (in.getFilePointer() >= in.length()) break; currentID = in.readInt(); valOrOffset = in.readInt() & 0xffffffffL; lastOffset = in.getFilePointer(); String key = getKey(currentID); Object value = String.valueOf(valOrOffset); boolean skipKey = false; switch (currentID) { case 3: value = valOrOffset != 0 ? "on" : "off"; break; case 4: case 5: case 21: case 22: case 23: case 24: case 38: case 39: value = readRational(in, valOrOffset); break; case 6: case 25: if (valOrOffset < in.length()) { in.seek(valOrOffset); num = in.readInt(); if (num + in.getFilePointer() >= in.length()) { num = (int) (in.length() - in.getFilePointer() - 1); } if (num >= 0) { value = in.readString(num); } } break; case 7: if (valOrOffset < in.length()) { in.seek(valOrOffset); num = in.readInt(); if (num >= 0) { imageName = in.readString(num); value = imageName; } } break; case 8: if (valOrOffset == 1) value = "inside"; else if (valOrOffset == 2) value = "outside"; else value = "off"; break; case 17: // oh how we hate you Julian format... if (valOrOffset < in.length()) { in.seek(valOrOffset); thedate = decodeDate(in.readInt()); thetime = decodeTime(in.readInt()); imageCreationDate = thedate + " " + thetime; value = imageCreationDate; } break; case 16: if (valOrOffset < in.length()) { in.seek(valOrOffset); thedate = decodeDate(in.readInt()); thetime = decodeTime(in.readInt()); value = thedate + " " + thetime; } break; case 26: if (valOrOffset < in.length()) { in.seek(valOrOffset); int standardLUT = in.readInt(); switch (standardLUT) { case 0: value = "monochrome"; break; case 1: value = "pseudocolor"; break; case 2: value = "Red"; break; case 3: value = "Green"; break; case 4: value = "Blue"; break; case 5: value = "user-defined"; break; default: value = "monochrome"; } } break; case 28: if (valOrOffset < in.length()) { if (!hasStagePositions) { in.seek(valOrOffset); readStagePositions(); } skipKey = true; } break; case 29: if (valOrOffset < in.length()) { if (!hasChipOffsets) { in.seek(valOrOffset); readRationals( new String[] {"cameraXChipOffset", "cameraYChipOffset"}); } skipKey = true; } break; case 34: value = String.valueOf(in.readInt()); break; case 42: if (valOrOffset < in.length()) { in.seek(valOrOffset); value = String.valueOf(in.readInt()); } break; case 46: if (valOrOffset < in.length()) { in.seek(valOrOffset); int xBin = in.readInt(); int yBin = in.readInt(); binning = xBin + "x" + yBin; value = binning; } break; case 40: if (valOrOffset != 0 && valOrOffset < in.length()) { if (!hasAbsoluteZ) { in.seek(valOrOffset); readRationals(new String[] {"UIC1 absoluteZ"}); } skipKey = true; } break; case 41: if (valOrOffset != 0 && valOrOffset < in.length()) { if (!hasAbsoluteZValid) { in.seek(valOrOffset); readAbsoluteZValid(); } skipKey = true; } else if (valOrOffset == 0 && getSizeZ() < mmPlanes) { core.get(0).sizeZ = 1; } break; case 49: if (valOrOffset < in.length()) { in.seek(valOrOffset); readPlaneData(); skipKey = true; } break; } if (!skipKey) { addSeriesMeta(key, value); } in.seek(lastOffset); if ("Zoom".equals(key) && value != null) { zoom = Double.parseDouble(value.toString()); } if ("XCalibration".equals(key) && value != null) { if (value instanceof TiffRational) { sizeX = ((TiffRational) value).doubleValue(); } else sizeX = new Double(value.toString()); } if ("YCalibration".equals(key) && value != null) { if (value instanceof TiffRational) { sizeY = ((TiffRational) value).doubleValue(); } else sizeY = new Double(value.toString()); } } in.seek(saveLoc); if (validZ) zStart = tempZ; } // -- Utility methods -- /** Converts a Julian date value into a human-readable string. */ public static String decodeDate(int julian) { long a, b, c, d, e, alpha, z; short day, month, year; // code reused from the Metamorph data specification z = julian + 1; if (z < 2299161L) a = z; else { alpha = (long) ((z - 1867216.25) / 36524.25); a = z + 1 + alpha - alpha / 4; } b = (a > 1721423L ? a + 1524 : a + 1158); c = (long) ((b - 122.1) / 365.25); d = (long) (365.25 * c); e = (long) ((b - d) / 30.6001); day = (short) (b - d - (long) (30.6001 * e)); month = (short) ((e < 13.5) ? e - 1 : e - 13); year = (short) ((month > 2.5) ? (c - 4716) : c - 4715); return intFormat(day, 2) + "/" + intFormat(month, 2) + "/" + year; } /** Converts a time value in milliseconds into a human-readable string. */ public static String decodeTime(int millis) { DateTime tm = new DateTime(millis, DateTimeZone.UTC); String hours = intFormat(tm.getHourOfDay(), 2); String minutes = intFormat(tm.getMinuteOfHour(), 2); String seconds = intFormat(tm.getSecondOfMinute(), 2); String ms = intFormat(tm.getMillisOfSecond(), 3); return hours + ":" + minutes + ":" + seconds + ":" + ms; } /** Formats an integer value with leading 0s if needed. */ public static String intFormat(int myint, int digits) { return String.format("%0" + digits + "d", myint); } /** * Formats an integer with leading 0 using maximum sequence number. * * @param myint integer to format * @param maxint max of "myint" * @return String */ public static String intFormatMax(int myint, int maxint) { return intFormat(myint, String.valueOf(maxint).length()); } /** * Locates the first valid file in the STK arrays. * @return Path to the first valid file. */ private String locateFirstValidFile() { for (int q = 0; q < stks.length; q++) { for (int f = 0; f < stks.length; f++) { if (stks[q][f] != null) { return stks[q][f]; } } } return null; } private TiffRational readRational(RandomAccessInputStream s) throws IOException { return readRational(s, s.getFilePointer()); } private TiffRational readRational(RandomAccessInputStream s, long offset) throws IOException { if (offset >= s.length() - 8) { return null; } s.seek(offset); int num = s.readInt(); int denom = s.readInt(); return new TiffRational(num, denom); } private void setCanLookForND(boolean v) { FormatTools.assertId(currentId, false, 1); canLookForND = v; } private void readPlaneData() throws IOException { in.skipBytes(4); int keyLength = in.read(); String key = in.readString(keyLength); in.skipBytes(4); int type = in.read(); int index = 0; switch (type) { case 1: while (getGlobalMeta("Channel #" + index + " " + key) != null) { index++; } addGlobalMeta("Channel #" + index + " " + key, readRational(in).doubleValue()); break; case 2: int valueLength = in.read(); String value = in.readString(valueLength); if (valueLength == 0) { in.skipBytes(4); valueLength = in.read(); value = in.readString(valueLength); } while (getGlobalMeta("Channel #" + index + " " + key) != null) { index++; } addGlobalMeta("Channel #" + index + " " + key, value); if (key.equals("_IllumSetting_")) { if (waveNames == null) waveNames = new Vector<String>(); waveNames.add(value); } break; } } private String getKey(int id) { switch (id) { case 0: return "AutoScale"; case 1: return "MinScale"; case 2: return "MaxScale"; case 3: return "Spatial Calibration"; case 4: return "XCalibration"; case 5: return "YCalibration"; case 6: return "CalibrationUnits"; case 7: return "Name"; case 8: return "ThreshState"; case 9: return "ThreshStateRed"; // there is no 10 case 11: return "ThreshStateGreen"; case 12: return "ThreshStateBlue"; case 13: return "ThreshStateLo"; case 14: return "ThreshStateHi"; case 15: return "Zoom"; case 16: return "DateTime"; case 17: return "LastSavedTime"; case 18: return "currentBuffer"; case 19: return "grayFit"; case 20: return "grayPointCount"; case 21: return "grayX"; case 22: return "grayY"; case 23: return "grayMin"; case 24: return "grayMax"; case 25: return "grayUnitName"; case 26: return "StandardLUT"; case 27: return "Wavelength"; case 28: return "StagePosition"; case 29: return "CameraChipOffset"; case 30: return "OverlayMask"; case 31: return "OverlayCompress"; case 32: return "Overlay"; case 33: return "SpecialOverlayMask"; case 34: return "SpecialOverlayCompress"; case 35: return "SpecialOverlay"; case 36: return "ImageProperty"; case 38: return "AutoScaleLoInfo"; case 39: return "AutoScaleHiInfo"; case 40: return "AbsoluteZ"; case 41: return "AbsoluteZValid"; case 42: return "Gamma"; case 43: return "GammaRed"; case 44: return "GammaGreen"; case 45: return "GammaBlue"; case 46: return "CameraBin"; case 47: return "NewLUT"; case 48: return "ImagePropertyEx"; case 49: return "PlaneProperty"; case 50: return "UserLutTable"; case 51: return "RedAutoScaleInfo"; case 52: return "RedAutoScaleLoInfo"; case 53: return "RedAutoScaleHiInfo"; case 54: return "RedMinScaleInfo"; case 55: return "RedMaxScaleInfo"; case 56: return "GreenAutoScaleInfo"; case 57: return "GreenAutoScaleLoInfo"; case 58: return "GreenAutoScaleHiInfo"; case 59: return "GreenMinScaleInfo"; case 60: return "GreenMaxScaleInfo"; case 61: return "BlueAutoScaleInfo"; case 62: return "BlueAutoScaleLoInfo"; case 63: return "BlueAutoScaleHiInfo"; case 64: return "BlueMinScaleInfo"; case 65: return "BlueMaxScaleInfo"; case 66: return "OverlayPlaneColor"; } return null; } }
//============================================================================= // // ecos-eyaffs.c // // eyaffs interface to the eCos filesystem layer // //============================================================================= // ####ECOSGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 2009 eCosCentric Limited. // // eCos 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 2 or (at your option) any later // version. // // eCos 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 eCos; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // As a special exception, if other files instantiate templates or use // macros or inline functions from this file, or you compile this file // and link it with other works to produce a work based on this file, // this file does not by itself cause the resulting work to be covered by // the GNU General Public License. However the source code for this file // must still be made available in accordance with section (3) of the GNU // General Public License v2. // // This exception does not invalidate any other reasons why a work based // on this file might be covered by the GNU General Public License. // ------------------------------------------- // ####ECOSGPLCOPYRIGHTEND#### //============================================================================= //#####DESCRIPTIONBEGIN#### // // Author(s): wry // Date: 2009-05-05 // //####DESCRIPTIONEND#### //============================================================================= /* Major TODO: * At the moment we tend to look files up by name(dirsearch), perform * our own sanity checks, then pass on to YAFFS fns which then go and * repeat the last step of the lookup. IWBNI we exposed corresponding * YAFFS functions which took yaffs_Object* instead of name. */ #include "yportenv.h" #include "yaffs_guts.h" #include "yaffs_packedtags2.h" #include "ecos-yaffs.h" #include "ecos-yaffs-nand.h" #include "ecos-yaffs-diriter.h" #include <errno.h> #include <limits.h> #include <stdlib.h> #include <unistd.h> #include <cyg/fileio/fileio.h> #include <cyg/fileio/dirent.h> #include <cyg/infra/cyg_ass.h> #include <cyg/nand/nand.h> #include <cyg/nand/util.h> // convenience error test macros. x should be an ecos error code. #define ER(x) do { int _x = (x); if (_x != 0) return _x; } while(0) #define EG(x) do { _err = (x); if (_err != 0) goto err_exit; } while(0) // ... variants which take a negative ecos error code #define ERm(x) ER(-(x)) #define EGm(x) EG(-(x)) // ... variants for YAFFS ops, which return YAFFS_OK or YAFFS_FAIL #define YER(x) do { int _x = (x); if (_x == YAFFS_FAIL) return EIO; } while(0) // sneaky grab from fileio misc.cxx: __externC cyg_mtab_entry cyg_mtab[]; __externC cyg_mtab_entry cyg_mtab_end; // For yaffs_guts: unsigned int yaffs_traceMask = CYGNUM_FS_YAFFS_TRACEMASK; // How many attempts do we make to write a page before giving up? // This could easily be added to CDL. unsigned int yaffs_wr_attempts = YAFFS_WR_ATTEMPTS; // eCos doesn't support file permissions or user IDs at all. // We hard-code sensible values in case anybody makes decisions on // the output from stat() et al. // (Update: As of March 2009 there is now limited support for chmod in both // anoncvs and eCosPro.) #define FIXED_UID 0 #define FIXED_GID 0 #define DIRECTORY_FIXED_PERMS (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) #define FILE_FIXED_PERMS (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH) // TODO: We could make uid/gid/fixedperms configurable. // Helper functions and forward defs ------------------------------------- static int eyaffs_count_links(yaffs_Object * node) { int links = 0; struct ylist_head *tmp; ylist_for_each(tmp, &(node->hardLinks)) { ++links; } return links; } static int eyaffs_stat_object(yaffs_Object *node, struct stat *buf); // Directory search / traversal ------------------------------------------ typedef struct ey_dirsearch { yaffs_Object *dir; // directory to search const char *path; // path to follow yaffs_Object *node; // Node found const char *name; // last name used int namelen;// name fragment length cyg_bool last; // last name in path? } ey_dirsearch; static void init_dirsearch(ey_dirsearch *ds, yaffs_Object *dir, const char *name) { ds->dir = dir; ds->path = name; ds->node = dir; ds->name = name; ds->namelen = 0; ds->last = false; } // Search a single directory for the next name in a path static int find_entry(ey_dirsearch *ds) { yaffs_Object *dir = ds->dir; const char *name = ds->path; const char *n = name; char namelen = 0; yaffs_Object *d; // check that we really have a directory switch (yaffs_GetObjectType(dir)) { case DT_DIR: break; case DT_LNK: // TODO: symlink support default: return ENOTDIR; } // Isolate the next element of the path name. while( *n != '\0' && *n != '/' ) n++, namelen++; // Check if this is the last path element. while( *n == '/') n++; if( *n == '\0' ) ds->last = true; // update name in dirsearch object ds->name = name; ds->namelen = namelen; // First, special case "." and "..": if (name[0] == '.') { if (namelen == 1) { // "." ds->node = dir; return ENOERR; } else if (name[1] == '.' && namelen == 2) { // ".." ds->node = dir->parent; if (!ds->node) ds->node = dir; // ".." at the root stays in the root return ENOERR; } } // Otherwise, search the directory for a matching entry YCHAR namebuf[YAFFS_MAX_NAME_LENGTH+1]; memcpy(namebuf, name, namelen); namebuf[(int)namelen]=0; d = yaffs_FindObjectByName(dir, namebuf); // TODO: Create a variant of y_FindObjectByName which takes dir, name and len. Indeed, that would be beneficial for a lot of its functions. if( d == NULL ) return ENOENT; d = yaffs_GetEquivalentObject(d); // traverse hardlinks // pass back the node we have found ds->node = d; return ENOERR; } /* Main directory search code. Use init_dirsearch() to init the struct. * If we return with d->last set, d->name _might_ be null-terminated. * (It will iff no trailing slashes were passed in.) * Code that acts on the output name MUST use d->namelen and not assume * null-termination without testing first. */ static int eyaffs_find(ey_dirsearch *d) { if ( *(d->path) == 0 ) return ENOERR; for (;;) { ER(find_entry(d)); if (d->last) return ENOERR; // Not done yet? Next one down... d->dir = d->node; d->path += d->namelen; // While we could check file perms here, eCos doesn't support them. while ( *(d->path) == '/' ) ++d->path; // skip separators } } // File operations -------------------------------------------------------- static int eyaffs_pathconf(yaffs_Object *node, struct cyg_pathconf_info *info) { switch(info->name) { case _PC_LINK_MAX: info->value = LINK_MAX; return ENOERR; case _PC_NAME_MAX: info->value = YAFFS_MAX_NAME_LENGTH; return ENOERR; case _PC_PATH_MAX: info->value = PATH_MAX; return ENOERR; case _PC_PRIO_IO: case _PC_SYNC_IO: info->value=0; return ENOERR; case _PC_NO_TRUNC: info->value=1; return ENOERR; case _PC_MAX_CANON: // terminals only case _PC_MAX_INPUT: // terminals case _PC_PIPE_BUF: // pipes case _PC_ASYNC_IO: // not supported case _PC_CHOWN_RESTRICTED: // we don't track owners case _PC_VDISABLE: // terminals default: info->value = -1; return EINVAL; } } static int eyaffs_fo_read (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio) { yaffs_Object *node = (yaffs_Object*) fp->f_data; int i; off_t pos = fp->f_offset; ssize_t resid = uio->uio_resid; for (i=0; i < uio->uio_iovcnt; i++) { cyg_iovec *iov = &uio->uio_iov[i]; unsigned char *buf = iov->iov_base; off_t len = iov->iov_len; if (pos + len > node->variant.fileVariant.fileSize) len = node->variant.fileVariant.fileSize - pos; while (len > 0 && pos < node->variant.fileVariant.fileSize) { off_t l = yaffs_ReadDataFromFile(node, buf, pos, len); len -= l; pos += l; buf += l; resid -= l; } } uio->uio_resid = resid; fp->f_offset = pos; return ENOERR; } static int eyaffs_fo_write (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio) { yaffs_Object *node = (yaffs_Object*) fp->f_data; int i; off_t pos = fp->f_offset; ssize_t resid = uio->uio_resid; if (fp->f_flag & CYG_FAPPEND) pos = fp->f_offset = node->variant.fileVariant.fileSize; CYG_ASSERT(pos >= 0, "pos became negative"); for (i=0; i < uio->uio_iovcnt; i++) { cyg_iovec *iov = &uio->uio_iov[i]; unsigned char *buf = iov->iov_base; off_t len = iov->iov_len; while (len > 0) { off_t l = yaffs_WriteDataToFile(node, buf, pos, len, 0); len -= l; buf += l; pos += l; resid -= l; if (l==0) goto stop; // urgh, how does this cope with dire errors? } } // Timestamps are updated on yaffs_FlushFile() stop: uio->uio_resid = resid; fp->f_offset = pos; return ENOERR; } static int eyaffs_fo_lseek (struct CYG_FILE_TAG *fp, off_t *apos, int whence ) { yaffs_Object *node = (yaffs_Object*) fp->f_data; off_t pos = *apos; switch (whence) { case SEEK_SET: // Pos is already where we want to be break; case SEEK_CUR: // Add pos to current offset pos += fp->f_offset; break; case SEEK_END: // Add pos to file size pos += node->variant.fileVariant.fileSize; break; default: return EINVAL; } // Check that pos is still within current file size, // or at the very end if (pos < 0 || pos > node->variant.fileVariant.fileSize) return EINVAL; *apos = fp->f_offset = pos; return ENOERR; } static int eyaffs_fo_ioctl (struct CYG_FILE_TAG *fp, CYG_ADDRWORD com, CYG_ADDRWORD data) { return EINVAL; // No ioctls defined } static int eyaffs_fo_fsync (struct CYG_FILE_TAG *fp, int mode ) { yaffs_Object *node = (yaffs_Object*) fp->f_data; int ymode = (mode == CYG_FDATASYNC) ? 1 : 0; YER(yaffs_FlushFile(node,1,ymode)); return ENOERR; } static int eyaffs_fo_close (struct CYG_FILE_TAG *fp) { yaffs_Object *node = (yaffs_Object*) fp->f_data; if (node->inUse) { YER(yaffs_FlushFile(node,1,0)); node->inUse--; if (node->inUse <= 0 && node->unlinked) { YER(yaffs_DeleteObject(node)); } } fp->f_data = 0; return ENOERR; } static int eyaffs_fo_fstat (struct CYG_FILE_TAG *fp, struct stat *buf ) { yaffs_Object *node = (yaffs_Object*) fp->f_data; return eyaffs_stat_object(node, buf); } static int eyaffs_fo_getinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len ) { yaffs_Object *node = (yaffs_Object*) fp->f_data; switch(key) { case FS_INFO_CONF: return eyaffs_pathconf(node, (struct cyg_pathconf_info *)buf ); } return EINVAL; } static int eyaffs_fo_setinfo (struct CYG_FILE_TAG *fp, int key, void *buf, int len ) { return EINVAL; // None defined } static cyg_fileops eyaffs_fileops = { eyaffs_fo_read, eyaffs_fo_write, eyaffs_fo_lseek, eyaffs_fo_ioctl, cyg_fileio_seltrue, eyaffs_fo_fsync, eyaffs_fo_close, eyaffs_fo_fstat, eyaffs_fo_getinfo, eyaffs_fo_setinfo }; // Directory entrypoints -------------- static int eyaffs_fo_dirread (struct CYG_FILE_TAG *fp, struct CYG_UIO_TAG *uio) { eyaffs_diriter *diriter = (eyaffs_diriter*) fp->f_data; struct dirent *ent = (struct dirent *)uio->uio_iov[0].iov_base; unsigned offset = fp->f_offset; off_t len = uio->uio_iov[0].iov_len; if( len < sizeof(struct dirent) ) return EINVAL; if (offset == 0) { strcpy(ent->d_name, "."); #ifdef CYGPKG_FS_YAFFS_RET_DIRENT_DTYPE ent->d_type = __stat_mode_DIR; #endif goto done; } if (offset == 1) { strcpy(ent->d_name, ".."); #ifdef CYGPKG_FS_YAFFS_RET_DIRENT_DTYPE ent->d_type = __stat_mode_DIR; #endif goto done; } // else use the iter: yaffs_Object * node = diriter->nextret; if (!node) goto done_eof; yaffs_GetObjectName(node, ent->d_name, sizeof(ent->d_name)); #ifdef CYGPKG_FS_YAFFS_RET_DIRENT_DTYPE ent->d_type = yaffs_GetObjectType(node); #endif eyaffs_diriter_advance(diriter); done: uio->uio_resid -= sizeof(struct dirent); fp->f_offset++; done_eof: return ENOERR; } static int eyaffs_fo_dirlseek (struct CYG_FILE_TAG *fp, off_t *pos, int whence ) { // This is easy, we only allow a full rewind. if (whence != SEEK_SET || *pos != 0) return EINVAL; // get and rewind the diriter eyaffs_diriter *diriter = (eyaffs_diriter*) fp->f_data; eyaffs_diriter_rewind(diriter); fp->f_offset = 0; return ENOERR; } static int eyaffs_fo_dirclose (struct CYG_FILE_TAG *fp) { eyaffs_diriter *diriter = (eyaffs_diriter*) fp->f_data; diriter->node->inUse--; ylist_del(&diriter->iterlist); memset(diriter, 0xbb, sizeof(eyaffs_diriter)); fp->f_data = 0; YFREE(diriter); return ENOERR; } static cyg_fileops eyaffs_dirops = { eyaffs_fo_dirread, (cyg_fileop_write *)cyg_fileio_enosys, eyaffs_fo_dirlseek, (cyg_fileop_ioctl *)cyg_fileio_enosys, cyg_fileio_seltrue, (cyg_fileop_fsync *)cyg_fileio_enosys, eyaffs_fo_dirclose, (cyg_fileop_fstat *)cyg_fileio_enosys, (cyg_fileop_getinfo *)cyg_fileio_enosys, (cyg_fileop_setinfo *)cyg_fileio_enosys }; // Filesystem operations ------------------------------------------------- // N.B. Function names are prefixed with 'e' to distinguish them from // those internal to yaffs. static int eyaffs_mount ( cyg_fstab_entry *fste, cyg_mtab_entry *mte ) { int _err = ENOERR; cyg_nand_device *nand = 0; cyg_nand_partition *part = 0; ERm(cyg_nand_resolve_device(mte->devname, &nand, &part)); if (!part || !part->dev || (part->last <= part->first) ) { TOUT(("eyaffs_mount: Invalid partition\n")); ER(EINVAL); } // Is this partition already mounted? cyg_mtab_entry *m = cyg_mtab; while (m != &cyg_mtab_end) { if (m->valid && (0==strcmp(m->fsname,"yaffs")) && (((yaffs_Device *)m->data)->genericDevice == part) ) { ER(EBUSY); /* TODO: Set up a refcount to allow a yaffs/nand fs * to be mounted multiple times. In that case, * re-use the existing yaffs device struct. */ } m++; } // Option handling. Defaults come from CDL. int o_nReserved = CYGNUM_FS_YAFFS_RESERVED_BLOCKS; int o_nShortOpCaches = CYGNUM_FS_YAFFS_SHORTOP_CACHES; int o_skipCheckpointRead = 0; #if defined(CYGSEM_FS_YAFFS_COMPATIBILITY_ECOSPRO) && (CYGSEM_FS_YAFFS_COMPATIBILITY_ECOSPRO == 1) if (mte->options) { int t; char buf[10]; // reserved=<int>: Number of blocks to reserve (minimum 2) if (0==cyg_fs_get_option(mte->options, "reserved", buf, sizeof buf)) { t = atoi(buf); if (t>=2 && t <= (part->last - part->first)) o_nReserved = t; else TOUT(("eyaffs_mount: ignoring invalid value `reserved=%d'", t)); } // caches=<int>: Number of cache entries to use (10-20 recommended) if (0==cyg_fs_get_option(mte->options, "caches", buf, sizeof buf)) { t = atoi(buf); if (t>=0) o_nShortOpCaches = t; else TOUT(("eyaffs_mount: ignoring invalid value `caches=%d'", t)); } // skip-checkpoint-read: Ignore the checkpoint restore and instead // do a full filesystem scan. if (0==cyg_fs_get_option(mte->options, "skip-checkpoint-read", buf, sizeof buf)) { o_skipCheckpointRead = 1; } // TODO: readonly option, runtime and/or CDL? } #endif #ifdef CYGPKG_INFRA_DEBUG // Best-efforts sanity check that there's enough heap. // The rule of thumb is 2 bytes per page. struct mallinfo mi = mallinfo(); unsigned want = ( 1 << (nand->block_page_bits + 1) ) * (1 + part->last - part->first); if ( mi.fordblks < want) { TOUT(("eyaffs_mount: warning: arena reports %u bytes free; %u recommended for this device\n", mi.fordblks, want)); } #endif // CYGSEM_FS_YAFFS_COMPATIBILITY yaffs_Device *y = YMALLOC(sizeof(yaffs_Device)); // ^^^^^^^^^^^^^^^^ if (!y) EG(ENOMEM); memset(y, 0, sizeof(yaffs_Device)); y->name = mte->devname; y->genericDevice = (void*) part; y->nDataBytesPerChunk = y->totalBytesPerChunk = CYG_NAND_BYTES_PER_PAGE(nand); y->inbandTags = 0; y->nChunksPerBlock = CYG_NAND_PAGES_PER_BLOCK(nand); y->nReservedBlocks = o_nReserved; y->startBlock = 0; y->endBlock = CYG_NAND_PARTITION_NBLOCKS(part)-1; y->useNANDECC = 1; y->nShortOpCaches = o_nShortOpCaches; if (CYG_NAND_BYTES_PER_PAGE(nand) == 512) { #ifdef CYGSEM_FS_YAFFS_SMALLPAGE_MODE_YAFFS1 y->isYaffs2 = 0; if (CYG_NAND_APPSPARE_PER_PAGE(nand) < PACKEDTAGS1_OOBSIZE) { NAND_ERROR(nand, "Device has %d spare per page but YAFFS1 needs %d\n", CYG_NAND_APPSPARE_PER_PAGE(nand), PACKEDTAGS1_OOBSIZE); EG(EINVAL); } #else // CYGSEM_FS_YAFFS_SMALLPAGE_MODE_YAFFS2 y->isYaffs2 = 1; // 512-byte page devices normally have 8-byte spare areas. // This isn't big enough for YAFFS2 tags, which need 25. y->inbandTags = 1; #endif } else { y->isYaffs2 = 1; if (CYG_NAND_APPSPARE_PER_PAGE(nand) < PACKEDTAGS2_OOBSIZE(y)) { NAND_ERROR(nand, "Device has %d spare per page but YAFFS2 needs %u\n", CYG_NAND_APPSPARE_PER_PAGE(nand), PACKEDTAGS2_OOBSIZE(y)); EG(EINVAL); } } #ifdef CYGSEM_FS_YAFFS_OMIT_YAFFS2_CODE if (y->isYaffs2) { NAND_ERROR(nand, "Device is set to run with yaffs2 code, which is compiled out.\n"); EG(ENODEV); } #endif y->eraseBlockInNAND = eyaffs_eraseBlockInNAND; y->initialiseNAND = eyaffs_initialiseNAND; y->deinitialiseNAND = eyaffs_deinitialiseNAND; y->writeChunkWithTagsToNAND = eyaffs_writeChunkWithTagsToNAND; y->readChunkWithTagsFromNAND = eyaffs_readChunkWithTagsFromNAND; y->markNANDBlockBad = eyaffs_markNANDBlockBad; y->queryNANDBlock = eyaffs_queryNANDBlock; y->isMounted = 0; y->removeObjectCallback = eyaffs_diriter_objremove_callback; if (o_skipCheckpointRead) { NAND_CHATTER(1, nand, "mounting with skip-checkpoint-read\n"); y->skipCheckpointRead = 1; } int yerr = yaffs_GutsInitialise(y); if (yerr == YAFFS_FAIL) { NAND_CHATTER(1, nand, "yaffs_GutsInitialise failed!\n"); EG(EIO); } yaffs_Object * root = yaffs_Root(y); mte->root = (cyg_dir) root; mte->data = (CYG_ADDRWORD) y; CYG_ASSERT(_err == ENOERR, "Unhandled error in initialisation"); // At this point we could use the device struct's devList to link it // into a global devList. (We don't currently need to, so won't.) return ENOERR; err_exit: if (y) YFREE(y); return _err; } #if defined(CYGSEM_FS_YAFFS_COMPATIBILITY_ECOSPRO) && (CYGSEM_FS_YAFFS_COMPATIBILITY_ECOSPRO == 1) static int eyaffs_umount ( cyg_mtab_entry *mte, cyg_bool force ) #else static int eyaffs_umount ( cyg_mtab_entry *mte ) #endif { yaffs_Device *y = (yaffs_Device*) mte->data; yaffs_FlushEntireDeviceCache(y); yaffs_CheckpointSave(y); yaffs_Deinitialise(y); YFREE(y); return ENOERR; } static int eyaffs_open ( cyg_mtab_entry *mte, cyg_dir dir, const char *name, int mode, cyg_file *file ) { int _err; ey_dirsearch ds; yaffs_Object *node = 0; // 'mode' is the open options (flags), not the permissions. // (eCos doesn't support file perms.) // fileio gives us either the root, or the current wd, to start at init_dirsearch(&ds, (yaffs_Object*) dir, name); _err = eyaffs_find(&ds); if (_err == ENOENT) { // It's not there. Are we creat()ing? if (ds.last && (mode & O_CREAT) ) { // A trailing slash implies directory, which makes no sense here if (ds.name[ds.namelen] == '/') return EISDIR; CYG_ASSERT(ds.name[ds.namelen]==0, "Length fencepost failed"); node = yaffs_MknodFile(ds.dir, ds.name, FILE_FIXED_PERMS, FIXED_UID, FIXED_GID); if (!node || (node==YAFFS_FAIL)) return ENOMEM; _err = ENOERR; } // else we return ENOENT } else if (_err == ENOERR) { // The node exists. If the O_CREAT and O_EXCL bits are set, we // must fail the open. if( (mode & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL) ) _err = EEXIST; else node = ds.node; } if( _err != ENOERR ) return _err; if (yaffs_GetObjectType(node) == DT_LNK) { // TODO: symlink support return ENOSYS; } if(yaffs_GetObjectType(node) == DT_DIR) return EISDIR; // Could check perms here (and on the dir tree too) if( mode & O_TRUNC ) YER(yaffs_ResizeFile(node, 0)); node->inUse++; file->f_flag |= mode & CYG_FILE_MODE_MASK; file->f_type = CYG_FILE_TYPE_FILE; file->f_ops = &eyaffs_fileops; file->f_offset = (mode & O_APPEND) ? yaffs_GetObjectFileLength(node) : 0; file->f_data = (CYG_ADDRWORD) node; file->f_xops = 0; return ENOERR; } static int eyaffs_unlink ( cyg_mtab_entry *mte, cyg_dir dir, const char *name ) { int _err; ey_dirsearch ds; init_dirsearch(&ds, (yaffs_Object*) dir, name); _err = eyaffs_find(&ds); if (_err != ENOERR) return _err; if(yaffs_GetObjectType(ds.node) == DT_DIR) return EISDIR; if (ds.name[ds.namelen] == '/') return EISDIR; // cannot unlink dirs YER(yaffs_Unlink(ds.dir,ds.name)); // this appears to DTRT wrt 0-linked still-open files return ENOERR; } static int eyaffs_mkdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name ) { ey_dirsearch ds; init_dirsearch(&ds, (yaffs_Object*) dir, name); int _err = eyaffs_find(&ds); if (_err == ENOENT) { if (ds.last) { char dirname[ds.namelen+1]; memcpy(dirname, ds.name, ds.namelen); dirname[ds.namelen] = 0; // OK, create it! yaffs_Object * node = yaffs_MknodDirectory(ds.dir, dirname, DIRECTORY_FIXED_PERMS, FIXED_UID, FIXED_GID); _err = (node == NULL) ? EIO : ENOERR; } else { // Intermediate directory doesn't exist - ENOENT } } else { // something there already if (_err == ENOERR) _err = EEXIST; } return _err; } static int eyaffs_rmdir ( cyg_mtab_entry *mte, cyg_dir dir, const char *name ) { ey_dirsearch ds; init_dirsearch(&ds, (yaffs_Object*) dir, name); int _err = eyaffs_find(&ds); if (_err != ENOERR) return _err; if(yaffs_GetObjectType(ds.node) != DT_DIR) return ENOTDIR; if (0==strcmp(ds.name,".")) return EINVAL; if (0==ds.namelen) return EINVAL; char dirname[ds.namelen+1]; memcpy(dirname, ds.name, ds.namelen); dirname[ds.namelen] = 0; if (YAFFS_FAIL == yaffs_Unlink(ds.dir,dirname)) return ENOTEMPTY; return ENOERR; } static int eyaffs_rename ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1, cyg_dir dir2, const char *name2 ) { ey_dirsearch ds1, ds2; init_dirsearch(&ds1, (yaffs_Object*) dir1, name1); int _err = eyaffs_find(&ds1); if (_err != ENOERR) return _err; init_dirsearch(&ds2, (yaffs_Object*) dir2, name2); _err = eyaffs_find(&ds2); if (ds2.last && _err == ENOENT) ds2.node = NULL, _err = ENOERR; // through-rename if (_err != ENOERR) return _err; if (ds1.node == ds2.node) return ENOERR; // identity op if (ds2.node) { int type1 = yaffs_GetObjectType(ds1.node), type2 = yaffs_GetObjectType(ds2.node); if ( (type1 != DT_DIR) && (type2 == DT_DIR) ) return EISDIR; if ( (type1 == DT_DIR) && (type2 != DT_DIR) ) return ENOTDIR; // YAFFS will delete the target } // Alas, if this is a directory rename, there may be trailing / involved, // so we have to strip them. char xname1[ds1.namelen+1]; memcpy(xname1, ds1.name, ds1.namelen); xname1[ds1.namelen] = 0; char xname2[ds2.namelen+1]; memcpy(xname2, ds2.name, ds2.namelen); xname2[ds2.namelen] = 0; YER(yaffs_RenameObject(ds1.dir, xname1, ds2.dir, xname2)); return ENOERR; } static int eyaffs_link ( cyg_mtab_entry *mte, cyg_dir dir1, const char *name1, cyg_dir dir2, const char *name2, int type ) { ey_dirsearch ds1, ds2; // Only do hard links for now if (type != CYG_FSLINK_HARD) return EINVAL; init_dirsearch(&ds1, (yaffs_Object*) dir1, name1); int _err = eyaffs_find(&ds1); if (_err != ENOERR) return _err; init_dirsearch(&ds2, (yaffs_Object*) dir2, name2); _err = eyaffs_find(&ds2); if (_err == ENOERR) return EEXIST; // Can't rename-over if (ds2.last && _err == ENOENT) ds2.node = 0, _err = ENOERR; // link-through ER(_err); // Forbid hard links to directories if (ds1.node->variantType == YAFFS_OBJECT_TYPE_DIRECTORY) return EPERM; if (ds2.name[ds2.namelen] == '/') return EISDIR; // eh? makes no sense. yaffs_Object * newnode = yaffs_Link(ds2.dir, ds2.name, ds1.node); if (newnode) return ENOERR; else return EIO; } static int eyaffs_opendir( cyg_mtab_entry *mte, cyg_dir dir, const char *name, cyg_file *file ) { int _err; ey_dirsearch ds; init_dirsearch(&ds, (yaffs_Object*) dir, name); _err = eyaffs_find(&ds); if (_err != ENOERR) return _err; if(yaffs_GetObjectType(ds.node) != DT_DIR) return ENOTDIR; eyaffs_diriter *diriter = YMALLOC(sizeof(eyaffs_diriter)); if (!diriter) return ENOMEM; ds.node->inUse++; YINIT_LIST_HEAD(&diriter->iterlist); diriter->node = ds.node; if (!eyaffs_all_diriters.next) YINIT_LIST_HEAD(&eyaffs_all_diriters); ylist_add(&diriter->iterlist, &eyaffs_all_diriters); eyaffs_diriter_rewind(diriter); file->f_type = CYG_FILE_TYPE_FILE; file->f_ops = &eyaffs_dirops; file->f_offset = 0; file->f_data = (CYG_ADDRWORD) diriter; file->f_xops = 0; return ENOERR; } static int eyaffs_chdir ( cyg_mtab_entry *mte, cyg_dir xdir, const char *name, cyg_dir *dir_out ) { yaffs_Object *dir = (yaffs_Object*) xdir; if (dir_out) { ey_dirsearch ds; init_dirsearch(&ds, dir, name); int _err = eyaffs_find(&ds); if (_err != ENOERR) return _err; if (yaffs_GetObjectType(ds.node) != DT_DIR) return ENOTDIR; *dir_out = (cyg_dir)ds.node; } else { // the "dec-refcount" case: nothing to do } return ENOERR; } static int eyaffs_stat ( cyg_mtab_entry *mte, cyg_dir dir, const char *name, struct stat *buf) { int _err; ey_dirsearch ds; init_dirsearch(&ds, (yaffs_Object*) dir, name); _err = eyaffs_find(&ds); if (_err != ENOERR) return _err; return eyaffs_stat_object(ds.node, buf); } static int eyaffs_stat_object(yaffs_Object *node, struct stat *buf) { switch (yaffs_GetObjectType(node)) { case DT_REG: buf->st_mode = __stat_mode_REG; buf->st_size = node->variant.fileVariant.fileSize; break; case DT_DIR: buf->st_mode = __stat_mode_DIR; buf->st_size = 0; break; default: return ENOSYS; // Don't support anything else yet } buf->st_mode |= node->yst_mode &~ S_IFMT; buf->st_ino = node->objectId; buf->st_dev = 0; buf->st_nlink = eyaffs_count_links(node); buf->st_uid = node->yst_uid; buf->st_gid = node->yst_gid; buf->st_atime = node->yst_atime; buf->st_mtime = node->yst_mtime; buf->st_ctime = node->yst_ctime; return ENOERR; } static int eyaffs_getinfo( cyg_mtab_entry *mte, cyg_dir dir, const char *name, int key, void *buf, int len ) { int _err; ey_dirsearch ds; yaffs_Device *y = (yaffs_Device*) mte->data; switch(key) { case FS_INFO_CONF: break; #ifdef CYGSEM_FILEIO_INFO_DISK_USAGE case FS_INFO_DISK_USAGE: { struct cyg_fs_disk_usage *usage = (struct cyg_fs_disk_usage *) buf; CYG_CHECK_DATA_PTR(buf, "getinfo buf"); if (len < sizeof(struct cyg_fs_disk_usage)) return EINVAL; usage->total_blocks = y->endBlock - y->startBlock + 1; usage->free_blocks = y->nErasedBlocks; usage->block_size = y->nDataBytesPerChunk * y->nChunksPerBlock; return ENOERR; } #else (void)y; #endif case FS_INFO_GETCWD: // yaffs doesn't provide anything special, we'd only end up duplicating the fallback ".." method. case FS_INFO_ATTRIB: // not supported #ifdef FS_INFO_CALLBACK case FS_INFO_CALLBACK: // not supported #endif default: return ENOSYS; } init_dirsearch(&ds, (yaffs_Object*) dir, name); _err = eyaffs_find(&ds); if (_err != ENOERR) return _err; switch(key) { case FS_INFO_CONF: if (len < sizeof (struct cyg_pathconf_info)) return EINVAL; return eyaffs_pathconf(ds.node, (struct cyg_pathconf_info *) buf); #ifdef FS_INFO_MBCS_TRANSLATE case FS_INFO_MBCS_TRANSLATE: #endif default: return ENOSYS; } } static int eyaffs_do_sync_fs(yaffs_Device * y) { yaffs_FlushEntireDeviceCache(y); // TODO: If there were a convenient way to enumerate all the open // files in a filesystem, we could fsync them all here. // This might involve code similar to cyg_fd_filesys_close(). yaffs_CheckpointSave(y); return ENOERR; } static int eyaffs_setinfo( cyg_mtab_entry *mte, cyg_dir dir, const char *name, int key, void *buf, int len ) { switch (key) { case FS_INFO_SYNC: return eyaffs_do_sync_fs( (yaffs_Device*) mte->data ); case FS_INFO_ATTRIB: // not supported #ifdef FS_INFO_CALLBACK case FS_INFO_CALLBACK: // not supported #endif #ifdef FS_INFO_SECURE_ERASE case FS_INFO_SECURE_ERASE: #endif #ifdef FS_INFO_MBCS_TRANSLATE case FS_INFO_MBCS_TRANSLATE: #endif return ENOSYS; } return EINVAL; } FSTAB_ENTRY(eyaffs_fste, "yaffs", 0, CYG_SYNCMODE_FILE_FILESYSTEM|CYG_SYNCMODE_IO_FILESYSTEM, /* N.B. If you get a build failure here (initialization from incompatible pointer type), it might be because you're using this GPL-licensed package on eCosPro and need to set CYGSEM_FS_YAFFS_COMPATIBILITY_ECOSPRO. */ eyaffs_mount, eyaffs_umount, eyaffs_open, eyaffs_unlink, eyaffs_mkdir, eyaffs_rmdir, eyaffs_rename, eyaffs_link, eyaffs_opendir, eyaffs_chdir, eyaffs_stat, eyaffs_getinfo, eyaffs_setinfo); // -----------------------------------------------------------------------
<?php namespace Markup\NeedleBundle\Intercept; /** * An interface for an object that can match a search query to an intercept. **/ interface InterceptorInterface { /** * Matches a provided search query. Returns an intercept if match happens, null otherwise. * * @param string $queryString * @return InterceptInterface|null **/ public function matchQueryToIntercept($queryString); }
Seabury Quinn's short stories were featured in well more than half of the pulp magazine Weird Tales's original publication run. His most famous character, the supernatural French detective Dr. Jules de Grandin, investigated cases involving monsters, devil worshippers, serial killers, and spirits from beyond the grave, often set in the small town of Harrisonville, New Jersey. In de Grandin there are familiar shades of both Arthur Conan Doyle's Sherlock Holmes and Agatha Christie's Hercule Poirot, and alongside his assistant, Dr. Samuel Trowbridge, de Grandin's knack for solving mysteries-and his outbursts of peculiar French-isms (grand Dieu!)-captivated readers for nearly three decades. Collected for the first time in trade editions, The Complete Tales of Jules de Grandin, presents all ninety-three published works featuring the supernatural detective. Presented in chronological order over five volumes, this is the definitive collection of an iconic pulp hero.
namespace Company.App.Core.DTOs { public class EmployeeWithManagerDto { public int Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public decimal Salary { get; set; } public string ManagerFirstName { get; set; } public string ManagerLastName { get; set; } } }
/* SPDX-License-Identifier: GPL-2.0 */ /* * Wireless configuration interface internals. * * Copyright 2006-2010 Johannes Berg <[email protected]> */ #ifndef __NET_WIRELESS_CORE_H #define __NET_WIRELESS_CORE_H #include <linux/list.h> #include <linux/netdevice.h> #include <linux/rbtree.h> #include <linux/debugfs.h> #include <linux/rfkill.h> #include <linux/workqueue.h> #include <linux/rtnetlink.h> #include <net/genetlink.h> #include <net/cfg80211.h> #include "reg.h" #define WIPHY_IDX_INVALID -1 struct cfg80211_registered_device { const struct cfg80211_ops *ops; struct list_head list; /* rfkill support */ struct rfkill_ops rfkill_ops; struct rfkill *rfkill; struct work_struct rfkill_sync; /* ISO / IEC 3166 alpha2 for which this device is receiving * country IEs on, this can help disregard country IEs from APs * on the same alpha2 quickly. The alpha2 may differ from * cfg80211_regdomain's alpha2 when an intersection has occurred. * If the AP is reconfigured this can also be used to tell us if * the country on the country IE changed. */ char country_ie_alpha2[2]; /* * the driver requests the regulatory core to set this regulatory * domain as the wiphy's. Only used for %REGULATORY_WIPHY_SELF_MANAGED * devices using the regulatory_set_wiphy_regd() API */ const struct ieee80211_regdomain *requested_regd; /* If a Country IE has been received this tells us the environment * which its telling us its in. This defaults to ENVIRON_ANY */ enum environment_cap env; /* wiphy index, internal only */ int wiphy_idx; /* protected by RTNL */ int devlist_generation, wdev_id; int opencount; wait_queue_head_t dev_wait; struct list_head beacon_registrations; spinlock_t beacon_registrations_lock; struct list_head mlme_unreg; spinlock_t mlme_unreg_lock; struct work_struct mlme_unreg_wk; /* protected by RTNL only */ int num_running_ifaces; int num_running_monitor_ifaces; u64 cookie_counter; /* BSSes/scanning */ spinlock_t bss_lock; struct list_head bss_list; struct rb_root bss_tree; u32 bss_generation; u32 bss_entries; struct cfg80211_scan_request *scan_req; /* protected by RTNL */ struct sk_buff *scan_msg; struct list_head sched_scan_req_list; time64_t suspend_at; struct work_struct scan_done_wk; struct genl_info *cur_cmd_info; struct work_struct conn_work; struct work_struct event_work; struct delayed_work dfs_update_channels_wk; /* netlink port which started critical protocol (0 means not started) */ u32 crit_proto_nlportid; struct cfg80211_coalesce *coalesce; struct work_struct destroy_work; struct work_struct sched_scan_stop_wk; struct work_struct sched_scan_res_wk; struct cfg80211_chan_def radar_chandef; struct work_struct propagate_radar_detect_wk; struct cfg80211_chan_def cac_done_chandef; struct work_struct propagate_cac_done_wk; /* must be last because of the way we do wiphy_priv(), * and it should at least be aligned to NETDEV_ALIGN */ struct wiphy wiphy __aligned(NETDEV_ALIGN); }; static inline struct cfg80211_registered_device *wiphy_to_rdev(struct wiphy *wiphy) { BUG_ON(!wiphy); return container_of(wiphy, struct cfg80211_registered_device, wiphy); } static inline void cfg80211_rdev_free_wowlan(struct cfg80211_registered_device *rdev) { #ifdef CONFIG_PM int i; if (!rdev->wiphy.wowlan_config) return; for (i = 0; i < rdev->wiphy.wowlan_config->n_patterns; i++) kfree(rdev->wiphy.wowlan_config->patterns[i].mask); kfree(rdev->wiphy.wowlan_config->patterns); if (rdev->wiphy.wowlan_config->tcp && rdev->wiphy.wowlan_config->tcp->sock) sock_release(rdev->wiphy.wowlan_config->tcp->sock); kfree(rdev->wiphy.wowlan_config->tcp); kfree(rdev->wiphy.wowlan_config->nd_config); kfree(rdev->wiphy.wowlan_config); #endif } static inline u64 cfg80211_assign_cookie(struct cfg80211_registered_device *rdev) { u64 r = ++rdev->cookie_counter; if (WARN_ON(r == 0)) r = ++rdev->cookie_counter; return r; } extern struct workqueue_struct *cfg80211_wq; extern struct list_head cfg80211_rdev_list; extern int cfg80211_rdev_list_generation; struct cfg80211_internal_bss { struct list_head list; struct list_head hidden_list; struct rb_node rbn; u64 ts_boottime; unsigned long ts; unsigned long refcount; atomic_t hold; /* time at the start of the reception of the first octet of the * timestamp field of the last beacon/probe received for this BSS. * The time is the TSF of the BSS specified by %parent_bssid. */ u64 parent_tsf; /* the BSS according to which %parent_tsf is set. This is set to * the BSS that the interface that requested the scan was connected to * when the beacon/probe was received. */ u8 parent_bssid[ETH_ALEN] __aligned(2); /* must be last because of priv member */ struct cfg80211_bss pub; }; static inline struct cfg80211_internal_bss *bss_from_pub(struct cfg80211_bss *pub) { return container_of(pub, struct cfg80211_internal_bss, pub); } static inline void cfg80211_hold_bss(struct cfg80211_internal_bss *bss) { atomic_inc(&bss->hold); } static inline void cfg80211_unhold_bss(struct cfg80211_internal_bss *bss) { int r = atomic_dec_return(&bss->hold); WARN_ON(r < 0); } struct cfg80211_registered_device *cfg80211_rdev_by_wiphy_idx(int wiphy_idx); int get_wiphy_idx(struct wiphy *wiphy); struct wiphy *wiphy_idx_to_wiphy(int wiphy_idx); int cfg80211_switch_netns(struct cfg80211_registered_device *rdev, struct net *net); void cfg80211_init_wdev(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev); static inline void wdev_lock(struct wireless_dev *wdev) __acquires(wdev) { mutex_lock(&wdev->mtx); __acquire(wdev->mtx); } static inline void wdev_unlock(struct wireless_dev *wdev) __releases(wdev) { __release(wdev->mtx); mutex_unlock(&wdev->mtx); } #define ASSERT_WDEV_LOCK(wdev) lockdep_assert_held(&(wdev)->mtx) static inline bool cfg80211_has_monitors_only(struct cfg80211_registered_device *rdev) { ASSERT_RTNL(); return rdev->num_running_ifaces == rdev->num_running_monitor_ifaces && rdev->num_running_ifaces > 0; } enum cfg80211_event_type { EVENT_CONNECT_RESULT, EVENT_ROAMED, EVENT_DISCONNECTED, EVENT_IBSS_JOINED, EVENT_STOPPED, EVENT_PORT_AUTHORIZED, }; struct cfg80211_event { struct list_head list; enum cfg80211_event_type type; union { struct cfg80211_connect_resp_params cr; struct cfg80211_roam_info rm; struct { const u8 *ie; size_t ie_len; u16 reason; bool locally_generated; } dc; struct { u8 bssid[ETH_ALEN]; struct ieee80211_channel *channel; } ij; struct { u8 bssid[ETH_ALEN]; } pa; }; }; struct cfg80211_cached_keys { struct key_params params[CFG80211_MAX_WEP_KEYS]; u8 data[CFG80211_MAX_WEP_KEYS][WLAN_KEY_LEN_WEP104]; int def; }; enum cfg80211_chan_mode { CHAN_MODE_UNDEFINED, CHAN_MODE_SHARED, CHAN_MODE_EXCLUSIVE, }; struct cfg80211_beacon_registration { struct list_head list; u32 nlportid; }; struct cfg80211_cqm_config { u32 rssi_hyst; s32 last_rssi_event_value; int n_rssi_thresholds; s32 rssi_thresholds[0]; }; void cfg80211_destroy_ifaces(struct cfg80211_registered_device *rdev); /* free object */ void cfg80211_dev_free(struct cfg80211_registered_device *rdev); int cfg80211_dev_rename(struct cfg80211_registered_device *rdev, char *newname); void ieee80211_set_bitrate_flags(struct wiphy *wiphy); void cfg80211_bss_expire(struct cfg80211_registered_device *rdev); void cfg80211_bss_age(struct cfg80211_registered_device *rdev, unsigned long age_secs); /* IBSS */ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, struct net_device *dev, struct cfg80211_ibss_params *params, struct cfg80211_cached_keys *connkeys); void cfg80211_clear_ibss(struct net_device *dev, bool nowext); int __cfg80211_leave_ibss(struct cfg80211_registered_device *rdev, struct net_device *dev, bool nowext); int cfg80211_leave_ibss(struct cfg80211_registered_device *rdev, struct net_device *dev, bool nowext); void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid, struct ieee80211_channel *channel); int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev); /* mesh */ extern const struct mesh_config default_mesh_config; extern const struct mesh_setup default_mesh_setup; int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev, struct net_device *dev, struct mesh_setup *setup, const struct mesh_config *conf); int __cfg80211_leave_mesh(struct cfg80211_registered_device *rdev, struct net_device *dev); int cfg80211_leave_mesh(struct cfg80211_registered_device *rdev, struct net_device *dev); int cfg80211_set_mesh_channel(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, struct cfg80211_chan_def *chandef); /* OCB */ int __cfg80211_join_ocb(struct cfg80211_registered_device *rdev, struct net_device *dev, struct ocb_setup *setup); int cfg80211_join_ocb(struct cfg80211_registered_device *rdev, struct net_device *dev, struct ocb_setup *setup); int __cfg80211_leave_ocb(struct cfg80211_registered_device *rdev, struct net_device *dev); int cfg80211_leave_ocb(struct cfg80211_registered_device *rdev, struct net_device *dev); /* AP */ int __cfg80211_stop_ap(struct cfg80211_registered_device *rdev, struct net_device *dev, bool notify); int cfg80211_stop_ap(struct cfg80211_registered_device *rdev, struct net_device *dev, bool notify); /* MLME */ int cfg80211_mlme_auth(struct cfg80211_registered_device *rdev, struct net_device *dev, struct ieee80211_channel *chan, enum nl80211_auth_type auth_type, const u8 *bssid, const u8 *ssid, int ssid_len, const u8 *ie, int ie_len, const u8 *key, int key_len, int key_idx, const u8 *auth_data, int auth_data_len); int cfg80211_mlme_assoc(struct cfg80211_registered_device *rdev, struct net_device *dev, struct ieee80211_channel *chan, const u8 *bssid, const u8 *ssid, int ssid_len, struct cfg80211_assoc_request *req); int cfg80211_mlme_deauth(struct cfg80211_registered_device *rdev, struct net_device *dev, const u8 *bssid, const u8 *ie, int ie_len, u16 reason, bool local_state_change); int cfg80211_mlme_disassoc(struct cfg80211_registered_device *rdev, struct net_device *dev, const u8 *bssid, const u8 *ie, int ie_len, u16 reason, bool local_state_change); void cfg80211_mlme_down(struct cfg80211_registered_device *rdev, struct net_device *dev); int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid, u16 frame_type, const u8 *match_data, int match_len); void cfg80211_mlme_unreg_wk(struct work_struct *wk); void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid); void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev); int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev, struct cfg80211_mgmt_tx_params *params, u64 *cookie); void cfg80211_oper_and_ht_capa(struct ieee80211_ht_cap *ht_capa, const struct ieee80211_ht_cap *ht_capa_mask); void cfg80211_oper_and_vht_capa(struct ieee80211_vht_cap *vht_capa, const struct ieee80211_vht_cap *vht_capa_mask); /* SME events */ int cfg80211_connect(struct cfg80211_registered_device *rdev, struct net_device *dev, struct cfg80211_connect_params *connect, struct cfg80211_cached_keys *connkeys, const u8 *prev_bssid); void __cfg80211_connect_result(struct net_device *dev, struct cfg80211_connect_resp_params *params, bool wextev); void __cfg80211_disconnected(struct net_device *dev, const u8 *ie, size_t ie_len, u16 reason, bool from_ap); int cfg80211_disconnect(struct cfg80211_registered_device *rdev, struct net_device *dev, u16 reason, bool wextev); void __cfg80211_roamed(struct wireless_dev *wdev, struct cfg80211_roam_info *info); void __cfg80211_port_authorized(struct wireless_dev *wdev, const u8 *bssid); int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev); void cfg80211_autodisconnect_wk(struct work_struct *work); /* SME implementation */ void cfg80211_conn_work(struct work_struct *work); void cfg80211_sme_scan_done(struct net_device *dev); bool cfg80211_sme_rx_assoc_resp(struct wireless_dev *wdev, u16 status); void cfg80211_sme_rx_auth(struct wireless_dev *wdev, const u8 *buf, size_t len); void cfg80211_sme_disassoc(struct wireless_dev *wdev); void cfg80211_sme_deauth(struct wireless_dev *wdev); void cfg80211_sme_auth_timeout(struct wireless_dev *wdev); void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev); void cfg80211_sme_abandon_assoc(struct wireless_dev *wdev); /* internal helpers */ bool cfg80211_supported_cipher_suite(struct wiphy *wiphy, u32 cipher); int cfg80211_validate_key_settings(struct cfg80211_registered_device *rdev, struct key_params *params, int key_idx, bool pairwise, const u8 *mac_addr); void __cfg80211_scan_done(struct work_struct *wk); void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, bool send_message); void cfg80211_add_sched_scan_req(struct cfg80211_registered_device *rdev, struct cfg80211_sched_scan_request *req); int cfg80211_sched_scan_req_possible(struct cfg80211_registered_device *rdev, bool want_multi); void cfg80211_sched_scan_results_wk(struct work_struct *work); int cfg80211_stop_sched_scan_req(struct cfg80211_registered_device *rdev, struct cfg80211_sched_scan_request *req, bool driver_initiated); int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev, u64 reqid, bool driver_initiated); void cfg80211_upload_connect_keys(struct wireless_dev *wdev); int cfg80211_change_iface(struct cfg80211_registered_device *rdev, struct net_device *dev, enum nl80211_iftype ntype, struct vif_params *params); void cfg80211_process_rdev_events(struct cfg80211_registered_device *rdev); void cfg80211_process_wdev_events(struct wireless_dev *wdev); bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range, u32 center_freq_khz, u32 bw_khz); /** * cfg80211_chandef_dfs_usable - checks if chandef is DFS usable * @wiphy: the wiphy to validate against * @chandef: the channel definition to check * * Checks if chandef is usable and we can/need start CAC on such channel. * * Return: Return true if all channels available and at least * one channel require CAC (NL80211_DFS_USABLE) */ bool cfg80211_chandef_dfs_usable(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef); void cfg80211_set_dfs_state(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef, enum nl80211_dfs_state dfs_state); void cfg80211_dfs_channels_update_work(struct work_struct *work); unsigned int cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy, const struct cfg80211_chan_def *chandef); void cfg80211_sched_dfs_chan_update(struct cfg80211_registered_device *rdev); bool cfg80211_any_wiphy_oper_chan(struct wiphy *wiphy, struct ieee80211_channel *chan); bool cfg80211_beaconing_iface_active(struct wireless_dev *wdev); bool cfg80211_is_sub_chan(struct cfg80211_chan_def *chandef, struct ieee80211_channel *chan); static inline unsigned int elapsed_jiffies_msecs(unsigned long start) { unsigned long end = jiffies; if (end >= start) return jiffies_to_msecs(end - start); return jiffies_to_msecs(end + (ULONG_MAX - start) + 1); } void cfg80211_get_chan_state(struct wireless_dev *wdev, struct ieee80211_channel **chan, enum cfg80211_chan_mode *chanmode, u8 *radar_detect); int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev, struct cfg80211_chan_def *chandef); int ieee80211_get_ratemask(struct ieee80211_supported_band *sband, const u8 *rates, unsigned int n_rates, u32 *mask); int cfg80211_validate_beacon_int(struct cfg80211_registered_device *rdev, enum nl80211_iftype iftype, u32 beacon_int); void cfg80211_update_iface_num(struct cfg80211_registered_device *rdev, enum nl80211_iftype iftype, int num); void __cfg80211_leave(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev); void cfg80211_leave(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev); void cfg80211_stop_p2p_device(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev); void cfg80211_stop_nan(struct cfg80211_registered_device *rdev, struct wireless_dev *wdev); #ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS #define CFG80211_DEV_WARN_ON(cond) WARN_ON(cond) #else /* * Trick to enable using it as a condition, * and also not give a warning when it's * not used that way. */ #define CFG80211_DEV_WARN_ON(cond) ({bool __r = (cond); __r; }) #endif void cfg80211_cqm_config_free(struct wireless_dev *wdev); #endif /* __NET_WIRELESS_CORE_H */
There are few words in this world that can make a man truly happy. Iron Man and Capsule Elevator are four of them, and both these features you will find in this futuristic family apartment tucked away in bustling Taipei. Developed by White Interior Design, the project elegantly known as La Fatte Residence takes an unconventional approach to modern design for the young family. The designer says that the team combined industrial elements with hints of retro like the library wallpaper to keep things grounded. The elevator is also fully functioning unit that delivers the dwellers across two floors in order to keep with the futuristic theme. And the Iron Man? The crazy 1:1 full scale statue is a result of the owner’s love for sci-fi which helps to drive the elegance of the space into the digital age. Who said dads couldn’t be cool?
########################################################################### # # Copyright 2017 Google Inc. # # 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. # ########################################################################### TargetUnion_Schema = [ { "name":"union", "type":"RECORD", "mode":"REPEATED", "fields":[ { "name":"criteria_id", "type":"INTEGER", "mode":"NULLABLE", }, { "name":"parameter", "type":"STRING", "mode":"NULLABLE", }, { "name":"excluded", "type":"BOOLEAN", "mode":"NULLABLE", }, ] }, { "name":"excluded", "type":"BOOLEAN", "mode":"NULLABLE", }, ]
export default /* glsl */` varying vec2 vUv0; uniform sampler2D source; void main(void) { gl_FragColor = texture2D(source, vUv0); } `;
Home | BLACK BUFFALO INC. Born in the Midwest. Raised in the South. Charge Ahead. WARNING: This product contains nicotine which is a highly addictive substance. It is intended for use by existing tobacco consumers above legal age only. Do not use this product to treat any medical condition or habit. Do not use if pregnant, breast-feeding or suffer from any medical condition. Stop use if you show any sensitivity to this product. Please remember to verify your age on the account page. Do you want to use Canadian site?