answer
stringlengths
15
1.25M
$(function () { var colors = Highcharts.getOptions().colors, categories = ['', 'NEW', ''], name = 'Browser brands', data = [{ y: 290, color: colors[0], drilldown: { name: 'close bug version', categories: ['', ''], data: [20,270], color: colors[0] } }, { y: 64, color: colors[1], drilldown: { name: 'fix bug version', categories: ['', ''], data: [8,56], color: colors[1] } }, { y: 82, color: colors[2], drilldown: { name: 'NEW bug versions', categories: ['', ''], data: [5,77], color: colors[2] } }]; // Build the data arrays var browserData = []; var versionsData = []; for (var i = 0; i < data.length; i++) { // add browser data browserData.push({ name: categories[i], y: data[i].y, color: data[i].color }); // add version data for (var j = 0; j < data[i].drilldown.data.length; j++) { var brightness = 0.2 - (j / data[i].drilldown.data.length) / 5 ; versionsData.push({ name: data[i].drilldown.categories[j], y: data[i].drilldown.data[j], color: Highcharts.Color(data[i].color).brighten(brightness).get() }); } } // Create the chart $('#container11').highcharts({ chart: { type: 'pie' }, title: { text: '' }, yAxis: { title: { text: 'Total percent market share' } }, plotOptions: { pie: { shadow: false, center: ['50%', '50%'] } }, tooltip: { valueSuffix: '' //tooltip }, series: [{ name: 'Browsers', data: browserData, size: '80%', dataLabels: { formatter: function() { return this.y > 5 ? this.point.name : null; }, color: 'white', distance: -30 } }, { name: 'Versions', data: versionsData, size: '100%', innerSize: '80%', dataLabels: { formatter: function() { // display only if larger than 1 return this.y > 0 ? '<b>'+ this.point.name +':</b> '+ this.y+'' : null; } } }] }); });
#ifndef <API key> #define <API key> #include <stdio.h> #include <stdlib.h> #include "BitSet.h" #include <list> namespace MIAMI { #define <API key> 0 class <API key> { public: <API key> (int _unit, BitSet* _umask, int _count); ~<API key> () { if (unit_mask) delete unit_mask; } inline BitSet* UnitsMask () const { return (unit_mask); } inline int Count () const { return (count); } int index; int count; BitSet *unit_mask; }; typedef std::list<<API key>*> TEUList; } /* namespace MIAMI */ #endif
# # product import logging from django.contrib import messages from django.contrib.auth.decorators import user_passes_test from django.urls import reverse from django.http import <API key> from django.shortcuts import render from dojo.utils import add_breadcrumb from dojo.forms import ToolTypeForm from dojo.models import Tool_Type logger = logging.getLogger(__name__) @user_passes_test(lambda u: u.is_staff) def new_tool_type(request): if request.method == 'POST': tform = ToolTypeForm(request.POST, instance=Tool_Type()) if tform.is_valid(): tform.save() messages.add_message(request, messages.SUCCESS, 'Tool Type Configuration Successfully Created.', extra_tags='alert-success') return <API key>(reverse('tool_type', )) else: tform = ToolTypeForm() add_breadcrumb(title="New Tool Type Configuration", top_level=False, request=request) return render(request, 'dojo/new_tool_type.html', {'tform': tform}) @user_passes_test(lambda u: u.is_staff) def edit_tool_type(request, ttid): tool_type = Tool_Type.objects.get(pk=ttid) if request.method == 'POST': tform = ToolTypeForm(request.POST, instance=tool_type) if tform.is_valid(): tform.save() messages.add_message(request, messages.SUCCESS, 'Tool Type Configuration Successfully Updated.', extra_tags='alert-success') return <API key>(reverse('tool_type', )) else: tform = ToolTypeForm(instance=tool_type) add_breadcrumb(title="Edit Tool Type Configuration", top_level=False, request=request) return render(request, 'dojo/edit_tool_type.html', { 'tform': tform, }) @user_passes_test(lambda u: u.is_staff) def tool_type(request): confs = Tool_Type.objects.all().order_by('name') add_breadcrumb(title="Tool Type List", top_level=not len(request.GET), request=request) return render(request, 'dojo/tool_type.html', {'confs': confs, })
#include <stddef.h> #include <stdint.h> #include "base/bind.h" #include "base/macros.h" #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "base/strings/<API key>.h" #include "media/base/media_log.h" #include "media/base/mock_filters.h" #include "media/base/test_helpers.h" #include "media/blink/<API key>.h" #include "media/blink/mock_webframeclient.h" #include "media/blink/mock_weburlloader.h" #include "media/blink/<API key>.h" #include "media/blink/multibuffer_reader.h" #include "media/blink/<API key>.h" #include "media/blink/<API key>.h" #include "third_party/WebKit/public/platform/WebURLResponse.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" #include "third_party/WebKit/public/web/WebView.h" using ::testing::_; using ::testing::Assign; using ::testing::DoAll; using ::testing::Invoke; using ::testing::InvokeWithoutArgs; using ::testing::InSequence; using ::testing::NiceMock; using ::testing::StrictMock; using blink::WebLocalFrame; using blink::WebString; using blink::WebURLLoader; using blink::WebURLResponse; using blink::WebView; namespace media { class <API key>; class <API key>; std::set<<API key>*> test_data_providers; class <API key> : public <API key> { public: <API key>(UrlData* url_data, MultiBuffer::BlockId pos) : <API key>(url_data, pos), loading_(false) { CHECK(test_data_providers.insert(this).second); } ~<API key>() override { CHECK_EQ(static_cast<size_t>(1), test_data_providers.erase(this)); } void Start() override { // Create a mock active loader. // Keep track of active loading state via loadAsynchronously() and cancel(). NiceMock<MockWebURLLoader>* url_loader = new NiceMock<MockWebURLLoader>(); ON_CALL(*url_loader, cancel()) .WillByDefault(Invoke([this]() { // Check that we have not been destroyed first. if (test_data_providers.find(this) != test_data_providers.end()) { this->loading_ = false; } })); loading_ = true; active_loader_.reset( new ActiveLoader(std::unique_ptr<WebURLLoader>(url_loader))); if (!on_start_.is_null()) { on_start_.Run(); } } bool loading() const { return loading_; } void RunOnStart(base::Closure cb) { on_start_ = cb; } private: bool loading_; base::Closure on_start_; }; class TestUrlData; class <API key> : public ResourceMultiBuffer { public: explicit <API key>(UrlData* url_data, int shift) : ResourceMultiBuffer(url_data, shift) {} std::unique_ptr<MultiBuffer::DataProvider> CreateWriter( const BlockId& pos) override { <API key>* ret = new <API key>(url_data_, pos); ret->Start(); return std::unique_ptr<MultiBuffer::DataProvider>(ret); } // TODO: Make these global <API key>* GetProvider() { EXPECT_EQ(test_data_providers.size(), 1U); if (test_data_providers.size() != 1) return nullptr; return *test_data_providers.begin(); } <API key>* <API key>() { EXPECT_LE(test_data_providers.size(), 1U); if (test_data_providers.size() != 1U) return nullptr; return *test_data_providers.begin(); } bool HasProvider() const { return test_data_providers.size() == 1U; } bool loading() { if (test_data_providers.empty()) return false; return GetProvider()->loading(); } }; class TestUrlData : public UrlData { public: TestUrlData(const GURL& url, CORSMode cors_mode, const base::WeakPtr<UrlIndex>& url_index) : UrlData(url, cors_mode, url_index), block_shift_(url_index->block_shift()) {} ResourceMultiBuffer* multibuffer() override { if (!test_multibuffer_.get()) { test_multibuffer_.reset(new <API key>(this, block_shift_)); } return test_multibuffer_.get(); } <API key>* test_multibuffer() { if (!test_multibuffer_.get()) { test_multibuffer_.reset(new <API key>(this, block_shift_)); } return test_multibuffer_.get(); } protected: ~TestUrlData() override {} const int block_shift_; std::unique_ptr<<API key>> test_multibuffer_; }; class TestUrlIndex : public UrlIndex { public: explicit TestUrlIndex(blink::WebFrame* frame) : UrlIndex(frame) {} scoped_refptr<UrlData> NewUrlData(const GURL& url, UrlData::CORSMode cors_mode) override { last_url_data_ = new TestUrlData(url, cors_mode, weak_factory_.GetWeakPtr()); return last_url_data_; } scoped_refptr<TestUrlData> last_url_data() { EXPECT_TRUE(last_url_data_); return last_url_data_; } private: scoped_refptr<TestUrlData> last_url_data_; }; class <API key> : public <API key> { public: <API key>() {} virtual ~<API key>() {} MOCK_METHOD1(SetTotalBytes, void(int64_t total_bytes)); MOCK_METHOD2(<API key>, void(int64_t start, int64_t end)); private: <API key>(<API key>); }; class <API key> : public <API key> { public: <API key>( const GURL& url, UrlData::CORSMode cors_mode, const scoped_refptr<base::<API key>>& task_runner, linked_ptr<UrlIndex> url_index, WebLocalFrame* frame, <API key>* host) : <API key>( url, cors_mode, task_runner, url_index, frame, new media::MediaLog(), host, base::Bind(&<API key>::set_downloading, base::Unretained(this))), downloading_(false) {} bool downloading() { return downloading_; } void set_downloading(bool downloading) { downloading_ = downloading; } bool range_supported() { return url_data_->range_supported(); } private: // Whether the resource is downloading or deferred. bool downloading_; <API key>(<API key>); }; static const int64_t kFileSize = 5000000; static const int64_t kFarReadPosition = 3997696; static const int kDataSize = 32 << 10; static const char kHttpUrl[] = "http://localhost/foo.webm"; static const char kFileUrl[] = "file:///tmp/bar.webm"; static const char <API key>[] = "http://localhost/bar.webm"; static const char <API key>[] = "http://127.0.0.1/foo.webm"; class <API key> : public testing::Test { public: <API key>() : view_(WebView::create(nullptr, blink::<API key>)), frame_( WebLocalFrame::create(blink::WebTreeScopeType::Document, &client_)), preload_(<API key>::AUTO), url_index_(make_linked_ptr(new TestUrlIndex(frame_))) { view_->setMainFrame(frame_); } virtual ~<API key>() { view_->close(); frame_->close(); } MOCK_METHOD1(OnInitialize, void(bool)); void InitializeWithCORS(const char* url, bool expected, UrlData::CORSMode cors_mode) { GURL gurl(url); data_source_.reset(new <API key>( gurl, cors_mode, message_loop_.task_runner(), url_index_, view_->mainFrame()->toWebLocalFrame(), &host_)); data_source_->SetPreload(preload_); response_generator_.reset(new <API key>(gurl, kFileSize)); EXPECT_CALL(*this, OnInitialize(expected)); data_source_->Initialize(base::Bind( &<API key>::OnInitialize, base::Unretained(this))); base::RunLoop().RunUntilIdle(); // Not really loading until after OnInitialize is called. EXPECT_EQ(data_source_->downloading(), false); } void Initialize(const char* url, bool expected) { InitializeWithCORS(url, expected, UrlData::CORS_UNSPECIFIED); } // Helper to initialize tests with a valid 200 response. void <API key>() { Initialize(kHttpUrl, true); EXPECT_CALL(host_, SetTotalBytes(response_generator_->content_length())); Respond(response_generator_->Generate200()); EXPECT_CALL(host_, <API key>(0, kDataSize)); ReceiveData(kDataSize); } // Helper to initialize tests with a valid 206 response. void <API key>() { Initialize(kHttpUrl, true); EXPECT_CALL(host_, SetTotalBytes(response_generator_->content_length())); Respond(response_generator_->Generate206(0)); EXPECT_CALL(host_, <API key>(0, kDataSize)); ReceiveData(kDataSize); } // Helper to initialize tests with a valid file:// response. void <API key>() { Initialize(kFileUrl, true); EXPECT_CALL(host_, SetTotalBytes(kFileSize)); EXPECT_CALL(host_, <API key>(0, kFileSize)); Respond(response_generator_-><API key>(0)); ReceiveData(kDataSize); } // Stops any active loaders and shuts down the data source. // This typically happens when the page is closed and for our purposes is // appropriate to do when tearing down a test. void Stop() { if (loading()) { data_provider()->didFail(url_loader(), response_generator_->GenerateError()); base::RunLoop().RunUntilIdle(); } data_source_->Stop(); base::RunLoop().RunUntilIdle(); } void Respond(const WebURLResponse& response) { EXPECT_TRUE(url_loader()); if (!active_loader()) return; data_provider()->didReceiveResponse(url_loader(), response); base::RunLoop().RunUntilIdle(); } void ReceiveData(int size) { EXPECT_TRUE(url_loader()); if (!url_loader()) return; std::unique_ptr<char[]> data(new char[size]); memset(data.get(), 0xA5, size); // Arbitrary non-zero value. data_provider()->didReceiveData(url_loader(), data.get(), size, size, size); base::RunLoop().RunUntilIdle(); } void FinishLoading() { EXPECT_TRUE(url_loader()); if (!url_loader()) return; data_provider()->didFinishLoading(url_loader(), 0, -1); base::RunLoop().RunUntilIdle(); } void FailLoading() { data_provider()->didFail(url_loader(), response_generator_->GenerateError()); base::RunLoop().RunUntilIdle(); } void Restart() { EXPECT_TRUE(data_provider()); EXPECT_FALSE(<API key>()); if (!data_provider()) return; data_provider()->Start(); } MOCK_METHOD1(ReadCallback, void(int size)); void ReadAt(int64_t position, int64_t howmuch = kDataSize) { data_source_->Read(position, howmuch, buffer_, base::Bind(&<API key>::ReadCallback, base::Unretained(this))); base::RunLoop().RunUntilIdle(); } void <API key>(const WebURLResponse& response1, const WebURLResponse& response2) { EXPECT_CALL(host_, SetTotalBytes(kFileSize)); EXPECT_CALL(host_, <API key>(0, kDataSize * 2)); EXPECT_CALL(host_, <API key>(0, kDataSize)); EXPECT_CALL(*this, ReadCallback(kDataSize)).Times(2); Respond(response1); ReceiveData(kDataSize); ReadAt(0); EXPECT_TRUE(loading()); FinishLoading(); Restart(); ReadAt(kDataSize); Respond(response2); ReceiveData(kDataSize); FinishLoading(); Stop(); } void <API key>(const WebURLResponse& response1, const WebURLResponse& response2) { EXPECT_CALL(host_, SetTotalBytes(kFileSize)); EXPECT_CALL(host_, <API key>(0, kDataSize)); EXPECT_CALL(*this, ReadCallback(kDataSize)); // Stop() will also cause the readback to be called with kReadError, but // we want to make sure it was called before Stop(). bool failed_ = false; EXPECT_CALL(*this, ReadCallback(media::DataSource::kReadError)) .WillOnce(Assign(&failed_, true)); Respond(response1); ReceiveData(kDataSize); ReadAt(0); EXPECT_TRUE(loading()); FinishLoading(); Restart(); ReadAt(kDataSize); Respond(response2); EXPECT_TRUE(failed_); Stop(); } void CheckCapacityDefer() { EXPECT_EQ(2 << 20, preload_low()); EXPECT_EQ(3 << 20, preload_high()); } void CheckReadThenDefer() { EXPECT_EQ(0, preload_low()); EXPECT_EQ(0, preload_high()); } void CheckNeverDefer() { EXPECT_EQ(1LL << 40, preload_low()); EXPECT_EQ(1LL << 40, preload_high()); } // Accessors for private variables on |data_source_|. MultiBufferReader* loader() { return data_source_->reader_.get(); } <API key>* multibuffer() { return url_index_->last_url_data()->test_multibuffer(); } <API key>* data_provider() { return multibuffer()->GetProvider(); } ActiveLoader* active_loader() { EXPECT_TRUE(data_provider()); if (!data_provider()) return nullptr; return data_provider()->active_loader_.get(); } ActiveLoader* <API key>() { <API key>* data_provider = multibuffer()-><API key>(); if (!data_provider) return nullptr; return data_provider->active_loader_.get(); } WebURLLoader* url_loader() { EXPECT_TRUE(active_loader()); if (!active_loader()) return nullptr; return active_loader()->loader_.get(); } bool loading() { return multibuffer()->loading(); } <API key>::Preload preload() { return data_source_->preload_; } void set_preload(<API key>::Preload preload) { preload_ = preload; } int64_t preload_high() { CHECK(loader()); return loader()->preload_high(); } int64_t preload_low() { CHECK(loader()); return loader()->preload_low(); } int data_source_bitrate() { return data_source_->bitrate_; } double <API key>() { return data_source_->playback_rate_; } bool is_local_source() { return data_source_-><API key>(); } void <API key>(bool value) { data_source_->url_data_->set_cacheable(value); } protected: MockWebFrameClient client_; WebView* view_; WebLocalFrame* frame_; <API key>::Preload preload_; base::MessageLoop message_loop_; linked_ptr<TestUrlIndex> url_index_; std::unique_ptr<<API key>> data_source_; std::unique_ptr<<API key>> response_generator_; StrictMock<<API key>> host_; // Used for calling <API key>::Read(). uint8_t buffer_[kDataSize * 2]; <API key>(<API key>); }; TEST_F(<API key>, Range_Supported) { <API key>(); EXPECT_TRUE(loading()); EXPECT_FALSE(data_source_->IsStreaming()); Stop(); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); Respond(response_generator_->Generate206( 0, <API key>::<API key>)); EXPECT_CALL(host_, <API key>(0, kDataSize)); ReceiveData(kDataSize); EXPECT_TRUE(loading()); EXPECT_TRUE(data_source_->IsStreaming()); Stop(); } TEST_F(<API key>, Range_NotFound) { Initialize(kHttpUrl, false); Respond(response_generator_->Generate404()); EXPECT_FALSE(loading()); Stop(); } TEST_F(<API key>, Range_NotSupported) { <API key>(); EXPECT_TRUE(loading()); EXPECT_TRUE(data_source_->IsStreaming()); Stop(); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); EXPECT_CALL(host_, <API key>(0, kDataSize)); Respond(response_generator_->GenerateResponse(416)); EXPECT_FALSE(loading()); Stop(); } // Special carve-out for Apache versions that choose to return a 200 for // Range:0- ("because it's more efficient" than a 206) TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); EXPECT_CALL(host_, SetTotalBytes(response_generator_->content_length())); WebURLResponse response = response_generator_->Generate200(); response.setHTTPHeaderField(WebString::fromUTF8("Accept-Ranges"), WebString::fromUTF8("bytes")); Respond(response); EXPECT_CALL(host_, <API key>(0, kDataSize)); ReceiveData(kDataSize); EXPECT_TRUE(loading()); EXPECT_FALSE(data_source_->IsStreaming()); Stop(); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, false); Respond(response_generator_->Generate206( 0, <API key>::kNoContentRange)); EXPECT_FALSE(loading()); Stop(); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); // It'll manage without a Content-Length response. EXPECT_CALL(host_, SetTotalBytes(response_generator_->content_length())); Respond(response_generator_->Generate206( 0, <API key>::kNoContentLength)); EXPECT_CALL(host_, <API key>(0, kDataSize)); ReceiveData(kDataSize); EXPECT_TRUE(loading()); EXPECT_FALSE(data_source_->IsStreaming()); Stop(); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, false); // Now it's done and will fail. Respond(response_generator_->Generate206(1337)); EXPECT_FALSE(loading()); Stop(); } // Test the case where the initial response from the server indicates that // Range requests are supported, but a later request prove otherwise. TEST_F(<API key>, Range_ServerLied) { <API key>(); // Read causing a new request to be made -- we'll expect it to error. ReadAt(kFarReadPosition); // Return a 200 in response to a range request. EXPECT_CALL(*this, ReadCallback(media::DataSource::kReadError)); Respond(response_generator_->Generate200()); EXPECT_FALSE(loading()); Stop(); } TEST_F(<API key>, <API key>) { <API key>(); // Make sure there's a pending read -- we'll expect it to error. ReadAt(kFileSize); // Abort!!! EXPECT_CALL(*this, ReadCallback(media::DataSource::kReadError)); data_source_->Abort(); base::RunLoop().RunUntilIdle(); EXPECT_FALSE(loading()); Stop(); } TEST_F(<API key>, <API key>) { <API key>(); // Make sure there's a pending read -- we'll expect it to error. ReadAt(kFileSize); // Abort!!! EXPECT_CALL(*this, ReadCallback(media::DataSource::kReadError)); data_source_->Abort(); base::RunLoop().RunUntilIdle(); EXPECT_FALSE(loading()); Stop(); } TEST_F(<API key>, Http_Retry) { <API key>(); // Read to advance our position. EXPECT_CALL(*this, ReadCallback(kDataSize)); ReadAt(0); // Issue a pending read but terminate the connection to force a retry. ReadAt(kDataSize); FinishLoading(); Restart(); Respond(response_generator_->Generate206(kDataSize)); // Complete the read. EXPECT_CALL(*this, ReadCallback(kDataSize)); EXPECT_CALL(host_, <API key>(0, kDataSize * 2)); ReceiveData(kDataSize); EXPECT_TRUE(loading()); Stop(); } TEST_F(<API key>, Http_RetryOnError) { <API key>(); // Read to advance our position. EXPECT_CALL(*this, ReadCallback(kDataSize)); ReadAt(0); // Issue a pending read but trigger an error to force a retry. EXPECT_CALL(*this, ReadCallback(kDataSize)); EXPECT_CALL(host_, <API key>(0, kDataSize * 2)); ReadAt(kDataSize); base::RunLoop run_loop; data_provider()->didFail(url_loader(), response_generator_->GenerateError()); data_provider()->RunOnStart(run_loop.QuitClosure()); run_loop.Run(); Respond(response_generator_->Generate206(kDataSize)); ReceiveData(kDataSize); FinishLoading(); EXPECT_FALSE(loading()); Stop(); } // Make sure that we prefetch across partial responses. (crbug.com/516589) TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); WebURLResponse response1 = response_generator_->GeneratePartial206(0, kDataSize - 1); WebURLResponse response2 = response_generator_->GeneratePartial206(kDataSize, kDataSize * 3 - 1); EXPECT_CALL(host_, SetTotalBytes(kFileSize)); EXPECT_CALL(host_, <API key>(0, kDataSize * 3)); EXPECT_CALL(host_, <API key>(0, kDataSize * 2)); EXPECT_CALL(host_, <API key>(0, kDataSize)); EXPECT_CALL(*this, ReadCallback(kDataSize)); Respond(response1); ReceiveData(kDataSize); ReadAt(0); EXPECT_TRUE(loading()); FinishLoading(); Restart(); Respond(response2); ReceiveData(kDataSize); ReceiveData(kDataSize); FinishLoading(); Stop(); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); WebURLResponse response1 = response_generator_->GeneratePartial206(0, kDataSize - 1); WebURLResponse response2 = response_generator_->GeneratePartial206(kDataSize, kDataSize * 2 - 1); // The origin URL of response1 and response2 are same. So no error should // occur. <API key>(response1, response2); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); WebURLResponse response1 = response_generator_->GeneratePartial206(0, kDataSize - 1); WebURLResponse response2 = response_generator_->GeneratePartial206(kDataSize, kDataSize * 2 - 1); response2.setURL(GURL(<API key>)); // The origin URL of response1 and response2 are same. So no error should // occur. <API key>(response1, response2); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); WebURLResponse response1 = response_generator_->GeneratePartial206(0, kDataSize - 1); WebURLResponse response2 = response_generator_->GeneratePartial206(kDataSize, kDataSize * 2 - 1); response2.setURL(GURL(<API key>)); // The origin URL of response1 and response2 are different. So an error should // occur. <API key>(response1, response2); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); WebURLResponse response1 = response_generator_->GeneratePartial206(0, kDataSize - 1); response1.<API key>(true); WebURLResponse response2 = response_generator_->GeneratePartial206(kDataSize, kDataSize * 2 - 1); // response1 is generated in a Service Worker but response2 is from a native // server. So an error should occur. <API key>(response1, response2); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); WebURLResponse response1 = response_generator_->GeneratePartial206(0, kDataSize - 1); response1.<API key>(true); response1.<API key>(GURL(kHttpUrl)); WebURLResponse response2 = response_generator_->GeneratePartial206(kDataSize, kDataSize * 2 - 1); // The origin URL of response1 and response2 are same. So no error should // occur. <API key>(response1, response2); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); WebURLResponse response1 = response_generator_->GeneratePartial206(0, kDataSize - 1); response1.<API key>(true); response1.<API key>(GURL(<API key>)); WebURLResponse response2 = response_generator_->GeneratePartial206(kDataSize, kDataSize * 2 - 1); // The origin URL of response1 and response2 are same. So no error should // occur. <API key>(response1, response2); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); WebURLResponse response1 = response_generator_->GeneratePartial206(0, kDataSize - 1); response1.<API key>(true); response1.<API key>(GURL(<API key>)); WebURLResponse response2 = response_generator_->GeneratePartial206(kDataSize, kDataSize * 2 - 1); // The origin URL of response1 and response2 are different. So an error should // occur. <API key>(response1, response2); } TEST_F(<API key>, <API key>) { InitializeWithCORS(kHttpUrl, true, UrlData::CORS_ANONYMOUS); WebURLResponse response1 = response_generator_->GeneratePartial206(0, kDataSize - 1); response1.<API key>(true); response1.<API key>(GURL(<API key>)); WebURLResponse response2 = response_generator_->GeneratePartial206(kDataSize, kDataSize * 2 - 1); // The origin URL of response1 and response2 are different, but a CORS check // has been passed for each request, so expect success. <API key>(response1, response2); } TEST_F(<API key>, File_Retry) { <API key>(); // Read to advance our position. EXPECT_CALL(*this, ReadCallback(kDataSize)); ReadAt(0); // Issue a pending read but terminate the connection to force a retry. ReadAt(kDataSize); FinishLoading(); Restart(); Respond(response_generator_-><API key>(kDataSize)); // Complete the read. EXPECT_CALL(*this, ReadCallback(kDataSize)); ReceiveData(kDataSize); EXPECT_TRUE(loading()); Stop(); } TEST_F(<API key>, Http_TooManyRetries) { <API key>(); // Make sure there's a pending read -- we'll expect it to error. ReadAt(kDataSize); for (int i = 0; i < <API key>::kMaxRetries; i++) { FailLoading(); data_provider()->Start(); Respond(response_generator_->Generate206(kDataSize)); } // Stop() will also cause the readback to be called with kReadError, but // we want to make sure it was called during FailLoading(). bool failed_ = false; EXPECT_CALL(*this, ReadCallback(media::DataSource::kReadError)) .WillOnce(Assign(&failed_, true)); FailLoading(); EXPECT_TRUE(failed_); EXPECT_FALSE(loading()); Stop(); } TEST_F(<API key>, File_TooManyRetries) { <API key>(); // Make sure there's a pending read -- we'll expect it to error. ReadAt(kDataSize); for (int i = 0; i < <API key>::kMaxRetries; i++) { FailLoading(); data_provider()->Start(); Respond(response_generator_->Generate206(kDataSize)); } // Stop() will also cause the readback to be called with kReadError, but // we want to make sure it was called during FailLoading(). bool failed_ = false; EXPECT_CALL(*this, ReadCallback(media::DataSource::kReadError)) .WillOnce(Assign(&failed_, true)); FailLoading(); EXPECT_TRUE(failed_); EXPECT_FALSE(loading()); Stop(); } TEST_F(<API key>, <API key>) { Initialize(kFileUrl, false); Respond( response_generator_-><API key>(media::DataSource::kReadError)); ReceiveData(kDataSize); EXPECT_FALSE(data_source_->downloading()); EXPECT_FALSE(loading()); Stop(); } TEST_F(<API key>, File_Successful) { <API key>(); EXPECT_TRUE(loading()); EXPECT_FALSE(data_source_->IsStreaming()); Stop(); } TEST_F(<API key>, StopDuringRead) { <API key>(); uint8_t buffer[256]; data_source_->Read(0, arraysize(buffer), buffer, base::Bind(&<API key>::ReadCallback, base::Unretained(this))); // The outstanding read should fail before the stop callback runs. { InSequence s; EXPECT_CALL(*this, ReadCallback(media::DataSource::kReadError)); data_source_->Stop(); } base::RunLoop().RunUntilIdle(); } TEST_F(<API key>, DefaultValues) { <API key>(); // Ensure we have sane values for default loading scenario. EXPECT_EQ(<API key>::AUTO, preload()); EXPECT_EQ(2 << 20, preload_low()); EXPECT_EQ(3 << 20, preload_high()); EXPECT_EQ(0, data_source_bitrate()); EXPECT_EQ(0.0, <API key>()); EXPECT_TRUE(loading()); Stop(); } TEST_F(<API key>, SetBitrate) { <API key>(); data_source_->SetBitrate(1234); base::RunLoop().RunUntilIdle(); EXPECT_EQ(1234, data_source_bitrate()); // Read so far ahead to cause the loader to get recreated. <API key>* old_loader = data_provider(); ReadAt(kFarReadPosition); Respond(response_generator_->Generate206(kFarReadPosition)); // Verify loader changed but still has same bitrate. EXPECT_NE(old_loader, data_provider()); EXPECT_TRUE(loading()); EXPECT_CALL(*this, ReadCallback(media::DataSource::kReadError)); Stop(); } TEST_F(<API key>, <API key>) { <API key>(); data_source_-><API key>(2.0); base::RunLoop().RunUntilIdle(); EXPECT_EQ(2.0, <API key>()); // Read so far ahead to cause the loader to get recreated. <API key>* old_loader = data_provider(); ReadAt(kFarReadPosition); Respond(response_generator_->Generate206(kFarReadPosition)); // Verify loader changed but still has same playback rate. EXPECT_NE(old_loader, data_provider()); EXPECT_TRUE(loading()); EXPECT_CALL(*this, ReadCallback(media::DataSource::kReadError)); Stop(); } TEST_F(<API key>, Http_Read) { <API key>(); EXPECT_CALL(*this, ReadCallback(kDataSize)); ReadAt(0, kDataSize * 2); ReadAt(kDataSize, kDataSize); EXPECT_CALL(*this, ReadCallback(kDataSize)); EXPECT_CALL(host_, <API key>(kDataSize, kDataSize + kDataSize / 2)); ReceiveData(kDataSize / 2); EXPECT_CALL(host_, <API key>(0, kDataSize * 2)); ReceiveData(kDataSize / 2); EXPECT_TRUE(data_source_->downloading()); Stop(); } TEST_F(<API key>, Http_ShareData) { <API key>(); EXPECT_CALL(*this, ReadCallback(kDataSize)); ReadAt(0, kDataSize * 2); ReadAt(kDataSize, kDataSize); EXPECT_CALL(*this, ReadCallback(kDataSize)); EXPECT_CALL(host_, <API key>(kDataSize, kDataSize + kDataSize / 2)); ReceiveData(kDataSize / 2); EXPECT_CALL(host_, <API key>(0, kDataSize * 2)); ReceiveData(kDataSize / 2); EXPECT_TRUE(data_source_->downloading()); StrictMock<<API key>> host2; <API key> source2( GURL(kHttpUrl), UrlData::CORS_UNSPECIFIED, message_loop_.task_runner(), url_index_, view_->mainFrame()->toWebLocalFrame(), &host2); source2.SetPreload(preload_); EXPECT_CALL(*this, OnInitialize(true)); // This call would not be expected if we were not sharing data. EXPECT_CALL(host2, SetTotalBytes(response_generator_->content_length())); source2.Initialize(base::Bind(&<API key>::OnInitialize, base::Unretained(this))); base::RunLoop().RunUntilIdle(); // Always loading after initialize. EXPECT_EQ(source2.downloading(), true); Stop(); } TEST_F(<API key>, Http_Read_Seek) { <API key>(); // Read a bit from the beginning. EXPECT_CALL(*this, ReadCallback(kDataSize)); ReadAt(0); // Simulate a seek by reading a bit beyond kDataSize. ReadAt(kDataSize * 2); // We receive data leading up to but not including our read. // No notification will happen, since it's progress outside // of our current range. ReceiveData(kDataSize); // We now receive the rest of the data for our read. EXPECT_CALL(*this, ReadCallback(kDataSize)); EXPECT_CALL(host_, <API key>(0, kDataSize * 3)); ReceiveData(kDataSize); EXPECT_TRUE(data_source_->downloading()); Stop(); } TEST_F(<API key>, File_Read) { <API key>(); EXPECT_CALL(*this, ReadCallback(kDataSize)); ReadAt(0, kDataSize * 2); ReadAt(kDataSize, kDataSize); EXPECT_CALL(*this, ReadCallback(kDataSize)); ReceiveData(kDataSize); Stop(); } TEST_F(<API key>, Http_FinishLoading) { <API key>(); EXPECT_TRUE(data_source_->downloading()); // premature didFinishLoading() will cause a retry. FinishLoading(); EXPECT_TRUE(data_source_->downloading()); Stop(); } TEST_F(<API key>, File_FinishLoading) { <API key>(); ReceiveData(kDataSize); EXPECT_FALSE(data_source_->downloading()); // premature didFinishLoading() will cause a retry. FinishLoading(); EXPECT_FALSE(data_source_->downloading()); Stop(); } TEST_F(<API key>, <API key>) { <API key>(); EXPECT_EQ(<API key>::AUTO, preload()); EXPECT_TRUE(is_local_source()); CheckCapacityDefer(); data_source_->MediaIsPlaying(); CheckCapacityDefer(); data_source_-><API key>( <API key>::<API key>); CheckCapacityDefer(); Stop(); } TEST_F(<API key>, <API key>) { set_preload(<API key>::METADATA); <API key>(); EXPECT_EQ(<API key>::METADATA, preload()); EXPECT_TRUE(is_local_source()); CheckReadThenDefer(); data_source_->MediaIsPlaying(); CheckCapacityDefer(); data_source_-><API key>( <API key>::<API key>); CheckCapacityDefer(); Stop(); } TEST_F(<API key>, <API key>) { <API key>(); EXPECT_EQ(<API key>::AUTO, preload()); EXPECT_FALSE(is_local_source()); EXPECT_FALSE(data_source_->range_supported()); CheckCapacityDefer(); data_source_->MediaIsPlaying(); CheckCapacityDefer(); data_source_-><API key>( <API key>::<API key>); CheckCapacityDefer(); Stop(); } TEST_F(<API key>, <API key>) { set_preload(<API key>::METADATA); <API key>(); EXPECT_EQ(<API key>::METADATA, preload()); EXPECT_FALSE(is_local_source()); EXPECT_FALSE(data_source_->range_supported()); CheckReadThenDefer(); data_source_->MediaIsPlaying(); CheckCapacityDefer(); data_source_-><API key>( <API key>::<API key>); CheckCapacityDefer(); Stop(); } TEST_F(<API key>, <API key>) { <API key>(); EXPECT_EQ(<API key>::AUTO, preload()); EXPECT_FALSE(is_local_source()); EXPECT_TRUE(data_source_->range_supported()); CheckCapacityDefer(); data_source_->MediaIsPlaying(); CheckCapacityDefer(); <API key>(true); data_source_-><API key>( <API key>::<API key>); CheckNeverDefer(); data_source_-><API key>( <API key>::<API key>); data_source_->MediaIsPlaying(); CheckCapacityDefer(); <API key>(false); data_source_-><API key>( <API key>::<API key>); CheckCapacityDefer(); Stop(); } TEST_F(<API key>, <API key>) { set_preload(<API key>::METADATA); <API key>(); EXPECT_EQ(<API key>::METADATA, preload()); EXPECT_FALSE(is_local_source()); EXPECT_TRUE(data_source_->range_supported()); CheckReadThenDefer(); data_source_->MediaIsPlaying(); CheckCapacityDefer(); <API key>(true); data_source_-><API key>( <API key>::<API key>); CheckNeverDefer(); data_source_-><API key>( <API key>::<API key>); data_source_->MediaIsPlaying(); CheckCapacityDefer(); <API key>(false); data_source_-><API key>( <API key>::<API key>); CheckCapacityDefer(); Stop(); } TEST_F(<API key>, <API key>) { set_preload(<API key>::METADATA); <API key>(); EXPECT_EQ(<API key>::METADATA, preload()); EXPECT_FALSE(is_local_source()); EXPECT_TRUE(data_source_->range_supported()); CheckReadThenDefer(); // Read a bit from the beginning. EXPECT_CALL(*this, ReadCallback(kDataSize)); ReadAt(0); ASSERT_TRUE(active_loader()); EXPECT_TRUE(active_loader()->deferred()); } TEST_F(<API key>, <API key>) { set_preload(<API key>::METADATA); <API key>(); EXPECT_EQ(<API key>::METADATA, preload()); EXPECT_FALSE(is_local_source()); EXPECT_TRUE(data_source_->range_supported()); CheckReadThenDefer(); ReadAt(kDataSize); data_source_-><API key>(false); ASSERT_TRUE(active_loader()); EXPECT_CALL(*this, ReadCallback(kDataSize)); EXPECT_CALL(host_, <API key>(0, kDataSize * 2)); ReceiveData(kDataSize); EXPECT_FALSE(<API key>()); } TEST_F(<API key>, <API key>) { set_preload(BufferedDataSource::METADATA); <API key>(); EXPECT_EQ(<API key>::METADATA, preload()); EXPECT_FALSE(is_local_source()); EXPECT_TRUE(data_source_->range_supported()); CheckReadThenDefer(); ReadAt(kDataSize); // Marking the media as playing should prevent deferral. It also tells the // data source to start buffering beyond the initial load. data_source_->MediaIsPlaying(); data_source_-><API key>(false); CheckCapacityDefer(); ASSERT_TRUE(active_loader()); // Read a bit from the beginning and ensure deferral hasn't happened yet. EXPECT_CALL(*this, ReadCallback(kDataSize)); EXPECT_CALL(host_, <API key>(0, kDataSize * 2)); ReceiveData(kDataSize); ASSERT_TRUE(active_loader()); data_source_-><API key>(true); ASSERT_TRUE(active_loader()); ASSERT_FALSE(active_loader()->deferred()); // Deliver data until capacity is reached and verify deferral. int bytes_received = 0; EXPECT_CALL(host_, <API key>(_, _)).Times(testing::AtLeast(1)); while (<API key>() && !active_loader()->deferred()) { ReceiveData(kDataSize); bytes_received += kDataSize; } EXPECT_GT(bytes_received, 0); EXPECT_LT(bytes_received + kDataSize, kFileSize); EXPECT_FALSE(<API key>()); } TEST_F(<API key>, SeekPastEOF) { GURL gurl(kHttpUrl); data_source_.reset(new <API key>( gurl, UrlData::CORS_UNSPECIFIED, message_loop_.task_runner(), url_index_, view_->mainFrame()->toWebLocalFrame(), &host_)); data_source_->SetPreload(preload_); response_generator_.reset(new <API key>(gurl, kDataSize + 1)); EXPECT_CALL(*this, OnInitialize(true)); data_source_->Initialize(base::Bind(&<API key>::OnInitialize, base::Unretained(this))); base::RunLoop().RunUntilIdle(); // Not really loading until after OnInitialize is called. EXPECT_EQ(data_source_->downloading(), false); EXPECT_CALL(host_, SetTotalBytes(response_generator_->content_length())); Respond(response_generator_->Generate206(0)); EXPECT_CALL(host_, <API key>(0, kDataSize)); ReceiveData(kDataSize); // Read a bit from the beginning. EXPECT_CALL(*this, ReadCallback(kDataSize)); ReadAt(0); EXPECT_CALL(host_, <API key>(kDataSize, kDataSize + 1)); ReceiveData(1); EXPECT_CALL(host_, <API key>(0, kDataSize * 3)); FinishLoading(); EXPECT_CALL(*this, ReadCallback(0)); ReadAt(kDataSize + 5, kDataSize * 2); Stop(); } TEST_F(<API key>, <API key>) { <API key>(); // Read to advance our position. EXPECT_CALL(*this, ReadCallback(kDataSize)); ReadAt(0); // Issue a pending read but trigger an error to force a retry. EXPECT_CALL(*this, ReadCallback(kDataSize - 10)); EXPECT_CALL(host_, <API key>(0, kDataSize * 2)); ReadAt(kDataSize + 10, kDataSize - 10); base::RunLoop run_loop; data_provider()->didFail(url_loader(), response_generator_->GenerateError()); data_provider()->RunOnStart(run_loop.QuitClosure()); run_loop.Run(); // Server responds with a redirect. blink::WebURLRequest request((GURL(<API key>))); blink::WebURLResponse response((GURL(kHttpUrl))); response.setHTTPStatusCode(307); data_provider()->willFollowRedirect(url_loader(), request, response, 0); Respond(response_generator_->Generate206(kDataSize)); ReceiveData(kDataSize); EXPECT_CALL(host_, <API key>(0, kDataSize * 3)); FinishLoading(); EXPECT_FALSE(loading()); Stop(); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); // Server responds with a redirect. blink::WebURLRequest request((GURL(<API key>))); blink::WebURLResponse response((GURL(kHttpUrl))); response.setHTTPStatusCode(307); data_provider()->willFollowRedirect(url_loader(), request, response, 0); EXPECT_CALL(host_, SetTotalBytes(response_generator_->content_length())); Respond(response_generator_->Generate206(0)); EXPECT_CALL(host_, <API key>(0, kDataSize)); ReceiveData(kDataSize); EXPECT_FALSE(data_source_->IsStreaming()); FinishLoading(); EXPECT_FALSE(loading()); Stop(); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); // Server responds with a redirect. blink::WebURLRequest request((GURL(<API key>))); blink::WebURLResponse response((GURL(kHttpUrl))); response.setHTTPStatusCode(307); data_provider()->willFollowRedirect(url_loader(), request, response, 0); EXPECT_CALL(host_, <API key>(0, kDataSize)); Respond(response_generator_->GenerateResponse(416)); Stop(); } TEST_F(<API key>, LengthKnownAtEOF) { Initialize(kHttpUrl, true); // Server responds without content-length. WebURLResponse response = response_generator_->Generate200(); response.<API key>(WebString::fromUTF8("Content-Length")); response.<API key>(<API key>); Respond(response); EXPECT_CALL(host_, <API key>(0, kDataSize)); ReceiveData(kDataSize); int64_t len; EXPECT_FALSE(data_source_->GetSize(&len)); EXPECT_TRUE(data_source_->IsStreaming()); EXPECT_CALL(*this, ReadCallback(kDataSize)); ReadAt(0); ReadAt(kDataSize); EXPECT_CALL(host_, SetTotalBytes(kDataSize)); EXPECT_CALL(*this, ReadCallback(0)); EXPECT_CALL(host_, <API key>(0, kDataSize * 2)); FinishLoading(); // Done loading, now we should know the length. EXPECT_TRUE(data_source_->GetSize(&len)); EXPECT_EQ(kDataSize, len); Stop(); } TEST_F(<API key>, <API key>) { Initialize(kHttpUrl, true); GURL gurl(kHttpUrl); blink::WebURLResponse response(gurl); response.setHTTPStatusCode(200); response.setHTTPHeaderField( WebString::fromUTF8("Content-Length"), WebString::fromUTF8(base::Int64ToString(kDataSize / 2))); response.<API key>(kDataSize / 2); Respond(response); EXPECT_CALL(host_, <API key>(0, kDataSize / 2)); EXPECT_CALL(host_, SetTotalBytes(kDataSize / 2)); EXPECT_CALL(host_, <API key>(0, kDataSize * 2)); ReceiveData(kDataSize / 2); FinishLoading(); int64_t len = 0; EXPECT_TRUE(data_source_->GetSize(&len)); EXPECT_EQ(kDataSize / 2, len); Stop(); } } // namespace media
<?php namespace BackEnd\Form; use Zend\Form\Form; use Zend\InputFilter\Factory as InputFactory; use Zend\InputFilter\InputFilter; class LoginForm extends Form { protected $inputFilter; public function __construct(){ parent::__construct('login-form'); $this->setAttribute('method', 'post'); $this->add(array( 'name' => 'username', 'options' => array( 'label' => '' ), )); $this->add(array( 'name' => 'password', 'options' => array( 'label' => '' ), )); $this->add(array( 'name' => 'submit', 'attributes' => array( 'value' => 'Login', 'type' => 'submit', ), )); $this->setInputFilter($this->getInputFilter()); } public function getInputFilter(){ if(!$this->inputFilter){ $inputFilter = new InputFilter(); $factory = new InputFactory(); $inputFilter->add($factory->createInput(array( 'name' => 'username', 'required' => true, 'validators' => array( array('name' => 'StringLength' , 'options' => array('min' => 3 , 'max' => 20)), ), ))); $inputFilter->add($factory->createInput(array( 'name' => 'password', 'required' => true, 'validators' => array( array('name' => 'Alnum'), ), ))); $this->inputFilter = $inputFilter; } return $this->inputFilter; } }
module UI.Widget.List ( listWidget ) where import Reactive.Banana import Reactive.Banana.Extra import Reactive.Banana.Frameworks import UI.TclTk import UI.TclTk.AST import UI.TclTk.Builder import UI.Widget -- | List widget listWidget :: Frameworks t => Event t [a] -> GUI t p (TkName, Event t (Int,a)) listWidget eList = do frame [Fill FillX] $ withPack PackLeft $ do let toEvt x (_,e) = x <$ e -- Buttons spacer e1 <- toEvt ToBegin <$> button [Text "<|" ] [] e2 <- toEvt (MoveBack 10) <$> button [Text "<<<"] [] e3 <- toEvt (MoveBack 1 ) <$> button [Text "<" ] [] -- Central area spacer Widget _ eN finiN <- entryInt [] [] _ <- label [ Text " / " ] [] labN <- label [] [] actimateTcl (length <$> eList) $ do configure labN $ LamOpt $ Text . show spacer -- More buttons e4 <- toEvt (MoveFwd 1 ) <$> button [Text ">" ] [] e5 <- toEvt (MoveFwd 10) <$> button [Text ">>>"] [] e6 <- toEvt ToEnd <$> button [Text "|>" ] [] spacer -- OOPS let events = listEvents eList (unions [JumpTo <$> eN, e1, e2, e3, e4, e5, e6]) finiN $ Bhv 0 $ fst <$> events return events -- Commands for a list data ListCmd = MoveFwd Int | MoveBack Int | JumpTo Int | ToBegin | ToEnd deriving (Show) -- Cursor for list of values data Cursor a = Cursor Int [a] Int | Invalid listEvents :: Event t [a] -> Event t ListCmd -> Event t (Int,a) listEvents listEvt command = filterJust $ fmap fini $ scanE acc Invalid $ listEvt `joinE` command where fini (Cursor _ xs i) = Just (i, xs !! i) fini Invalid = Nothing -- Accumulate data acc Invalid (Left []) = Invalid acc Invalid (Left xs) = Cursor (length xs) xs 0 acc Invalid _ = Invalid acc (Cursor _ _ n) (Left xs) = Cursor len xs $ clip len n where len = length xs acc (Cursor len xs n) (Right c) = case c of MoveFwd d -> go $ n + d MoveBack d -> go $ n - d JumpTo d -> go d ToBegin -> go 0 ToEnd -> go $ len - 1 where go = Cursor len xs . clip len -- Clip out of range indices clip len i | i < 0 = 0 | i >= len = len -1 | otherwise = i
#ifndef <API key> #define <API key> #include <vector> #include "base/containers/flat_map.h" #include "base/macros.h" #include "media/base/media_export.h" #include "media/base/video_codecs.h" #include "media/base/<API key>.h" #include "ui/gfx/geometry/size.h" namespace media { // Specification of a range of configurations that are supported by a video // decoder. Also provides the ability to check if a VideoDecoderConfig matches // the supported range. struct MEDIA_EXPORT <API key> { <API key>(); <API key>(VideoCodecProfile profile_min, VideoCodecProfile profile_max, const gfx::Size& coded_size_min, const gfx::Size& coded_size_max, bool allow_encrypted, bool require_encrypted); ~<API key>(); // Returns true if and only if |config| is a supported config. bool Matches(const VideoDecoderConfig& config) const; // Range of VideoCodecProfiles to match, inclusive. VideoCodecProfile profile_min = <API key>; VideoCodecProfile profile_max = <API key>; // Coded size range, inclusive. gfx::Size coded_size_min; gfx::Size coded_size_max; // TODO(liberato): consider switching these to "allow_clear" and // "allow_encrypted", so that they're orthogonal. // If true, then this will match encrypted configs. bool allow_encrypted = true; // If true, then unencrypted configs will not match. bool require_encrypted = false; // Allow copy and assignment. }; // Enumeration of possible implementations for (Mojo)VideoDecoders. enum class <API key> { kDefault = 0, kAlternate = 1, kMaxValue = kAlternate }; using <API key> = std::vector<<API key>>; // Map of mojo VideoDecoder implementations to the vector of configs that they // (probably) support. using <API key> = base::flat_map<<API key>, <API key>>; // Helper method to determine if |config| is supported by |supported_configs|. MEDIA_EXPORT bool <API key>( const <API key>& supported_configs, const VideoDecoderConfig& config); } // namespace media #endif // <API key>
#include <proxygen/lib/http/codec/experimental/HTTP2Framer.h> #include <cstdint> using namespace folly::io; using namespace folly; namespace proxygen { namespace http2 { const uint8_t kMaxFrameType = static_cast<uint8_t>(FrameType::ALTSVC); const boost::optional<uint8_t> kNoPadding; const PriorityUpdate DefaultPriority{0, false, 15}; namespace { const uint32_t kLengthMask = 0x00ffffff; const uint32_t kUint31Mask = 0x7fffffff; static const uint64_t kZeroPad[32] = {0}; static const bool kStrictPadding = true; static_assert(sizeof(kZeroPad) == 256, "bad zero padding"); void writePriorityBody(IOBufQueue& queue, uint32_t streamDependency, bool exclusive, uint8_t weight) { DCHECK_EQ(0, ~kUint31Mask & streamDependency); if (exclusive) { streamDependency |= ~kUint31Mask; } QueueAppender appender(&queue, 8); appender.writeBE<uint32_t>(streamDependency); appender.writeBE<uint8_t>(weight); } void writePadding(IOBufQueue& queue, boost::optional<uint8_t> size) { if (size && size.get() > 0) { auto out = queue.preallocate(size.get(), size.get()); memset(out.first, 0, size.get()); queue.postallocate(size.get()); } } /** * Generate just the common frame header. This includes the padding length * bits that sometimes come right after the frame header. Returns the * length field written to the common frame header. */ size_t writeFrameHeader(IOBufQueue& queue, uint32_t length, FrameType type, uint8_t flags, uint32_t stream, boost::optional<uint8_t> padding, boost::optional<PriorityUpdate> priority, std::unique_ptr<IOBuf> payload) noexcept { size_t headerSize = kFrameHeaderSize; // the acceptable length is now conditional based on state :( DCHECK_EQ(0, ~kLengthMask & length); DCHECK_EQ(0, ~kUint31Mask & stream); // Adjust length if we will emit a priority section if (flags & PRIORITY) { DCHECK(FrameType::HEADERS == type); length += kFramePrioritySize; headerSize += kFramePrioritySize; DCHECK_EQ(0, ~kLengthMask & length); } // Add or remove padding flags if (padding) { flags |= PADDED; length += padding.get() + 1; headerSize += 1; } else { flags &= ~PADDED; } if (priority) { headerSize += kFramePrioritySize; } DCHECK_EQ(0, ~kLengthMask & length); DCHECK_GE(kMaxFrameType, static_cast<uint8_t>(type)); uint32_t lengthAndType = ((kLengthMask & length) << 8) | static_cast<uint8_t>(type); uint64_t payloadLength = 0; if (payload && !payload->isSharedOne() && payload->headroom() >= headerSize && queue.tailroom() < headerSize) { // Use the headroom in payload for the frame header. // Make it appear that the payload IOBuf is empty and retreat so // appender can access the headroom payloadLength = payload->length(); payload->trimEnd(payloadLength); payload->retreat(headerSize); auto tail = payload->pop(); queue.append(std::move(payload)); payload = std::move(tail); } QueueAppender appender(&queue, kFrameHeaderSize); appender.writeBE<uint32_t>(lengthAndType); appender.writeBE<uint8_t>(flags); appender.writeBE<uint32_t>(kUint31Mask & stream); if (padding) { appender.writeBE<uint8_t>(padding.get()); } if (priority) { DCHECK_NE(priority->streamDependency, stream) << "Circular dependecy"; writePriorityBody(queue, priority->streamDependency, priority->exclusive, priority->weight); } if (payloadLength) { queue.postallocate(payloadLength); } queue.append(std::move(payload)); return length; } uint32_t parseUint31(Cursor& cursor) { // MUST ignore the 1 bit before the stream-id return kUint31Mask & cursor.readBE<uint32_t>(); } ErrorCode parseErrorCode(Cursor& cursor, ErrorCode& outCode) { auto code = cursor.readBE<uint32_t>(); if (code > kMaxErrorCode) { return ErrorCode::PROTOCOL_ERROR; } outCode = ErrorCode(code); return ErrorCode::NO_ERROR; } PriorityUpdate parsePriorityCommon(Cursor& cursor) { PriorityUpdate priority; uint32_t streamAndExclusive = cursor.readBE<uint32_t>(); priority.weight = cursor.readBE<uint8_t>(); priority.exclusive = ~kUint31Mask & streamAndExclusive; priority.streamDependency = kUint31Mask & streamAndExclusive; return priority; } /** * Given the flags for a frame and the cursor pointing at the top of the * frame-specific section (after the common header), return the number of * bytes to skip at the end of the frame. Caller must ensure there is at * least 1 bytes in the cursor. * * @param cursor The cursor to pull data from * @param header The frame header for the frame being parsed. The length * field may be modified based on the number of optional * padding length fields were read. * @param padding The out parameter that will return the number of padding * bytes at the end of the frame. * @return Nothing if success. The connection error code if failure. */ ErrorCode parsePadding(Cursor& cursor, FrameHeader& header, uint8_t& padding) noexcept { if (frameHasPadding(header)) { if (header.length < 1) { return ErrorCode::FRAME_SIZE_ERROR; } header.length -= 1; padding = cursor.readBE<uint8_t>(); } else { padding = 0; } return ErrorCode::NO_ERROR; } ErrorCode skipPadding(Cursor& cursor, uint8_t length, bool verify) { if (verify) { while (length > 0) { auto cur = cursor.peek(); uint8_t toCmp = std::min<size_t>(cur.second, length); if (memcmp(cur.first, kZeroPad, toCmp)) { return ErrorCode::PROTOCOL_ERROR; } cursor.skip(toCmp); length -= toCmp; } } else { cursor.skip(length); } return ErrorCode::NO_ERROR; } } // anonymous namespace bool <API key>(FrameType t) { return t == FrameType::HEADERS || t == FrameType::PUSH_PROMISE || t == FrameType::CONTINUATION; } bool frameHasPadding(const FrameHeader& header) { return header.flags & PADDED; } / Parsing ErrorCode parseFrameHeader(Cursor& cursor, FrameHeader& header) noexcept { DCHECK_LE(kFrameHeaderSize, cursor.totalLength()); // MUST ignore the 2 bits before the length uint32_t lengthAndType = cursor.readBE<uint32_t>(); header.length = kLengthMask & (lengthAndType >> 8); uint8_t type = lengthAndType & 0xff; header.type = FrameType(type); header.flags = cursor.readBE<uint8_t>(); header.stream = parseUint31(cursor); return ErrorCode::NO_ERROR; } ErrorCode parseData(Cursor& cursor, FrameHeader header, std::unique_ptr<IOBuf>& outBuf, uint16_t& outPadding) noexcept { DCHECK_LE(header.length, cursor.totalLength()); if (header.stream == 0) { return ErrorCode::PROTOCOL_ERROR; } uint8_t padding; const auto err = parsePadding(cursor, header, padding); RETURN_IF_ERROR(err); if (header.length < padding) { return ErrorCode::PROTOCOL_ERROR; } // outPadding is the total number of flow-controlled pad bytes, which // includes the length byte, if present. outPadding = padding + ((frameHasPadding(header)) ? 1 : 0); cursor.clone(outBuf, header.length - padding); return skipPadding(cursor, padding, kStrictPadding); } ErrorCode parseDataBegin(Cursor& cursor, FrameHeader header, size_t& parsed, uint16_t& outPadding) noexcept { uint8_t padding = 0; const auto err = http2::parsePadding(cursor, header, padding); RETURN_IF_ERROR(err); if (header.length < padding) { return ErrorCode::PROTOCOL_ERROR; } // outPadding is the total number of flow-controlled pad bytes, which // includes the length byte, if present. outPadding = padding + ((frameHasPadding(header)) ? 1 : 0); return ErrorCode::NO_ERROR; } ErrorCode parseDataEnd(Cursor& cursor, const size_t bufLen, const size_t <API key>, size_t& toSkip) noexcept { toSkip = std::min(<API key>, bufLen); return skipPadding(cursor, toSkip, kStrictPadding); } ErrorCode parseHeaders(Cursor& cursor, FrameHeader header, boost::optional<PriorityUpdate>& outPriority, std::unique_ptr<IOBuf>& outBuf) noexcept { DCHECK_LE(header.length, cursor.totalLength()); if (header.stream == 0) { return ErrorCode::PROTOCOL_ERROR; } uint8_t padding; auto err = parsePadding(cursor, header, padding); RETURN_IF_ERROR(err); if (header.flags & PRIORITY) { if (header.length < kFramePrioritySize) { return ErrorCode::FRAME_SIZE_ERROR; } outPriority = parsePriorityCommon(cursor); header.length -= kFramePrioritySize; } else { outPriority = boost::none; } if (header.length < padding) { return ErrorCode::PROTOCOL_ERROR; } cursor.clone(outBuf, header.length - padding); return skipPadding(cursor, padding, kStrictPadding); } ErrorCode parsePriority(Cursor& cursor, FrameHeader header, PriorityUpdate& outPriority) noexcept { DCHECK_LE(header.length, cursor.totalLength()); if (header.length != kFramePrioritySize) { return ErrorCode::FRAME_SIZE_ERROR; } if (header.stream == 0) { return ErrorCode::PROTOCOL_ERROR; } outPriority = parsePriorityCommon(cursor); return ErrorCode::NO_ERROR; } ErrorCode parseRstStream(Cursor& cursor, FrameHeader header, ErrorCode& outCode) noexcept { DCHECK_LE(header.length, cursor.totalLength()); if (header.length != kFrameRstStreamSize) { return ErrorCode::FRAME_SIZE_ERROR; } if (header.stream == 0) { return ErrorCode::PROTOCOL_ERROR; } return parseErrorCode(cursor, outCode); } ErrorCode parseSettings(Cursor& cursor, FrameHeader header, std::deque<SettingPair>& settings) noexcept { DCHECK_LE(header.length, cursor.totalLength()); if (header.stream != 0) { return ErrorCode::PROTOCOL_ERROR; } if (header.flags & ACK) { if (header.length != 0) { return ErrorCode::FRAME_SIZE_ERROR; } return ErrorCode::NO_ERROR; } if (header.length % 6 != 0) { return ErrorCode::FRAME_SIZE_ERROR; } for (; header.length > 0; header.length -= 6) { uint16_t id = cursor.readBE<uint16_t>(); uint32_t val = cursor.readBE<uint32_t>(); settings.push_back(std::make_pair(SettingsId(id), val)); } return ErrorCode::NO_ERROR; } ErrorCode parsePushPromise(Cursor& cursor, FrameHeader header, uint32_t& outPromisedStream, std::unique_ptr<IOBuf>& outBuf) noexcept { DCHECK_LE(header.length, cursor.totalLength()); if (header.stream == 0) { return ErrorCode::PROTOCOL_ERROR; } uint8_t padding; auto err = parsePadding(cursor, header, padding); RETURN_IF_ERROR(err); if (header.length < <API key>) { return ErrorCode::FRAME_SIZE_ERROR; } header.length -= <API key>; outPromisedStream = parseUint31(cursor); if (outPromisedStream == 0 || outPromisedStream & 0x1) { // client MUST reserve an even stream id greater than 0 return ErrorCode::PROTOCOL_ERROR; } if (header.length < padding) { return ErrorCode::PROTOCOL_ERROR; } cursor.clone(outBuf, header.length - padding); return skipPadding(cursor, padding, kStrictPadding); } ErrorCode parsePing(Cursor& cursor, FrameHeader header, uint64_t& outOpaqueData) noexcept { DCHECK_LE(header.length, cursor.totalLength()); if (header.length != kFramePingSize) { return ErrorCode::FRAME_SIZE_ERROR; } if (header.stream != 0) { return ErrorCode::PROTOCOL_ERROR; } cursor.pull(&outOpaqueData, sizeof(outOpaqueData)); return ErrorCode::NO_ERROR; } ErrorCode parseGoaway(Cursor& cursor, FrameHeader header, uint32_t& outLastStreamID, ErrorCode& outCode, std::unique_ptr<IOBuf>& outDebugData) noexcept { DCHECK_LE(header.length, cursor.totalLength()); if (header.length < kFrameGoawaySize) { return ErrorCode::FRAME_SIZE_ERROR; } if (header.stream != 0) { return ErrorCode::PROTOCOL_ERROR; } outLastStreamID = parseUint31(cursor); auto err = parseErrorCode(cursor, outCode); RETURN_IF_ERROR(err); header.length -= kFrameGoawaySize; if (header.length > 0) { cursor.clone(outDebugData, header.length); } return ErrorCode::NO_ERROR; } ErrorCode parseWindowUpdate(Cursor& cursor, FrameHeader header, uint32_t& outAmount) noexcept { DCHECK_LE(header.length, cursor.totalLength()); if (header.length != <API key>) { return ErrorCode::FRAME_SIZE_ERROR; } outAmount = parseUint31(cursor); return ErrorCode::NO_ERROR; } ErrorCode parseContinuation(Cursor& cursor, FrameHeader header, std::unique_ptr<IOBuf>& outBuf) noexcept { DCHECK(header.type == FrameType::CONTINUATION); DCHECK_LE(header.length, cursor.totalLength()); if (header.stream == 0) { return ErrorCode::PROTOCOL_ERROR; } uint8_t padding; auto err = parsePadding(cursor, header, padding); RETURN_IF_ERROR(err); if (header.length < padding) { return ErrorCode::PROTOCOL_ERROR; } cursor.clone(outBuf, header.length - padding); return skipPadding(cursor, padding, kStrictPadding); } ErrorCode parseAltSvc(Cursor& cursor, FrameHeader header, uint32_t& outMaxAge, uint32_t& outPort, std::string& outProtocol, std::string& outHost, std::string& outOrigin) noexcept { DCHECK_LE(header.length, cursor.totalLength()); if (header.length < <API key>) { return ErrorCode::FRAME_SIZE_ERROR; } std::unique_ptr<IOBuf> tmpBuf; outMaxAge = cursor.readBE<uint32_t>(); outPort = cursor.readBE<uint16_t>(); const auto protoLen = cursor.readBE<uint8_t>(); if (header.length < <API key> + protoLen) { return ErrorCode::FRAME_SIZE_ERROR; } outProtocol = cursor.readFixedString(protoLen); const auto hostLen = cursor.readBE<uint8_t>(); if (header.length < <API key> + protoLen + hostLen) { return ErrorCode::FRAME_SIZE_ERROR; } outHost = cursor.readFixedString(hostLen); const auto originLen = (header.length - <API key> - protoLen - hostLen); outOrigin = cursor.readFixedString(originLen); return ErrorCode::NO_ERROR; } / Egress size_t writeData(IOBufQueue& queue, std::unique_ptr<IOBuf> data, uint32_t stream, boost::optional<uint8_t> padding, bool endStream) noexcept { DCHECK_NE(0, stream); uint8_t flags = 0; if (endStream) { flags |= END_STREAM; } const uint64_t dataLen = data ? data-><API key>() : 0; // Caller must not exceed peer setting for MAX_FRAME_SIZE // TODO: look into using headroom from data to hold the frame header const auto frameLen = writeFrameHeader(queue, dataLen, FrameType::DATA, flags, stream, padding, boost::none, std::move(data)); writePadding(queue, padding); return kFrameHeaderSize + frameLen; } size_t writeHeaders(IOBufQueue& queue, std::unique_ptr<IOBuf> headers, uint32_t stream, boost::optional<PriorityUpdate> priority, boost::optional<uint8_t> padding, bool endStream, bool endHeaders) noexcept { DCHECK_NE(0, stream); const auto dataLen = (headers) ? headers-><API key>() : 0; uint32_t flags = 0; if (priority) { flags |= PRIORITY; } if (endStream) { flags |= END_STREAM; } if (endHeaders) { flags |= END_HEADERS; } // padding flags handled directly inside writeFrameHeader() const auto frameLen = writeFrameHeader(queue, dataLen, FrameType::HEADERS, flags, stream, padding, priority, std::move(headers)); writePadding(queue, padding); return kFrameHeaderSize + frameLen; } size_t writePriority(IOBufQueue& queue, uint32_t stream, PriorityUpdate priority) noexcept { DCHECK_NE(0, stream); const auto frameLen = writeFrameHeader(queue, kFramePrioritySize, FrameType::PRIORITY, 0, stream, kNoPadding, priority, nullptr); return kFrameHeaderSize + frameLen; } size_t writeRstStream(IOBufQueue& queue, uint32_t stream, ErrorCode errorCode) noexcept { DCHECK_NE(0, stream); const auto frameLen = writeFrameHeader(queue, kFrameRstStreamSize, FrameType::RST_STREAM, 0, stream, kNoPadding, boost::none, nullptr); QueueAppender appender(&queue, frameLen); appender.writeBE<uint32_t>(static_cast<uint32_t>(errorCode)); return kFrameHeaderSize + frameLen; } size_t writeSettings(IOBufQueue& queue, const std::deque<SettingPair>& settings) { const auto settingsSize = settings.size() * 6; const auto frameLen = writeFrameHeader(queue, settingsSize, FrameType::SETTINGS, 0, 0, kNoPadding, boost::none, nullptr); QueueAppender appender(&queue, settingsSize); for (const auto& setting: settings) { DCHECK_LE(static_cast<uint32_t>(setting.first), std::numeric_limits<uint16_t>::max()); appender.writeBE<uint16_t>(static_cast<uint16_t>(setting.first)); appender.writeBE<uint32_t>(setting.second); } return kFrameHeaderSize + frameLen; } size_t writeSettingsAck(IOBufQueue& queue) { writeFrameHeader(queue, 0, FrameType::SETTINGS, ACK, 0, kNoPadding, boost::none, nullptr); return kFrameHeaderSize; } size_t writePushPromise(IOBufQueue& queue, uint32_t associatedStream, uint32_t promisedStream, std::unique_ptr<IOBuf> headers, boost::optional<uint8_t> padding, bool endHeaders) noexcept { DCHECK_NE(0, promisedStream); DCHECK_NE(0, associatedStream); DCHECK_EQ(0, 0x1 & promisedStream); DCHECK_EQ(1, 0x1 & associatedStream); DCHECK_EQ(0, ~kUint31Mask & promisedStream); const auto dataLen = headers-><API key>(); const auto frameLen = writeFrameHeader(queue, dataLen + <API key>, FrameType::PUSH_PROMISE, endHeaders ? END_HEADERS : 0, associatedStream, padding, boost::none, nullptr); QueueAppender appender(&queue, frameLen); appender.writeBE<uint32_t>(promisedStream); queue.append(std::move(headers)); writePadding(queue, padding); return kFrameHeaderSize + frameLen; } size_t writePing(IOBufQueue& queue, uint64_t opaqueData, bool ack) noexcept { const auto frameLen = writeFrameHeader(queue, kFramePingSize, FrameType::PING, ack ? ACK : 0, 0, kNoPadding, boost::none, nullptr); queue.append(&opaqueData, sizeof(opaqueData)); return kFrameHeaderSize + frameLen; } size_t writeGoaway(IOBufQueue& queue, uint32_t lastStreamID, ErrorCode errorCode, std::unique_ptr<IOBuf> debugData) noexcept { uint32_t debugLen = debugData ? debugData-><API key>() : 0; DCHECK_EQ(0, ~kLengthMask & debugLen); const auto frameLen = writeFrameHeader(queue, kFrameGoawaySize + debugLen, FrameType::GOAWAY, 0, 0, kNoPadding, boost::none, nullptr); QueueAppender appender(&queue, frameLen); appender.writeBE<uint32_t>(lastStreamID); appender.writeBE<uint32_t>(static_cast<uint32_t>(errorCode)); queue.append(std::move(debugData)); return kFrameHeaderSize + frameLen; } size_t writeWindowUpdate(IOBufQueue& queue, uint32_t stream, uint32_t amount) noexcept { const auto frameLen = writeFrameHeader(queue, <API key>, FrameType::WINDOW_UPDATE, 0, stream, kNoPadding, boost::none, nullptr); DCHECK_EQ(0, ~kUint31Mask & amount); DCHECK_LT(0, amount); QueueAppender appender(&queue, <API key>); appender.writeBE<uint32_t>(amount); return kFrameHeaderSize + frameLen; } size_t writeContinuation(IOBufQueue& queue, uint32_t stream, bool endHeaders, std::unique_ptr<IOBuf> headers, boost::optional<uint8_t> padding) noexcept { DCHECK_NE(0, stream); const auto dataLen = headers-><API key>(); const auto frameLen = writeFrameHeader(queue, dataLen, FrameType::CONTINUATION, endHeaders ? END_HEADERS : 0, stream, padding, boost::none, std::move(headers)); writePadding(queue, padding); return kFrameHeaderSize + frameLen; } size_t writeAltSvc(IOBufQueue& queue, uint32_t stream, uint32_t maxAge, uint16_t port, StringPiece protocol, StringPiece host, StringPiece origin) noexcept { const auto protoLen = protocol.size(); const auto hostLen = host.size(); const auto originLen = origin.size(); const auto frameLen = protoLen + hostLen + originLen + <API key>; writeFrameHeader(queue, frameLen, FrameType::ALTSVC, 0, stream, kNoPadding, boost::none, nullptr); QueueAppender appender(&queue, frameLen); appender.writeBE<uint32_t>(maxAge); appender.writeBE<uint16_t>(port); appender.writeBE<uint8_t>(protoLen); appender.push(reinterpret_cast<const uint8_t*>(protocol.data()), protoLen); appender.writeBE<uint8_t>(hostLen); appender.push(reinterpret_cast<const uint8_t*>(host.data()), hostLen); appender.push(reinterpret_cast<const uint8_t*>(origin.data()), originLen); return kFrameHeaderSize + frameLen; } const char* getFrameTypeString(FrameType type) { switch (type) { case FrameType::DATA: return "DATA"; case FrameType::HEADERS: return "HEADERS"; case FrameType::PRIORITY: return "PRIORITY"; case FrameType::RST_STREAM: return "RST_STREAM"; case FrameType::SETTINGS: return "SETTINGS"; case FrameType::PUSH_PROMISE: return "PUSH_PROMISE"; case FrameType::PING: return "PING"; case FrameType::GOAWAY: return "GOAWAY"; case FrameType::WINDOW_UPDATE: return "WINDOW_UPDATE"; case FrameType::CONTINUATION: return "CONTINUATION"; case FrameType::ALTSVC: return "ALTSVC"; default: // can happen when type was cast from uint8_t return "Unknown"; } LOG(FATAL) << "Unreachable"; return ""; } }}
# -*-coding:Utf-8 -* # modification, are permitted provided that the following conditions are met: # and/or other materials provided with the distribution. # may be used to endorse or promote products derived from this software # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # 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. from primaires.format.fonctions import oui_ou_non from primaires.interpreteur.masque.parametre import Parametre from primaires.pnj.chemin import FLAGS class PrmVoir(Parametre): """Commande 'chemin voir'. """ def __init__(self): Parametre.__init__(self, "voir", "view") self.schema = "<cle>" self.aide_courte = "affiche le détail d'un chemin" self.aide_longue = \ "Cette commande permet d'obtenir plus d'informations sur " \ "un chemin (ses flags actifs, ses salles et sorties...)." def ajouter(self): cle = self.noeud.get_masque("cle") cle.proprietes["regex"] = r"'[a-z0-9_:]{3,}'" def interpreter(self, personnage, dic_masques): cle = dic_masques["cle"].cle if cle not in importeur.pnj.chemins: personnage << "|err|Ce chemin n'existe pas.|ff|" return chemin = importeur.pnj.chemins[cle] msg = "Détail sur le chemin {} :".format(chemin.cle) msg += "\n Flags :" for nom_flag in FLAGS.keys(): msg += "\n {}".format(nom_flag.capitalize()) msg += " : " + oui_ou_non(chemin.a_flag(nom_flag)) msg += "\n Salles du chemin :" if len(chemin.salles) == 0: msg += "\n Aucune" else: for salle, direction in chemin.salles.items(): msg += "\n " + salle.ident.ljust(20) + " " msg += direction.ljust(10) if salle in chemin.salles_retour and \ chemin.salles_retour[salle]: msg += " (retour " + chemin.salles_retour[salle] + ")" personnage << msg
#This is where the tests go.
using System; namespace <API key> { public class MessageTypes { public const int Terminate = 0; //tells the prime worker to stop public const int Start = 1; //initialize the prime workers public const int ReplyBatch = 2; //the main worker sends a batch of numbers public const int RequestBatch = 3; //the prime worker requests a new batch public const int Result = 4; //the prime worker sends the count back } }
// Use this file to import your target's public headers that you would like to expose to Swift. #import "MockORKTask.h" #import "<API key>.h" #import "MockAppInfoDelegate.h" #import "MockKeychainWrapper.h" #import "BridgeSDKTestable.h"
.clearfix { *zoom: 1; } .clearfix:before, .clearfix:after { display: table; content: ""; line-height: 0; } .clearfix:after { clear: both; } .hide-text { font: 0/0 a; color: transparent; text-shadow: none; background-color: transparent; border: 0; } .input-block-level { display: block; width: 100%; min-height: 30px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } audio:not([controls]) { display: none; } html { font-size: 100%; -<API key>: 100%; -ms-text-size-adjust: 100%; } a:focus { outline: thin dotted #333; outline: 5px auto -<API key>; outline-offset: -2px; } a:hover, a:active { outline: 0; } sub, sup { position: relative; font-size: 75%; line-height: 0; vertical-align: baseline; } sup { top: -0.5em; } sub { bottom: -0.25em; } img { /* Responsive images (ensure images don't scale beyond their parents) */ max-width: 100%; /* Part 1: Set a maxium relative to the parent */ width: auto\9; /* IE7-8 need help adjusting responsive images */ height: auto; /* Part 2: Scale the height according to the width, otherwise you get stretching */ vertical-align: middle; border: 0; -<API key>: bicubic; } #map_canvas img, .google-maps img { max-width: none; } button, input, select, textarea { margin: 0; font-size: 100%; vertical-align: middle; } button, input { *overflow: visible; line-height: normal; } button::-moz-focus-inner, input::-moz-focus-inner { padding: 0; border: 0; } button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; cursor: pointer; } label, select, button, input[type="button"], input[type="reset"], input[type="submit"], input[type="radio"], input[type="checkbox"] { cursor: pointer; } input[type="search"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; -webkit-appearance: textfield; } input[type="search"]::-<API key>, input[type="search"]::-<API key> { -webkit-appearance: none; } textarea { overflow: auto; vertical-align: top; } @media print { * { text-shadow: none !important; color: #000 !important; background: transparent !important; box-shadow: none !important; } a, a:visited { text-decoration: underline; } a[href]:after { content: " (" attr(href) ")"; } abbr[title]:after { content: " (" attr(title) ")"; } .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } thead { display: table-header-group; } tr, img { page-break-inside: avoid; } img { max-width: 100% !important; } @page { margin: 0.5cm; } p, h2, h3 { orphans: 3; widows: 3; } h2, h3 { page-break-after: avoid; } } body { margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; color: #2a2a2a; background-color: #c5ad91; } a { color: #715458; text-decoration: none; } a:hover, a:focus { color: #ca3308; text-decoration: underline; } .img-rounded { -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; } .img-polaroid { padding: 4px; background-color: #fff; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .img-circle { -<API key>: 500px; -moz-border-radius: 500px; border-radius: 500px; } .row { margin-left: -20px; *zoom: 1; } .row:before, .row:after { display: table; content: ""; line-height: 0; } .row:after { clear: both; } [class*="span"] { float: left; min-height: 1px; margin-left: 20px; } .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 940px; } .span12 { width: 940px; } .span11 { width: 860px; } .span10 { width: 780px; } .span9 { width: 700px; } .span8 { width: 620px; } .span7 { width: 540px; } .span6 { width: 460px; } .span5 { width: 380px; } .span4 { width: 300px; } .span3 { width: 220px; } .span2 { width: 140px; } .span1 { width: 60px; } .offset12 { margin-left: 980px; } .offset11 { margin-left: 900px; } .offset10 { margin-left: 820px; } .offset9 { margin-left: 740px; } .offset8 { margin-left: 660px; } .offset7 { margin-left: 580px; } .offset6 { margin-left: 500px; } .offset5 { margin-left: 420px; } .offset4 { margin-left: 340px; } .offset3 { margin-left: 260px; } .offset2 { margin-left: 180px; } .offset1 { margin-left: 100px; } .row-fluid { width: 100%; *zoom: 1; } .row-fluid:before, .row-fluid:after { display: table; content: ""; line-height: 0; } .row-fluid:after { clear: both; } .row-fluid [class*="span"] { display: block; width: 100%; min-height: 30px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; float: left; margin-left: 2.127659574468085%; *margin-left: 2.074468085106383%; } .row-fluid [class*="span"]:first-child { margin-left: 0; } .row-fluid .controls-row [class*="span"] + [class*="span"] { margin-left: 2.127659574468085%; } .row-fluid .span12 { width: 100%; *width: 99.94680851063829%; } .row-fluid .span11 { width: 91.48936170212765%; *width: 91.43617021276594%; } .row-fluid .span10 { width: 82.97872340425532%; *width: 82.92553191489361%; } .row-fluid .span9 { width: 74.46808510638297%; *width: 74.41489361702126%; } .row-fluid .span8 { width: 65.95744680851064%; *width: 65.90425531914893%; } .row-fluid .span7 { width: 57.44680851063829%; *width: 57.39361702127659%; } .row-fluid .span6 { width: 48.93617021276595%; *width: 48.88297872340425%; } .row-fluid .span5 { width: 40.42553191489362%; *width: 40.37234042553192%; } .row-fluid .span4 { width: 31.914893617021278%; *width: 31.861702127659576%; } .row-fluid .span3 { width: 23.404255319148934%; *width: 23.351063829787233%; } .row-fluid .span2 { width: 14.893617021276595%; *width: 14.840425531914894%; } .row-fluid .span1 { width: 6.382978723404255%; *width: 6.329787234042553%; } .row-fluid .offset12 { margin-left: 104.25531914893617%; *margin-left: 104.14893617021275%; } .row-fluid .offset12:first-child { margin-left: 102.12765957446808%; *margin-left: 102.02127659574467%; } .row-fluid .offset11 { margin-left: 95.74468085106382%; *margin-left: 95.6382978723404%; } .row-fluid .offset11:first-child { margin-left: 93.61702127659574%; *margin-left: 93.51063829787232%; } .row-fluid .offset10 { margin-left: 87.23404255319149%; *margin-left: 87.12765957446807%; } .row-fluid .offset10:first-child { margin-left: 85.1063829787234%; *margin-left: 84.99999999999999%; } .row-fluid .offset9 { margin-left: 78.72340425531914%; *margin-left: 78.61702127659572%; } .row-fluid .offset9:first-child { margin-left: 76.59574468085106%; *margin-left: 76.48936170212764%; } .row-fluid .offset8 { margin-left: 70.2127659574468%; *margin-left: 70.10638297872339%; } .row-fluid .offset8:first-child { margin-left: 68.08510638297872%; *margin-left: 67.9787234042553%; } .row-fluid .offset7 { margin-left: 61.70212765957446%; *margin-left: 61.59574468085106%; } .row-fluid .offset7:first-child { margin-left: 59.574468085106375%; *margin-left: 59.46808510638297%; } .row-fluid .offset6 { margin-left: 53.191489361702125%; *margin-left: 53.085106382978715%; } .row-fluid .offset6:first-child { margin-left: 51.063829787234035%; *margin-left: 50.95744680851063%; } .row-fluid .offset5 { margin-left: 44.68085106382979%; *margin-left: 44.57446808510638%; } .row-fluid .offset5:first-child { margin-left: 42.5531914893617%; *margin-left: 42.4468085106383%; } .row-fluid .offset4 { margin-left: 36.170212765957444%; *margin-left: 36.06382978723405%; } .row-fluid .offset4:first-child { margin-left: 34.04255319148936%; *margin-left: 33.93617021276596%; } .row-fluid .offset3 { margin-left: 27.659574468085104%; *margin-left: 27.5531914893617%; } .row-fluid .offset3:first-child { margin-left: 25.53191489361702%; *margin-left: 25.425531914893618%; } .row-fluid .offset2 { margin-left: 19.148936170212764%; *margin-left: 19.04255319148936%; } .row-fluid .offset2:first-child { margin-left: 17.02127659574468%; *margin-left: 16.914893617021278%; } .row-fluid .offset1 { margin-left: 10.638297872340425%; *margin-left: 10.53191489361702%; } .row-fluid .offset1:first-child { margin-left: 8.51063829787234%; *margin-left: 8.404255319148938%; } [class*="span"].hide, .row-fluid [class*="span"].hide { display: none; } [class*="span"].pull-right, .row-fluid [class*="span"].pull-right { float: right; } .container { margin-right: auto; margin-left: auto; *zoom: 1; } .container:before, .container:after { display: table; content: ""; line-height: 0; } .container:after { clear: both; } .container-fluid { padding-right: 20px; padding-left: 20px; *zoom: 1; } .container-fluid:before, .container-fluid:after { display: table; content: ""; line-height: 0; } .container-fluid:after { clear: both; } p { margin: 0 0 10px; } .lead { margin-bottom: 20px; font-size: 21px; font-weight: 200; line-height: 30px; } small { font-size: 85%; } strong { font-weight: bold; } em { font-style: italic; } cite { font-style: normal; } .muted { color: #999999; } a.muted:hover, a.muted:focus { color: #808080; } .text-warning { color: #c09853; } a.text-warning:hover, a.text-warning:focus { color: #a47e3c; } .text-error { color: #b94a48; } a.text-error:hover, a.text-error:focus { color: #953b39; } .text-info { color: #3a87ad; } a.text-info:hover, a.text-info:focus { color: #2d6987; } .text-success { color: #468847; } a.text-success:hover, a.text-success:focus { color: #356635; } .text-left { text-align: left; } .text-right { text-align: right; } .text-center { text-align: center; } h1, h2, h3, h4, h5, h6 { margin: 10px 0; font-family: inherit; font-weight: bold; line-height: 20px; color: inherit; text-rendering: optimizelegibility; } h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { font-weight: normal; line-height: 1; color: #999999; } h1, h2, h3 { line-height: 40px; } h1 { font-size: 38.5px; } h2 { font-size: 31.5px; } h3 { font-size: 24.5px; } h4 { font-size: 17.5px; } h5 { font-size: 14px; } h6 { font-size: 11.9px; } h1 small { font-size: 24.5px; } h2 small { font-size: 17.5px; } h3 small { font-size: 14px; } h4 small { font-size: 14px; } .page-header { padding-bottom: 9px; margin: 20px 0 30px; border-bottom: 1px solid #eeeeee; } ul, ol { padding: 0; margin: 0 0 10px 25px; } ul ul, ul ol, ol ol, ol ul { margin-bottom: 0; } li { line-height: 20px; } ul.unstyled, ol.unstyled { margin-left: 0; list-style: none; } ul.inline, ol.inline { margin-left: 0; list-style: none; } ul.inline > li, ol.inline > li { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; padding-left: 5px; padding-right: 5px; } dl { margin-bottom: 20px; } dt, dd { line-height: 20px; } dt { font-weight: bold; } dd { margin-left: 10px; } .dl-horizontal { *zoom: 1; } .dl-horizontal:before, .dl-horizontal:after { display: table; content: ""; line-height: 0; } .dl-horizontal:after { clear: both; } .dl-horizontal dt { float: left; width: 160px; clear: left; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dl-horizontal dd { margin-left: 180px; } hr { margin: 20px 0; border: 0; border-top: 1px solid #eeeeee; border-bottom: 1px solid #ffffff; } abbr[title], abbr[data-original-title] { cursor: help; border-bottom: 1px dotted #999999; } abbr.initialism { font-size: 90%; text-transform: uppercase; } blockquote { padding: 0 0 0 15px; margin: 0 0 20px; border-left: 5px solid #eeeeee; } blockquote p { margin-bottom: 0; font-size: 17.5px; font-weight: 300; line-height: 1.25; } blockquote small { display: block; line-height: 20px; color: #999999; } blockquote small:before { content: '\2014 \00A0'; } blockquote.pull-right { float: right; padding-right: 15px; padding-left: 0; border-right: 5px solid #eeeeee; border-left: 0; } blockquote.pull-right p, blockquote.pull-right small { text-align: right; } blockquote.pull-right small:before { content: ''; } blockquote.pull-right small:after { content: '\00A0 \2014'; } q:before, q:after, blockquote:before, blockquote:after { content: ""; } address { display: block; margin-bottom: 20px; font-style: normal; line-height: 20px; } code, pre { padding: 0 3px 2px; font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-size: 12px; color: #333333; -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; } code { padding: 2px 4px; color: #d14; background-color: #f7f7f9; border: 1px solid #e1e1e8; white-space: nowrap; } pre { display: block; padding: 9.5px; margin: 0 0 10px; font-size: 13px; line-height: 20px; word-break: break-all; word-wrap: break-word; white-space: pre; white-space: pre-wrap; background-color: #f5f5f5; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.15); -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } pre.prettyprint { margin-bottom: 20px; } pre code { padding: 0; color: inherit; white-space: pre; white-space: pre-wrap; background-color: transparent; border: 0; } .pre-scrollable { max-height: 340px; overflow-y: scroll; } .label, .badge { display: inline-block; padding: 2px 4px; font-size: 11.844px; font-weight: bold; line-height: 14px; color: #ffffff; vertical-align: baseline; white-space: nowrap; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #999999; } .label { -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; } .badge { padding-left: 9px; padding-right: 9px; -<API key>: 9px; -moz-border-radius: 9px; border-radius: 9px; } .label:empty, .badge:empty { display: none; } a.label:hover, a.label:focus, a.badge:hover, a.badge:focus { color: #ffffff; text-decoration: none; cursor: pointer; } .label-important, .badge-important { background-color: #b94a48; } .label-important[href], .badge-important[href] { background-color: #953b39; } .label-warning, .badge-warning { background-color: #fc9f06; } .label-warning[href], .badge-warning[href] { background-color: #cd8002; } .label-success, .badge-success { background-color: #468847; } .label-success[href], .badge-success[href] { background-color: #356635; } .label-info, .badge-info { background-color: #3a87ad; } .label-info[href], .badge-info[href] { background-color: #2d6987; } .label-inverse, .badge-inverse { background-color: #333333; } .label-inverse[href], .badge-inverse[href] { background-color: #1a1a1a; } .btn .label, .btn .badge { position: relative; top: -1px; } .btn-mini .label, .btn-mini .badge { top: 0; } table { max-width: 100%; background-color: transparent; border-collapse: collapse; border-spacing: 0; } .table { width: 100%; margin-bottom: 20px; } .table th, .table td { padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border-top: 1px solid #dddddd; } .table th { font-weight: bold; } .table thead th { vertical-align: bottom; } .table caption + thead tr:first-child th, .table caption + thead tr:first-child td, .table colgroup + thead tr:first-child th, .table colgroup + thead tr:first-child td, .table thead:first-child tr:first-child th, .table thead:first-child tr:first-child td { border-top: 0; } .table tbody + tbody { border-top: 2px solid #dddddd; } .table .table { background-color: #c5ad91; } .table-condensed th, .table-condensed td { padding: 4px 5px; } .table-bordered { border: 1px solid #dddddd; border-collapse: separate; *border-collapse: collapse; border-left: 0; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .table-bordered th, .table-bordered td { border-left: 1px solid #dddddd; } .table-bordered caption + thead tr:first-child th, .table-bordered caption + tbody tr:first-child th, .table-bordered caption + tbody tr:first-child td, .table-bordered colgroup + thead tr:first-child th, .table-bordered colgroup + tbody tr:first-child th, .table-bordered colgroup + tbody tr:first-child td, .table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td { border-top: 0; } .table-bordered thead:first-child tr:first-child > th:first-child, .table-bordered tbody:first-child tr:first-child > td:first-child, .table-bordered tbody:first-child tr:first-child > th:first-child { -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .table-bordered thead:first-child tr:first-child > th:last-child, .table-bordered tbody:first-child tr:first-child > td:last-child, .table-bordered tbody:first-child tr:first-child > th:last-child { -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .table-bordered thead:last-child tr:last-child > th:first-child, .table-bordered tbody:last-child tr:last-child > td:first-child, .table-bordered tbody:last-child tr:last-child > th:first-child, .table-bordered tfoot:last-child tr:last-child > td:first-child, .table-bordered tfoot:last-child tr:last-child > th:first-child { -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .table-bordered thead:last-child tr:last-child > th:last-child, .table-bordered tbody:last-child tr:last-child > td:last-child, .table-bordered tbody:last-child tr:last-child > th:last-child, .table-bordered tfoot:last-child tr:last-child > td:last-child, .table-bordered tfoot:last-child tr:last-child > th:last-child { -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .table-bordered tfoot + tbody:last-child tr:last-child td:first-child { -<API key>: 0; -<API key>: 0; <API key>: 0; } .table-bordered tfoot + tbody:last-child tr:last-child td:last-child { -<API key>: 0; -<API key>: 0; <API key>: 0; } .table-bordered caption + thead tr:first-child th:first-child, .table-bordered caption + tbody tr:first-child td:first-child, .table-bordered colgroup + thead tr:first-child th:first-child, .table-bordered colgroup + tbody tr:first-child td:first-child { -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .table-bordered caption + thead tr:first-child th:last-child, .table-bordered caption + tbody tr:first-child td:last-child, .table-bordered colgroup + thead tr:first-child th:last-child, .table-bordered colgroup + tbody tr:first-child td:last-child { -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .table-striped tbody > tr:nth-child(odd) > td, .table-striped tbody > tr:nth-child(odd) > th { background-color: #f9f9f9; } .table-hover tbody tr:hover > td, .table-hover tbody tr:hover > th { background-color: #f5f5f5; } table td[class*="span"], table th[class*="span"], .row-fluid table td[class*="span"], .row-fluid table th[class*="span"] { display: table-cell; float: none; margin-left: 0; } .table td.span1, .table th.span1 { float: none; width: 44px; margin-left: 0; } .table td.span2, .table th.span2 { float: none; width: 124px; margin-left: 0; } .table td.span3, .table th.span3 { float: none; width: 204px; margin-left: 0; } .table td.span4, .table th.span4 { float: none; width: 284px; margin-left: 0; } .table td.span5, .table th.span5 { float: none; width: 364px; margin-left: 0; } .table td.span6, .table th.span6 { float: none; width: 444px; margin-left: 0; } .table td.span7, .table th.span7 { float: none; width: 524px; margin-left: 0; } .table td.span8, .table th.span8 { float: none; width: 604px; margin-left: 0; } .table td.span9, .table th.span9 { float: none; width: 684px; margin-left: 0; } .table td.span10, .table th.span10 { float: none; width: 764px; margin-left: 0; } .table td.span11, .table th.span11 { float: none; width: 844px; margin-left: 0; } .table td.span12, .table th.span12 { float: none; width: 924px; margin-left: 0; } .table tbody tr.success > td { background-color: #dff0d8; } .table tbody tr.error > td { background-color: #f2dede; } .table tbody tr.warning > td { background-color: #fcf8e3; } .table tbody tr.info > td { background-color: #d9edf7; } .table-hover tbody tr.success:hover > td { background-color: #d0e9c6; } .table-hover tbody tr.error:hover > td { background-color: #ebcccc; } .table-hover tbody tr.warning:hover > td { background-color: #faf2cc; } .table-hover tbody tr.info:hover > td { background-color: #c4e3f3; } form { margin: 0 0 20px; } fieldset { padding: 0; margin: 0; border: 0; } legend { display: block; width: 100%; padding: 0; margin-bottom: 20px; font-size: 21px; line-height: 40px; color: #333333; border: 0; border-bottom: 1px solid #e5e5e5; } legend small { font-size: 15px; color: #999999; } label, input, button, select, textarea { font-size: 14px; font-weight: normal; line-height: 20px; } input, button, select, textarea { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } label { display: block; margin-bottom: 5px; } select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input { display: inline-block; height: 20px; padding: 4px 6px; margin-bottom: 10px; font-size: 14px; line-height: 20px; color: #555555; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; vertical-align: middle; } input, textarea, .uneditable-input { width: 206px; } textarea { height: auto; } textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input { background-color: #ffffff; border: 1px solid #cccccc; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border linear .2s, box-shadow linear .2s; -moz-transition: border linear .2s, box-shadow linear .2s; -o-transition: border linear .2s, box-shadow linear .2s; transition: border linear .2s, box-shadow linear .2s; } textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus, input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="color"]:focus, .uneditable-input:focus { border-color: rgba(82, 168, 236, 0.8); outline: 0; outline: thin dotted \9; /* IE6-9 */ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); } input[type="radio"], input[type="checkbox"] { margin: 4px 0 0; *margin-top: 0; /* IE7 */ margin-top: 1px \9; /* IE8-9 */ line-height: normal; } input[type="file"], input[type="image"], input[type="submit"], input[type="reset"], input[type="button"], input[type="radio"], input[type="checkbox"] { width: auto; } select, input[type="file"] { height: 30px; /* In IE7, the height of the select element cannot be changed by height, only font-size */ *margin-top: 4px; /* For IE7, add top margin to align select with labels */ line-height: 30px; } select { width: 220px; border: 1px solid #cccccc; background-color: #ffffff; } select[multiple], select[size] { height: auto; } select:focus, input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: thin dotted #333; outline: 5px auto -<API key>; outline-offset: -2px; } .uneditable-input, .uneditable-textarea { color: #999999; background-color: #fcfcfc; border-color: #cccccc; -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); cursor: not-allowed; } .uneditable-input { overflow: hidden; white-space: nowrap; } .uneditable-textarea { width: auto; height: auto; } input:-moz-placeholder, textarea:-moz-placeholder { color: #999999; } input:-<API key>, textarea:-<API key> { color: #999999; } input::-<API key>, textarea::-<API key> { color: #999999; } .radio, .checkbox { min-height: 20px; padding-left: 20px; } .radio input[type="radio"], .checkbox input[type="checkbox"] { float: left; margin-left: -20px; } .controls > .radio:first-child, .controls > .checkbox:first-child { padding-top: 5px; } .radio.inline, .checkbox.inline { display: inline-block; padding-top: 5px; margin-bottom: 0; vertical-align: middle; } .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { margin-left: 10px; } .input-mini { width: 60px; } .input-small { width: 90px; } .input-medium { width: 150px; } .input-large { width: 210px; } .input-xlarge { width: 270px; } .input-xxlarge { width: 530px; } input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"] { float: none; margin-left: 0; } .input-append input[class*="span"], .input-append .uneditable-input[class*="span"], .input-prepend input[class*="span"], .input-prepend .uneditable-input[class*="span"], .row-fluid input[class*="span"], .row-fluid select[class*="span"], .row-fluid textarea[class*="span"], .row-fluid .uneditable-input[class*="span"], .row-fluid .input-prepend [class*="span"], .row-fluid .input-append [class*="span"] { display: inline-block; } input, textarea, .uneditable-input { margin-left: 0; } .controls-row [class*="span"] + [class*="span"] { margin-left: 20px; } input.span12, textarea.span12, .uneditable-input.span12 { width: 926px; } input.span11, textarea.span11, .uneditable-input.span11 { width: 846px; } input.span10, textarea.span10, .uneditable-input.span10 { width: 766px; } input.span9, textarea.span9, .uneditable-input.span9 { width: 686px; } input.span8, textarea.span8, .uneditable-input.span8 { width: 606px; } input.span7, textarea.span7, .uneditable-input.span7 { width: 526px; } input.span6, textarea.span6, .uneditable-input.span6 { width: 446px; } input.span5, textarea.span5, .uneditable-input.span5 { width: 366px; } input.span4, textarea.span4, .uneditable-input.span4 { width: 286px; } input.span3, textarea.span3, .uneditable-input.span3 { width: 206px; } input.span2, textarea.span2, .uneditable-input.span2 { width: 126px; } input.span1, textarea.span1, .uneditable-input.span1 { width: 46px; } .controls-row { *zoom: 1; } .controls-row:before, .controls-row:after { display: table; content: ""; line-height: 0; } .controls-row:after { clear: both; } .controls-row [class*="span"], .row-fluid .controls-row [class*="span"] { float: left; } .controls-row .checkbox[class*="span"], .controls-row .radio[class*="span"] { padding-top: 5px; } input[disabled], select[disabled], textarea[disabled], input[readonly], select[readonly], textarea[readonly] { cursor: not-allowed; background-color: #eeeeee; } input[type="radio"][disabled], input[type="checkbox"][disabled], input[type="radio"][readonly], input[type="checkbox"][readonly] { background-color: transparent; } .control-group.warning .control-label, .control-group.warning .help-block, .control-group.warning .help-inline { color: #c09853; } .control-group.warning .checkbox, .control-group.warning .radio, .control-group.warning input, .control-group.warning select, .control-group.warning textarea { color: #c09853; } .control-group.warning input, .control-group.warning select, .control-group.warning textarea { border-color: #c09853; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus { border-color: #a47e3c; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; } .control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on { color: #c09853; background-color: #fcf8e3; border-color: #c09853; } .control-group.error .control-label, .control-group.error .help-block, .control-group.error .help-inline { color: #b94a48; } .control-group.error .checkbox, .control-group.error .radio, .control-group.error input, .control-group.error select, .control-group.error textarea { color: #b94a48; } .control-group.error input, .control-group.error select, .control-group.error textarea { border-color: #b94a48; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus { border-color: #953b39; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; } .control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on { color: #b94a48; background-color: #f2dede; border-color: #b94a48; } .control-group.success .control-label, .control-group.success .help-block, .control-group.success .help-inline { color: #468847; } .control-group.success .checkbox, .control-group.success .radio, .control-group.success input, .control-group.success select, .control-group.success textarea { color: #468847; } .control-group.success input, .control-group.success select, .control-group.success textarea { border-color: #468847; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus { border-color: #356635; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; } .control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on { color: #468847; background-color: #dff0d8; border-color: #468847; } .control-group.info .control-label, .control-group.info .help-block, .control-group.info .help-inline { color: #3a87ad; } .control-group.info .checkbox, .control-group.info .radio, .control-group.info input, .control-group.info select, .control-group.info textarea { color: #3a87ad; } .control-group.info input, .control-group.info select, .control-group.info textarea { border-color: #3a87ad; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); } .control-group.info input:focus, .control-group.info select:focus, .control-group.info textarea:focus { border-color: #2d6987; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; } .control-group.info .input-prepend .add-on, .control-group.info .input-append .add-on { color: #3a87ad; background-color: #d9edf7; border-color: #3a87ad; } input:focus:invalid, textarea:focus:invalid, select:focus:invalid { color: #b94a48; border-color: #ee5f5b; } input:focus:invalid:focus, textarea:focus:invalid:focus, select:focus:invalid:focus { border-color: #e9322d; -webkit-box-shadow: 0 0 6px #f8b9b7; -moz-box-shadow: 0 0 6px #f8b9b7; box-shadow: 0 0 6px #f8b9b7; } .form-actions { padding: 19px 20px 20px; margin-top: 20px; margin-bottom: 20px; background-color: #f5f5f5; border-top: 1px solid #e5e5e5; *zoom: 1; } .form-actions:before, .form-actions:after { display: table; content: ""; line-height: 0; } .form-actions:after { clear: both; } .help-block, .help-inline { color: #505050; } .help-block { display: block; margin-bottom: 10px; } .help-inline { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; vertical-align: middle; padding-left: 5px; } .input-append, .input-prepend { display: inline-block; margin-bottom: 10px; vertical-align: middle; font-size: 0; white-space: nowrap; } .input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input, .input-append .dropdown-menu, .input-prepend .dropdown-menu, .input-append .popover, .input-prepend .popover { font-size: 14px; } .input-append input, .input-prepend input, .input-append select, .input-prepend select, .input-append .uneditable-input, .input-prepend .uneditable-input { position: relative; margin-bottom: 0; *margin-left: 0; vertical-align: top; -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-append input:focus, .input-prepend input:focus, .input-append select:focus, .input-prepend select:focus, .input-append .uneditable-input:focus, .input-prepend .uneditable-input:focus { z-index: 2; } .input-append .add-on, .input-prepend .add-on { display: inline-block; width: auto; height: 20px; min-width: 16px; padding: 4px 5px; font-size: 14px; font-weight: normal; line-height: 20px; text-align: center; text-shadow: 0 1px 0 #ffffff; background-color: #eeeeee; border: 1px solid #ccc; } .input-append .add-on, .input-prepend .add-on, .input-append .btn, .input-prepend .btn, .input-append .btn-group > .dropdown-toggle, .input-prepend .btn-group > .dropdown-toggle { vertical-align: top; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .input-append .active, .input-prepend .active { background-color: #a9dba9; border-color: #46a546; } .input-prepend .add-on, .input-prepend .btn { margin-right: -1px; } .input-prepend .add-on:first-child, .input-prepend .btn:first-child { -<API key>: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .input-append input, .input-append select, .input-append .uneditable-input { -<API key>: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .input-append input + .btn-group .btn:last-child, .input-append select + .btn-group .btn:last-child, .input-append .uneditable-input + .btn-group .btn:last-child { -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-append .add-on, .input-append .btn, .input-append .btn-group { margin-left: -1px; } .input-append .add-on:last-child, .input-append .btn:last-child, .input-append .btn-group:last-child > .dropdown-toggle { -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-prepend.input-append input, .input-prepend.input-append select, .input-prepend.input-append .uneditable-input { -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .input-prepend.input-append input + .btn-group .btn, .input-prepend.input-append select + .btn-group .btn, .input-prepend.input-append .uneditable-input + .btn-group .btn { -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-prepend.input-append .add-on:first-child, .input-prepend.input-append .btn:first-child { margin-right: -1px; -<API key>: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .input-prepend.input-append .add-on:last-child, .input-prepend.input-append .btn:last-child { margin-left: -1px; -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .input-prepend.input-append .btn-group:first-child { margin-left: 0; } input.search-query { padding-right: 14px; padding-right: 4px \9; padding-left: 14px; padding-left: 4px \9; /* IE7-8 doesn't have border-radius, so don't indent the padding */ margin-bottom: 0; -<API key>: 15px; -moz-border-radius: 15px; border-radius: 15px; } /* Allow for input prepend/append in search forms */ .form-search .input-append .search-query, .form-search .input-prepend .search-query { -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .form-search .input-append .search-query { -<API key>: 14px 0 0 14px; -moz-border-radius: 14px 0 0 14px; border-radius: 14px 0 0 14px; } .form-search .input-append .btn { -<API key>: 0 14px 14px 0; -moz-border-radius: 0 14px 14px 0; border-radius: 0 14px 14px 0; } .form-search .input-prepend .search-query { -<API key>: 0 14px 14px 0; -moz-border-radius: 0 14px 14px 0; border-radius: 0 14px 14px 0; } .form-search .input-prepend .btn { -<API key>: 14px 0 0 14px; -moz-border-radius: 14px 0 0 14px; border-radius: 14px 0 0 14px; } .form-search input, .form-inline input, .form-horizontal input, .form-search textarea, .form-inline textarea, .form-horizontal textarea, .form-search select, .form-inline select, .form-horizontal select, .form-search .help-inline, .form-inline .help-inline, .form-horizontal .help-inline, .form-search .uneditable-input, .form-inline .uneditable-input, .form-horizontal .uneditable-input, .form-search .input-prepend, .form-inline .input-prepend, .form-horizontal .input-prepend, .form-search .input-append, .form-inline .input-append, .form-horizontal .input-append { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; margin-bottom: 0; vertical-align: middle; } .form-search .hide, .form-inline .hide, .form-horizontal .hide { display: none; } .form-search label, .form-inline label, .form-search .btn-group, .form-inline .btn-group { display: inline-block; } .form-search .input-append, .form-inline .input-append, .form-search .input-prepend, .form-inline .input-prepend { margin-bottom: 0; } .form-search .radio, .form-search .checkbox, .form-inline .radio, .form-inline .checkbox { padding-left: 0; margin-bottom: 0; vertical-align: middle; } .form-search .radio input[type="radio"], .form-search .checkbox input[type="checkbox"], .form-inline .radio input[type="radio"], .form-inline .checkbox input[type="checkbox"] { float: left; margin-right: 3px; margin-left: 0; } .control-group { margin-bottom: 10px; } legend + .control-group { margin-top: 20px; -<API key>: separate; } .form-horizontal .control-group { margin-bottom: 20px; *zoom: 1; } .form-horizontal .control-group:before, .form-horizontal .control-group:after { display: table; content: ""; line-height: 0; } .form-horizontal .control-group:after { clear: both; } .form-horizontal .control-label { float: left; width: 160px; padding-top: 5px; text-align: right; } .form-horizontal .controls { *display: inline-block; *padding-left: 20px; margin-left: 180px; *margin-left: 0; } .form-horizontal .controls:first-child { *padding-left: 180px; } .form-horizontal .help-block { margin-bottom: 0; } .form-horizontal input + .help-block, .form-horizontal select + .help-block, .form-horizontal textarea + .help-block, .form-horizontal .uneditable-input + .help-block, .form-horizontal .input-prepend + .help-block, .form-horizontal .input-append + .help-block { margin-top: 10px; } .form-horizontal .form-actions { padding-left: 180px; } .btn { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; padding: 4px 12px; margin-bottom: 0; font-size: 14px; line-height: 20px; text-align: center; vertical-align: middle; cursor: pointer; color: #333333; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); background-color: #f5f5f5; background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); background-image: -<API key>(top, #ffffff, #e6e6e6); background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); border-color: #e6e6e6 #e6e6e6 #bfbfbf; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #e6e6e6; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); border: 1px solid #cccccc; *border: 0; border-bottom-color: #b3b3b3; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; *margin-left: .3em; -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); } .btn:hover, .btn:focus, .btn:active, .btn.active, .btn.disabled, .btn[disabled] { color: #333333; background-color: #e6e6e6; *background-color: #d9d9d9; } .btn:active, .btn.active { background-color: #cccccc \9; } .btn:first-child { *margin-left: 0; } .btn:hover, .btn:focus { color: #333333; text-decoration: none; background-position: 0 -15px; -webkit-transition: background-position 0.1s linear; -moz-transition: background-position 0.1s linear; -o-transition: background-position 0.1s linear; transition: background-position 0.1s linear; } .btn:focus { outline: thin dotted #333; outline: 5px auto -<API key>; outline-offset: -2px; } .btn.active, .btn:active { background-image: none; outline: 0; -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); } .btn.disabled, .btn[disabled] { cursor: default; background-image: none; opacity: 0.65; filter: alpha(opacity=65); -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .btn-large { padding: 11px 19px; font-size: 17.5px; -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; } .btn-large [class^="icon-"], .btn-large [class*=" icon-"] { margin-top: 4px; } .btn-small { padding: 2px 10px; font-size: 11.9px; -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; } .btn-small [class^="icon-"], .btn-small [class*=" icon-"] { margin-top: 0; } .btn-mini [class^="icon-"], .btn-mini [class*=" icon-"] { margin-top: -1px; } .btn-mini { padding: 0 6px; font-size: 10.5px; -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; } .btn-block { display: block; width: 100%; padding-left: 0; padding-right: 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .btn-block + .btn-block { margin-top: 5px; } input[type="submit"].btn-block, input[type="reset"].btn-block, input[type="button"].btn-block { width: 100%; } .btn-primary.active, .btn-warning.active, .btn-danger.active, .btn-success.active, .btn-info.active, .btn-inverse.active { color: rgba(255, 255, 255, 0.75); } .btn-primary { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #816266; background-image: -moz-linear-gradient(top, #715458, #9a777c); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#715458), to(#9a777c)); background-image: -<API key>(top, #715458, #9a777c); background-image: -o-linear-gradient(top, #715458, #9a777c); background-image: linear-gradient(to bottom, #715458, #9a777c); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff715458', endColorstr='#ff9a777c', GradientType=0); border-color: #9a777c #9a777c #715458; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #9a777c; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] { color: #ffffff; background-color: #9a777c; *background-color: #8e6a6f; } .btn-primary:active, .btn-primary.active { background-color: #805f63 \9; } .btn-warning { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #fdb033; background-image: -moz-linear-gradient(top, #fdbc52, #fc9f06); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdbc52), to(#fc9f06)); background-image: -<API key>(top, #fdbc52, #fc9f06); background-image: -o-linear-gradient(top, #fdbc52, #fc9f06); background-image: linear-gradient(to bottom, #fdbc52, #fc9f06); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdbc52', endColorstr='#fffc9f06', GradientType=0); border-color: #fc9f06 #fc9f06 #b37002; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #fc9f06; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-warning:hover, .btn-warning:focus, .btn-warning:active, .btn-warning.active, .btn-warning.disabled, .btn-warning[disabled] { color: #ffffff; background-color: #fc9f06; *background-color: #e69003; } .btn-warning:active, .btn-warning.active { background-color: #cd8002 \9; } .btn-danger { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #da4f49; background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); background-image: -<API key>(top, #ee5f5b, #bd362f); background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); border-color: #bd362f #bd362f #802420; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #bd362f; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-danger:hover, .btn-danger:focus, .btn-danger:active, .btn-danger.active, .btn-danger.disabled, .btn-danger[disabled] { color: #ffffff; background-color: #bd362f; *background-color: #a9302a; } .btn-danger:active, .btn-danger.active { background-color: #942a25 \9; } .btn-success { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #5bb75b; background-image: -moz-linear-gradient(top, #62c462, #51a351); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); background-image: -<API key>(top, #62c462, #51a351); background-image: -o-linear-gradient(top, #62c462, #51a351); background-image: linear-gradient(to bottom, #62c462, #51a351); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); border-color: #51a351 #51a351 #387038; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #51a351; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active, .btn-success.disabled, .btn-success[disabled] { color: #ffffff; background-color: #51a351; *background-color: #499249; } .btn-success:active, .btn-success.active { background-color: #408140 \9; } .btn-info { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #49afcd; background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); background-image: -<API key>(top, #5bc0de, #2f96b4); background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); border-color: #2f96b4 #2f96b4 #1f6377; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #2f96b4; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-info:hover, .btn-info:focus, .btn-info:active, .btn-info.active, .btn-info.disabled, .btn-info[disabled] { color: #ffffff; background-color: #2f96b4; *background-color: #2a85a0; } .btn-info:active, .btn-info.active { background-color: #24748c \9; } .btn-inverse { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #363636; background-image: -moz-linear-gradient(top, #444444, #222222); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); background-image: -<API key>(top, #444444, #222222); background-image: -o-linear-gradient(top, #444444, #222222); background-image: linear-gradient(to bottom, #444444, #222222); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); border-color: #222222 #222222 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #222222; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-inverse:hover, .btn-inverse:focus, .btn-inverse:active, .btn-inverse.active, .btn-inverse.disabled, .btn-inverse[disabled] { color: #ffffff; background-color: #222222; *background-color: #151515; } .btn-inverse:active, .btn-inverse.active { background-color: #080808 \9; } button.btn, input[type="submit"].btn { *padding-top: 3px; *padding-bottom: 3px; } button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner { padding: 0; border: 0; } button.btn.btn-large, input[type="submit"].btn.btn-large { *padding-top: 7px; *padding-bottom: 7px; } button.btn.btn-small, input[type="submit"].btn.btn-small { *padding-top: 3px; *padding-bottom: 3px; } button.btn.btn-mini, input[type="submit"].btn.btn-mini { *padding-top: 1px; *padding-bottom: 1px; } .btn-link, .btn-link:active, .btn-link[disabled] { background-color: transparent; background-image: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .btn-link { border-color: transparent; cursor: pointer; color: #715458; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .btn-link:hover, .btn-link:focus { color: #ca3308; text-decoration: underline; background-color: transparent; } .btn-link[disabled]:hover, .btn-link[disabled]:focus { color: #333333; text-decoration: none; } [class^="icon-"], [class*=" icon-"] { display: inline-block; width: 14px; height: 14px; *margin-right: .3em; line-height: 14px; vertical-align: text-top; background-image: url("../img/<API key>.png"); background-position: 14px 14px; background-repeat: no-repeat; margin-top: 1px; } /* White icons with optional class, or on hover/focus/active states of certain elements */ .icon-white, .nav-pills > .active > a > [class^="icon-"], .nav-pills > .active > a > [class*=" icon-"], .nav-list > .active > a > [class^="icon-"], .nav-list > .active > a > [class*=" icon-"], .navbar-inverse .nav > .active > a > [class^="icon-"], .navbar-inverse .nav > .active > a > [class*=" icon-"], .dropdown-menu > li > a:hover > [class^="icon-"], .dropdown-menu > li > a:focus > [class^="icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"], .dropdown-menu > li > a:focus > [class*=" icon-"], .dropdown-menu > .active > a > [class^="icon-"], .dropdown-menu > .active > a > [class*=" icon-"], .dropdown-submenu:hover > a > [class^="icon-"], .dropdown-submenu:focus > a > [class^="icon-"], .dropdown-submenu:hover > a > [class*=" icon-"], .dropdown-submenu:focus > a > [class*=" icon-"] { background-image: url("../img/<API key>.png"); } .icon-glass { background-position: 0 0; } .icon-music { background-position: -24px 0; } .icon-search { background-position: -48px 0; } .icon-envelope { background-position: -72px 0; } .icon-heart { background-position: -96px 0; } .icon-star { background-position: -120px 0; } .icon-star-empty { background-position: -144px 0; } .icon-user { background-position: -168px 0; } .icon-film { background-position: -192px 0; } .icon-th-large { background-position: -216px 0; } .icon-th { background-position: -240px 0; } .icon-th-list { background-position: -264px 0; } .icon-ok { background-position: -288px 0; } .icon-remove { background-position: -312px 0; } .icon-zoom-in { background-position: -336px 0; } .icon-zoom-out { background-position: -360px 0; } .icon-off { background-position: -384px 0; } .icon-signal { background-position: -408px 0; } .icon-cog { background-position: -432px 0; } .icon-trash { background-position: -456px 0; } .icon-home { background-position: 0 -24px; } .icon-file { background-position: -24px -24px; } .icon-time { background-position: -48px -24px; } .icon-road { background-position: -72px -24px; } .icon-download-alt { background-position: -96px -24px; } .icon-download { background-position: -120px -24px; } .icon-upload { background-position: -144px -24px; } .icon-inbox { background-position: -168px -24px; } .icon-play-circle { background-position: -192px -24px; } .icon-repeat { background-position: -216px -24px; } .icon-refresh { background-position: -240px -24px; } .icon-list-alt { background-position: -264px -24px; } .icon-lock { background-position: -287px -24px; } .icon-flag { background-position: -312px -24px; } .icon-headphones { background-position: -336px -24px; } .icon-volume-off { background-position: -360px -24px; } .icon-volume-down { background-position: -384px -24px; } .icon-volume-up { background-position: -408px -24px; } .icon-qrcode { background-position: -432px -24px; } .icon-barcode { background-position: -456px -24px; } .icon-tag { background-position: 0 -48px; } .icon-tags { background-position: -25px -48px; } .icon-book { background-position: -48px -48px; } .icon-bookmark { background-position: -72px -48px; } .icon-print { background-position: -96px -48px; } .icon-camera { background-position: -120px -48px; } .icon-font { background-position: -144px -48px; } .icon-bold { background-position: -167px -48px; } .icon-italic { background-position: -192px -48px; } .icon-text-height { background-position: -216px -48px; } .icon-text-width { background-position: -240px -48px; } .icon-align-left { background-position: -264px -48px; } .icon-align-center { background-position: -288px -48px; } .icon-align-right { background-position: -312px -48px; } .icon-align-justify { background-position: -336px -48px; } .icon-list { background-position: -360px -48px; } .icon-indent-left { background-position: -384px -48px; } .icon-indent-right { background-position: -408px -48px; } .icon-facetime-video { background-position: -432px -48px; } .icon-picture { background-position: -456px -48px; } .icon-pencil { background-position: 0 -72px; } .icon-map-marker { background-position: -24px -72px; } .icon-adjust { background-position: -48px -72px; } .icon-tint { background-position: -72px -72px; } .icon-edit { background-position: -96px -72px; } .icon-share { background-position: -120px -72px; } .icon-check { background-position: -144px -72px; } .icon-move { background-position: -168px -72px; } .icon-step-backward { background-position: -192px -72px; } .icon-fast-backward { background-position: -216px -72px; } .icon-backward { background-position: -240px -72px; } .icon-play { background-position: -264px -72px; } .icon-pause { background-position: -288px -72px; } .icon-stop { background-position: -312px -72px; } .icon-forward { background-position: -336px -72px; } .icon-fast-forward { background-position: -360px -72px; } .icon-step-forward { background-position: -384px -72px; } .icon-eject { background-position: -408px -72px; } .icon-chevron-left { background-position: -432px -72px; } .icon-chevron-right { background-position: -456px -72px; } .icon-plus-sign { background-position: 0 -96px; } .icon-minus-sign { background-position: -24px -96px; } .icon-remove-sign { background-position: -48px -96px; } .icon-ok-sign { background-position: -72px -96px; } .icon-question-sign { background-position: -96px -96px; } .icon-info-sign { background-position: -120px -96px; } .icon-screenshot { background-position: -144px -96px; } .icon-remove-circle { background-position: -168px -96px; } .icon-ok-circle { background-position: -192px -96px; } .icon-ban-circle { background-position: -216px -96px; } .icon-arrow-left { background-position: -240px -96px; } .icon-arrow-right { background-position: -264px -96px; } .icon-arrow-up { background-position: -289px -96px; } .icon-arrow-down { background-position: -312px -96px; } .icon-share-alt { background-position: -336px -96px; } .icon-resize-full { background-position: -360px -96px; } .icon-resize-small { background-position: -384px -96px; } .icon-plus { background-position: -408px -96px; } .icon-minus { background-position: -433px -96px; } .icon-asterisk { background-position: -456px -96px; } .<API key> { background-position: 0 -120px; } .icon-gift { background-position: -24px -120px; } .icon-leaf { background-position: -48px -120px; } .icon-fire { background-position: -72px -120px; } .icon-eye-open { background-position: -96px -120px; } .icon-eye-close { background-position: -120px -120px; } .icon-warning-sign { background-position: -144px -120px; } .icon-plane { background-position: -168px -120px; } .icon-calendar { background-position: -192px -120px; } .icon-random { background-position: -216px -120px; width: 16px; } .icon-comment { background-position: -240px -120px; } .icon-magnet { background-position: -264px -120px; } .icon-chevron-up { background-position: -288px -120px; } .icon-chevron-down { background-position: -313px -119px; } .icon-retweet { background-position: -336px -120px; } .icon-shopping-cart { background-position: -360px -120px; } .icon-folder-close { background-position: -384px -120px; width: 16px; } .icon-folder-open { background-position: -408px -120px; width: 16px; } .<API key> { background-position: -432px -119px; } .<API key> { background-position: -456px -118px; } .icon-hdd { background-position: 0 -144px; } .icon-bullhorn { background-position: -24px -144px; } .icon-bell { background-position: -48px -144px; } .icon-certificate { background-position: -72px -144px; } .icon-thumbs-up { background-position: -96px -144px; } .icon-thumbs-down { background-position: -120px -144px; } .icon-hand-right { background-position: -144px -144px; } .icon-hand-left { background-position: -168px -144px; } .icon-hand-up { background-position: -192px -144px; } .icon-hand-down { background-position: -216px -144px; } .<API key> { background-position: -240px -144px; } .<API key> { background-position: -264px -144px; } .<API key> { background-position: -288px -144px; } .<API key> { background-position: -312px -144px; } .icon-globe { background-position: -336px -144px; } .icon-wrench { background-position: -360px -144px; } .icon-tasks { background-position: -384px -144px; } .icon-filter { background-position: -408px -144px; } .icon-briefcase { background-position: -432px -144px; } .icon-fullscreen { background-position: -456px -144px; } .btn-group { position: relative; display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; font-size: 0; vertical-align: middle; white-space: nowrap; *margin-left: .3em; } .btn-group:first-child { *margin-left: 0; } .btn-group + .btn-group { margin-left: 5px; } .btn-toolbar { font-size: 0; margin-top: 10px; margin-bottom: 10px; } .btn-toolbar > .btn + .btn, .btn-toolbar > .btn-group + .btn, .btn-toolbar > .btn + .btn-group { margin-left: 5px; } .btn-group > .btn { position: relative; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .btn-group > .btn + .btn { margin-left: -1px; } .btn-group > .btn, .btn-group > .dropdown-menu, .btn-group > .popover { font-size: 14px; } .btn-group > .btn-mini { font-size: 10.5px; } .btn-group > .btn-small { font-size: 11.9px; } .btn-group > .btn-large { font-size: 17.5px; } .btn-group > .btn:first-child { margin-left: 0; -<API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .btn-group > .btn:last-child, .btn-group > .dropdown-toggle { -<API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .btn-group > .btn.large:first-child { margin-left: 0; -<API key>: 6px; -<API key>: 6px; <API key>: 6px; -<API key>: 6px; -<API key>: 6px; <API key>: 6px; } .btn-group > .btn.large:last-child, .btn-group > .large.dropdown-toggle { -<API key>: 6px; -<API key>: 6px; <API key>: 6px; -<API key>: 6px; -<API key>: 6px; <API key>: 6px; } .btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active { z-index: 2; } .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } .btn-group > .btn + .dropdown-toggle { padding-left: 8px; padding-right: 8px; -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); *padding-top: 5px; *padding-bottom: 5px; } .btn-group > .btn-mini + .dropdown-toggle { padding-left: 5px; padding-right: 5px; *padding-top: 2px; *padding-bottom: 2px; } .btn-group > .btn-small + .dropdown-toggle { *padding-top: 5px; *padding-bottom: 4px; } .btn-group > .btn-large + .dropdown-toggle { padding-left: 12px; padding-right: 12px; *padding-top: 7px; *padding-bottom: 7px; } .btn-group.open .dropdown-toggle { background-image: none; -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); } .btn-group.open .btn.dropdown-toggle { background-color: #e6e6e6; } .btn-group.open .btn-primary.dropdown-toggle { background-color: #9a777c; } .btn-group.open .btn-warning.dropdown-toggle { background-color: #fc9f06; } .btn-group.open .btn-danger.dropdown-toggle { background-color: #bd362f; } .btn-group.open .btn-success.dropdown-toggle { background-color: #51a351; } .btn-group.open .btn-info.dropdown-toggle { background-color: #2f96b4; } .btn-group.open .btn-inverse.dropdown-toggle { background-color: #222222; } .btn .caret { margin-top: 8px; margin-left: 0; } .btn-large .caret { margin-top: 6px; } .btn-large .caret { border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; } .btn-mini .caret, .btn-small .caret { margin-top: 8px; } .dropup .btn-large .caret { border-bottom-width: 5px; } .btn-primary .caret, .btn-warning .caret, .btn-danger .caret, .btn-info .caret, .btn-success .caret, .btn-inverse .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .btn-group-vertical { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; } .btn-group-vertical > .btn { display: block; float: none; max-width: 100%; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .btn-group-vertical > .btn + .btn { margin-left: 0; margin-top: -1px; } .btn-group-vertical > .btn:first-child { -<API key>: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } .btn-group-vertical > .btn:last-child { -<API key>: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } .btn-group-vertical > .btn-large:first-child { -<API key>: 6px 6px 0 0; -moz-border-radius: 6px 6px 0 0; border-radius: 6px 6px 0 0; } .btn-group-vertical > .btn-large:last-child { -<API key>: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; } .nav { margin-left: 0; margin-bottom: 20px; list-style: none; } .nav > li > a { display: block; } .nav > li > a:hover, .nav > li > a:focus { text-decoration: none; background-color: #eeeeee; } .nav > li > a > img { max-width: none; } .nav > .pull-right { float: right; } .nav-header { display: block; padding: 3px 15px; font-size: 11px; font-weight: bold; line-height: 20px; color: #999999; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); text-transform: uppercase; } .nav li + .nav-header { margin-top: 9px; } .nav-list { padding-left: 15px; padding-right: 15px; margin-bottom: 0; } .nav-list > li > a, .nav-list .nav-header { margin-left: -15px; margin-right: -15px; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); } .nav-list > li > a { padding: 3px 15px; } .nav-list > .active > a, .nav-list > .active > a:hover, .nav-list > .active > a:focus { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); background-color: #715458; } .nav-list [class^="icon-"], .nav-list [class*=" icon-"] { margin-right: 2px; } .nav-list .divider { *width: 100%; height: 1px; margin: 9px 1px; *margin: -5px 0 5px; overflow: hidden; background-color: #e5e5e5; border-bottom: 1px solid #ffffff; } .nav-tabs, .nav-pills { *zoom: 1; } .nav-tabs:before, .nav-pills:before, .nav-tabs:after, .nav-pills:after { display: table; content: ""; line-height: 0; } .nav-tabs:after, .nav-pills:after { clear: both; } .nav-tabs > li, .nav-pills > li { float: left; } .nav-tabs > li > a, .nav-pills > li > a { padding-right: 12px; padding-left: 12px; margin-right: 2px; line-height: 14px; } .nav-tabs { border-bottom: 1px solid #ddd; } .nav-tabs > li { margin-bottom: -1px; } .nav-tabs > li > a { padding-top: 8px; padding-bottom: 8px; line-height: 20px; border: 1px solid transparent; -<API key>: 4px 4px 0 0; -moz-border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0; } .nav-tabs > li > a:hover, .nav-tabs > li > a:focus { border-color: #eeeeee #eeeeee #dddddd; } .nav-tabs > .active > a, .nav-tabs > .active > a:hover, .nav-tabs > .active > a:focus { color: #555555; background-color: #c5ad91; border: 1px solid #ddd; border-bottom-color: transparent; cursor: default; } .nav-pills > li > a { padding-top: 8px; padding-bottom: 8px; margin-top: 2px; margin-bottom: 2px; -<API key>: 5px; -moz-border-radius: 5px; border-radius: 5px; } .nav-pills > .active > a, .nav-pills > .active > a:hover, .nav-pills > .active > a:focus { color: #ffffff; background-color: #715458; } .nav-stacked > li { float: none; } .nav-stacked > li > a { margin-right: 0; } .nav-tabs.nav-stacked { border-bottom: 0; } .nav-tabs.nav-stacked > li > a { border: 1px solid #ddd; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .nav-tabs.nav-stacked > li:first-child > a { -<API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .nav-tabs.nav-stacked > li:last-child > a { -<API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .nav-tabs.nav-stacked > li > a:hover, .nav-tabs.nav-stacked > li > a:focus { border-color: #ddd; z-index: 2; } .nav-pills.nav-stacked > li > a { margin-bottom: 3px; } .nav-pills.nav-stacked > li:last-child > a { margin-bottom: 1px; } .nav-tabs .dropdown-menu { -<API key>: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; } .nav-pills .dropdown-menu { -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; } .nav .dropdown-toggle .caret { border-top-color: #715458; border-bottom-color: #715458; margin-top: 6px; } .nav .dropdown-toggle:hover .caret, .nav .dropdown-toggle:focus .caret { border-top-color: #ca3308; border-bottom-color: #ca3308; } /* move down carets for tabs */ .nav-tabs .dropdown-toggle .caret { margin-top: 8px; } .nav .active .dropdown-toggle .caret { border-top-color: #fff; border-bottom-color: #fff; } .nav-tabs .active .dropdown-toggle .caret { border-top-color: #555555; border-bottom-color: #555555; } .nav > .dropdown.active > a:hover, .nav > .dropdown.active > a:focus { cursor: pointer; } .nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > li.dropdown.open.active > a:hover, .nav > li.dropdown.open.active > a:focus { color: #ffffff; background-color: #999999; border-color: #999999; } .nav li.dropdown.open .caret, .nav li.dropdown.open.active .caret, .nav li.dropdown.open a:hover .caret, .nav li.dropdown.open a:focus .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; opacity: 1; filter: alpha(opacity=100); } .tabs-stacked .open > a:hover, .tabs-stacked .open > a:focus { border-color: #999999; } .tabbable { *zoom: 1; } .tabbable:before, .tabbable:after { display: table; content: ""; line-height: 0; } .tabbable:after { clear: both; } .tab-content { overflow: auto; } .tabs-below > .nav-tabs, .tabs-right > .nav-tabs, .tabs-left > .nav-tabs { border-bottom: 0; } .tab-content > .tab-pane, .pill-content > .pill-pane { display: none; } .tab-content > .active, .pill-content > .active { display: block; } .tabs-below > .nav-tabs { border-top: 1px solid #ddd; } .tabs-below > .nav-tabs > li { margin-top: -1px; margin-bottom: 0; } .tabs-below > .nav-tabs > li > a { -<API key>: 0 0 4px 4px; -moz-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; } .tabs-below > .nav-tabs > li > a:hover, .tabs-below > .nav-tabs > li > a:focus { border-bottom-color: transparent; border-top-color: #ddd; } .tabs-below > .nav-tabs > .active > a, .tabs-below > .nav-tabs > .active > a:hover, .tabs-below > .nav-tabs > .active > a:focus { border-color: transparent #ddd #ddd #ddd; } .tabs-left > .nav-tabs > li, .tabs-right > .nav-tabs > li { float: none; } .tabs-left > .nav-tabs > li > a, .tabs-right > .nav-tabs > li > a { min-width: 74px; margin-right: 0; margin-bottom: 3px; } .tabs-left > .nav-tabs { float: left; margin-right: 19px; border-right: 1px solid #ddd; } .tabs-left > .nav-tabs > li > a { margin-right: -1px; -<API key>: 4px 0 0 4px; -moz-border-radius: 4px 0 0 4px; border-radius: 4px 0 0 4px; } .tabs-left > .nav-tabs > li > a:hover, .tabs-left > .nav-tabs > li > a:focus { border-color: #eeeeee #dddddd #eeeeee #eeeeee; } .tabs-left > .nav-tabs .active > a, .tabs-left > .nav-tabs .active > a:hover, .tabs-left > .nav-tabs .active > a:focus { border-color: #ddd transparent #ddd #ddd; *border-right-color: #ffffff; } .tabs-right > .nav-tabs { float: right; margin-left: 19px; border-left: 1px solid #ddd; } .tabs-right > .nav-tabs > li > a { margin-left: -1px; -<API key>: 0 4px 4px 0; -moz-border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0; } .tabs-right > .nav-tabs > li > a:hover, .tabs-right > .nav-tabs > li > a:focus { border-color: #eeeeee #eeeeee #eeeeee #dddddd; } .tabs-right > .nav-tabs .active > a, .tabs-right > .nav-tabs .active > a:hover, .tabs-right > .nav-tabs .active > a:focus { border-color: #ddd #ddd #ddd transparent; *border-left-color: #ffffff; } .nav > .disabled > a { color: #999999; } .nav > .disabled > a:hover, .nav > .disabled > a:focus { text-decoration: none; background-color: transparent; cursor: default; } .navbar { overflow: visible; margin-bottom: 20px; *position: relative; *z-index: 2; } .navbar-inner { min-height: 40px; padding-left: 20px; padding-right: 20px; background-color: #160902; background-image: -moz-linear-gradient(top, #000000, #371605); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#000000), to(#371605)); background-image: -<API key>(top, #000000, #371605); background-image: -o-linear-gradient(top, #000000, #371605); background-image: linear-gradient(to bottom, #000000, #371605); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff000000', endColorstr='#ff371605', GradientType=0); border: 1px solid #000000; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); *zoom: 1; } .navbar-inner:before, .navbar-inner:after { display: table; content: ""; line-height: 0; } .navbar-inner:after { clear: both; } .navbar .container { width: auto; } .nav-collapse.collapse { height: auto; overflow: visible; } .navbar .brand { float: left; display: block; padding: 10px 20px 10px; margin-left: -20px; font-size: 20px; font-weight: 200; color: #bb844e; text-shadow: 0 1px 0 #000000; } .navbar .brand:hover, .navbar .brand:focus { text-decoration: none; } .navbar-text { margin-bottom: 0; line-height: 40px; color: #bb844e; } .navbar-link { color: #bb844e; } .navbar-link:hover, .navbar-link:focus { color: #c5ad91; } .navbar .divider-vertical { height: 40px; margin: 0 9px; border-left: 1px solid #371605; border-right: 1px solid #000000; } .navbar .btn, .navbar .btn-group { margin-top: 5px; } .navbar .btn-group .btn, .navbar .input-prepend .btn, .navbar .input-append .btn, .navbar .input-prepend .btn-group, .navbar .input-append .btn-group { margin-top: 0; } .navbar-form { margin-bottom: 0; *zoom: 1; } .navbar-form:before, .navbar-form:after { display: table; content: ""; line-height: 0; } .navbar-form:after { clear: both; } .navbar-form input, .navbar-form select, .navbar-form .radio, .navbar-form .checkbox { margin-top: 5px; } .navbar-form input, .navbar-form select, .navbar-form .btn { display: inline-block; margin-bottom: 0; } .navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] { margin-top: 3px; } .navbar-form .input-append, .navbar-form .input-prepend { margin-top: 5px; white-space: nowrap; } .navbar-form .input-append input, .navbar-form .input-prepend input { margin-top: 0; } .navbar-search { position: relative; float: left; margin-top: 5px; margin-bottom: 0; } .navbar-search .search-query { margin-bottom: 0; padding: 4px 14px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-weight: normal; line-height: 1; -<API key>: 15px; -moz-border-radius: 15px; border-radius: 15px; } .navbar-static-top { position: static; margin-bottom: 0; } .navbar-static-top .navbar-inner { -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .navbar-fixed-top, .navbar-fixed-bottom { position: fixed; right: 0; left: 0; z-index: 1030; margin-bottom: 0; } .navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner { border-width: 0 0 1px; } .navbar-fixed-bottom .navbar-inner { border-width: 1px 0 0; } .navbar-fixed-top .navbar-inner, .navbar-fixed-bottom .navbar-inner { padding-left: 0; padding-right: 0; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; } .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 940px; } .navbar-fixed-top { top: 0; } .navbar-fixed-top .navbar-inner, .navbar-static-top .navbar-inner { -webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1); -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1); box-shadow: 0 1px 10px rgba(0,0,0,.1); } .navbar-fixed-bottom { bottom: 0; } .navbar-fixed-bottom .navbar-inner { -webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1); -moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1); box-shadow: 0 -1px 10px rgba(0,0,0,.1); } .navbar .nav { position: relative; left: 0; display: block; float: left; margin: 0 10px 0 0; } .navbar .nav.pull-right { float: right; margin-right: 0; } .navbar .nav > li { float: left; } .navbar .nav > li > a { float: none; padding: 10px 15px 10px; color: #bb844e; text-decoration: none; text-shadow: 0 1px 0 #000000; } .navbar .nav .dropdown-toggle .caret { margin-top: 8px; } .navbar .nav > li > a:focus, .navbar .nav > li > a:hover { background-color: transparent; color: #c5ad91; text-decoration: none; } .navbar .nav > .active > a, .navbar .nav > .active > a:hover, .navbar .nav > .active > a:focus { color: #371605; text-decoration: none; background-color: #bb844e; -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); } .navbar .btn-navbar { display: none; float: right; padding: 7px 10px; margin-left: 5px; margin-right: 5px; color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #0d0501; background-image: -moz-linear-gradient(top, #000000, #200d03); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#000000), to(#200d03)); background-image: -<API key>(top, #000000, #200d03); background-image: -o-linear-gradient(top, #000000, #200d03); background-image: linear-gradient(to bottom, #000000, #200d03); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff000000', endColorstr='#ff200d03', GradientType=0); border-color: #200d03 #200d03 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #200d03; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); } .navbar .btn-navbar:hover, .navbar .btn-navbar:focus, .navbar .btn-navbar:active, .navbar .btn-navbar.active, .navbar .btn-navbar.disabled, .navbar .btn-navbar[disabled] { color: #ffffff; background-color: #200d03; *background-color: #080301; } .navbar .btn-navbar:active, .navbar .btn-navbar.active { background-color: #000000 \9; } .navbar .btn-navbar .icon-bar { display: block; width: 18px; height: 2px; background-color: #f5f5f5; -<API key>: 1px; -moz-border-radius: 1px; border-radius: 1px; -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); } .btn-navbar .icon-bar + .icon-bar { margin-top: 3px; } .navbar .nav > li > .dropdown-menu:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #ccc; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; top: -7px; left: 9px; } .navbar .nav > li > .dropdown-menu:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #c5ad91; position: absolute; top: -6px; left: 10px; } .navbar-fixed-bottom .nav > li > .dropdown-menu:before { border-top: 7px solid #ccc; border-top-color: rgba(0, 0, 0, 0.2); border-bottom: 0; bottom: -7px; top: auto; } .navbar-fixed-bottom .nav > li > .dropdown-menu:after { border-top: 6px solid #c5ad91; border-bottom: 0; bottom: -6px; top: auto; } .navbar .nav li.dropdown > a:hover .caret, .navbar .nav li.dropdown > a:focus .caret { border-top-color: #c5ad91; border-bottom-color: #c5ad91; } .navbar .nav li.dropdown.open > .dropdown-toggle, .navbar .nav li.dropdown.active > .dropdown-toggle, .navbar .nav li.dropdown.open.active > .dropdown-toggle { background-color: #bb844e; color: #371605; } .navbar .nav li.dropdown > .dropdown-toggle .caret { border-top-color: #bb844e; border-bottom-color: #bb844e; } .navbar .nav li.dropdown.open > .dropdown-toggle .caret, .navbar .nav li.dropdown.active > .dropdown-toggle .caret, .navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { border-top-color: #371605; border-bottom-color: #371605; } .navbar .pull-right > li > .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right { left: auto; right: 0; } .navbar .pull-right > li > .dropdown-menu:before, .navbar .nav > li > .dropdown-menu.pull-right:before { left: auto; right: 12px; } .navbar .pull-right > li > .dropdown-menu:after, .navbar .nav > li > .dropdown-menu.pull-right:after { left: auto; right: 13px; } .navbar .pull-right > li > .dropdown-menu .dropdown-menu, .navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { left: auto; right: 100%; margin-left: 0; margin-right: -1px; -<API key>: 6px 0 6px 6px; -moz-border-radius: 6px 0 6px 6px; border-radius: 6px 0 6px 6px; } .navbar-inverse .navbar-inner { background-color: #1b1b1b; background-image: -moz-linear-gradient(top, #222222, #111111); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); background-image: -<API key>(top, #222222, #111111); background-image: -o-linear-gradient(top, #222222, #111111); background-image: linear-gradient(to bottom, #222222, #111111); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); border-color: #252525; } .navbar-inverse .brand, .navbar-inverse .nav > li > a { color: #999999; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .navbar-inverse .brand:hover, .navbar-inverse .nav > li > a:hover, .navbar-inverse .brand:focus, .navbar-inverse .nav > li > a:focus { color: #ffffff; } .navbar-inverse .brand { color: #999999; } .navbar-inverse .navbar-text { color: #999999; } .navbar-inverse .nav > li > a:focus, .navbar-inverse .nav > li > a:hover { background-color: transparent; color: #ffffff; } .navbar-inverse .nav .active > a, .navbar-inverse .nav .active > a:hover, .navbar-inverse .nav .active > a:focus { color: #ffffff; background-color: #111111; } .navbar-inverse .navbar-link { color: #999999; } .navbar-inverse .navbar-link:hover, .navbar-inverse .navbar-link:focus { color: #ffffff; } .navbar-inverse .divider-vertical { border-left-color: #111111; border-right-color: #222222; } .navbar-inverse .nav li.dropdown.open > .dropdown-toggle, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { background-color: #111111; color: #ffffff; } .navbar-inverse .nav li.dropdown > a:hover .caret, .navbar-inverse .nav li.dropdown > a:focus .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { border-top-color: #999999; border-bottom-color: #999999; } .navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { border-top-color: #ffffff; border-bottom-color: #ffffff; } .navbar-inverse .navbar-search .search-query { color: #ffffff; background-color: #515151; border-color: #111111; -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); -webkit-transition: none; -moz-transition: none; -o-transition: none; transition: none; } .navbar-inverse .navbar-search .search-query:-moz-placeholder { color: #cccccc; } .navbar-inverse .navbar-search .search-query:-<API key> { color: #cccccc; } .navbar-inverse .navbar-search .search-query::-<API key> { color: #cccccc; } .navbar-inverse .navbar-search .search-query:focus, .navbar-inverse .navbar-search .search-query.focused { padding: 5px 15px; color: #333333; text-shadow: 0 1px 0 #ffffff; background-color: #ffffff; border: 0; -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); outline: 0; } .navbar-inverse .btn-navbar { color: #ffffff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #0e0e0e; background-image: -moz-linear-gradient(top, #151515, #040404); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); background-image: -<API key>(top, #151515, #040404); background-image: -o-linear-gradient(top, #151515, #040404); background-image: linear-gradient(to bottom, #151515, #040404); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); border-color: #040404 #040404 #000000; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); *background-color: #040404; /* Darken IE7 buttons by default so they stand out more given they won't have borders */ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); } .navbar-inverse .btn-navbar:hover, .navbar-inverse .btn-navbar:focus, .navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active, .navbar-inverse .btn-navbar.disabled, .navbar-inverse .btn-navbar[disabled] { color: #ffffff; background-color: #040404; *background-color: #000000; } .navbar-inverse .btn-navbar:active, .navbar-inverse .btn-navbar.active { background-color: #000000 \9; } .breadcrumb { padding: 8px 15px; margin: 0 0 20px; list-style: none; background-color: #f5f5f5; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .breadcrumb > li { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; text-shadow: 0 1px 0 #ffffff; } .breadcrumb > li > .divider { padding: 0 5px; color: #ccc; } .breadcrumb > .active { color: #999999; } .pagination { margin: 20px 0; } .pagination ul { display: inline-block; *display: inline; /* IE7 inline-block hack */ *zoom: 1; margin-left: 0; margin-bottom: 0; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); } .pagination ul > li { display: inline; } .pagination ul > li > a, .pagination ul > li > span { float: left; padding: 4px 12px; line-height: 20px; text-decoration: none; background-color: #ffffff; border: 1px solid #dddddd; border-left-width: 0; } .pagination ul > li > a:hover, .pagination ul > li > a:focus, .pagination ul > .active > a, .pagination ul > .active > span { background-color: #f5f5f5; } .pagination ul > .active > a, .pagination ul > .active > span { color: #999999; cursor: default; } .pagination ul > .disabled > span, .pagination ul > .disabled > a, .pagination ul > .disabled > a:hover, .pagination ul > .disabled > a:focus { color: #999999; background-color: transparent; cursor: default; } .pagination ul > li:first-child > a, .pagination ul > li:first-child > span { border-left-width: 1px; -<API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .pagination ul > li:last-child > a, .pagination ul > li:last-child > span { -<API key>: 4px; -<API key>: 4px; <API key>: 4px; -<API key>: 4px; -<API key>: 4px; <API key>: 4px; } .pagination-centered { text-align: center; } .pagination-right { text-align: right; } .pagination-large ul > li > a, .pagination-large ul > li > span { padding: 11px 19px; font-size: 17.5px; } .pagination-large ul > li:first-child > a, .pagination-large ul > li:first-child > span { -<API key>: 6px; -<API key>: 6px; <API key>: 6px; -<API key>: 6px; -<API key>: 6px; <API key>: 6px; } .pagination-large ul > li:last-child > a, .pagination-large ul > li:last-child > span { -<API key>: 6px; -<API key>: 6px; <API key>: 6px; -<API key>: 6px; -<API key>: 6px; <API key>: 6px; } .pagination-mini ul > li:first-child > a, .pagination-small ul > li:first-child > a, .pagination-mini ul > li:first-child > span, .pagination-small ul > li:first-child > span { -<API key>: 3px; -<API key>: 3px; <API key>: 3px; -<API key>: 3px; -<API key>: 3px; <API key>: 3px; } .pagination-mini ul > li:last-child > a, .pagination-small ul > li:last-child > a, .pagination-mini ul > li:last-child > span, .pagination-small ul > li:last-child > span { -<API key>: 3px; -<API key>: 3px; <API key>: 3px; -<API key>: 3px; -<API key>: 3px; <API key>: 3px; } .pagination-small ul > li > a, .pagination-small ul > li > span { padding: 2px 10px; font-size: 11.9px; } .pagination-mini ul > li > a, .pagination-mini ul > li > span { padding: 0 6px; font-size: 10.5px; } .pager { margin: 20px 0; list-style: none; text-align: center; *zoom: 1; } .pager:before, .pager:after { display: table; content: ""; line-height: 0; } .pager:after { clear: both; } .pager li { display: inline; } .pager li > a, .pager li > span { display: inline-block; padding: 5px 14px; background-color: #fff; border: 1px solid #ddd; -<API key>: 15px; -moz-border-radius: 15px; border-radius: 15px; } .pager li > a:hover, .pager li > a:focus { text-decoration: none; background-color: #f5f5f5; } .pager .next > a, .pager .next > span { float: right; } .pager .previous > a, .pager .previous > span { float: left; } .pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > a:focus, .pager .disabled > span { color: #999999; background-color: #fff; cursor: default; } .thumbnails { margin-left: -20px; list-style: none; *zoom: 1; } .thumbnails:before, .thumbnails:after { display: table; content: ""; line-height: 0; } .thumbnails:after { clear: both; } .row-fluid .thumbnails { margin-left: 0; } .thumbnails > li { float: left; margin-bottom: 20px; margin-left: 20px; } .thumbnail { display: block; padding: 4px; line-height: 20px; border: 1px solid #ddd; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; } a.thumbnail:hover, a.thumbnail:focus { border-color: #715458; -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); } .thumbnail > img { display: block; max-width: 100%; margin-left: auto; margin-right: auto; } .thumbnail .caption { padding: 9px; color: #555555; } .alert { padding: 8px 35px 8px 14px; margin-bottom: 20px; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); background-color: #fcf8e3; border: 1px solid #fbeed5; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .alert, .alert h4 { color: #c09853; } .alert h4 { margin: 0; } .alert .close { position: relative; top: -2px; right: -21px; line-height: 20px; } .alert-success { background-color: #dff0d8; border-color: #d6e9c6; color: #468847; } .alert-success h4 { color: #468847; } .alert-danger, .alert-error { background-color: #f2dede; border-color: #eed3d7; color: #b94a48; } .alert-danger h4, .alert-error h4 { color: #b94a48; } .alert-info { background-color: #d9edf7; border-color: #bce8f1; color: #3a87ad; } .alert-info h4 { color: #3a87ad; } .alert-block { padding-top: 14px; padding-bottom: 14px; } .alert-block > p, .alert-block > ul { margin-bottom: 0; } .alert-block p + p { margin-top: 5px; } @-webkit-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @-moz-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @-ms-keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } @-o-keyframes <API key> { from { background-position: 0 0; } to { background-position: 40px 0; } } @keyframes <API key> { from { background-position: 40px 0; } to { background-position: 0 0; } } .progress { overflow: hidden; height: 20px; margin-bottom: 20px; background-color: #f7f7f7; background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); background-image: -<API key>(top, #f5f5f5, #f9f9f9); background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .progress .bar { width: 0%; height: 100%; color: #ffffff; float: left; font-size: 12px; text-align: center; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #0e90d2; background-image: -moz-linear-gradient(top, #149bdf, #0480be); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); background-image: -<API key>(top, #149bdf, #0480be); background-image: -o-linear-gradient(top, #149bdf, #0480be); background-image: linear-gradient(to bottom, #149bdf, #0480be); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-transition: width 0.6s ease; -moz-transition: width 0.6s ease; -o-transition: width 0.6s ease; transition: width 0.6s ease; } .progress .bar + .bar { -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); } .progress-striped .bar { background-color: #149bdf; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -<API key>: 40px 40px; -moz-background-size: 40px 40px; -o-background-size: 40px 40px; background-size: 40px 40px; } .progress.active .bar { -webkit-animation: <API key> 2s linear infinite; -moz-animation: <API key> 2s linear infinite; -ms-animation: <API key> 2s linear infinite; -o-animation: <API key> 2s linear infinite; animation: <API key> 2s linear infinite; } .progress-danger .bar, .progress .bar-danger { background-color: #dd514c; background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); background-image: -<API key>(top, #ee5f5b, #c43c35); background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); } .progress-danger.progress-striped .bar, .progress-striped .bar-danger { background-color: #ee5f5b; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-success .bar, .progress .bar-success { background-color: #5eb95e; background-image: -moz-linear-gradient(top, #62c462, #57a957); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); background-image: -<API key>(top, #62c462, #57a957); background-image: -o-linear-gradient(top, #62c462, #57a957); background-image: linear-gradient(to bottom, #62c462, #57a957); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); } .progress-success.progress-striped .bar, .progress-striped .bar-success { background-color: #62c462; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-info .bar, .progress .bar-info { background-color: #4bb1cf; background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); background-image: -<API key>(top, #5bc0de, #339bb9); background-image: -o-linear-gradient(top, #5bc0de, #339bb9); background-image: linear-gradient(to bottom, #5bc0de, #339bb9); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); } .progress-info.progress-striped .bar, .progress-striped .bar-info { background-color: #5bc0de; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-warning .bar, .progress .bar-warning { background-color: #fdb033; background-image: -moz-linear-gradient(top, #fdbc52, #fc9f06); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdbc52), to(#fc9f06)); background-image: -<API key>(top, #fdbc52, #fc9f06); background-image: -o-linear-gradient(top, #fdbc52, #fc9f06); background-image: linear-gradient(to bottom, #fdbc52, #fc9f06); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdbc52', endColorstr='#fffc9f06', GradientType=0); } .progress-warning.progress-striped .bar, .progress-striped .bar-warning { background-color: #fdbc52; background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .hero-unit { padding: 60px; margin-bottom: 30px; font-size: 18px; font-weight: 200; line-height: 30px; color: inherit; background-color: #bb844e; -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; } .hero-unit h1 { margin-bottom: 0; font-size: 60px; line-height: 1; color: inherit; letter-spacing: -1px; } .hero-unit li { line-height: 30px; } .media, .media-body { overflow: hidden; *overflow: visible; zoom: 1; } .media, .media .media { margin-top: 15px; } .media:first-child { margin-top: 0; } .media-object { display: block; } .media-heading { margin: 0 0 5px; } .media > .pull-left { margin-right: 10px; } .media > .pull-right { margin-left: 10px; } .media-list { margin-left: 0; list-style: none; } .tooltip { position: absolute; z-index: 1030; display: block; visibility: visible; font-size: 11px; line-height: 1.4; opacity: 0; filter: alpha(opacity=0); } .tooltip.in { opacity: 0.8; filter: alpha(opacity=80); } .tooltip.top { margin-top: -3px; padding: 5px 0; } .tooltip.right { margin-left: 3px; padding: 0 5px; } .tooltip.bottom { margin-top: 3px; padding: 5px 0; } .tooltip.left { margin-left: -3px; padding: 0 5px; } .tooltip-inner { max-width: 200px; padding: 8px; color: #ffffff; text-align: center; text-decoration: none; background-color: #000000; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } .tooltip.top .tooltip-arrow { bottom: 0; left: 50%; margin-left: -5px; border-width: 5px 5px 0; border-top-color: #000000; } .tooltip.right .tooltip-arrow { top: 50%; left: 0; margin-top: -5px; border-width: 5px 5px 5px 0; border-right-color: #000000; } .tooltip.left .tooltip-arrow { top: 50%; right: 0; margin-top: -5px; border-width: 5px 0 5px 5px; border-left-color: #000000; } .tooltip.bottom .tooltip-arrow { top: 0; left: 50%; margin-left: -5px; border-width: 0 5px 5px; border-bottom-color: #000000; } .popover { position: absolute; top: 0; left: 0; z-index: 1010; display: none; max-width: 276px; padding: 1px; text-align: left; background-color: #ffffff; -<API key>: padding-box; -moz-background-clip: padding; background-clip: padding-box; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); white-space: normal; } .popover.top { margin-top: -10px; } .popover.right { margin-left: 10px; } .popover.bottom { margin-top: 10px; } .popover.left { margin-left: -10px; } .popover-title { margin: 0; padding: 8px 14px; font-size: 14px; font-weight: normal; line-height: 18px; background-color: #f7f7f7; border-bottom: 1px solid #ebebeb; -<API key>: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0; } .popover-title:empty { display: none; } .popover-content { padding: 9px 14px; } .popover .arrow, .popover .arrow:after { position: absolute; display: block; width: 0; height: 0; border-color: transparent; border-style: solid; } .popover .arrow { border-width: 11px; } .popover .arrow:after { border-width: 10px; content: ""; } .popover.top .arrow { left: 50%; margin-left: -11px; border-bottom-width: 0; border-top-color: #999; border-top-color: rgba(0, 0, 0, 0.25); bottom: -11px; } .popover.top .arrow:after { bottom: 1px; margin-left: -10px; border-bottom-width: 0; border-top-color: #ffffff; } .popover.right .arrow { top: 50%; left: -11px; margin-top: -11px; border-left-width: 0; border-right-color: #999; border-right-color: rgba(0, 0, 0, 0.25); } .popover.right .arrow:after { left: 1px; bottom: -10px; border-left-width: 0; border-right-color: #ffffff; } .popover.bottom .arrow { left: 50%; margin-left: -11px; border-top-width: 0; border-bottom-color: #999; border-bottom-color: rgba(0, 0, 0, 0.25); top: -11px; } .popover.bottom .arrow:after { top: 1px; margin-left: -10px; border-top-width: 0; border-bottom-color: #ffffff; } .popover.left .arrow { top: 50%; right: -11px; margin-top: -11px; border-right-width: 0; border-left-color: #999; border-left-color: rgba(0, 0, 0, 0.25); } .popover.left .arrow:after { right: 1px; border-right-width: 0; border-left-color: #ffffff; bottom: -10px; } .modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1040; background-color: #000000; } .modal-backdrop.fade { opacity: 0; } .modal-backdrop, .modal-backdrop.fade.in { opacity: 0.8; filter: alpha(opacity=80); } .modal { position: fixed; top: 10%; left: 50%; z-index: 1050; width: 560px; margin-left: -280px; background-color: #ffffff; border: 1px solid #999; border: 1px solid rgba(0, 0, 0, 0.3); *border: 1px solid #999; /* IE6-7 */ -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -<API key>: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; outline: none; } .modal.fade { -webkit-transition: opacity .3s linear, top .3s ease-out; -moz-transition: opacity .3s linear, top .3s ease-out; -o-transition: opacity .3s linear, top .3s ease-out; transition: opacity .3s linear, top .3s ease-out; top: -25%; } .modal.fade.in { top: 10%; } .modal-header { padding: 9px 15px; border-bottom: 1px solid #eee; } .modal-header .close { margin-top: 2px; } .modal-header h3 { margin: 0; line-height: 30px; } .modal-body { position: relative; overflow-y: auto; max-height: 400px; padding: 15px; } .modal-form { margin-bottom: 0; } .modal-footer { padding: 14px 15px 15px; margin-bottom: 0; text-align: right; background-color: #f5f5f5; border-top: 1px solid #ddd; -<API key>: 0 0 6px 6px; -moz-border-radius: 0 0 6px 6px; border-radius: 0 0 6px 6px; -webkit-box-shadow: inset 0 1px 0 #ffffff; -moz-box-shadow: inset 0 1px 0 #ffffff; box-shadow: inset 0 1px 0 #ffffff; *zoom: 1; } .modal-footer:before, .modal-footer:after { display: table; content: ""; line-height: 0; } .modal-footer:after { clear: both; } .modal-footer .btn + .btn { margin-left: 5px; margin-bottom: 0; } .modal-footer .btn-group .btn + .btn { margin-left: -1px; } .modal-footer .btn-block + .btn-block { margin-left: 0; } .dropup, .dropdown { position: relative; } .dropdown-toggle { *margin-bottom: -3px; } .dropdown-toggle:active, .open .dropdown-toggle { outline: 0; } .caret { display: inline-block; width: 0; height: 0; vertical-align: top; border-top: 4px solid #000000; border-right: 4px solid transparent; border-left: 4px solid transparent; content: ""; } .dropdown .caret { margin-top: 8px; margin-left: 2px; } .dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 1000; display: none; float: left; min-width: 160px; padding: 5px 0; margin: 2px 0 0; list-style: none; background-color: #c5ad91; border: 1px solid #ccc; border: 1px solid rgba(0, 0, 0, 0.2); *border-right-width: 2px; *border-bottom-width: 2px; -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); -<API key>: padding-box; -moz-background-clip: padding; background-clip: padding-box; } .dropdown-menu.pull-right { right: 0; left: auto; } .dropdown-menu .divider { *width: 100%; height: 1px; margin: 9px 1px; *margin: -5px 0 5px; overflow: hidden; background-color: #e5e5e5; border-bottom: 1px solid #ffffff; } .dropdown-menu > li > a { display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 20px; color: #715458; white-space: nowrap; } .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus, .dropdown-submenu:hover > a, .dropdown-submenu:focus > a { text-decoration: none; color: #c5ad91; background-color: #6b5053; background-image: -moz-linear-gradient(top, #715458, #62494d); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#715458), to(#62494d)); background-image: -<API key>(top, #715458, #62494d); background-image: -o-linear-gradient(top, #715458, #62494d); background-image: linear-gradient(to bottom, #715458, #62494d); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff715458', endColorstr='#ff62494d', GradientType=0); } .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { color: #ffffff; text-decoration: none; outline: 0; background-color: #6b5053; background-image: -moz-linear-gradient(top, #715458, #62494d); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#715458), to(#62494d)); background-image: -<API key>(top, #715458, #62494d); background-image: -o-linear-gradient(top, #715458, #62494d); background-image: linear-gradient(to bottom, #715458, #62494d); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff715458', endColorstr='#ff62494d', GradientType=0); } .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { color: #999999; } .dropdown-menu > .disabled > a:hover, .dropdown-menu > .disabled > a:focus { text-decoration: none; background-color: transparent; background-image: none; filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); cursor: default; } .open { *z-index: 1000; } .open > .dropdown-menu { display: block; } .dropdown-backdrop { position: fixed; left: 0; right: 0; bottom: 0; top: 0; z-index: 990; } .pull-right > .dropdown-menu { right: 0; left: auto; } .dropup .caret, .navbar-fixed-bottom .dropdown .caret { border-top: 0; border-bottom: 4px solid #000000; content: ""; } .dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu { top: auto; bottom: 100%; margin-bottom: 1px; } .dropdown-submenu { position: relative; } .dropdown-submenu > .dropdown-menu { top: 0; left: 100%; margin-top: -6px; margin-left: -1px; -<API key>: 0 6px 6px 6px; -moz-border-radius: 0 6px 6px 6px; border-radius: 0 6px 6px 6px; } .dropdown-submenu:hover > .dropdown-menu { display: block; } .dropup .dropdown-submenu > .dropdown-menu { top: auto; bottom: 0; margin-top: 0; margin-bottom: -2px; -<API key>: 5px 5px 5px 0; -moz-border-radius: 5px 5px 5px 0; border-radius: 5px 5px 5px 0; } .dropdown-submenu > a:after { display: block; content: " "; float: right; width: 0; height: 0; border-color: transparent; border-style: solid; border-width: 5px 0 5px 5px; border-left-color: #9d7b53; margin-top: 5px; margin-right: -10px; } .dropdown-submenu:hover > a:after { border-left-color: #c5ad91; } .dropdown-submenu.pull-left { float: none; } .dropdown-submenu.pull-left > .dropdown-menu { left: -100%; margin-left: 10px; -<API key>: 6px 0 6px 6px; -moz-border-radius: 6px 0 6px 6px; border-radius: 6px 0 6px 6px; } .dropdown .dropdown-menu .nav-header { padding-left: 20px; padding-right: 20px; } .typeahead { z-index: 1051; margin-top: 2px; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .accordion { margin-bottom: 20px; } .accordion-group { margin-bottom: 2px; border: 1px solid #e5e5e5; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .accordion-heading { border-bottom: 0; } .accordion-heading .accordion-toggle { display: block; padding: 8px 15px; } .accordion-toggle { cursor: pointer; } .accordion-inner { padding: 9px 15px; border-top: 1px solid #e5e5e5; } .carousel { position: relative; margin-bottom: 20px; line-height: 1; } .carousel-inner { overflow: hidden; width: 100%; position: relative; } .carousel-inner > .item { display: none; position: relative; -webkit-transition: 0.6s ease-in-out left; -moz-transition: 0.6s ease-in-out left; -o-transition: 0.6s ease-in-out left; transition: 0.6s ease-in-out left; } .carousel-inner > .item > img, .carousel-inner > .item > a > img { display: block; line-height: 1; } .carousel-inner > .active, .carousel-inner > .next, .carousel-inner > .prev { display: block; } .carousel-inner > .active { left: 0; } .carousel-inner > .next, .carousel-inner > .prev { position: absolute; top: 0; width: 100%; } .carousel-inner > .next { left: 100%; } .carousel-inner > .prev { left: -100%; } .carousel-inner > .next.left, .carousel-inner > .prev.right { left: 0; } .carousel-inner > .active.left { left: -100%; } .carousel-inner > .active.right { left: 100%; } .carousel-control { position: absolute; top: 40%; left: 15px; width: 40px; height: 40px; margin-top: -20px; font-size: 60px; font-weight: 100; line-height: 30px; color: #ffffff; text-align: center; background: #222222; border: 3px solid #ffffff; -<API key>: 23px; -moz-border-radius: 23px; border-radius: 23px; opacity: 0.5; filter: alpha(opacity=50); } .carousel-control.right { left: auto; right: 15px; } .carousel-control:hover, .carousel-control:focus { color: #ffffff; text-decoration: none; opacity: 0.9; filter: alpha(opacity=90); } .carousel-indicators { position: absolute; top: 15px; right: 15px; z-index: 5; margin: 0; list-style: none; } .carousel-indicators li { display: block; float: left; width: 10px; height: 10px; margin-left: 5px; text-indent: -999px; background-color: #ccc; background-color: rgba(255, 255, 255, 0.25); border-radius: 5px; } .carousel-indicators .active { background-color: #fff; } .carousel-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 15px; background: #333333; background: rgba(0, 0, 0, 0.75); } .carousel-caption h4, .carousel-caption p { color: #ffffff; line-height: 20px; } .carousel-caption h4 { margin: 0 0 5px; } .carousel-caption p { margin-bottom: 0; } .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background-color: #f5f5f5; border: 1px solid #e3e3e3; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); } .well blockquote { border-color: #ddd; border-color: rgba(0, 0, 0, 0.15); } .well-large { padding: 24px; -<API key>: 6px; -moz-border-radius: 6px; border-radius: 6px; } .well-small { padding: 9px; -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; } .close { float: right; font-size: 20px; font-weight: bold; line-height: 20px; color: #000000; text-shadow: 0 1px 0 #ffffff; opacity: 0.2; filter: alpha(opacity=20); } .close:hover, .close:focus { color: #000000; text-decoration: none; cursor: pointer; opacity: 0.4; filter: alpha(opacity=40); } button.close { padding: 0; cursor: pointer; background: transparent; border: 0; -webkit-appearance: none; } .pull-right { float: right; } .pull-left { float: left; } .hide { display: none; } .show { display: block; } .invisible { visibility: hidden; } .affix { position: fixed; } .fade { opacity: 0; -webkit-transition: opacity 0.15s linear; -moz-transition: opacity 0.15s linear; -o-transition: opacity 0.15s linear; transition: opacity 0.15s linear; } .fade.in { opacity: 1; } .collapse { position: relative; height: 0; overflow: hidden; -webkit-transition: height 0.35s ease; -moz-transition: height 0.35s ease; -o-transition: height 0.35s ease; transition: height 0.35s ease; } .collapse.in { height: auto; } @-ms-viewport { width: device-width; } .hidden { display: none; visibility: hidden; } .visible-phone { display: none !important; } .visible-tablet { display: none !important; } .hidden-desktop { display: none !important; } .visible-desktop { display: inherit !important; } @media (min-width: 768px) and (max-width: 979px) { .hidden-desktop { display: inherit !important; } .visible-desktop { display: none !important ; } .visible-tablet { display: inherit !important; } .hidden-tablet { display: none !important; } } @media (max-width: 767px) { .hidden-desktop { display: inherit !important; } .visible-desktop { display: none !important; } .visible-phone { display: inherit !important; } .hidden-phone { display: none !important; } } .visible-print { display: none !important; } @media print { .visible-print { display: inherit !important; } .hidden-print { display: none !important; } } @media (max-width: 767px) { body { padding-left: 20px; padding-right: 20px; } .navbar-fixed-top, .navbar-fixed-bottom, .navbar-static-top { margin-left: -20px; margin-right: -20px; } .container-fluid { padding: 0; } .dl-horizontal dt { float: none; clear: none; width: auto; text-align: left; } .dl-horizontal dd { margin-left: 0; } .container { width: auto; } .row-fluid { width: 100%; } .row, .thumbnails { margin-left: 0; } .thumbnails > li { float: none; margin-left: 0; } [class*="span"], .uneditable-input[class*="span"], .row-fluid [class*="span"] { float: none; display: block; width: 100%; margin-left: 0; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .span12, .row-fluid .span12 { width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .row-fluid [class*="offset"]:first-child { margin-left: 0; } .input-large, .input-xlarge, .input-xxlarge, input[class*="span"], select[class*="span"], textarea[class*="span"], .uneditable-input { display: block; width: 100%; min-height: 30px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .input-prepend input, .input-append input, .input-prepend input[class*="span"], .input-append input[class*="span"] { display: inline-block; width: auto; } .controls-row [class*="span"] + [class*="span"] { margin-left: 0; } .modal { position: fixed; top: 20px; left: 20px; right: 20px; width: auto; margin: 0; } .modal.fade { top: -100px; } .modal.fade.in { top: 20px; } } @media (max-width: 480px) { .nav-collapse { -webkit-transform: translate3d(0, 0, 0); } .page-header h1 small { display: block; line-height: 20px; } input[type="checkbox"], input[type="radio"] { border: 1px solid #ccc; } .form-horizontal .control-label { float: none; width: auto; padding-top: 0; text-align: left; } .form-horizontal .controls { margin-left: 0; } .form-horizontal .control-list { padding-top: 0; } .form-horizontal .form-actions { padding-left: 10px; padding-right: 10px; } .media .pull-left, .media .pull-right { float: none; display: block; margin-bottom: 10px; } .media-object { margin-right: 0; margin-left: 0; } .modal { top: 10px; left: 10px; right: 10px; } .modal-header .close { padding: 10px; margin: -10px; } .carousel-caption { position: static; } } @media (min-width: 768px) and (max-width: 979px) { .row { margin-left: -20px; *zoom: 1; } .row:before, .row:after { display: table; content: ""; line-height: 0; } .row:after { clear: both; } [class*="span"] { float: left; min-height: 1px; margin-left: 20px; } .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 724px; } .span12 { width: 724px; } .span11 { width: 662px; } .span10 { width: 600px; } .span9 { width: 538px; } .span8 { width: 476px; } .span7 { width: 414px; } .span6 { width: 352px; } .span5 { width: 290px; } .span4 { width: 228px; } .span3 { width: 166px; } .span2 { width: 104px; } .span1 { width: 42px; } .offset12 { margin-left: 764px; } .offset11 { margin-left: 702px; } .offset10 { margin-left: 640px; } .offset9 { margin-left: 578px; } .offset8 { margin-left: 516px; } .offset7 { margin-left: 454px; } .offset6 { margin-left: 392px; } .offset5 { margin-left: 330px; } .offset4 { margin-left: 268px; } .offset3 { margin-left: 206px; } .offset2 { margin-left: 144px; } .offset1 { margin-left: 82px; } .row-fluid { width: 100%; *zoom: 1; } .row-fluid:before, .row-fluid:after { display: table; content: ""; line-height: 0; } .row-fluid:after { clear: both; } .row-fluid [class*="span"] { display: block; width: 100%; min-height: 30px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; float: left; margin-left: 2.7624309392265194%; *margin-left: 2.709239449864817%; } .row-fluid [class*="span"]:first-child { margin-left: 0; } .row-fluid .controls-row [class*="span"] + [class*="span"] { margin-left: 2.7624309392265194%; } .row-fluid .span12 { width: 100%; *width: 99.94680851063829%; } .row-fluid .span11 { width: 91.43646408839778%; *width: 91.38327259903608%; } .row-fluid .span10 { width: 82.87292817679558%; *width: 82.81973668743387%; } .row-fluid .span9 { width: 74.30939226519337%; *width: 74.25620077583166%; } .row-fluid .span8 { width: 65.74585635359117%; *width: 65.69266486422946%; } .row-fluid .span7 { width: 57.18232044198895%; *width: 57.12912895262725%; } .row-fluid .span6 { width: 48.61878453038674%; *width: 48.56559304102504%; } .row-fluid .span5 { width: 40.05524861878453%; *width: 40.00205712942283%; } .row-fluid .span4 { width: 31.491712707182323%; *width: 31.43852121782062%; } .row-fluid .span3 { width: 22.92817679558011%; *width: 22.87498530621841%; } .row-fluid .span2 { width: 14.3646408839779%; *width: 14.311449394616199%; } .row-fluid .span1 { width: 5.801104972375691%; *width: 5.747913483013988%; } .row-fluid .offset12 { margin-left: 105.52486187845304%; *margin-left: 105.41847889972962%; } .row-fluid .offset12:first-child { margin-left: 102.76243093922652%; *margin-left: 102.6560479605031%; } .row-fluid .offset11 { margin-left: 96.96132596685082%; *margin-left: 96.8549429881274%; } .row-fluid .offset11:first-child { margin-left: 94.1988950276243%; *margin-left: 94.09251204890089%; } .row-fluid .offset10 { margin-left: 88.39779005524862%; *margin-left: 88.2914070765252%; } .row-fluid .offset10:first-child { margin-left: 85.6353591160221%; *margin-left: 85.52897613729868%; } .row-fluid .offset9 { margin-left: 79.8342541436464%; *margin-left: 79.72787116492299%; } .row-fluid .offset9:first-child { margin-left: 77.07182320441989%; *margin-left: 76.96544022569647%; } .row-fluid .offset8 { margin-left: 71.2707182320442%; *margin-left: 71.16433525332079%; } .row-fluid .offset8:first-child { margin-left: 68.50828729281768%; *margin-left: 68.40190431409427%; } .row-fluid .offset7 { margin-left: 62.70718232044199%; *margin-left: 62.600799341718584%; } .row-fluid .offset7:first-child { margin-left: 59.94475138121547%; *margin-left: 59.838368402492065%; } .row-fluid .offset6 { margin-left: 54.14364640883978%; *margin-left: 54.037263430116376%; } .row-fluid .offset6:first-child { margin-left: 51.38121546961326%; *margin-left: 51.27483249088986%; } .row-fluid .offset5 { margin-left: 45.58011049723757%; *margin-left: 45.47372751851417%; } .row-fluid .offset5:first-child { margin-left: 42.81767955801105%; *margin-left: 42.71129657928765%; } .row-fluid .offset4 { margin-left: 37.01657458563536%; *margin-left: 36.91019160691196%; } .row-fluid .offset4:first-child { margin-left: 34.25414364640884%; *margin-left: 34.14776066768544%; } .row-fluid .offset3 { margin-left: 28.45303867403315%; *margin-left: 28.346655695309746%; } .row-fluid .offset3:first-child { margin-left: 25.69060773480663%; *margin-left: 25.584224756083227%; } .row-fluid .offset2 { margin-left: 19.88950276243094%; *margin-left: 19.783119783707537%; } .row-fluid .offset2:first-child { margin-left: 17.12707182320442%; *margin-left: 17.02068884448102%; } .row-fluid .offset1 { margin-left: 11.32596685082873%; *margin-left: 11.219583872105325%; } .row-fluid .offset1:first-child { margin-left: 8.56353591160221%; *margin-left: 8.457152932878806%; } input, textarea, .uneditable-input { margin-left: 0; } .controls-row [class*="span"] + [class*="span"] { margin-left: 20px; } input.span12, textarea.span12, .uneditable-input.span12 { width: 710px; } input.span11, textarea.span11, .uneditable-input.span11 { width: 648px; } input.span10, textarea.span10, .uneditable-input.span10 { width: 586px; } input.span9, textarea.span9, .uneditable-input.span9 { width: 524px; } input.span8, textarea.span8, .uneditable-input.span8 { width: 462px; } input.span7, textarea.span7, .uneditable-input.span7 { width: 400px; } input.span6, textarea.span6, .uneditable-input.span6 { width: 338px; } input.span5, textarea.span5, .uneditable-input.span5 { width: 276px; } input.span4, textarea.span4, .uneditable-input.span4 { width: 214px; } input.span3, textarea.span3, .uneditable-input.span3 { width: 152px; } input.span2, textarea.span2, .uneditable-input.span2 { width: 90px; } input.span1, textarea.span1, .uneditable-input.span1 { width: 28px; } } @media (min-width: 1200px) { .row { margin-left: -30px; *zoom: 1; } .row:before, .row:after { display: table; content: ""; line-height: 0; } .row:after { clear: both; } [class*="span"] { float: left; min-height: 1px; margin-left: 30px; } .container, .navbar-static-top .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 1170px; } .span12 { width: 1170px; } .span11 { width: 1070px; } .span10 { width: 970px; } .span9 { width: 870px; } .span8 { width: 770px; } .span7 { width: 670px; } .span6 { width: 570px; } .span5 { width: 470px; } .span4 { width: 370px; } .span3 { width: 270px; } .span2 { width: 170px; } .span1 { width: 70px; } .offset12 { margin-left: 1230px; } .offset11 { margin-left: 1130px; } .offset10 { margin-left: 1030px; } .offset9 { margin-left: 930px; } .offset8 { margin-left: 830px; } .offset7 { margin-left: 730px; } .offset6 { margin-left: 630px; } .offset5 { margin-left: 530px; } .offset4 { margin-left: 430px; } .offset3 { margin-left: 330px; } .offset2 { margin-left: 230px; } .offset1 { margin-left: 130px; } .row-fluid { width: 100%; *zoom: 1; } .row-fluid:before, .row-fluid:after { display: table; content: ""; line-height: 0; } .row-fluid:after { clear: both; } .row-fluid [class*="span"] { display: block; width: 100%; min-height: 30px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; float: left; margin-left: 2.564102564102564%; *margin-left: 2.5109110747408616%; } .row-fluid [class*="span"]:first-child { margin-left: 0; } .row-fluid .controls-row [class*="span"] + [class*="span"] { margin-left: 2.564102564102564%; } .row-fluid .span12 { width: 100%; *width: 99.94680851063829%; } .row-fluid .span11 { width: 91.45299145299145%; *width: 91.39979996362975%; } .row-fluid .span10 { width: 82.90598290598291%; *width: 82.8527914166212%; } .row-fluid .span9 { width: 74.35897435897436%; *width: 74.30578286961266%; } .row-fluid .span8 { width: 65.81196581196582%; *width: 65.75877432260411%; } .row-fluid .span7 { width: 57.26495726495726%; *width: 57.21176577559556%; } .row-fluid .span6 { width: 48.717948717948715%; *width: 48.664757228587014%; } .row-fluid .span5 { width: 40.17094017094017%; *width: 40.11774868157847%; } .row-fluid .span4 { width: 31.623931623931625%; *width: 31.570740134569924%; } .row-fluid .span3 { width: 23.076923076923077%; *width: 23.023731587561375%; } .row-fluid .span2 { width: 14.52991452991453%; *width: 14.476723040552828%; } .row-fluid .span1 { width: 5.982905982905983%; *width: 5.929714493544281%; } .row-fluid .offset12 { margin-left: 105.12820512820512%; *margin-left: 105.02182214948171%; } .row-fluid .offset12:first-child { margin-left: 102.56410256410257%; *margin-left: 102.45771958537915%; } .row-fluid .offset11 { margin-left: 96.58119658119658%; *margin-left: 96.47481360247316%; } .row-fluid .offset11:first-child { margin-left: 94.01709401709402%; *margin-left: 93.91071103837061%; } .row-fluid .offset10 { margin-left: 88.03418803418803%; *margin-left: 87.92780505546462%; } .row-fluid .offset10:first-child { margin-left: 85.47008547008548%; *margin-left: 85.36370249136206%; } .row-fluid .offset9 { margin-left: 79.48717948717949%; *margin-left: 79.38079650845607%; } .row-fluid .offset9:first-child { margin-left: 76.92307692307693%; *margin-left: 76.81669394435352%; } .row-fluid .offset8 { margin-left: 70.94017094017094%; *margin-left: 70.83378796144753%; } .row-fluid .offset8:first-child { margin-left: 68.37606837606839%; *margin-left: 68.26968539734497%; } .row-fluid .offset7 { margin-left: 62.393162393162385%; *margin-left: 62.28677941443899%; } .row-fluid .offset7:first-child { margin-left: 59.82905982905982%; *margin-left: 59.72267685033642%; } .row-fluid .offset6 { margin-left: 53.84615384615384%; *margin-left: 53.739770867430444%; } .row-fluid .offset6:first-child { margin-left: 51.28205128205128%; *margin-left: 51.175668303327875%; } .row-fluid .offset5 { margin-left: 45.299145299145295%; *margin-left: 45.1927623204219%; } .row-fluid .offset5:first-child { margin-left: 42.73504273504273%; *margin-left: 42.62865975631933%; } .row-fluid .offset4 { margin-left: 36.75213675213675%; *margin-left: 36.645753773413354%; } .row-fluid .offset4:first-child { margin-left: 34.18803418803419%; *margin-left: 34.081651209310785%; } .row-fluid .offset3 { margin-left: 28.205128205128204%; *margin-left: 28.0987452264048%; } .row-fluid .offset3:first-child { margin-left: 25.641025641025642%; *margin-left: 25.53464266230224%; } .row-fluid .offset2 { margin-left: 19.65811965811966%; *margin-left: 19.551736679396257%; } .row-fluid .offset2:first-child { margin-left: 17.094017094017094%; *margin-left: 16.98763411529369%; } .row-fluid .offset1 { margin-left: 11.11111111111111%; *margin-left: 11.004728132387708%; } .row-fluid .offset1:first-child { margin-left: 8.547008547008547%; *margin-left: 8.440625568285142%; } input, textarea, .uneditable-input { margin-left: 0; } .controls-row [class*="span"] + [class*="span"] { margin-left: 30px; } input.span12, textarea.span12, .uneditable-input.span12 { width: 1156px; } input.span11, textarea.span11, .uneditable-input.span11 { width: 1056px; } input.span10, textarea.span10, .uneditable-input.span10 { width: 956px; } input.span9, textarea.span9, .uneditable-input.span9 { width: 856px; } input.span8, textarea.span8, .uneditable-input.span8 { width: 756px; } input.span7, textarea.span7, .uneditable-input.span7 { width: 656px; } input.span6, textarea.span6, .uneditable-input.span6 { width: 556px; } input.span5, textarea.span5, .uneditable-input.span5 { width: 456px; } input.span4, textarea.span4, .uneditable-input.span4 { width: 356px; } input.span3, textarea.span3, .uneditable-input.span3 { width: 256px; } input.span2, textarea.span2, .uneditable-input.span2 { width: 156px; } input.span1, textarea.span1, .uneditable-input.span1 { width: 56px; } .thumbnails { margin-left: -30px; } .thumbnails > li { margin-left: 30px; } .row-fluid .thumbnails { margin-left: 0; } } @media (max-width: 979px) { body { padding-top: 0; } .navbar-fixed-top, .navbar-fixed-bottom { position: static; } .navbar-fixed-top { margin-bottom: 20px; } .navbar-fixed-bottom { margin-top: 20px; } .navbar-fixed-top .navbar-inner, .navbar-fixed-bottom .navbar-inner { padding: 5px; } .navbar .container { width: auto; padding: 0; } .navbar .brand { padding-left: 10px; padding-right: 10px; margin: 0 0 0 -5px; } .nav-collapse { clear: both; } .nav-collapse .nav { float: none; margin: 0 0 10px; } .nav-collapse .nav > li { float: none; } .nav-collapse .nav > li > a { margin-bottom: 2px; } .nav-collapse .nav > .divider-vertical { display: none; } .nav-collapse .nav .nav-header { color: #bb844e; text-shadow: none; } .nav-collapse .nav > li > a, .nav-collapse .dropdown-menu a { padding: 9px 15px; font-weight: bold; color: #bb844e; -<API key>: 3px; -moz-border-radius: 3px; border-radius: 3px; } .nav-collapse .btn { padding: 4px 10px 4px; font-weight: normal; -<API key>: 4px; -moz-border-radius: 4px; border-radius: 4px; } .nav-collapse .dropdown-menu li + li a { margin-bottom: 2px; } .nav-collapse .nav > li > a:hover, .nav-collapse .nav > li > a:focus, .nav-collapse .dropdown-menu a:hover, .nav-collapse .dropdown-menu a:focus { background-color: #371605; } .navbar-inverse .nav-collapse .nav > li > a, .navbar-inverse .nav-collapse .dropdown-menu a { color: #999999; } .navbar-inverse .nav-collapse .nav > li > a:hover, .navbar-inverse .nav-collapse .nav > li > a:focus, .navbar-inverse .nav-collapse .dropdown-menu a:hover, .navbar-inverse .nav-collapse .dropdown-menu a:focus { background-color: #111111; } .nav-collapse.in .btn-group { margin-top: 5px; padding: 0; } .nav-collapse .dropdown-menu { position: static; top: auto; left: auto; float: none; display: none; max-width: none; margin: 0 15px; padding: 0; background-color: transparent; border: none; -<API key>: 0; -moz-border-radius: 0; border-radius: 0; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } .nav-collapse .open > .dropdown-menu { display: block; } .nav-collapse .dropdown-menu:before, .nav-collapse .dropdown-menu:after { display: none; } .nav-collapse .dropdown-menu .divider { display: none; } .nav-collapse .nav > li > .dropdown-menu:before, .nav-collapse .nav > li > .dropdown-menu:after { display: none; } .nav-collapse .navbar-form, .nav-collapse .navbar-search { float: none; padding: 10px 15px; margin: 10px 0; border-top: 1px solid #371605; border-bottom: 1px solid #371605; -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); } .navbar-inverse .nav-collapse .navbar-form, .navbar-inverse .nav-collapse .navbar-search { border-top-color: #111111; border-bottom-color: #111111; } .navbar .nav-collapse .nav.pull-right { float: none; margin-left: 0; } .nav-collapse, .nav-collapse.collapse { overflow: hidden; height: 0; } .navbar .btn-navbar { display: block; } .navbar-static .navbar-inner { padding-left: 10px; padding-right: 10px; } } @media (min-width: 980px) { .nav-collapse.collapse { height: auto !important; overflow: visible !important; } }
#ifndef ENTRY_H #define ENTRY_H #include "Object.h" #include "CompiledCode.h" #include "String.h" #define ENTRY_MAX_ARGS_SIZE 16 typedef struct { _Bool isHandle; union { Value value; Object *handle; }; } EntryArg; typedef struct { size_t size; EntryArg values[ENTRY_MAX_ARGS_SIZE]; } EntryArgs; Value invokeMethod(CompiledMethod *method, EntryArgs *args); Value invokeInititalize(Object *object); Value sendMessage(String *selector, EntryArgs *args); Value evalCode(char *source); _Bool <API key>(char *filename, Value *lastBlockResult); _Bool parseFile(char *filename, OrderedCollection *classes, OrderedCollection *blocks); static void entryArgsAddObject(EntryArgs *args, Object *object) { intptr_t index = args->size++; ASSERT(index <= ENTRY_MAX_ARGS_SIZE); args->values[index].isHandle = 1; args->values[index].handle = object; } static void entryArgsAdd(EntryArgs *args, Value value) { intptr_t index = args->size++; ASSERT(index <= ENTRY_MAX_ARGS_SIZE); args->values[index].isHandle = 0; args->values[index].value = value; } #endif
#ifndef <API key> #define <API key> #include <cstdint> #include "absl/strings/string_view.h" namespace quic { // An interface that includes methods to interact with a QBONE client. class <API key> { public: virtual ~<API key>() {} // Accepts a given packet from the network and sends the packet down to the // QBONE connection. virtual void <API key>(absl::string_view packet) = 0; }; } // namespace quic #endif // <API key>
#ifndef <API key> #define <API key> #include <fstream> #include <iostream> #include <vector> #include <assert.h> #include <stdlib.h> #include <sstream> #include <algorithm> #include "Types.h" #include "DNASequence.h" #include "utils/StringUtils.h" using namespace std; #define <API key> 1233211233 template<typename TSeq> class <API key> { public: vector<DNALength> growableSeqStartPos; vector<string> growableName; DNALength *seqStartPos; bool deleteSeqStartPos; char **names; bool deleteNames; int *nameLengths; bool deleteNameLengths; int nSeqPos; bool deleteStructures; // This is stored after reading in the sequence. vector<string> md5; <API key>(int final=0) { nSeqPos = 0; if (!final) { growableSeqStartPos.push_back(0); } names = NULL; deleteNames = false; nameLengths = NULL; deleteNameLengths = false; seqStartPos = NULL; deleteSeqStartPos = false; deleteStructures = false; } DNALength GetLengthOfSeq(int seqIndex) { assert(seqIndex < nSeqPos-1); return seqStartPos[seqIndex+1] - seqStartPos[seqIndex] - 1; } void GetName(int seqIndex, string &name) { assert(seqIndex < nSeqPos-1); name = names[seqIndex]; } void MakeSAMSQString(string &sqString) { stringstream st; int i; for (i = 0; i < nSeqPos-1; i++) { st << "@SQ\tSN:" << names[i] << "\tLN:" << GetLengthOfSeq(i); if (md5.size() == nSeqPos-1) { st << "\tM5:" << md5[i]; } st << endl; } sqString = st.str(); } DNALength <API key>(int chrom, DNALength chromPos) { assert(chrom < nSeqPos); return seqStartPos[chrom] + chromPos; } int SearchForIndex(DNALength pos) { // The default behavior for the case // that there is just one genome. if (nSeqPos == 1) { return 0; } DNALength* seqPosIt = upper_bound(seqStartPos+1, seqStartPos + nSeqPos, pos); return seqPosIt - seqStartPos - 1; } string <API key>(unsigned int index) { int pos; assert(index < nSeqPos); string name; for (pos = 0; pos < nameLengths[index]; pos++) { if (names[index][pos] == ' ' or names[index][pos] == '\t' or names[index][pos] == '\0') { break; } } name.assign(names[index], pos); return name; } int <API key>(DNALength pos) { int index = SearchForIndex(pos); if (index != -1) { return seqStartPos[index]; } else { return -1; } } int <API key>(DNALength pos) { int index = SearchForIndex(pos); if (index != -1) { return seqStartPos[index + 1]; } else { return -1; } } DNALength <API key>(DNALength pos, DNALength &start, DNALength &end) { int index = SearchForIndex(pos); if (index != -1) { start = seqStartPos[index]; end = seqStartPos[index+1]; return 1; } else { start = end = -1; return 0; } } void WriteDatabase(ofstream &out) { int mn = <API key>; out.write((char*) &mn, sizeof(int)); out.write((char*) &nSeqPos, sizeof(int)); out.write((char*) seqStartPos, sizeof(DNALength) * nSeqPos); int nSeq = nSeqPos - 1; out.write((char*) nameLengths, sizeof(int) * nSeq); int i; // The number of sequences is 1 less than the number of positions // since the positions include 0 as a boundary. char nullchar = '\0'; for (i = 0; i < nSeq; i++) { // nameLengths has space for the null char, so the length of the // name = nameLengths[i]-1. Write a nullchar to disk so that it // may be read in later with no work. out.write((char*) names[i], sizeof(char) * (nameLengths[i]-1)); out.write((char*) &nullchar, sizeof(char)); } } void ReadDatabase(ifstream &in) { int mn; // Make sure this is a read database, since the binary input // is not syntax checked. in.read((char*) &mn, sizeof(int)); if (mn != <API key>) { cout << "ERROR: Sequence index database is corrupt!" << endl; exit(0); } // Read in the boundaries of each sequence. deleteStructures = true; in.read((char*) &nSeqPos, sizeof(int)); seqStartPos = new DNALength[nSeqPos]; deleteSeqStartPos = true; in.read((char*) seqStartPos, sizeof(DNALength) * nSeqPos); int nSeq = nSeqPos - 1; // Get the lengths of the strings to read. nameLengths = new int[nSeq]; deleteNameLengths = true; in.read((char*)nameLengths, sizeof(int) * nSeq); // Get the titles of the sequences. names = new char*[nSeq]; deleteNames = true; char *namePtr; int i; for (i = 0; i < nSeq; i++) { namePtr = new char[nameLengths[i]]; if (nameLengths[i] > 0) { in.read(namePtr, nameLengths[i]); } namePtr[nameLengths[i]-1] = '\0'; names[i] = namePtr; } } void <API key>() { int seqIndex; for (seqIndex = 0; seqIndex < nSeqPos-1; seqIndex++) { string tmpName; <API key>(names[seqIndex], nameLengths[seqIndex], tmpName); delete[] names[seqIndex]; names[seqIndex] = new char[tmpName.size()+1]; strcpy(names[seqIndex], tmpName.c_str()); names[seqIndex][tmpName.size()] = '\0'; nameLengths[seqIndex] = tmpName.size(); } } VectorIndex AddSequence(TSeq &sequence) { int endPos = growableSeqStartPos[growableSeqStartPos.size() - 1]; int growableSize = growableSeqStartPos.size(); growableSeqStartPos.push_back(endPos + sequence.length + 1); string fastaTitle; sequence.GetFASTATitle(fastaTitle); growableName.push_back(fastaTitle); return growableName.size(); } void Finalize() { deleteStructures = true; seqStartPos = &growableSeqStartPos[0]; nSeqPos = growableSeqStartPos.size(); int nSeq = nSeqPos - 1; names = new char*[nSeq]; deleteNames = true; unsigned int i; nameLengths = new int[nSeq]; deleteNameLengths = true; for (i = 0; i < nSeq; i++) { names[i] = new char[growableName[i].size() + 1]; memcpy((char*) names[i], (char*) growableName[i].c_str(), growableName[i].size()); names[i][growableName[i].size()] = '\0'; nameLengths[i] = growableName[i].size() + 1; } } void FreeDatabase() { int i; if (deleteStructures == false) { return; } if (names != NULL and deleteNames) { int nSeq = nSeqPos - 1; for (i = 0; i < nSeq; i++ ){ delete[] names[i]; } delete[] names; } if (nameLengths != NULL) { delete[] nameLengths; } if (seqStartPos != NULL and deleteSeqStartPos) { delete[] seqStartPos; } } }; template< typename TSeq > class SeqBoundaryFtr { public: <API key><TSeq> *seqDB; SeqBoundaryFtr(<API key><TSeq> *_seqDB) { seqDB = _seqDB; } int GetIndex(DNALength pos) { return seqDB->SearchForIndex(pos); } int GetStartPos(int index) { assert(index < seqDB->nSeqPos); return seqDB->seqStartPos[index]; } DNALength operator()(DNALength pos) { return seqDB-><API key>(pos); } // This is misuse of a functor, but easier interface coding for now. DNALength Length(DNALength pos) { DNALength start, end; seqDB-><API key>(pos, start, end); return end - start; } }; #endif
#pragma once #include "ParticleSystemFwd.hpp" namespace KRE { namespace Particles { enum class EmitsType { VISUAL, EMITTER, AFFECTOR, TECHNIQUE, SYSTEM, }; class Emitter : public EmitObject { public: explicit Emitter(<API key>* parent, const variant& node); virtual ~Emitter(); Emitter(const Emitter&); int <API key>(float t); color_vector getColor() const; Technique* getTechnique() { return technique_; } void setParentTechnique(Technique* tq) { technique_ = tq; } virtual Emitter* clone() = 0; static Emitter* factory(<API key>* parent, const variant& node); protected: virtual void internalCreate(Particle& p, float t) = 0; virtual bool durationExpired() { return can_be_deleted_; } private: virtual void handleEmitProcess(float t) override; virtual void handleDraw() const override; Technique* technique_; // These are generation parameters. ParameterPtr emission_rate_; ParameterPtr time_to_live_; ParameterPtr velocity_; ParameterPtr angle_; ParameterPtr mass_; // This is the duration that the emitter lives for ParameterPtr duration_; // this is the delay till the emitter repeats. ParameterPtr repeat_delay_; std::unique_ptr<std::pair<glm::quat, glm::quat>> orientation_range_; typedef std::pair<color_vector,color_vector> color_range; std::shared_ptr<color_range> color_range_; glm::vec4 color_; ParameterPtr particle_width_; ParameterPtr particle_height_; ParameterPtr particle_depth_; bool force_emission_; bool <API key>; bool can_be_deleted_; EmitsType emits_type_; std::string emits_name_; void initParticle(Particle& p, float t); void <API key>(const std::vector<Particle>::iterator& start, const std::vector<Particle>::iterator& end); void createParticles(std::vector<Particle>& particles, std::vector<Particle>::iterator& start, std::vector<Particle>::iterator& end, float t); size_t <API key>(float t, size_t quota, size_t current_size); float generateAngle() const; glm::vec3 getInitialDirection() const; //BoxOutlinePtr debug_draw_outline_; // working items // Any "left over" fractional count of emitted particles float emission_fraction_; // time till the emitter stops emitting. float duration_remaining_; // time remaining till a stopped emitter restarts. float <API key>; Emitter(); }; } }
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} module React.Flux.Mui.RadioButton.RadioButtonGroup where import Protolude import Data.Aeson import Data.Aeson.Casing import Data.String (String) import React.Flux import React.Flux.Mui.Types import React.Flux.Mui.Util data RadioButtonGroup = RadioButtonGroup { <API key> :: !(Maybe Text) , <API key> :: !(Maybe (MuiSymbolEnum '[ "left", "right"])) , <API key> :: !Text } deriving (Generic, Show) instance ToJSON RadioButtonGroup where toJSON = genericToJSON $ aesonDrop (length ("RadioButtonGroup" :: String)) camelCase defRadioButtonGroup :: Text -> RadioButtonGroup defRadioButtonGroup <API key> = RadioButtonGroup { <API key> = Nothing , <API key> = Nothing , <API key> = <API key> } radioButtonGroup_ :: RadioButtonGroup -> [PropertyOrHandler handler] -> ReactElementM handler () -> ReactElementM handler () radioButtonGroup_ args props = foreign_ "RadioButtonGroup" (fromMaybe [] (toProps args) ++ props)
YUI.add('enc-utf16-test', function (Y) { var C = CryptoJS; Y.CryptoJSTestSuite.add(new Y.Test.Case({ name: 'Utf16', testStringify1: function () { Y.Assert.areEqual('z', C.enc.Utf16.stringify(C.lib.WordArray.create([0x007a0000], 2))); }, testStringify2: function () { Y.Assert.areEqual('', C.enc.Utf16.stringify(C.lib.WordArray.create([0x6c340000], 2))); }, testStringify3: function () { Y.Assert.areEqual('', C.enc.Utf16.stringify(C.lib.WordArray.create([0xd800dc00], 4))); }, testStringify4: function () { Y.Assert.areEqual('', C.enc.Utf16.stringify(C.lib.WordArray.create([0xd834dd1e], 4))); }, testStringify5: function () { Y.Assert.areEqual('􏿽', C.enc.Utf16.stringify(C.lib.WordArray.create([0xdbffdffd], 4))); }, testStringifyLE: function () { Y.Assert.areEqual('􏿽', C.enc.Utf16LE.stringify(C.lib.WordArray.create([0xffdbfddf], 4))); }, <API key>: function () { var wordArray = C.lib.WordArray.create([0xffdbfddf], 4); Y.Assert.areEqual('􏿽', C.enc.Utf16LE.stringify(wordArray)); Y.Assert.areEqual('􏿽', C.enc.Utf16LE.stringify(wordArray)); }, testParse1: function () { Y.Assert.areEqual(C.lib.WordArray.create([0x007a0000], 2).toString(), C.enc.Utf16.parse('z').toString()); }, testParse2: function () { Y.Assert.areEqual(C.lib.WordArray.create([0x6c340000], 2).toString(), C.enc.Utf16.parse('').toString()); }, testParse3: function () { Y.Assert.areEqual(C.lib.WordArray.create([0xd800dc00], 4).toString(), C.enc.Utf16.parse('').toString()); }, testParse4: function () { Y.Assert.areEqual(C.lib.WordArray.create([0xd834dd1e], 4).toString(), C.enc.Utf16.parse('').toString()); }, testParse5: function () { Y.Assert.areEqual(C.lib.WordArray.create([0xdbffdffd], 4).toString(), C.enc.Utf16.parse('􏿽').toString()); }, testParseLE: function () { Y.Assert.areEqual(C.lib.WordArray.create([0xffdbfddf], 4).toString(), C.enc.Utf16LE.parse('􏿽').toString()); } })); }, '$Rev$');
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This package contains the qibuild actions. """ from __future__ import absolute_import from __future__ import unicode_literals from __future__ import print_function
package com.navisens.pojostick.navishare; import com.navisens.motiondnaapi.MotionDna; import com.navisens.pojostick.navisenscore.*; import java.util.HashSet; import java.util.Map; import java.util.Set; @SuppressWarnings("unused") public class NaviShare implements NavisensPlugin { private static final long QUERY_INTERVAL = 500000000; private String host, port, room; private boolean changed; private boolean configured; private boolean connected; private NavisensCore core; private final Set<String> rooms; private final Set<NaviShareListener> listeners; private long roomsQueriedAt; @SuppressWarnings("unused") public NaviShare() { this.rooms = new HashSet<>(); this.listeners = new HashSet<>(); this.roomsQueriedAt = System.nanoTime(); } /** * Configure a server. This does not connect to it yet, but is required before calling connect. * * @param host server ip * @param port server port * @return a reference to this NaviShare */ @SuppressWarnings("unused") public NaviShare configure(String host, String port) { core.getSettings().overrideHost(null, null); this.host = host; this.port = port; this.changed = true; this.configured = true; return this; } /** * Connect to a room in the server. * * @param room The room to connect to * @return Whether this device connected to a server */ @SuppressWarnings("unused") public boolean connect(String room) { core.getSettings().overrideRoom(null); if (configured) { if (connected && !changed) { core.getMotionDna().setUDPRoom(room); } else { this.disconnect(); core.getMotionDna().startUDP(room, host, port); this.connected = true; } this.changed = false; return true; } return false; } /** * Disconnect from the server. */ @SuppressWarnings("unused") public void disconnect() { core.getMotionDna().stopUDP(); this.connected = false; } /** * Connect to a public test server. Don't use this for official release, as it is public * and can get filled up quickly. Each organization can claim one room, so if you need * multiple independent servers within your organization, you should test on a private * server instead, and use configure(host, port) to target that server instead. */ @SuppressWarnings("unused") public boolean testConnect() { if (!connected) { this.disconnect(); core.getMotionDna().startUDP(); return this.connected = true; } return false; } /** * Send a message to all other devices on the network * * @param msg A string to send, recommended web safe */ @SuppressWarnings("unused") public void sendMessage(String msg) { if (connected) { core.getMotionDna().sendUDPPacket(msg); } } /** * Add a listener to receive network events * * @param listener The listener to receive events * @return Whether the listener was added successfully */ @SuppressWarnings("unused") public boolean addListener(NaviShareListener listener) { return this.listeners.add(listener); } /** * Remove a listener to stop receiving events * * @param listener Ths listener to remove * @return Whether the listener was removed successfully */ @SuppressWarnings("unused") public boolean removeListener(NaviShareListener listener) { return this.listeners.remove(listener); } /** * Track a room so you can query its status. Call refreshRoomStatus to * receive a new roomStatus event * * @param room A room to track * @return Whether the room was added to be tracked or not */ @SuppressWarnings("unused") public boolean trackRoom(String room) { return this.rooms.add(room); } /** * Stop tracking a room. Call refreshRoomStatus to receive a new roomStatusEvent * * @param room A room to stop tracking * @return Whether the room was removed from tracking or not */ @SuppressWarnings("unused") public boolean untrackRoom(String room) { return this.rooms.remove(room); } /** * Refresh the status of any tracked rooms. Updates will be received from the * <API key> event * @return Whether a refresh request was sent or not */ @SuppressWarnings("unused") public boolean refreshRoomStatus() { final long now = System.nanoTime(); if (connected && now - roomsQueriedAt > QUERY_INTERVAL) { roomsQueriedAt = now; core.getMotionDna().sendUDPQueryRooms(rooms.toArray(new String[0])); return true; } return false; } @Override public boolean init(NavisensCore navisensCore, Object[] objects) { this.core = navisensCore; core.subscribe(this, NavisensCore.NETWORK_DATA); core.getSettings().requestNetworkRate(100); core.applySettings(); return true; } @Override public boolean stop() { this.disconnect(); core.remove(this); return true; } @Override public void receiveMotionDna(MotionDna motionDna) { } @Override public void receiveNetworkData(MotionDna motionDna) { } @Override public void receiveNetworkData(MotionDna.NetworkCode networkCode, Map<String, ?> map) { switch (networkCode) { case RAW_NETWORK_DATA: for (NaviShareListener listener : listeners) listener.messageReceived((String) map.get("ID"), (String) map.get("payload")); break; case <API key>: for (NaviShareListener listener : listeners) listener.<API key>((Map<String, Integer>) map.get("payload")); break; case <API key>: for (NaviShareListener listener : listeners) listener.<API key>(); this.disconnect(); break; case <API key>: for (NaviShareListener listener : listeners) listener.<API key>(); this.disconnect(); break; } } @Override public void receivePluginData(String id, int operator, Object... payload) { } @Override public void reportError(MotionDna.ErrorCode errorCode, String s) { } }
# @desc makefile for Login # @author viticm<viticm.ti@gmail.com> # @date 2013-06-25 20:00:13 include ../../premake.mk CFLAGS = -I$(BASEDIR)/Login/Main -I$(BASEDIR)/Login/DB -I$(BASEDIR)/Login/Packets -I$(BASEDIR)/Login/Process -I$(BASEDIR)/Login/Player -I$(BASEDIR)/Login $(<API key>) LDFLAGS = DIRS = OBJS = DBThread.o \ LoginDBManager.o \ DBThreadManager.o \ CharConfig.o \ DBLogicManager.o debug:$(OBJS) for dir in $(DIRS); do \ $(MAKE) debug -C $$dir; \ done release:$(OBJS) for dir in $(DIRS); do \ $(MAKE) release -C $$dir; \ done all:debug clean: $(RM) -f *.o
# $FreeBSD$ PROG= juggle NO_MAN= WARNS?= 3 DPADD= ${LIBPTHREAD} LDADD= -lpthread .include <bsd.prog.mk>
<?php // WARNING // WARNING, Changes made to this file will be clobbered // WARNING // WARNING, Please make changes on poeditor instead of here ?> subject: (opomnik) {if:transfer.files>1}Datoteke, pripravljene{else}Datoteka, pripravljena{endif} za prenos subject: (opomnik) {transfer.subject} {alternative:plain} Spoštovani, prejeli ste opomnik, da {if:transfer.files>1}so bile naložene datoteke{else}je bila naložena datoteka{endif} na {cfg:site_name} s strani {transfer.user_email}, Vam pa so bile dodeljene pravice za prenos {if:transfer.files>1}njihovih vsebin{else}njene vsebine{endif} : {if:transfer.files>1}{each:transfer.files as file} - {file.path} ({size:file.size}) {endeach}{else} {transfer.files.first().path} ({size:transfer.files.first().size}) {endif} Povezava za prenos: {recipient.download_link} Prenos je na voljo do {date:transfer.expires}. Po tem datumu bo avtomatsko izbrisan. {if:transfer.message || transfer.subject} Osebno sporočilo od {transfer.user_email}: {transfer.subject} {transfer.message} {endif} Lep pozdrav, {cfg:site_name} {alternative:html} <p> Spoštovani, </p> <p> prejeli ste opomnik, da {if:transfer.files>1}so bile naložene datoteke{else}je bila naložena datoteka{endif} na {cfg:site_name} s strani {transfer.user_email}, Vam pa so bile dodeljene pravice za prenos {if:transfer.files>1}njihovih vsebin{else}njene vsebine{endif}. </p> <table rules="rows"> <thead> <tr> <th colspan="2">Podrobnosti prenosa</th> </tr> </thead> <tbody> <tr> <td>{if:transfer.files>1}Datoteke{else}Datoteka{endif}</td> <td> {if:transfer.files>1} <ul> {each:transfer.files as file} <li>{file.path} ({size:file.size})</li> {endeach} </ul> {else} {transfer.files.first().path} ({size:transfer.files.first().size}) {endif} </td> </tr> {if:transfer.files>1} <tr> <td>Velikost prenosa</td> <td>{size:transfer.size}</td> </tr> {endif} <tr> <td>Rok veljavnosti</td> <td>{date:transfer.expires}</td> </tr> <tr> <td>Povezava do prenosa</td> <td><a href="{recipient.download_link}">{recipient.download_link}</a></td> </tr> </tbody> </table> {if:transfer.message} <p> Osebno sporočilo od {transfer.user_email}: </p> <p class="message"> <span class="subject">{transfer.subject}</span> {transfer.message} </p> {endif} <p> Lep pozdrav,<br /> {cfg:site_name} </p>
-- Module: Threshold -- Description: Time integrated threshold functions -- Time integrated threshold functions typically used in condition monitoring. module Language.Atom.Common.Threshold ( boolThreshold , doubleThreshold ) where import Language.Atom.Expressions import Language.Atom.Language import Data.Int (Int32) -- | Boolean thresholding over time. Output is set when internal counter hits -- limit, and cleared when counter is 0. boolThreshold :: Name -> Int32 -> Bool -> E Bool -> Atom (E Bool) boolThreshold name_ num init_ input = atom name_ "" $ do --assert "positiveNumber" $ num >= 0 state <- bool "state" init_ count <- int32 "count" (if init_ then num else 0) atom "update" "" $ do cond $ value count >. Const 0 &&. value count <. Const num count <== value count + mux input (Const 1) (Const (-1)) atom "low" "" $ do cond $ value count ==. Const 0 state <== false atom "high" "" $ do cond $ value count ==. Const num state <== true return $ value state -- | Integrating threshold. Output is set with integral reaches limit, and -- cleared when integral reaches 0. doubleThreshold :: Name -> Double -> E Double -> Atom (E Bool) doubleThreshold name_ lim input = atom name_ "" $ do --assert "positiveLimit" $ lim >= 0 state <- bool "state" False sum_ <- double "sum" 0 -- TODO: Figure out what the below translates to in the newer library -- (high,low) <- priority atom "update" "" $ do sum_ <== value sum_ + input -- low atom "clear" "" $ do cond $ value sum_ <=. 0 state <== false sum_ <== 0 -- high atom "set" "" $ do cond $ value sum_ >=. Const lim state <== true sum_ <== Const lim -- high return $ value state
// modification, are permitted provided that the following conditions // are met: // and/or other materials provided with the distribution. // * Neither the name of Jaroslaw Kowalski nor the names of its // contributors may be used to endorse or promote products derived from this // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // 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. namespace NLog.Layouts { using NLog.Config; <summary> A XML Element </summary> [<API key>] public class XmlElement : XmlElementBase { private const string DefaultElementName = "item"; <inheritdoc/> public XmlElement() : this(DefaultElementName, null) { } <inheritdoc/> public XmlElement(string elementName, Layout elementValue) : base(elementName, elementValue) { } <summary> Name of the element </summary> <docgen category='Element Options' order='10' /> public string Name { get => base.ElementNameInternal; set => base.ElementNameInternal = value; } <summary> Value inside the element </summary> <docgen category='Element Options' order='10' /> public Layout Value { get => base.LayoutWrapper.Inner; set => base.LayoutWrapper.Inner = value; } <summary> Determines whether or not this attribute will be Xml encoded. </summary> <docgen category='Element Options' order='10' /> public bool Encode { get => base.LayoutWrapper.XmlEncode; set => base.LayoutWrapper.XmlEncode = value; } } }
require "lita" Lita.load_locales Dir[File.expand_path( File.join("..", "..", "locales", "*.yml"), __FILE__ )] require 'lita/handlers/markov' # Lita::Handlers::Markov.template_root File.expand_path( # File.join("..", "..", "templates"), # __FILE__
<?php //AJAX Poll System Hack Start - 5:03 PM 3/24/2007 $language['POLL_ID']='الرقم'; $language['LATEST_POLL']='آخر استفتاء'; $language['CAST_VOTE']='قدم صوتي'; $language['FETCHING_RESULTS']='جلب نتائج الاستفتاء الرجاء الانتظار'; $language['POLL_TITLE']='عنوان الاستفتاء'; $language['POLL_TITLE_MISSING']='عنوان الاستفتاء مفقود'; $language['POLLING_SYSTEM']='AJAX نظام استفتاء'; $language['CURRENT_POLLS']='الاستفتاءت الحالية'; $language['POLL_STARTED']='بدات في'; $language['POLL_ENDED']='انتهت في'; $language['POLL_LASTED']='استمرت'; $language['POLL_BY']='قدمها'; $language['POLL_VOTES']='الاصوات'; $language['POLL_STILL_ACTIVE']='فعالة'; $language['POLL_NEW']='جديد'; $language['POLL_START_NEW']='ابدى استفتاء جديد'; $language['POLL_ACTIVE']='فعال'; $language['POLL_ACTIVE_TRUE']='فعالة'; $language['POLL_ACTIVE_FALSE']='معطلة'; $language['POLL_OPTION']='خيار'; $language['POLL_OPTIONS']='خيارات'; $language['POLL_MOVE']='الى الاسفل'; $language['POLL_NEW_OPTIONS']='خيارات اخرى'; $language['POLL_SAVE']='حفظ'; $language['POLL_CANCEL']='الغاء'; $language['POLL_DELETE']='مسح'; $language['POLL_DEL_CONFIRM']='اكبس موافق لمسح الاستفتاء'; $language['POLL_VOTERS']='مصوتين الاستفتاء'; $language['POLL_IP_ADDRESS']='IP عناوين الـ'; $language['POLL_DATE']='اليوم'; $language['POLL_USER']='المستخدم'; $language['POLL_ACCOUNT_DEL']='<i>الحساب الغي</i>'; $language['POLL_BACK']='وراء'; $language['YEAR']='سنة'; $language['MONTH']='شهر'; $language['WEEK']='اسبوع'; $language['DAY']='يوم'; $language['HOUR']='ساعة'; $language['MINUTE']='دقيقة'; $language['SECOND']='ثانية'; $language['YEARS']='سنوات'; $language['MONTHS']='شهور'; $language['WEEKS']='اسابيع'; $language['DAYS']='ايام'; $language['HOURS']='سا عات'; $language['MINUTES']='دقائق'; $language['SECONDS']='ثواني'; //AJAX Poll System Hack Stop ?>
package org.mafagafogigante.dungeon.stats; import org.mafagafogigante.dungeon.game.Id; import org.jetbrains.annotations.NotNull; import java.io.Serializable; /** * CauseOfDeath class that defines what kind of death happened and the ID of the related Item or Spell. */ public class CauseOfDeath implements Serializable { private static final CauseOfDeath UNARMED = new CauseOfDeath(TypeOfCauseOfDeath.UNARMED, new Id("UNARMED")); private final TypeOfCauseOfDeath type; private final Id id; /** * Constructs a CauseOfDeath with the specified TypeOfCauseOfDeath and ID. * * @param type a TypeOfCauseOfDeath * @param id an ID */ public CauseOfDeath(@NotNull TypeOfCauseOfDeath type, @NotNull Id id) { this.type = type; this.id = id; } /** * Convenience method that returns a CauseOfDeath that represents an unarmed kill. */ public static CauseOfDeath <API key>() { return UNARMED; } @Override public boolean equals(Object object) { if (this == object) { return true; } if (object == null || getClass() != object.getClass()) { return false; } CauseOfDeath that = (CauseOfDeath) object; return id.equals(that.id) && type == that.type; } @Override public int hashCode() { int result = type.hashCode(); result = 31 * result + id.hashCode(); return result; } @Override public String toString() { return String.format("%s : %s", type, id); } }
title: Towers of Hanoi id: <API key> challengeType: 5 isHidden: false forumTopicId: 302341 ## Description <section id='description'> Solve the <a href="https://en.wikipedia.org/wiki/Towers_of_Hanoi" title="wp: Towers_of_Hanoi" target="_blank">Towers of Hanoi</a> problem.</p> Your solution should accept the number of discs as the first parameters, and three string used to identify each of the three stacks of discs, for example <code>towerOfHanoi(4, 'A', 'B', 'C')</code>. The function should return an array of arrays containing the list of moves, source -> destination. For example, the array <code>[['A', 'C'], ['B', 'A']]</code> indicates that the 1st move was to move a disc from stack A to C, and the 2nd move was to move a disc from stack B to A. </p> </section> ## Instructions <section id='instructions'> </section> ## Tests <section id='tests'> yml tests: - text: <code>towerOfHanoi</code> should be a function. testString: assert(typeof towerOfHanoi === 'function'); - text: <code>towerOfHanoi(3, ...)</code> should return 7 moves. testString: assert(res3.length === 7); - text: <code>towerOfHanoi(3, 'A', 'B', 'C')</code> should return <code>[['A','B'], ['A','C'], ['B','C'], ['A','B'], ['C','A'], ['C','B'], ['A','B']]</code>. testString: assert.deepEqual(towerOfHanoi(3, 'A', 'B', 'C'), res3Moves); - text: <code>towerOfHanoi(5, "X", "Y", "Z")</code> 10th move should be Y -> X. testString: assert.deepEqual(res5[9], ['Y', 'X']); - text: <code>towerOfHanoi(7, 'A', 'B', 'C')</code> first ten moves should be <code>[['A','B'], ['A','C'], ['B','C'], ['A','B'], ['C','A'], ['C','B'], ['A','B'], ['A','C'], ['B','C'], ['B','A']]</code> testString: assert.deepEqual(towerOfHanoi(7, 'A', 'B', 'C').slice(0, 10), res7First10Moves); </section> ## Challenge Seed <section id='challengeSeed'> <div id='js-seed'> js function towerOfHanoi(n, a, b, c) { // Good luck! return [[]]; } </div> After Test <div id='js-teardown'> js const res3 = towerOfHanoi(3, 'A', 'B', 'C'); const res3Moves = [['A', 'B'], ['A', 'C'], ['B', 'C'], ['A', 'B'], ['C', 'A'], ['C', 'B'], ['A', 'B']]; const res5 = towerOfHanoi(5, 'X', 'Y', 'Z'); const res7First10Moves = [['A', 'B'], ['A', 'C'], ['B', 'C'], ['A', 'B'], ['C', 'A'], ['C', 'B'], ['A', 'B'], ['A', 'C'], ['B', 'C'], ['B', 'A']]; </div> </section> ## Solution <section id='solution'> js function towerOfHanoi(n, a, b, c) { const res = []; towerOfHanoiHelper(n, a, c, b, res); return res; } function towerOfHanoiHelper(n, a, b, c, res) { if (n > 0) { towerOfHanoiHelper(n - 1, a, c, b, res); res.push([a, c]); towerOfHanoiHelper(n - 1, b, a, c, res); } } </section>
// Benoit 2011-05-16 #include <ros/node_handle.h> #include <ros/subscriber.h> #include <ros/rate.h> #include <<API key>/RequestForUUIDs.h> #include "NIFTiROSUtil.h" #include "UUIDsManager.h" namespace eu { namespace nifti { namespace ocu { const char* UUIDsManager::TOPIC = "/eoi/RequestForUUIDs"; const u_int UUIDsManager::NUM_REQUESTED(10); UUIDsManager* UUIDsManager::instance = NULL; UUIDsManager* UUIDsManager::getInstance() { if (instance == NULL) { instance = new UUIDsManager(); } return instance; } UUIDsManager::UUIDsManager() : wxThread(wxTHREAD_JOINABLE) , condition(mutexForCondition) , keepManaging(true) { } void UUIDsManager::stopManaging() { //printf("IN UUIDsManager::stopManaging \n"); keepManaging = false; if (instance != NULL) { instance->condition.Signal(); // Will make it go out of the main loop and terminate } //printf("OUT UUIDsManager::stopManaging \n"); } void* UUIDsManager::Entry() { //printf("%s\n", "UUIDsManager::Entry()"); ::ros::ServiceClient client = NIFTiROSUtil::getNodeHandle()->serviceClient<<API key>::RequestForUUIDs > (TOPIC); <API key>::RequestForUUIDs srv; srv.request.numRequested = NUM_REQUESTED; mutexForCondition.Lock(); // This must be called before the first wait() while (keepManaging) { //ROS_INFO("In the loop (keepManaging)"); // This is a requirement from wxThread // http://docs.wxwidgets.org/2.8/wx_wxthread.html#wxthreadtestdestroy if (TestDestroy()) break; if (!client.call(srv)) { std::cerr << "Failed to call ROS service \"RequestForUUIDs\"" << std::endl; //return 0; // Removed this on 2012-03-02 so that it would re-check the service every time, since CAST is unstable } else { //ROS_INFO("Got UUIDs"); { wxMutexLocker lock(instance->mutexForQueue); // Adds all new UUIDs to the list for (u_int i = 0; i < srv.response.uuids.size(); i++) { availableUUIDs.push(srv.response.uuids.at(i)); //std::cout << "Added " << srv.response.uuids.at(i) << std::endl; } } } // Waits until more ids are needed (signal will be called on the condition) //ROS_INFO("Before waiting"); condition.Wait(); //ROS_INFO("After waiting"); } return 0; } int UUIDsManager::getUUID() { //ROS_INFO("int UUIDsManager::getUUID()"); int uuid; { wxMutexLocker lock(instance->mutexForQueue); //ROS_INFO("Num left: %i/%i", instance->availableUUIDs.size(), NUM_REQUESTED); //ROS_INFO("Enough? %i", instance->availableUUIDs.size() <= NUM_REQUESTED / 2); assert(instance != NULL); // Requests more id's when the list is half empty if (instance->availableUUIDs.size() <= NUM_REQUESTED / 2) { //ROS_INFO("Will try waking up the thread to request UUIDs"); instance->condition.Signal(); if (instance->availableUUIDs.size() == 0) { throw "No UUID available"; } } uuid = instance->availableUUIDs.front(); instance->availableUUIDs.pop(); } //ROS_INFO("int UUIDsManager::getUUID() returned %i. Num left: %i", uuid, instance->availableUUIDs.size()); return uuid; } } } }
#ifndef <API key> #define <API key> #include <cstddef> #include <cstdint> #include <limits> #include <tuple> #include "base/allocator/buildflags.h" #include "base/allocator/partition_allocator/<API key>.h" #include "base/allocator/partition_allocator/<API key>.h" #include "base/allocator/partition_allocator/<API key>.h" #include "base/allocator/partition_allocator/<API key>.h" #include "base/compiler_specific.h" #include "build/build_config.h" namespace base { namespace internal { static constexpr uint16_t <API key> = std::numeric_limits<uint16_t>::max(); static constexpr uint16_t <API key> = std::numeric_limits<uint16_t>::max() - 1; // The main purpose of the reservation offset table is to easily locate the // direct map reservation start address for any given address. There is one // entry in the table for each super page. // When PartitionAlloc reserves an address region it is always aligned to // super page boundary. However, in 32-bit mode, the size may not be aligned // super-page-aligned, so it may look like this: // |SuperPage0|SuperPage1| ... |SuperPage K|SuperPage K+1| // The table entries for reserved super pages say how many pages away from the // reservation the super page is: // |Entry for |Entry for | ... |Entry for |Entry for | // |SuperPage0|SuperPage1| |SuperPage K|SuperPage K+1| // | 0 | 1 | ... | K | K + 1 | // For an address Z, the reservation start can be found using this formula: // ((Z >> kSuperPageShift) - (the entry for Z)) << kSuperPageShift // <API key> is a special tag denoting that the super page isn't // allocated by PartitionAlloc and <API key> denotes that it is // used for a normal-bucket allocation, not for a direct-map allocation. // *) In 32-bit mode, Y is not used by PartitionAlloc, and cannot be used // until X is unreserved, because PartitionAlloc always uses kSuperPageSize // alignment when reserving address spaces. One can use "GigaCage" to // further determine which part of the supe page is used by PartitionAlloc. // This isn't a problem in 64-bit mode, where allocation granularity is // kSuperPageSize. class BASE_EXPORT <API key> { public: #if defined(<API key>) // There is one reservation offset table per Pool in 64-bit mode. static constexpr size_t <API key> = kPoolMaxSize; static constexpr size_t <API key> = <API key> >> kSuperPageShift; #else // The size of the reservation offset table should cover the entire 32-bit // address space, one element per super page. static constexpr uint64_t kGiB = 1024 * 1024 * 1024ull; static constexpr size_t <API key> = 4 * kGiB / kSuperPageSize; #endif static_assert(<API key> < <API key>, "Offsets should be smaller than <API key>."); static struct <API key> { // The number of table elements is less than MAX_UINT16, so the element type // can be uint16_t. static_assert( <API key> <= std::numeric_limits<uint16_t>::max(), "Length of the reservation offset table must be less than MAX_UINT16"); uint16_t offsets[<API key>] = {}; constexpr <API key>() { for (uint16_t& offset : offsets) offset = <API key>; } #if defined(<API key>) // One table per Pool. } <API key>[kNumPools]; #else // A single table for the entire 32-bit address space. } <API key>; #endif }; #if defined(<API key>) ALWAYS_INLINE uint16_t* <API key>(pool_handle handle) { PA_DCHECK(0 < handle && handle <= kNumPools); return <API key>::<API key>[handle - 1].offsets; } ALWAYS_INLINE const uint16_t* <API key>(pool_handle handle) { return <API key>(handle) + <API key>::<API key>; } ALWAYS_INLINE uint16_t* <API key>(uintptr_t address) { pool_handle handle = GetPool(address); return <API key>(handle); } ALWAYS_INLINE const uint16_t* <API key>(uintptr_t address) { pool_handle handle = GetPool(address); return <API key>(handle); } ALWAYS_INLINE uint16_t* <API key>(pool_handle pool, uintptr_t offset_in_pool) { size_t table_index = offset_in_pool >> kSuperPageShift; PA_DCHECK(table_index < <API key>::<API key>); return <API key>(pool) + table_index; } #else ALWAYS_INLINE uint16_t* <API key>(uintptr_t address) { return <API key>::<API key>.offsets; } ALWAYS_INLINE const uint16_t* <API key>(uintptr_t address) { return <API key>::<API key>.offsets + <API key>::<API key>; } #endif ALWAYS_INLINE uint16_t* <API key>(uintptr_t address) { #if defined(<API key>) // In 64-bit mode, find the owning Pool and compute the offset from its base. pool_handle pool; address = memory::UnmaskPtr(address); uintptr_t offset; std::tie(pool, offset) = GetPoolAndOffset(address); return <API key>(pool, offset); #else size_t table_index = address >> kSuperPageShift; PA_DCHECK(table_index < <API key>::<API key>); return <API key>(address) + table_index; #endif } ALWAYS_INLINE uintptr_t <API key>(uintptr_t address, uint16_t* offset_ptr) { return (address & kSuperPageBaseMask) - (static_cast<size_t>(*offset_ptr) << kSuperPageShift); } // If the given address doesn't point to direct-map allocated memory, // returns 0. ALWAYS_INLINE uintptr_t <API key>(uintptr_t address) { #if DCHECK_IS_ON() bool is_in_brp_pool = <API key>(address); bool is_in_regular_pool = <API key>(address); // When USE_BACKUP_REF_PTR is off, BRP pool isn't used. #if !BUILDFLAG(USE_BACKUP_REF_PTR) PA_DCHECK(!is_in_brp_pool); #endif #endif // DCHECK_IS_ON() uint16_t* offset_ptr = <API key>(address); PA_DCHECK(*offset_ptr != <API key>); if (*offset_ptr == <API key>) return 0; uintptr_t reservation_start = <API key>(address, offset_ptr); #if DCHECK_IS_ON() // Make sure the reservation start is in the same pool as |address|. // In the 32-bit mode, the beginning of a reservation may be excluded from the // BRP pool, so shift the pointer. The other pools don't have this logic. PA_DCHECK(is_in_brp_pool == <API key>( reservation_start #if !defined(<API key>) + <API key>::<API key> * <API key>::<API key> #endif // !defined(<API key>) )); PA_DCHECK(is_in_regular_pool == <API key>(reservation_start)); PA_DCHECK(*<API key>(reservation_start) == 0); #endif // DCHECK_IS_ON() return reservation_start; } #if defined(<API key>) // If the given address doesn't point to direct-map allocated memory, // returns 0. // This variant has better performance than the regular one on 64-bit builds if // the Pool that an allocation belongs to is known. ALWAYS_INLINE uintptr_t <API key>(uintptr_t address, pool_handle pool, uintptr_t offset_in_pool) { PA_DCHECK(AddressPoolManager::GetInstance()->GetPoolBaseAddress(pool) + offset_in_pool == address); uint16_t* offset_ptr = <API key>(pool, offset_in_pool); PA_DCHECK(*offset_ptr != <API key>); if (*offset_ptr == <API key>) return 0; uintptr_t reservation_start = <API key>(address, offset_ptr); PA_DCHECK(*<API key>(reservation_start) == 0); return reservation_start; } #endif // defined(<API key>) // Returns true if |address| is the beginning of the first super page of a // reservation, i.e. either a normal bucket super page, or the first super page // of direct map. // |address| must belong to an allocated super page. ALWAYS_INLINE bool IsReservationStart(uintptr_t address) { uint16_t* offset_ptr = <API key>(address); PA_DCHECK(*offset_ptr != <API key>); return ((*offset_ptr == <API key>) || (*offset_ptr == 0)) && (address % kSuperPageSize == 0); } // Returns true if |address| belongs to a normal bucket super page. ALWAYS_INLINE bool <API key>(uintptr_t address) { uint16_t* offset_ptr = <API key>(address); return *offset_ptr == <API key>; } // Returns true if |address| belongs to a direct map region. ALWAYS_INLINE bool <API key>(uintptr_t address) { uint16_t* offset_ptr = <API key>(address); return *offset_ptr != <API key> && *offset_ptr != <API key>; } // Returns true if |address| belongs to a normal bucket super page or a direct // map region, i.e. belongs to an allocated super page. ALWAYS_INLINE bool <API key>(uintptr_t address) { uint16_t* offset_ptr = <API key>(address); return *offset_ptr != <API key>; } } // namespace internal } // namespace base #endif // <API key>
package net.jloop.rejoice; import net.jloop.rejoice.types.Symbol; import net.jloop.rejoice.types.Type; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class MacroHelper { public static List<Value> collect(Env env, Iterator<Value> input, Symbol terminator) { List<Value> output = new ArrayList<>(); while (true) { if (!input.hasNext()) { throw new RuntimeError("MACRO", "Input stream ended before finding the terminating symbol '" + terminator.print() + "'"); } Value next = input.next(); if (next instanceof Symbol) { if (next.equals(terminator)) { return output; } Function function = env.lookup((Symbol) next); if (function instanceof Macro) { env.trace().push((Symbol) next); Iterator<Value> values = ((Macro) function).call(env, input); while (values.hasNext()) { output.add(values.next()); } env.trace().pop(); } else { output.add(next); } } else { output.add(next); } } } @SuppressWarnings("unchecked") public static <T extends Value> T match(Iterator<Value> input, Type type) { if (!input.hasNext()) { throw new RuntimeError("MACRO", "Unexpected EOF when attempting to match " + type.print()); } Value next = input.next(); if (type == next.type()) { return (T) next; } else { throw new RuntimeError("MACRO", "Expecting to match " + type.print() + ", but found " + next.type().print() + " with value '" + next.print() + "'"); } } public static void match(Iterator<Value> input, Symbol symbol) { if (!input.hasNext()) { throw new RuntimeError("MACRO", "Unexpected EOF when attempting to match ^symbol '" + symbol.print() + "'"); } Value next = input.next(); if (!next.equals(symbol)) { throw new RuntimeError("MACRO", "Expecting to match symbol '" + symbol.print() + "' , but found " + next.type().print() + " with value '" + next.print() + "'"); } } }
import React from "react"; import { Text, View } from "react-native"; import { defaultProps, propTypes } from "./caption-prop-types"; import styles from "./styles"; const renderCredits = (style, credits) => { if (!credits || credits === "") { return null; } return ( <Text style={[styles.text, styles.credits, style.text, style.credits]}> {credits.toUpperCase()} </Text> ); }; const renderText = (style, text) => { if (!text || text === "") { return null; } return <Text style={[styles.text, style.text, style.caption]}>{text}</Text>; }; const Caption = ({ children, credits, style, text }) => ( <View> {children} <View style={[styles.container, style.container]}> {renderText(style, text)} {renderCredits(style, credits)} </View> </View> ); Caption.propTypes = propTypes; Caption.defaultProps = defaultProps; export default Caption; export { default as CentredCaption } from "./centred-caption";
<h1>Header</h1> <p>Now, let's try something <em>inline</em>, to see if it works</p> <p>Blah blah blah <a href="http: <ul> <li>Basic list</li> <li>Basic list 2</li> </ul> <p>addss</p> <ul> <li>Lazy list</li> </ul> <p>An <a href="http://example.com" title="Title">example</a> (oops)</p> <p>Now, let's use a footnote[^1]. Not bad, eh? Let's continue.</p> <p>[^1]: Here is the text of the footnote continued on several lines. some more of the footnote, etc.</p> <pre><code>Actually, another paragraph too. </code></pre> <p>And then there is a little bit of text.</p>
<?php namespace yii\db; /** * SchemaBuilderTrait contains shortcut methods to create instances of [[ColumnSchemaBuilder]]. * * These can be used in database migrations to define database schema types using a PHP interface. * This is useful to define a schema in a DBMS independent way so that the application may run on * different DBMS the same way. * * For example you may use the following code inside your migration files: * * ```php * $this->createTable('example_table', [ * 'id' => $this->primaryKey(), * 'name' => $this->string(64)->notNull(), * 'type' => $this->integer()->notNull()->defaultValue(10), * 'description' => $this->text(), * 'rule_name' => $this->string(64), * 'data' => $this->text(), * 'CreatedDateTime' => $this->datetime()->notNull(), * '<API key>' => $this->datetime(), * ]); * ``` * * @author Vasenin Matvey <vaseninm@gmail.com> * @since 2.0.6 */ trait SchemaBuilderTrait { /** * @return Connection the database connection to be used for schema building. */ protected abstract function getDb(); /** * Creates a primary key column. * @param integer $length column size or precision definition. * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function primaryKey($length = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_PK, $length); } /** * Creates a big primary key column. * @param integer $length column size or precision definition. * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function bigPrimaryKey($length = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_BIGPK, $length); } /** * Creates a char column. * @param integer $length column size definition i.e. the maximum string length. * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.8 */ public function char($length = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_CHAR, $length); } /** * Creates a string column. * @param integer $length column size definition i.e. the maximum string length. * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function string($length = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_STRING, $length); } /** * Creates a text column. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function text() { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_TEXT); } /** * Creates a smallint column. * @param integer $length column size or precision definition. * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function smallInteger($length = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_SMALLINT, $length); } /** * Creates an integer column. * @param integer $length column size or precision definition. * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function integer($length = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_INTEGER, $length); } /** * Creates a bigint column. * @param integer $length column size or precision definition. * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function bigInteger($length = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_BIGINT, $length); } /** * Creates a float column. * @param integer $precision column value precision. First parameter passed to the column type, e.g. FLOAT(precision). * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function float($precision = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_FLOAT, $precision); } /** * Creates a double column. * @param integer $precision column value precision. First parameter passed to the column type, e.g. DOUBLE(precision). * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function double($precision = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_DOUBLE, $precision); } /** * Creates a decimal column. * @param integer $precision column value precision, which is usually the total number of digits. * First parameter passed to the column type, e.g. DECIMAL(precision, scale). * This parameter will be ignored if not supported by the DBMS. * @param integer $scale column value scale, which is usually the number of digits after the decimal point. * Second parameter passed to the column type, e.g. DECIMAL(precision, scale). * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function decimal($precision = null, $scale = null) { $length = []; if ($precision !== null) { $length[] = $precision; } if ($scale !== null) { $length[] = $scale; } return $this->getDb()->getSchema()-><API key>(Schema::TYPE_DECIMAL, $length); } /** * Creates a datetime column. * @param integer $precision column value precision. First parameter passed to the column type, e.g. DATETIME(precision). * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function dateTime($precision = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_DATETIME, $precision); } /** * Creates a timestamp column. * @param integer $precision column value precision. First parameter passed to the column type, e.g. TIMESTAMP(precision). * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function timestamp($precision = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_TIMESTAMP, $precision); } /** * Creates a time column. * @param integer $precision column value precision. First parameter passed to the column type, e.g. TIME(precision). * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function time($precision = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_TIME, $precision); } /** * Creates a date column. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function date() { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_DATE); } /** * Creates a binary column. * @param integer $length column size or precision definition. * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function binary($length = null) { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_BINARY, $length); } /** * Creates a boolean column. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function boolean() { return $this->getDb()->getSchema()-><API key>(Schema::TYPE_BOOLEAN); } /** * Creates a money column. * @param integer $precision column value precision, which is usually the total number of digits. * First parameter passed to the column type, e.g. DECIMAL(precision, scale). * This parameter will be ignored if not supported by the DBMS. * @param integer $scale column value scale, which is usually the number of digits after the decimal point. * Second parameter passed to the column type, e.g. DECIMAL(precision, scale). * This parameter will be ignored if not supported by the DBMS. * @return ColumnSchemaBuilder the column instance which can be further customized. * @since 2.0.6 */ public function money($precision = null, $scale = null) { $length = []; if ($precision !== null) { $length[] = $precision; } if ($scale !== null) { $length[] = $scale; } return $this->getDb()->getSchema()-><API key>(Schema::TYPE_MONEY, $length); } }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http: <html xmlns="http: <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Document Info and Metadata - Zend Framework Manual</title> </head> <body> <table width="100%"> <tr valign="top"> <td width="85%"> <table width="100%"> <tr> <td width="25%" style="text-align: left;"> <a href="zend.pdf.<API key>.html">Interactive Features</a> </td> <td width="50%" style="text-align: center;"> <div class="up"><span class="up"><a href="zend.pdf.html">Zend_Pdf</a></span><br /> <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div> </td> <td width="25%" style="text-align: right;"> <div class="next" style="text-align: right; float: right;"><a href="zend.pdf.usage.html">Zend_Pdf module usage example</a></div> </td> </tr> </table> <hr /> <div id="zend.pdf.info" class="section"><div class="info"><h1 class="title">Document Info and Metadata</h1></div> <p class="para"> A <acronym class="acronym">PDF</acronym> document may include general information such as the document&#039;s title, author, and creation and modification dates. </p> <p class="para"> Historically this information is stored using special Info structure. This structure is available for read and writing as an associative array using <span class="property">properties</span> public property of <span class="classname">Zend_Pdf</span> objects: </p> <div class="programlisting php"><div class="phpcode"><div class="php" style="font-family: monospace;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$pdf</span> = Zend_Pdf::<span style="color: #006600;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$pdfPath</span><span style="color: #66cc66;">&#41;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$pdf</span>-&gt;<span style="color: #006600;">properties</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'Title'</span><span style="color: #66cc66;">&#93;</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$pdf</span>-&gt;<span style="color: #006600;">properties</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'Author'</span><span style="color: #66cc66;">&#93;</span> . <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$pdf</span>-&gt;<span style="color: #006600;">properties</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'Title'</span><span style="color: #66cc66;">&#93;</span> = <span style="color: #ff0000;">'New Title.'</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$pdf</span>-&gt;<span style="color: #006600;">save</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$pdfPath</span><span style="color: #66cc66;">&#41;</span>;</div></li></ol></div></div></div> <p class="para"> The following keys are defined by <acronym class="acronym">PDF</acronym> v1.4 (Acrobat 5) standard: <ul class="itemizedlist"> <li class="listitem"> <p class="para"> <em class="emphasis">Title</em> - string, optional, the document&#039;s title. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">Author</em> - string, optional, the name of the person who created the document. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">Subject</em> - string, optional, the subject of the document. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">Keywords</em> - string, optional, keywords associated with the document. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">Creator</em> - string, optional, if the document was converted to <acronym class="acronym">PDF</acronym> from another format, the name of the application (for example, Adobe FrameMaker®) that created the original document from which it was converted. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">Producer</em> - string, optional, if the document was converted to <acronym class="acronym">PDF</acronym> from another format, the name of the application (for example, Acrobat Distiller) that converted it to <acronym class="acronym">PDF</acronym>.. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">CreationDate</em> - string, optional, the date and time the document was created, in the following form: &quot;D:YYYYMMDDHHmmSSOHH&#039;mm&#039;&quot;, where: <ul class="itemizedlist"> <li class="listitem"> <p class="para"> <em class="emphasis">YYYY</em> is the year. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">MM</em> is the month. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">DD</em> is the day (01–31). </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">HH</em> is the hour (00–23). </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">mm</em>is the minute (00–59). </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">SS</em> is the second (00–59). </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">O</em> is the relationship of local time to Universal Time (UT), denoted by one of the characters +, −, or Z (see below). </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">HH</em> followed by &#039; is the absolute value of the offset from UT in hours (00–23). </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">mm</em> followed by &#039; is the absolute value of the offset from UT in minutes (00–59). </p> </li> </ul> The apostrophe character (&#039;) after HH and mm is part of the syntax. All fields after the year are optional. (The prefix D:, although also optional, is strongly recommended.) The default values for MM and DD are both 01; all other numerical fields default to zero values. A plus sign (+) as the value of the O field signifies that local time is later than UT, a minus sign (−) that local time is earlier than UT, and the letter Z that local time is equal to UT. If no UT information is specified, the relationship of the specified time to UT is considered to be unknown. Whether or not the time zone is known, the rest of the date should be specified in local time. </p> <p class="para"> For example, December 23, 1998, at 7:52 PM, U.S. Pacific Standard Time, is represented by the string &quot;D:199812231952−08&#039;00&#039;&quot;. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">ModDate</em> - string, optional, the date and time the document was most recently modified, in the same form as <em class="emphasis">CreationDate</em>. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis">Trapped</em> - boolean, optional, indicates whether the document has been modified to include trapping information. <ul class="itemizedlist"> <li class="listitem"> <p class="para"> <em class="emphasis"><b><tt>TRUE</tt></b></em> - The document has been fully trapped; no further trapping is needed. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis"><b><tt>FALSE</tt></b></em> - The document has not yet been trapped; any desired trapping must still be done. </p> </li> <li class="listitem"> <p class="para"> <em class="emphasis"><b><tt>NULL</tt></b></em> - Either it is unknown whether the document has been trapped or it has been partly but not yet fully trapped; some additional trapping may still be needed. </p> </li> </ul> </p> </li> </ul> </p> <p class="para"> Since <acronym class="acronym">PDF</acronym> v 1.6 metadata can be stored in the special <acronym class="acronym">XML</acronym> document attached to the <acronym class="acronym">PDF</acronym> (XMP - <a href="http: </p> <p class="para"> This <acronym class="acronym">XML</acronym> document can be retrieved and attached to the PDF with <span class="methodname">Zend_Pdf::getMetadata()</span> and <span class="methodname">Zend_Pdf::setMetadata($metadata)</span> methods: </p> <div class="programlisting php"><div class="phpcode"><div class="php" style="font-family: monospace;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$pdf</span> = Zend_Pdf::<span style="color: #006600;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$pdfPath</span><span style="color: #66cc66;">&#41;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$metadata</span> = <span style="color: #0000ff;">$pdf</span>-&gt;<span style="color: #006600;">getMetadata</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$metadataDOM</span> = <span style="color: #000000; font-weight: bold;">new</span> DOMDocument<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$metadataDOM</span>-&gt;<span style="color: #006600;">loadXML</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$metadata</span><span style="color: #66cc66;">&#41;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$xpath</span> = <span style="color: #000000; font-weight: bold;">new</span> DOMXPath<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$metadataDOM</span><span style="color: #66cc66;">&#41;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$<API key></span> = <span style="color: #0000ff;">$xpath</span>-&gt;<span style="color: #006600;">query</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'/rdf:RDF/rdf:Description'</span><span style="color: #66cc66;">&#41;</span></div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt;<span style="color: #006600;">item</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span></div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt;<span style="color: #006600;">lookupNamespaceURI</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'pdf'</span><span style="color: #66cc66;">&#41;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$xpath</span>-&gt;<span style="color: #006600;">registerNamespace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'pdf'</span>, <span style="color: #0000ff;">$<API key></span><span style="color: #66cc66;">&#41;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$titleNode</span> = <span style="color: #0000ff;">$xpath</span>-&gt;<span style="color: #006600;">query</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'/rdf:RDF/rdf:Description/pdf:Title'</span><span style="color: #66cc66;">&#41;</span>-&gt;<span style="color: #006600;">item</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$title</span> = <span style="color: #0000ff;">$titleNode</span>-&gt;<span style="color: #006600;">nodeValue</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">...</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$titleNode</span>-&gt;<span style="color: #006600;">nodeValue</span> = <span style="color: #ff0000;">'New title'</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$pdf</span>-&gt;<span style="color: #006600;">setMetadata</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$metadataDOM</span>-&gt;<span style="color: #006600;">saveXML</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div></li> <li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$pdf</span>-&gt;<span style="color: #006600;">save</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$pdfPath</span><span style="color: #66cc66;">&#41;</span>;</div></li></ol></div></div></div> <p class="para"> Common document properties are duplicated in the Info structure and Metadata document (if presented). It&#039;s user application responsibility now to keep them synchronized. </p> </div> <hr /> <table width="100%"> <tr> <td width="25%" style="text-align: left;"> <a href="zend.pdf.<API key>.html">Interactive Features</a> </td> <td width="50%" style="text-align: center;"> <div class="up"><span class="up"><a href="zend.pdf.html">Zend_Pdf</a></span><br /> <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div> </td> <td width="25%" style="text-align: right;"> <div class="next" style="text-align: right; float: right;"><a href="zend.pdf.usage.html">Zend_Pdf module usage example</a></div> </td> </tr> </table> </td> <td style="font-size: smaller;" width="15%"> <style type="text/css"> #leftbar { float: left; width: 186px; padding: 5px; font-size: smaller; } ul.toc { margin: 0px 5px 5px 5px; padding: 0px; } ul.toc li { font-size: 85%; margin: 1px 0 1px 1px; padding: 1px 0 1px 11px; list-style-type: none; background-repeat: no-repeat; background-position: center left; } ul.toc li.header { font-size: 115%; padding: 5px 0px 5px 11px; border-bottom: 1px solid #cccccc; margin-bottom: 5px; } ul.toc li.active { font-weight: bold; } ul.toc li a { text-decoration: none; } ul.toc li a:hover { text-decoration: underline; } </style> <ul class="toc"> <li class="header home"><a href="manual.html">Programmer's Reference Guide</a></li> <li class="header up"><a href="manual.html">Programmer's Reference Guide</a></li> <li class="header up"><a href="reference.html">Zend Framework Reference</a></li> <li class="header up"><a href="zend.pdf.html">Zend_Pdf</a></li> <li><a href="zend.pdf.introduction.html"></a></li> <li><a href="zend.pdf.create.html"> PDF </a></li> <li><a href="zend.pdf.save.html"> PDF </a></li> <li><a href="zend.pdf.pages.html"></a></li> <li><a href="zend.pdf.drawing.html">Drawing</a></li> <li><a href="zend.pdf.<API key>.html">Interactive Features</a></li> <li class="active"><a href="zend.pdf.info.html">Document Info and Metadata</a></li> <li><a href="zend.pdf.usage.html">Zend_Pdf module usage example</a></li> </ul> </td> </tr> </table> </body> </html>
import Control.Monad (when) import Distribution.Simple import System.Directory (doesFileExist) import System.Process (readProcess) import Data.ByteString.Char8 as BS gitVersion :: IO () gitVersion = do let filename = "app/Internal/Version.hs" versionSh = "./version.sh" hasVersionSh <- doesFileExist versionSh when hasVersionSh $ do ver <- fmap BS.pack $ readProcess "bash" [versionSh] "" let override = BS.writeFile filename ver e <- doesFileExist filename if e then do orig_ver <- BS.readFile filename when (ver /= orig_ver) $ do override else override main :: IO () main = gitVersion >> defaultMain
module Vector where data Vec = V !Int !Int deriving (Show, Eq) instance Num Vec where V x1 y1 + V x2 y2 = V (x1+x2) (y1+y2) V x1 y1 - V x2 y2 = V (x1-x2) (y1-y2) V x1 y1 * V x2 y2 = V (x1*x2) (y1*y2) abs (V x y) = V (abs x) (abs y) signum (V x y) = V (signum x) (signum y) fromInteger x = V (fromInteger x) (fromInteger x)
# modification, are permitted provided that the following conditions are met: # documentation and/or other materials provided with the distribution. # * Neither the name of the author of this software nor the name of # contributors to this software may be used to endorse or promote products # derived from this software without specific prior written consent. # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # 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. from supybot.test import * class <API key>(PluginTestCase): plugins = ('MyChannelLogger',) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
#include "ets_sys.h" #include "osapi.h" #include "gpio.h" #include "os_type.h" #include "user_config.h" #define LED_PIN (2) static volatile os_timer_t blinky_timer; static void <API key>(void *prv); void ICACHE_FLASH_ATTR user_init() { uint8_t value = 0; /* setup */ gpio_init(); // init gpio subsytem gpio_output_set(0, 0, (1 << LED_PIN), 0); // set LED pin as output with low state uart_div_modify(0, UART_CLK_FREQ / 115200); // set UART baudrate os_printf("\n\nSDK version:%s\n\n", <API key>()); /* start timer (500ms) */ os_timer_setfn(&blinky_timer, (os_timer_func_t *)<API key>, NULL); os_timer_arm(&blinky_timer, 500, 1); } void <API key>(void *prv) { if (GPIO_REG_READ(GPIO_OUT_ADDRESS) & (1 << LED_PIN)) { gpio_output_set(0, (1 << LED_PIN), 0, 0); // LED off } else { gpio_output_set((1 << LED_PIN), 0, 0, 0); // LED on } }
<?php use yii\helpers\Html; use yii\widgets\ActiveForm; /** Get all roles */ $authManager = Yii::$app->authManager; ?> <div class="<API key>"> <?php $form = ActiveForm::begin(); ?> <?= Html::activeHiddenInput($formModel, 'userId')?> <label class="control-label"><?=$formModel->attributeLabels()['roles']?></label> <input type="hidden" name="AssignmentForm[roles]" value=""> <table class="table table-striped table-bordered detail-view"> <thead> <tr> <th style="width:1px"></th> <th style="width:150px">Name</th> <th>Description</th> </tr> <tbody> <?php foreach ($authManager->getRoles() as $role): ?> <tr> <?php $checked = true; if($formModel->roles==null||!is_array($formModel->roles)||count($formModel->roles)==0){ $checked = false; }else if(!in_array($role->name, $formModel->roles) ){ $checked = false; } ?> <td><input <?= $checked? "checked":"" ?> type="checkbox" name="AssignmentForm[roles][]" value="<?= $role->name?>"></td> <td><?= $role->name ?></td> <td><?= $role->description ?></td> </tr> <?php endforeach; ?> </tbody> </table> <?php if (!Yii::$app->request->isAjax) { ?> <div class="form-group"> <?= Html::submitButton(Yii::t('rbac', 'Save'), ['class' => 'btn btn-success']) ?> </div> <?php } ?> <?php ActiveForm::end(); ?> </div>
<!DOCTYPE html PUBLIC "- window.onload = function () {pageLoad();}; </script></head><body id="mini"><div id="module-header"><p class="caption">Control.Lens.Internal.Getter</p></div><div id="interface"><div class="top"><p class="src"><a href="<API key>.html#v:noEffect" target="main">noEffect</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="<API key>.html#t:AlongsideLeft" target="main">AlongsideLeft</a> f b a</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="<API key>.html#t:AlongsideRight" target="main">AlongsideRight</a> f a b</p></div></div></body></html>
// IPC messages for resource loading. // NOTE: All messages must send an |int request_id| as their first parameter. // Multiply-included message file, hence no include guard. #include "base/memory/shared_memory.h" #include "base/process/process.h" #include "content/common/<API key>.h" #include "content/common/navigation_params.h" #include "content/common/<API key>.h" #include "content/common/service_worker/<API key>.h" #include "content/public/common/common_param_traits.h" #include "content/public/common/resource_response.h" #include "ipc/ipc_message_macros.h" #include "net/base/request_priority.h" #include "net/http/http_response_info.h" #include "net/url_request/redirect_info.h" #ifndef <API key> #define <API key> namespace net { struct LoadTimingInfo; } namespace content { struct <API key>; } namespace IPC { template <> struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { typedef scoped_refptr<net::HttpResponseHeaders> param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template <> struct CONTENT_EXPORT ParamTraits<storage::DataElement> { typedef storage::DataElement param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template <> struct ParamTraits<scoped_refptr<content::<API key>> > { typedef scoped_refptr<content::<API key>> param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template <> struct ParamTraits<net::LoadTimingInfo> { typedef net::LoadTimingInfo param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template <> struct ParamTraits<scoped_refptr<content::ResourceRequestBody> > { typedef scoped_refptr<content::ResourceRequestBody> param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); static void Log(const param_type& p, std::string* l); }; } // namespace IPC #endif // <API key> #define IPC_MESSAGE_START ResourceMsgStart #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT <API key>( \ net::HttpResponseInfo::ConnectionInfo, \ net::HttpResponseInfo::<API key> - 1) <API key>(content::FetchRequestMode, content::<API key>) <API key>(content::<API key>, content::<API key>) <API key>(content::FetchRedirectMode, content::FetchRedirectMode::LAST) <API key>(content::<API key>) <API key>(content::<API key>) <API key>(request_start) <API key>(response_start) <API key>() <API key>(content::SyncLoadResult) <API key>(content::<API key>) <API key>(error_code) <API key>(final_url) <API key>(data) <API key>() <API key>(content::<API key>) <API key>(request_time) <API key>(response_time) <API key>(headers) <API key>(mime_type) <API key>(charset) <API key>(security_info) <API key>(content_length) <API key>(encoded_data_length) <API key>(appcache_id) <API key>(<API key>) <API key>(load_timing) <API key>(devtools_info) <API key>(download_file_path) <API key>(<API key>) <API key>(was_npn_negotiated) <API key>(<API key>) <API key>(connection_info) <API key>(<API key>) <API key>(<API key>) <API key>(socket_address) <API key>(<API key>) <API key>(<API key>) <API key>(<API key>) <API key>(<API key>) <API key>(<API key>) <API key>(<API key>) <API key>(proxy_server) <API key>(is_using_lofi) <API key>() <API key>(net::RedirectInfo) <API key>(status_code) <API key>(new_method) <API key>(new_url) <API key>(<API key>) <API key>(new_referrer) <API key>() // Parameters for a resource request. IPC_STRUCT_BEGIN(<API key>) // The request method: GET, POST, etc. IPC_STRUCT_MEMBER(std::string, method) // The requested URL. IPC_STRUCT_MEMBER(GURL, url) // Usually the URL of the document in the top-level window, which may be // checked by the third-party cookie blocking policy. Leaving it empty may // lead to undesired cookie blocking. Third-party cookie blocking can be // bypassed by setting <API key> = url, but this should ideally // only be done if there really is no way to determine the correct value. IPC_STRUCT_MEMBER(GURL, <API key>) // The referrer to use (may be empty). IPC_STRUCT_MEMBER(GURL, referrer) // The referrer policy to use. IPC_STRUCT_MEMBER(blink::WebReferrerPolicy, referrer_policy) // The frame's visiblity state. IPC_STRUCT_MEMBER(blink::<API key>, visiblity_state) // Additional HTTP request headers. IPC_STRUCT_MEMBER(std::string, headers) // net::URLRequest load flags (0 by default). IPC_STRUCT_MEMBER(int, load_flags) // Process ID from which this request originated, or zero if it originated // in the renderer itself. // If <API key> isn't specified, then plugin requests get routed // through the renderer and and this holds the pid of the plugin process. // Otherwise this holds the render_process_id of the view that has the plugin. IPC_STRUCT_MEMBER(int, origin_pid) // What this resource load is for (main frame, sub-frame, sub-resource, // object). IPC_STRUCT_MEMBER(content::ResourceType, resource_type) // The priority of this request. IPC_STRUCT_MEMBER(net::RequestPriority, priority) // Used by plugin->browser requests to get the correct net::URLRequestContext. IPC_STRUCT_MEMBER(uint32, request_context) // Indicates which frame (or worker context) the request is being loaded into, // or kAppCacheNoHostId. IPC_STRUCT_MEMBER(int, appcache_host_id) // True if corresponding AppCache group should be resetted. IPC_STRUCT_MEMBER(bool, <API key>) // Indicates which frame (or worker context) the request is being loaded into, // or <API key>. IPC_STRUCT_MEMBER(int, <API key>) // True if the request should not be handled by the ServiceWorker. IPC_STRUCT_MEMBER(bool, skip_service_worker) // The request mode passed to the ServiceWorker. IPC_STRUCT_MEMBER(content::FetchRequestMode, fetch_request_mode) // The credentials mode passed to the ServiceWorker. IPC_STRUCT_MEMBER(content::<API key>, <API key>) // The redirect mode used in Fetch API. IPC_STRUCT_MEMBER(content::FetchRedirectMode, fetch_redirect_mode) // The request context passed to the ServiceWorker. IPC_STRUCT_MEMBER(content::RequestContextType, <API key>) // The frame type passed to the ServiceWorker. IPC_STRUCT_MEMBER(content::<API key>, fetch_frame_type) // Optional resource request body (may be null). IPC_STRUCT_MEMBER(scoped_refptr<content::ResourceRequestBody>, request_body) IPC_STRUCT_MEMBER(bool, download_to_file) // True if the request was user initiated. IPC_STRUCT_MEMBER(bool, has_user_gesture) // True if load timing data should be collected for request. IPC_STRUCT_MEMBER(bool, enable_load_timing) // True if upload progress should be available for request. IPC_STRUCT_MEMBER(bool, <API key>) // True if login prompts for this request should be supressed. IPC_STRUCT_MEMBER(bool, <API key>) // The routing id of the RenderFrame. IPC_STRUCT_MEMBER(int, render_frame_id) // True if |frame_id| is the main frame of a RenderView. IPC_STRUCT_MEMBER(bool, is_main_frame) // True if |<API key>| is the main frame of a RenderView. IPC_STRUCT_MEMBER(bool, <API key>) // Identifies the parent frame of the frame that sent the request. // -1 if unknown / invalid. IPC_STRUCT_MEMBER(int, <API key>) IPC_STRUCT_MEMBER(ui::PageTransition, transition_type) // For navigations, whether this navigation should replace the current session // history entry on commit. IPC_STRUCT_MEMBER(bool, <API key>) // The following two members identify a previous request that has been // created before this navigation has been transferred to a new render view. // This serves the purpose of recycling the old request. // Unless this refers to a transferred navigation, these values are -1 and -1. IPC_STRUCT_MEMBER(int, <API key>) IPC_STRUCT_MEMBER(int, <API key>) // Whether or not we should allow the URL to download. IPC_STRUCT_MEMBER(bool, allow_download) // Whether to intercept headers to pass back to the renderer. IPC_STRUCT_MEMBER(bool, report_raw_headers) // Whether or not to request a LoFi version of the resource or let the browser // decide. IPC_STRUCT_MEMBER(content::LoFiState, lofi_state) IPC_STRUCT_END() // Parameters for a <API key> IPC_STRUCT_BEGIN(<API key>) // The error code. IPC_STRUCT_MEMBER(int, error_code) // Was ignored by the request handler. IPC_STRUCT_MEMBER(bool, <API key>) // A copy of the data requested exists in the cache. IPC_STRUCT_MEMBER(bool, exists_in_cache) // Serialized security info; see content/common/<API key>.h. IPC_STRUCT_MEMBER(std::string, security_info) // Time the request completed. IPC_STRUCT_MEMBER(base::TimeTicks, completion_time) // Total amount of data received from the network. IPC_STRUCT_MEMBER(int64, encoded_data_length) IPC_STRUCT_END() // Resource messages sent from the browser to the renderer. // Sent when the headers are available for a resource request. <API key>(<API key>, int /* request_id */, content::<API key>) // Sent when cached metadata from a resource request is ready. <API key>(<API key>, int /* request_id */, std::vector<char> /* data */) // Sent as upload progress is being made. <API key>(<API key>, int /* request_id */, int64 /* position */, int64 /* size */) // Sent when the request has been redirected. The receiver is expected to // respond with either a FollowRedirect message (if the redirect is to be // followed) or a CancelRequest message (if it should not be followed). <API key>(<API key>, int /* request_id */, net::RedirectInfo /* redirect_info */, content::<API key>) // Sent to set the shared memory buffer to be used to transmit response data to // the renderer. Subsequent DataReceived messages refer to byte ranges in the // shared memory buffer. The shared memory buffer should be retained by the // renderer until the resource request completes. // NOTE: The shared memory handle should already be mapped into the process // that receives this message. // TODO(darin): The |renderer_pid| parameter is just a temporary parameter, // added to help in debugging crbug/160401. <API key>(<API key>, int /* request_id */, base::SharedMemoryHandle /* shm_handle */, int /* shm_size */, base::ProcessId /* renderer_pid */) // Sent when some data from a resource request is ready. The data offset and // length specify a byte range into the shared memory buffer provided by the // SetDataBuffer message. <API key>(<API key>, int /* request_id */, int /* data_offset */, int /* data_length */, int /* encoded_data_length */) // Sent when some data from a resource request has been downloaded to // file. This is only called in the 'download_to_file' case and replaces // <API key> in the call sequence in that case. <API key>(<API key>, int /* request_id */, int /* data_len */, int /* encoded_data_length */) // Sent when the request has been completed. <API key>(<API key>, int /* request_id */, <API key>) // Resource messages sent from the renderer to the browser. // Makes a resource request via the browser. <API key>(<API key>, int /* routing_id */, int /* request_id */, <API key>) // Cancels a resource request with the ID given as the parameter. <API key>(<API key>, int /* request_id */) // Follows a redirect that occured for the resource request with the ID given // as the parameter. <API key>(<API key>, int /* request_id */) // Makes a synchronous resource request via the browser. <API key>(<API key>, int /* request_id */, <API key>, content::SyncLoadResult) // Sent when the renderer process is done processing a DataReceived // message. <API key>(<API key>, int /* request_id */) // Sent when the renderer has processed a DataDownloaded message. <API key>(<API key>, int /* request_id */) // Sent by the renderer process to acknowledge receipt of a // UploadProgress message. <API key>(<API key>, int /* request_id */) // Sent when the renderer process deletes a resource loader. <API key>(<API key>, int /* request_id */) // Sent by the renderer when a resource request changes priority. <API key>(<API key>, int /* request_id */, net::RequestPriority, int /* <API key> */)
#include "chrome/browser/ui/simple_message_box.h" #include <utility> #include "base/bind.h" #include "base/callback.h" #include "base/compiler_specific.h" #include "base/macros.h" #include "base/message_loop/<API key>.h" #include "base/run_loop.h" #include "build/build_config.h" #include "chrome/browser/ui/browser_dialogs.h" #include "chrome/browser/ui/<API key>.h" #include "chrome/browser/ui/views/message_box_dialog.h" #include "chrome/grit/generated_resources.h" #include "components/constrained_window/<API key>.h" #include "components/<API key>/browser/<API key>.h" #include "components/strings/grit/components_strings.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/display/screen.h" #include "ui/gfx/native_widget_types.h" #include "ui/views/controls/message_box_view.h" #include "ui/views/widget/widget.h" #include "ui/views/window/dialog_delegate.h" #if defined(OS_WIN) #include "ui/base/win/message_box_win.h" #include "ui/views/win/hwnd_util.h" #endif #if defined(OS_MACOSX) #include "chrome/browser/ui/cocoa/<API key>.h" #endif namespace { #if defined(OS_WIN) UINT <API key>(chrome::MessageBoxType type) { UINT flags = MB_SETFOREGROUND; switch (type) { case chrome::<API key>: return flags | MB_OK | MB_ICONWARNING; case chrome::<API key>: return flags | MB_YESNO | MB_ICONQUESTION; } NOTREACHED(); return flags | MB_OK | MB_ICONWARNING; } #endif // static chrome::MessageBoxResult ShowSync(gfx::NativeWindow parent, const base::string16& title, const base::string16& message, chrome::MessageBoxType type, const base::string16& yes_text, const base::string16& no_text, const base::string16& checkbox_text) { chrome::MessageBoxResult result = chrome::<API key>; // TODO(pkotwicz): Exit message loop when the dialog is closed by some other // means than |Cancel| or |Accept|. crbug.com/404385 base::RunLoop run_loop(base::RunLoop::Type::<API key>); MessageBoxDialog::Show( parent, title, message, type, yes_text, no_text, checkbox_text, base::BindOnce( [](base::RunLoop* run_loop, chrome::MessageBoxResult* out_result, chrome::MessageBoxResult messagebox_result) { *out_result = messagebox_result; run_loop->Quit(); }, &run_loop, &result)); run_loop.Run(); return result; } } // namespace // MessageBoxDialog, public: // static chrome::MessageBoxResult MessageBoxDialog::Show( gfx::NativeWindow parent, const base::string16& title, const base::string16& message, chrome::MessageBoxType type, const base::string16& yes_text, const base::string16& no_text, const base::string16& checkbox_text, MessageBoxDialog::<API key> callback) { if (!callback) return ShowSync(parent, title, message, type, yes_text, no_text, checkbox_text); <API key>::<API key>(); if (chrome::internal::<API key>) { std::move(callback).Run(chrome::<API key>); return chrome::<API key>; } // Views dialogs cannot be shown outside the UI thread message loop or if the // ResourceBundle is not initialized yet. // Fallback to logging with a default response or a Windows MessageBox. #if defined(OS_WIN) if (!base::<API key>::IsSet() || !base::RunLoop::<API key>() || !ui::ResourceBundle::HasSharedInstance()) { LOG_IF(ERROR, !checkbox_text.empty()) << "Dialog checkbox won't be shown"; int result = ui::MessageBox(views::HWNDForNativeWindow(parent), message, title, <API key>(type)); std::move(callback).Run((result == IDYES || result == IDOK) ? chrome::<API key> : chrome::<API key>); return chrome::<API key>; } #elif defined(OS_MACOSX) if (!base::<API key>::IsSet() || !base::RunLoop::<API key>() || !ui::ResourceBundle::HasSharedInstance()) { // Even though this function could return a value synchronously here in // principle, in practice call sites do not expect any behavior other than a // return of DEFERRED and an invocation of the callback. std::move(callback).Run( chrome::ShowMessageBoxCocoa(message, type, checkbox_text)); return chrome::<API key>; } #else if (!base::<API key>::IsSet() || !ui::ResourceBundle::HasSharedInstance() || !display::Screen::GetScreen()) { LOG(ERROR) << "Unable to show a dialog outside the UI thread message loop: " << title << " - " << message; std::move(callback).Run(chrome::<API key>); return chrome::<API key>; } #endif bool is_system_modal = !parent; #if defined(OS_MACOSX) // Mac does not support system modals, so never ask MessageBoxDialog to // be system modal. is_system_modal = false; #endif MessageBoxDialog* dialog = new MessageBoxDialog( title, message, type, yes_text, no_text, checkbox_text, is_system_modal); views::Widget* widget = constrained_window::<API key>(dialog, parent); #if defined(OS_MACOSX) // Mac does not support system modal dialogs. If there is no parent window to // attach to, move the dialog's widget on top so other windows do not obscure if (!parent) widget->SetZOrderLevel(ui::ZOrderLevel::kFloatingWindow); #endif widget->Show(); dialog->Run(std::move(callback)); return chrome::<API key>; } void MessageBoxDialog::OnDialogAccepted() { if (!message_box_view_->HasCheckBox() || message_box_view_->IsCheckBoxSelected()) { Done(chrome::<API key>); } else { Done(chrome::<API key>); } } base::string16 MessageBoxDialog::GetWindowTitle() const { return window_title_; } void MessageBoxDialog::DeleteDelegate() { delete this; } ui::ModalType MessageBoxDialog::GetModalType() const { return is_system_modal_ ? ui::MODAL_TYPE_SYSTEM : ui::MODAL_TYPE_WINDOW; } views::View* MessageBoxDialog::GetContentsView() { return message_box_view_; } bool MessageBoxDialog::<API key>() const { return true; } void MessageBoxDialog::<API key>(views::Widget* widget, bool active) { if (!active) GetWidget()->Close(); } // MessageBoxDialog, private: MessageBoxDialog::MessageBoxDialog(const base::string16& title, const base::string16& message, chrome::MessageBoxType type, const base::string16& yes_text, const base::string16& no_text, const base::string16& checkbox_text, bool is_system_modal) : window_title_(title), type_(type), message_box_view_(new views::MessageBoxView( views::MessageBoxView::InitParams(message))), is_system_modal_(is_system_modal) { SetButtons(type_ == chrome::<API key> ? ui::DIALOG_BUTTON_OK | ui::<API key> : ui::DIALOG_BUTTON_OK); SetAcceptCallback(base::BindOnce(&MessageBoxDialog::OnDialogAccepted, base::Unretained(this))); SetCancelCallback(base::BindOnce(&MessageBoxDialog::Done, base::Unretained(this), chrome::<API key>)); SetCloseCallback(base::BindOnce(&MessageBoxDialog::Done, base::Unretained(this), chrome::<API key>)); base::string16 ok_text = yes_text; if (ok_text.empty()) { ok_text = type_ == chrome::<API key> ? l10n_util::GetStringUTF16(<API key>) : l10n_util::GetStringUTF16(IDS_OK); } SetButtonLabel(ui::DIALOG_BUTTON_OK, ok_text); // Only <API key> has a Cancel button. if (type_ == chrome::<API key>) { base::string16 cancel_text = no_text; if (cancel_text.empty()) cancel_text = l10n_util::GetStringUTF16(IDS_CANCEL); SetButtonLabel(ui::<API key>, cancel_text); } if (!checkbox_text.empty()) message_box_view_->SetCheckBoxLabel(checkbox_text); chrome::<API key>(chrome::DialogIdentifier::SIMPLE_MESSAGE_BOX); } MessageBoxDialog::~MessageBoxDialog() { GetWidget()->RemoveObserver(this); } void MessageBoxDialog::Run(<API key> result_callback) { GetWidget()->AddObserver(this); result_callback_ = std::move(result_callback); } void MessageBoxDialog::Done(chrome::MessageBoxResult result) { CHECK(!result_callback_.is_null()); std::move(result_callback_).Run(result); } views::Widget* MessageBoxDialog::GetWidget() { return message_box_view_->GetWidget(); } const views::Widget* MessageBoxDialog::GetWidget() const { return message_box_view_->GetWidget(); } namespace chrome { void <API key>(gfx::NativeWindow parent, const base::string16& title, const base::string16& message) { MessageBoxDialog::Show(parent, title, message, chrome::<API key>, base::string16(), base::string16(), base::string16()); } void <API key>( gfx::NativeWindow parent, const base::string16& title, const base::string16& message, const base::string16& checkbox_text, base::OnceCallback<void(bool checked)> callback) { MessageBoxDialog::Show(parent, title, message, chrome::<API key>, base::string16(), base::string16(), checkbox_text, base::BindOnce( [](base::OnceCallback<void(bool checked)> callback, MessageBoxResult message_box_result) { std::move(callback).Run(message_box_result == <API key>); }, base::Passed(std::move(callback)))); } MessageBoxResult <API key>(gfx::NativeWindow parent, const base::string16& title, const base::string16& message) { return MessageBoxDialog::Show( parent, title, message, chrome::<API key>, base::string16(), base::string16(), base::string16()); } MessageBoxResult <API key>(gfx::NativeWindow parent, const base::string16& title, const base::string16& message, const base::string16& yes_text, const base::string16& no_text) { return MessageBoxDialog::Show(parent, title, message, chrome::<API key>, yes_text, no_text, base::string16()); } } // namespace chrome
<?php session_start(); if ($_SESSION['user_name']=='') { $user_name_session = $_POST['id']; echo "no session set"; } else { $user_name_session = $_SESSION['user_name']; } //print_r($user_name_session); include_once('/kunden/homepages/0/d643120834/htdocs/config/index.php'); $db = new UserDashboard($_SESSION); // $user = $db->getUserData($user_name_session); // //print_r($user); // $user['stats']['total'] = $db->getUserStats($user_name_session , 'total'); // $user['stats']['total'] = $db->getUserStats($user_name_session , 'fans'); // $user['id'] = $user['user_id']; // $user['photo'] = $db->getProfilePhoto($user_name_session); // $user['media']['audio'] = $db->getUserMedia($user_name_session); // Grab Users Posts // $user['stats']['tracks'] = count($user['media']['audio']); // $user['twitter'] = $user['media']['audio'][0]['twitter']; if (isset($user['photo']) && $user['photo']!='' ) { $profile_image = '<img src="'.$user['photo'].'" alt="'.$user['photo'].'" style="width:100%;">'; } else { if (strpos($user['media']['audio'][0]['photo'], 'http: $media = 'http://freelabel.net/images/'.$user['media']['audio'][0]['photo']; //echo 'I needs to be formated'; } else { $media = $user['media']['audio'][0]['photo']; //echo 'it doesnt need to be!!'; } $profile_image = '<img src="'.$media.'" alt="from-media-'.$media.'" style="width:100%;">'; } if ($user['custom']==''){ $user['custom'] = $db->getCustomData($user); } //print_r($user['media']['audio']); //exit; //print_r($user['user_name']); //exit; //echo '<hr><hr><hr>'; //print_r(); //$user_name_session = $user['user_name']; //echo 'THEUSERER: '.$user_name_session.'<hr>'; $todays_date = date('Y-m-d'); $dashboard_options = ' <div class="btn-group-vertical <API key> " style="width:100%;"> <a onclick="loadPage(\'http://freelabel.net/submit/views/db/recent_posts.php\', \'#<API key>\', \'dashboard\', \''.$user_name_session.'\')" class="btn btn-default btn-lg"><span class="glyphicon glyphicon-dashboard"></span> - Dashboard</a> <a href="http://freelabel.net/@'.strtolower($user['twitter']).'" class="btn btn-default btn-lg" target="_blank" ><span class="glyphicon glyphicon-user"></span> - View Profile</a> <a href=" <a href=" <a href=" <a href=" <a href=" <a href=" <a href="http://freelabel.net/submit/index.php?logout" class="btn btn-danger btn-lg" ><span class="glyphicon glyphicon-log-out"></span> - Logout</a> '; $admin_options = " <hr> <h3>Admin Only:</h3> <a onclick=\"loadPage('http://freelabel.net/submit/views/db/blog_poster.php', '#main_display_panel', 'dashboard', 'admin')\" class='btn btn-warning btn-lg'> <span class='glyphicon glyphicon-pencil'></span>Post</a> <a onclick=\"loadPage('http://freelabel.net/submit/views/db/lead_conversion.php', '#main_display_panel', 'dashboard', 'admin')\" class='btn btn-warning btn-lg'> <span class='glyphicon glyphicon-usd'></span>Clients</a> <a onclick=\"loadPage('http://freelabel.net/twitter/index.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-warning btn-lg'> <span class='glyphicon glyphicon-comment'></span>Twitter</a> <a onclick=\"loadPage('http://freelabel.net/x/s.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-warning btn-lg'><span class='glyphicon glyphicon-list-alt'></span>Script</a> <hr> <h4>Soon-To-Be-Launched</h4> <a onclick=\"loadPage('http://freelabel.net/twitter/index.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-warning btn-lg'> <span class='glyphicon glyphicon-comment'></span>Respond</a> <a onclick=\"loadPage('http://freelabel.net/submit/views/db/blog_poster.php', '#main_display_panel', 'dashboard', 'admin')\" class='btn btn-warning btn-lg'> <span class='glyphicon glyphicon-usd'></span>Release</a> <a onclick=\"loadPage('http://freelabel.net/submit/views/db/current_clients.php', '#main_display_panel', 'dashboard', 'admin')\" class='btn btn-warning btn-lg'> <span class='glyphicon glyphicon-pencil'></span>Reproduce</a> <hr> <h4>Still Testing</h4> <a onclick=\"loadPage('http://freelabel.net/upload/index.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-warning btn-lg'>Uploader</a> <a onclick=\"loadPage('http://freelabel.net/submit/views/uploadedsingles.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-warning btn-lg'>Payouts</a> <a onclick=\"loadPage('http://freelabel.net/tweeter.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-warning btn-lg'>Saved</a> <a onclick=\"loadPage('http://freelabel.net/tweeter.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-warning btn-lg'>Saved</a> <a onclick=\"loadPage('http://freelabel.net/FullWidthTabs/index.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-warning btn-lg'>Full Width</a>"; $update_successful = '<script type="text/javascript"> function redirectToSite() { alert("Your Changes Have Been Saved! Now Returning you to your Dashboard.."); window.location.assign("http://freelabel.net/submit/") } </script>'; $<API key> = '<div class="<API key>">'; //$<API key> .= '<h3 >Hello, '.$user_name_session.'! </h3>'; $<API key> .= '<div class="label label-warning" role="alert">You\'ll need to finish completing all the additional information regarding creating your profile, '.$user_name_session.'! </div>'; //$<API key> .= '<div class="alert alert-warning" role="alert">You\'ll need to <a href="#" class="alert-link">make your payment</a> before we can get you booked in rotation!</div>'; $<API key> .= " <form name='<API key>' action='http://freelabel.net/submit/views/db/campaign_info.php' method='post' enctype=\"multipart/form-data\" class='<API key> panel-body row' > <h1>Complete Profile</h1> <p class='section-description text-muted' >Use this form to complete your FREELABEL Profile. We will use this information to build your campaign as well as tag you during promotional campaigns!</p> <div class='col-md-3 col-sm-6' > <h4><i class='fa fa-photo' ></i> Upload Profile Photo</h4><input type='file' class='form-control' name='photo' required> </div> <div class='col-md-3 col-sm-6' > <h4><i class='fa fa-comment'></i> Display Name</h4> <input type='text' class='form-control' name='artist_name' placeholder='What is your Artist or Brand Name?' required> </div> <div class='col-md-3 col-sm-6' > <h4><i class='fa fa-map-marker'></i> Location</h4> <input type='text' class='form-control' name='artist_location' placeholder='Where are you from?' required> </div> <div class='col-md-3 col-sm-6' > <h4><i class='fa fa-users'></i> Brand or Management <small>(optional)</small></h4> <input type='text' class='form-control' name='artist_location' placeholder='Enter management contact information (Name, Phone, Email, etc..)' > </div> <div class='col-md-12'> <h4><i class='fa fa-book'></i> Artist Bio</h4><br> <textarea name='artist_description' class='form-control' rows='4' cols='53' placeholder='Tell us a little (or alot) about yourself..'></textarea> </div> <h1>Link Social Media</h1> <div class=' col-md-4 col-sm-6' > <h4><i class='fa fa-twitter'></i> Twitter</h4> <input type='text' class='form-control' name='artist_<TwitterConsumerkey>='Enter your Twitter username.. (include \"@\" sign)' required > </div> <div class=' col-md-4 col-sm-6' > <h4><i class='fa fa-instagram'></i> Instagram <small>(optional)</small></h4> <input type='text' class='form-control' name='artist_<TwitterConsumerkey>='Enter Your Instagram Username.. (include \"@\" sign)' > </div> <div class=' col-md-4 col-sm-6' > <h4><i class='fa fa-soundcloud'></i> Soundcloud <small>(optional)</small></h4> <input type='text' class='form-control' name='artist_<TwitterConsumerkey>='Enter Your Soundcloud Username.. (include \"@\" sign)' > </div> <div class=' col-md-4 col-sm-6' > <h4><i class='fa fa-youtube'></i> Youtube <small>(optional)</small></h4> <input type='text' class='form-control' name='artist_<TwitterConsumerkey>='Enter Your Youtube Username.. (include \"@\" sign)' > </div> <div class=' col-md-4 col-sm-6' > <h4><i class='fa fa-paypal'></i> Paypal <small>(optional)</small></h4> <input type='text' class='form-control' name='artist_<TwitterConsumerkey>='Enter Your Paypal Email..' > </div> <div class=' col-md-4 col-sm-6' > <h4><i class='fa fa-snapchat'></i> Snapchat <small>(optional)</small></h4> <input type='text' class='form-control' name='artist_<TwitterConsumerkey>='Enter Your Paypal Email..' > </div> <div class='col-md-12'> <input name='update_profile' type='submit' class='btn btn-warning <API key>' value='SAVE PROFILE'> </div> <input type='hidden' name='id' value='".$user_name_session."' > <input type='hidden' name='update_profile'> <br> </form> <hr> </div>"; $confirm_profile = " <h2 id='subtitle'>Confirm Profile!</h2> <div id='body'> <h2>Make sure your information is correct before we make these changes to your profile!</h2> <br><br> <table id='body'> <tr> <td> <img id='preview_photo' src='".$full_photo_path."'> </td> <td> <span id='sub_label' >Arist Name:</span> <span id='pricing1' >".$artist_name."</span><br> <span id='sub_label' >Twitter UserName:</span> <span id='pricing1' >".$artist_twitter."</span><br> <span id='sub_label' >Artist Location:</span> <span id='pricing1' >".$artist_location."</span><br> <h3>Description:</h3><br> ".$artist_description." <center> <button class='confirm_update' type='button' onclick='redirectToSite()'>SAVE CHANGES TO PROFILE</button> </center> </td> </tr> </table> <br><br> </div>"; ?> <style type="text/css"> #preview_photo { width:400px; vertical-align: text-top; } #<API key> { width:300px; } .download_button { display:block; } .<API key> h3 { color:#101010; } .uploaded_singles { border-radius:0px; } .more-options-button { display:none; } .events-panel { text-align: left; } .dashboard-panel { min-height: 50vh; } .db-details { color:#303030; font-size: 0.75em; } .overflow { max-height:300px; overflow-y:scroll; } .<API key> input, .<API key> textarea, .<API key> select, .<API key> option { font-size: 125%; padding:2.5%; margin-bottom:2.5%; } .<API key> { margin:auto; display:block; } .form-section-title h3 { color:#e3e3e3; } .events-panel { padding-bottom:0px; margin-bottom:4%; border-bottom:2px solid #101010; } .overflow, .<API key> { min-height: 80vh; } .events-panel .overflow { height:80vh; } </style> <script type="text/javascript"> $(function(){ var pleaseWait = 'Please wait..'; $('.more-options-button').click(function(){ $('.more-options').slideToggle('fast'); }); $('#edit-default-pxhoto').change(function() { $('.<API key>').html(' '); $('#edit-default-photo').append(pleaseWait); //$('.<API key>').prepend('<p class="wait" style="color:#303030;">Please wait..<p>'); //$('.<API key>').hide('fast'); var path = 'submit/updateprofile.php'; var data; var formdata_PHO = $('#edit-default-photo')[0].files[0]; var formdata = new FormData(); // Add the file to the request. formdata.append('photos[]', formdata_PHO); //var formdata = $('#single_upload_form').serialize(); //console.log(formdata_PHO); //alert(formdata_PHO); $.ajax({ // Uncomment the following to send cross-domain cookies: xhrFields: {withCredentials: true}, url: path, //dataType: 'json', method: 'POST', cache : false, processData: false, contentType: false, fileElementId: 'image-upload', data: formdata, beforeSend: function (x) { if (x && x.overrideMimeType) { x.overrideMimeType("multipart/form-data"); } }, // Now you should be able to do this: mimeType: 'multipart/form-data' //Property added in 1.5.1 }).always(function () { //alert(formdata_PHO); console.log(formdata_PHO); //$('#confirm_upload').html('please wait..'); //$(this).removeClass('<API key>'); }).fail(function(jqXHR){ alert(jqXHR.statusText + 'oh no it didnt work!') }).done(function (result) { //alert('YES'); $('.edit-default-form').append(result); //$('.<API key>').show('fast'); // $('.<API key>').css('opacity',1); //$('.wait').hide('fast'); }) }); }); function showPhotoOptions(id) { //alert(id); $('.edit-profile-block').slideToggle('fast'); } </script> <?php // IF ARTIST PROFILE EXISTS, SHOW PANELS include(ROOT.'inc/connection.php'); if ($user_name == false) { $user_name = 'no username'; } // CHECK IF EXISTS IN ARTIST WEBSITE DATABASE $sql ="SELECT * FROM user_profiles WHERE id='".$user_name_session."'"; $result = mysqli_query($con,$sql); if($row = mysqli_fetch_array($result)) { // IF EXISTS, DISPLAY FULL USER DATA & CONTROL OPTIONS // PROFILE IMAGE $profile_info = ' <a target="_blank" href="'.$user['profile_url'].'">'.$profile_image.'</a>'; $profile_options.=" <! <a onclick=\"loadPage('http://freelabel.net/mag/pull_mag.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-default lead_control'><span class=\"glyphicon glyphicon-signal\"></span>Feed</a> <a onclick=\"loadPage('http://freelabel.net/submit/views/db/user_photos.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-default lead_control'><span class=\"glyphicon glyphicon-picture\"></span>Photos</a> <a onclick=\"loadPage('http://freelabel.net/submit/views/db/recent_posts.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-default lead_control'><span class=\"glyphicon glyphicon-envelope\"></span>Messages</a> <a onclick=\"loadPage('http://freelabel.net/submit/views/db/recent_uploads.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-default lead_control'><span class=\"glyphicon glyphicon-envelope\"></span>Notifications</a> <a class='btn btn-default lead_control' href='".$user['profile_url']."' target='_blank' ><span class=\"glyphicon glyphicon-phone\"></span>View Website</a> <a onclick=\"loadPage('http://freelabel.net/submit/views/db/recent_posts.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-default lead_control'><span class=\"glyphicon <API key>\"></span>Your Uploads</a> <a onclick=\"loadPage('http://freelabel.net/submit/views/db/showcase_schedule.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-default lead_control'><span class=\"glyphicon glyphicon-calendar\"></span>Your Schedule</a> <a onclick=\"loadPage('http://freelabel.net/submit/views/db/howtouse.php', '#main_display_panel', 'dashboard', '".$user_name_session."')\" class='btn btn-default lead_control'><span class=\"glyphicon <API key>\"></span>Help</a> <a class='btn btn-default lead_control more-options-button'><span class=\"glyphicon glyphicon-cog\"></span>Settings</a> <div class='more-options' style='display:none;'> ".$user['custom']." </div> "; $profile_info.=' <div class="" id="<API key>" > '; $profile_info .= ' <div class="panel-body <API key>"> <a onclick="showPhotoOptions('.$user['user_id'].')" class=\'btn btn-default btn-xs col-md-6\' id="update_photo_button"> <span class="glyphicon glyphicon-pencil"></span>Change Default</a> <div id=\'<API key>\' style=\'margin-top:5%;display:none;\' > <!--<a class=\'btn btn-primary\' href="http://freelabel.net/submit/" style=\'display:none;\'>Artist Control Panel</a> <a class=\'btn btn-primary\' href="edit.php">View Profile</a> <a class=\'btn btn-primary\' href="edit.php">'.<API key>.'</a> <a class=\'btn btn-danger\' href="../index.php?logout">'.WORDING_LOGOUT.'</a> </div> </div> <div class="edit-profile-block" style="display:none;background-color:#e3e3e3;border-radius:10px;padding:2% 1%" > <form action="http://freelabel.net/submit/updateprofile.php" method="POST" enctype="multipart/form-data" class="edit-default-form"> <span id="<API key>" ></span> <input type="file" name="file" id="edit-default-photo"> <br> <input type="hidden" name="user_name" value="'.$user['user_name'].'"> <input type="hidden" name="user_id" value="'.$user['user_id'].'"> <input type="submit" value="UPDATE PHOTO" class="btn btn-primary"> </form> </div> </div>'; echo $upload_options; echo '<div class="row <API key>">'; echo '<div class="col-md-4 col-sm-4 <API key>">'; echo $profile_info; echo $profile_options; echo '</div>'; echo '<div class="col-md-8 col-sm-8">'; echo '<div class="panel-body col-md-10 col-xs-10 dashboard-panel events-panel ">'; //echo '<h4 class="section_title" style="text-align:left;">Events</h4>'; echo '<div class="overflow" >'; include(ROOT.'submit/views/db/showcase_schedule.php'); echo '</div>'; echo '</div>'; echo '<div class="panel-body col-md-2 col-xs-2 dashboard-panel uploaded_singles">'; echo '<h3 class="db-details">Total Views:<h3> '.$user['stats']['total']; echo '<h3 class="db-details">Tracks:<h3> '.$user['stats']['tracks']; //echo 'Total Fans: '.$user['stats']; //$user_media = $user['media']['audio']; //include(ROOT.'submit/views/uploadedsingles.php'); echo '</div>'; echo '</div>'; echo '</div>'; // FULL ADMIN DASHBOARD PANEL $i=0; if ($user_name_session == 'admin' OR $user_name_session == 'mayoalexander' //OR $user_name_session == 'sierra' OR $user_name_session == 'sales' OR $user_name_session == 'Mia' OR $user_name_session == 'nickhustle' //OR $user_name_session == 'ghost' ) { $i=1; //echo $admin_options; } // BLOGGER DASHBOARD NAVIGATION if ($user_name_session == 'sierra' OR $user_name_session == 'siralexmayo' OR $user_name_session == 'KingMilitia' ) { $i=1; echo $blogger_options; } if ($i!=1) { echo '</div>'; } } else { if (isset($_POST["update_profile"])) { // echo 'it worked'; // include('../../../header.php'); //echo '<pre>'; //print_r($_POST); $profile_data['id'] = $_POST['id']; $profile_data['name'] = $_POST['artist_name']; $profile_data['twitter'] = $_POST['artist_twitter']; $profile_data['location'] = $_POST['artist_location']; $profile_data['description'] = $_POST['artist_description']; $profile_data['photo'] = $_POST['photo']; $profile_data['profile_url'] = $_POST['id']; $profile_data['photo'] = $_POST['id']; $profile_data['date_created'] = $_POST['id']; $id = $_POST['id']; $artist_name = $_POST['artist_name']; $artist_twitter = $_POST['artist_twitter']; // TWITTERFIX $artist_<TwitterConsumerkey>('@@', '@', $artist_twitter); $artist_<TwitterConsumerkey>('@@@', '@', $artist_twitter); $artist_location = $_POST['artist_location']; $artist_description = $_POST['artist_description']; $photo = $_POST['photo']; $tmp_name = $_FILES["photo"]["tmp_name"]; $ext_arr = explode('.',$_FILES["photo"]["name"]); $ext_arr = array_reverse($ext_arr); $ext = $ext_arr[0]; $name = $_FILES["photo"]["name"]; $photo_path = "uploads/".$profile_data['id'].'-'.rand(1111111111,9999999999).'.'.$ext; $photo_path_save = "../../".$photo_path; $full_photo_path = "http://freelabel.net/submit/".$photo_path; //$profile_img_exists = getimagesize($full_photo_path); $profile_url = 'http://FREELA.BE/'.strtolower($profile_data['id']); //echo '<pre>'; //print_r($_FILES); //print_r($photo_path_save); //exit; move_uploaded_file($tmp_name, $photo_path_save ); // CONFIRM PROFILE //echo 'PROFILE UPDATED!'; // CREATE PROFILE include('../../../inc/connection.php'); // Insert into database $sql='INSERT INTO `amrusers`.`user_profiles` ( `id` , `name` , `twitter` , `location` , `description` , `photo`, `profile_url`, `date_created` ) VALUES ( "'.$id.'", "'.$artist_name.'", "'.$artist_twitter.'", "'.$artist_location.'", "'.$artist_description.'", "'.$full_photo_path.'", "'.$profile_url.'", "'.$todays_date.'" );'; if (mysqli_query($con,$sql)) { //echo "Entry Created Successfully!"; echo '<script> alert("Entry Created Successfully!"); window.location.assign("http://freelabel.net/users/dashboard/?ctrl=analytics"); </script>'; } else { echo "Error creating database entry: " . mysqli_error($con); } //echo '<br><br><br><br><br><br>'; } else { echo $<API key>; //exit; } } ?> <script type="text/javascript"> $(function(){ $('.<API key>').submit(function(event){ var data = $(this).seralize(); event.preventDefault(); alert(data); }); }); </script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http: <html xmlns="http: <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>statsmodels.tsa.statespace.structural.<API key>.loglike &#8212; statsmodels 0.9.0 documentation</title> <link rel="stylesheet" href="../_static/nature.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript" src="../_static/<API key>.js"></script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=<API key>"></script> <link rel="shortcut icon" href="../_static/<API key>.ico"/> <link rel="author" title="About these documents" href="../about.html" /> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="statsmodels.tsa.statespace.structural.<API key>.loglikeobs" href="statsmodels.tsa.statespace.structural.<API key>.loglikeobs.html" /> <link rel="prev" title="statsmodels.tsa.statespace.structural.<API key>.<API key>" href="statsmodels.tsa.statespace.structural.<API key>.<API key>.html" /> <link rel="stylesheet" href="../_static/examples.css" type="text/css" /> <link rel="stylesheet" href="../_static/facebox.css" type="text/css" /> <script type="text/javascript" src="../_static/scripts.js"> </script> <script type="text/javascript" src="../_static/facebox.js"> </script> <script type="text/javascript"> $.facebox.settings.closeImage = "../_static/closelabel.png" $.facebox.settings.loadingImage = "../_static/loading.gif" </script> </head><body> <div class="headerwrap"> <div class = "header"> <a href = "../index.html"> <img src="../_static/<API key>.png" alt="Logo" style="padding-left: 15px"/></a> </div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="statsmodels.tsa.statespace.structural.<API key>.loglikeobs.html" title="statsmodels.tsa.statespace.structural.<API key>.loglikeobs" accesskey="N">next</a> |</li> <li class="right" > <a href="statsmodels.tsa.statespace.structural.<API key>.<API key>.html" title="statsmodels.tsa.statespace.structural.<API key>.<API key>" accesskey="P">previous</a> |</li> <li><a href ="../install.html">Install</a></li> &nbsp;|&nbsp; <li><a href="https://groups.google.com/forum/?hl=en#!forum/pystatsmodels">Support</a></li> &nbsp;|&nbsp; <li><a href="https://github.com/statsmodels/statsmodels/issues">Bugs</a></li> &nbsp;|&nbsp; <li><a href="../dev/index.html">Develop</a></li> &nbsp;|&nbsp; <li><a href="../examples/index.html">Examples</a></li> &nbsp;|&nbsp; <li><a href="../faq.html">FAQ</a></li> &nbsp;|&nbsp; <li class="nav-item nav-item-1"><a href="../statespace.html" >Time Series Analysis by State Space Methods <code class="docutils literal notranslate"><span class="pre">statespace</span></code></a> |</li> <li class="nav-item nav-item-2"><a href="statsmodels.tsa.statespace.structural.<API key>.html" accesskey="U">statsmodels.tsa.statespace.structural.<API key></a> |</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="<API key>"> <h1>statsmodels.tsa.statespace.structural.<API key>.loglike<a class="headerlink" href=" <dl class="method"> <dt id="statsmodels.tsa.statespace.structural.<API key>.loglike"> <code class="descclassname"><API key>.</code><code class="descname">loglike</code><span class="sig-paren">(</span><em>params</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href=" <dd><p>Loglikelihood evaluation</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>params</strong> (<em>array_like</em>) – Array of parameters at which to evaluate the loglikelihood function.</li> <li><strong>transformed</strong> (<em>boolean</em><em>, </em><em>optional</em>) – Whether or not <cite>params</cite> is already transformed. Default is True.</li> <li><strong>kwargs</strong> – Additional keyword arguments to pass to the Kalman filter. See <cite>KalmanFilter.filter</cite> for more details.</li> </ul> </td> </tr> </tbody> </table> <p class="rubric">Notes</p> <p><a class="footnote-reference" href="#id2" id="id1">[1]</a> recommend maximizing the average likelihood to avoid scale issues; this is done automatically by the base Model fit method.</p> <p class="rubric">References</p> <table class="docutils footnote" frame="void" id="id2" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> <tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>Koopman, Siem Jan, Neil Shephard, and Jurgen A. Doornik. 1999. Statistical Algorithms for Models in State Space Using SsfPack 2.2. Econometrics Journal 2 (1): 107-60. doi:10.1111/1368-423X.00023.</td></tr> </tbody> </table> <div class="admonition seealso"> <p class="first admonition-title">See also</p> <dl class="last docutils"> <dt><a class="reference internal" href="statsmodels.tsa.statespace.structural.<API key>.update.html#statsmodels.tsa.statespace.structural.<API key>.update" title="statsmodels.tsa.statespace.structural.<API key>.update"><code class="xref py py-meth docutils literal notranslate"><span class="pre">update</span></code></a></dt> <dd>modifies the internal state of the state space model to reflect new params</dd> </dl> </div> </dd></dl> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="<API key>"> <h4>Previous topic</h4> <p class="topless"><a href="statsmodels.tsa.statespace.structural.<API key>.<API key>.html" title="previous chapter">statsmodels.tsa.statespace.structural.<API key>.<API key></a></p> <h4>Next topic</h4> <p class="topless"><a href="statsmodels.tsa.statespace.structural.<API key>.loglikeobs.html" title="next chapter">statsmodels.tsa.statespace.structural.<API key>.loglikeobs</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/generated/statsmodels.tsa.statespace.structural.<API key>.loglike.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="footer" role="contentinfo"> & Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.4. </div> </body> </html>
#pragma once #if defined(BUILDING_LIBHOSTILE) # if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY # define LIBHOSTILE_API __attribute__ ((visibility("default"))) # define LIBHOSTILE_LOCAL __attribute__ ((visibility("hidden"))) # elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550) # define LIBHOSTILE_API __global # define LIBHOSTILE_LOCAL __global # elif defined(_MSC_VER) # define LIBHOSTILE_API extern __declspec(dllexport) # define LIBHOSTILE_LOCAL extern __declspec(dllexport) # else # define LIBHOSTILE_API # define LIBHOSTILE_LOCAL # endif /* defined(HAVE_VISIBILITY) */ #else /* defined(BUILDING_LIBHOSTILE) */ # if defined(_MSC_VER) # define LIBHOSTILE_API extern __declspec(dllimport) # define LIBHOSTILE_LOCAL # else # define LIBHOSTILE_API # define LIBHOSTILE_LOCAL # endif /* defined(_MSC_VER) */ #endif /* defined(BUILDING_LIBHOSTILE) */
// text_recognizer.h // STR #ifndef <API key> #define <API key> #include <iostream> #include <string> #include <vector> #include <opencv2/text.hpp> #include <opencv2/core/utility.hpp> #include <opencv2/highgui.hpp> #include <opencv2/imgproc.hpp> class TextRecognizer { public: TextRecognizer(){}; std::vector<std::string> recognize(std::vector<char> data); }; #endif /* defined(<API key>) */
#ifndef ARRAYENTRYTYPE_H_ #define ARRAYENTRYTYPE_H_ #include <stdlib.h> #include <stdio.h> #ifndef _WRS_KERNEL #include <stdint.h> #endif class ArrayEntryType; #include "ArrayData.h" #include "ComplexEntryType.h" struct ArrayEntryData{ uint8_t length; EntryValue* array; }; /** * Represents the size and contents of an array. */ typedef struct ArrayEntryData ArrayEntryData; /** * Represents the type of an array entry value. */ class ArrayEntryType : public ComplexEntryType {//TODO allow for array of complex type private: <API key>& m_elementType; public: /** * Creates a new ArrayEntryType. * * @param id The ID which identifies this type to other nodes on * across the network. * @param elementType The type of the elements this array contains. */ ArrayEntryType(TypeId id, <API key>& elementType); /** * Creates a copy of an value which is of the type contained by * this array. * * @param value The element, of this array's contained type, to * copy. * @return A copy of the given value. */ EntryValue copyElement(EntryValue value); /** * Deletes a entry value which is of the type contained by * this array. * * After calling this method, the given entry value is * no longer valid. * * @param value The value to delete. */ void deleteElement(EntryValue value); /** * See {@link <API key>}::sendValue */ void sendValue(EntryValue value, DataIOStream& os); /** * See {@link <API key>}::readValue */ EntryValue readValue(DataIOStream& is); /** * See {@link <API key>}::copyValue */ EntryValue copyValue(EntryValue value); /** * See {@link <API key>}::deleteValue */ void deleteValue(EntryValue value); /** * See {@link ComplexEntryType}::internalizeValue */ EntryValue internalizeValue(std::string& key, ComplexData& <API key>, EntryValue currentInteralValue); /** * See {@link ComplexEntryType}::exportValue */ void exportValue(std::string& key, EntryValue internalData, ComplexData& <API key>); }; #endif /* ARRAYENTRYTYPE_H_ */
#!/usr/bin/env python import sys def inv(s): if s[0] == '-': return s[1:] elif s[0] == '+': return '-' + s[1:] else: # plain number return '-' + s if len(sys.argv) != 1: print 'Usage:', sys.argv[0] sys.exit(1) for line in sys.stdin: linesplit = line.strip().split() if len(linesplit) == 3: assert(linesplit[0] == 'p') print('p ' + inv(linesplit[2]) + ' ' + linesplit[1]) elif len(linesplit) == 5: assert(linesplit[0] == 's') print('s ' + \ inv(linesplit[2]) + ' ' + linesplit[1] + ' ' + \ inv(linesplit[4]) + ' ' + linesplit[3] ) elif len(linesplit) == 0: print
def test_default(cookies): """ Checks if default configuration is working """ result = cookies.bake() assert result.exit_code == 0 assert result.project.isdir() assert result.exception is None
// Test for "sancov.py missing ...". // First case: coverage from executable. main() is called on every code path. // RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %t -DFOOBAR -DMAIN // RUN: rm -rf %t-dir // RUN: mkdir -p %t-dir // RUN: cd %t-dir // RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t // RUN: %sancov print *.sancov > main.txt // RUN: rm *.sancov // RUN: count 1 < main.txt // RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x // RUN: %sancov print *.sancov > foo.txt // RUN: rm *.sancov // RUN: count 3 < foo.txt // RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x x // RUN: %sancov print *.sancov > bar.txt // RUN: rm *.sancov // RUN: count 4 < bar.txt // RUN: %sancov missing %t < foo.txt > foo-missing.txt // RUN: sort main.txt foo-missing.txt -o <API key>.txt // The "missing from foo" set may contain a few bogus PCs from the sanitizer // runtime, but it must include the entire "bar" code path as a subset. Sorted // lists can be tested for set inclusion with diff + grep. // RUN: diff bar.txt <API key>.txt > %t.log || true // RUN: not grep "^<" %t.log // Second case: coverage from DSO. // cd %t-dir // RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %dynamiclib -DFOOBAR -shared -fPIC // RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %dynamiclib -o %t -DMAIN // RUN: cd .. // RUN: rm -rf %t-dir // RUN: mkdir -p %t-dir // RUN: cd %t-dir // RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x // RUN: %sancov print %<API key>.*.sancov > foo.txt // RUN: rm *.sancov // RUN: count 2 < foo.txt // RUN: %env_asan_opts=coverage=1:coverage_dir=%t-dir %run %t x x // RUN: %sancov print %<API key>.*.sancov > bar.txt // RUN: rm *.sancov // RUN: count 3 < bar.txt // RUN: %sancov missing %dynamiclib < foo.txt > foo-missing.txt // RUN: diff bar.txt foo-missing.txt > %t.log || true // RUN: not grep "^<" %t.log // REQUIRES: x86-target-arch // XFAIL: android #include <stdio.h> void foo1(); void foo2(); void bar1(); void bar2(); void bar3(); #if defined(FOOBAR) void foo1() { fprintf(stderr, "foo1\n"); } void foo2() { fprintf(stderr, "foo2\n"); } void bar1() { fprintf(stderr, "bar1\n"); } void bar2() { fprintf(stderr, "bar2\n"); } void bar3() { fprintf(stderr, "bar3\n"); } #endif #if defined(MAIN) int main(int argc, char **argv) { switch (argc) { case 1: break; case 2: foo1(); foo2(); break; case 3: bar1(); bar2(); bar3(); break; } } #endif
# modification, are permitted provided that the following conditions are met: # and/or other materials provided with the distribution. # contributors may be used to endorse or promote products derived from this # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # 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. obj-y += dwc_otg_adp.o obj-y += dwc_otg_cfi.o obj-y += dwc_otg_cil.o obj-y += dwc_otg_cil_intr.o obj-y += dwc_otg_driver.o obj-y += dwc_common_phabos.o obj-$(CONFIG_USB_HOST) += dwc_otg_hcd.o obj-$(CONFIG_USB_HOST) += dwc_otg_hcd_ddma.o obj-$(CONFIG_USB_HOST) += dwc_otg_hcd_intr.o obj-$(CONFIG_USB_HOST) += dwc_otg_hcd_queue.o obj-$(CONFIG_USB_DEVICE) += dwc_otg_pcd.o obj-$(CONFIG_USB_DEVICE) += dwc_otg_pcd_intr.o CFLAGS += -DDWC_PHABOS ifeq ($(<API key>),y) CFLAGS += -DDEBUG endif ifeq ($(CONFIG_USB_DEVICE),y) ifneq ($(CONFIG_USB_HOST),y) CFLAGS += -DDWC_DEVICE_ONLY endif endif
/* TEMPLATE GENERATED TESTCASE FILE Filename: <API key>.c Label Definition File: <API key>.strings.label.xml Template File: sources-sink-61b.tmpl.c */ /* * @description * CWE: 78 OS Command Injection * BadSource: environment Read input from an environment variable * GoodSource: Fixed string * Sinks: w32_spawnv * BadSink : execute command with spawnv * Flow Variant: 61 Data flow: data returned from one function to another in different source files * * */ #include "std_testcase.h" #include <wchar.h> #ifdef _WIN32 #define COMMAND_INT_PATH "%WINDIR%\\system32\\cmd.exe" #define COMMAND_INT "cmd.exe" #define COMMAND_ARG1 "/c" #define COMMAND_ARG2 "dir " #define COMMAND_ARG3 data #else /* NOT _WIN32 */ #include <unistd.h> #define COMMAND_INT_PATH "/bin/sh" #define COMMAND_INT "sh" #define COMMAND_ARG1 "-c" #define COMMAND_ARG2 "ls " #define COMMAND_ARG3 data #endif #define ENV_VARIABLE "ADD" #ifdef _WIN32 #define GETENV getenv #else #define GETENV getenv #endif #include <process.h> #ifndef OMITBAD char * <API key>(char * data) { { /* Append input from an environment variable to data */ size_t dataLen = strlen(data); char * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ strncat(data+dataLen, environment, 100-dataLen-1); } } return data; } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B() uses the GoodSource with the BadSink */ char * <API key>(char * data) { /* FIX: Append a fixed string to data (not user / external input) */ strcat(data, "*.*"); return data; } #endif /* OMITGOOD */
#endregion namespace ProCenter.Domain.Psc { #region Using Statements using System; using Pillar.FluentRuleEngine; using ProCenter.Domain.AssessmentModule; using ProCenter.Domain.AssessmentModule.Rules; #endregion <summary>The <API key> rule collection class.</summary> public class <API key> : <API key> { private readonly <API key> <API key>; private static Guid? <API key>; #region Constructors and Destructors <summary>Initializes a new instance of the <see cref="<API key>" /> class.</summary> <param name="<API key>">The assessment definition repository.</param> public <API key>(<API key> <API key>) { <API key> = <API key>; NewItemSkippingRule(() => SkipItem71250040) .ForItemInstance<bool>("71250039") .EqualTo(false) .SkipItem(GetItemDefinition("71250040")); NewRuleSet(() => <API key>, SkipItem71250040); } #endregion #region Public Properties <summary> Gets or sets the skip item71250040. </summary> <value> The skip item71250040. </value> public IItemSkippingRule SkipItem71250040 { get; set; } <summary> Gets or sets the item updated rule set71250039. </summary> <value> The item updated rule set71250039. </value> public IRuleSet <API key> { get; set; } #endregion <summary> Gets the item definition. </summary> <param name="itemDefinitionCode">The item definition code.</param> <returns>Returns and ItemDefinition for the itemDefinitionCode if found by key.</returns> private ItemDefinition GetItemDefinition(string itemDefinitionCode) { if (!<API key>.HasValue) { <API key> = <API key>.GetKeyByCode(<API key>.<API key>.Code); } var <API key> = <API key>.GetByKey(<API key>.Value); return <API key>.<API key>(itemDefinitionCode); } } }
package net.byteseek.searcher.sequence.sunday; import java.io.IOException; import java.util.Arrays; import java.util.List; import net.byteseek.io.reader.Window; import net.byteseek.io.reader.WindowReader; import net.byteseek.matcher.bytes.ByteMatcher; import net.byteseek.matcher.sequence.SequenceMatcher; import net.byteseek.object.factory.<API key>; import net.byteseek.object.factory.LazyObject; import net.byteseek.object.factory.ObjectFactory; import net.byteseek.searcher.SearchResult; import net.byteseek.searcher.SearchUtils; import net.byteseek.searcher.sequence.<API key>; /** * * @author Matt Palmer */ public final class SundayQuickSearcher extends <API key> { private final LazyObject<int[]> forwardInfo; private final LazyObject<int[]> backwardInfo; /** * Constructs a Sunday Quick searcher given a {@link SequenceMatcher} * to search for. * * @param sequence The sequence to search for. */ public SundayQuickSearcher(final SequenceMatcher sequence) { super(sequence); forwardInfo = new <API key><int[]>(new ForwardInfoFactory()); backwardInfo = new <API key><int[]>(new BackwardInfoFactory()); } /** * {@inheritDoc} */ @Override public List<SearchResult<SequenceMatcher>> searchForwards(final byte[] bytes, final int fromPosition, final int toPosition) { // Get the objects needed to search: final int[] safeShifts = forwardInfo.get(); final SequenceMatcher sequence = getMatcher(); // Calculate safe bounds for the search: final int length = sequence.length(); final int finalPosition = bytes.length - length; final int lastLoopPosition = finalPosition - 1; final int lastPosition = toPosition < lastLoopPosition? toPosition : lastLoopPosition; int searchPosition = fromPosition > 0? fromPosition : 0; // Search forwards. The loop does not check for the final // position, as we shift on the byte after the sequence. while (searchPosition <= lastPosition) { if (sequence.<API key>(bytes, searchPosition)) { return SearchUtils.singleResult(searchPosition, sequence); } searchPosition += safeShifts[bytes[searchPosition + length] & 0xFF]; } // Check the final position if necessary: if (searchPosition == finalPosition && toPosition >= finalPosition && sequence.matches(bytes, finalPosition)) { return SearchUtils.singleResult(finalPosition, sequence); } return SearchUtils.noResults(); } /** * {@inheritDoc} */ @Override public List<SearchResult<SequenceMatcher>> doSearchForwards(final WindowReader reader, final long fromPosition, final long toPosition ) throws IOException { // Initialise final int[] safeShifts = forwardInfo.get(); final SequenceMatcher sequence = getMatcher(); final int length = sequence.length(); long searchPosition = fromPosition; // While there is a window to search in... // If there is no window immediately after the sequence, // then there is no match, since this is only invoked if the // sequence is already crossing into another window. Window window; while (searchPosition <= toPosition && (window = reader.getWindow(searchPosition + length)) != null) { // Initialise array search: final byte[] array = window.getArray(); final int arrayStartPosition = reader.getWindowOffset(searchPosition + length); final int arrayEndPosition = window.length() - 1; final long distanceToEnd = toPosition - window.getWindowPosition() + length ; final int finalPosition = distanceToEnd < arrayEndPosition? (int) distanceToEnd : arrayEndPosition; int arraySearchPosition = arrayStartPosition; // Search fowards in the array using the reader interface to match. // The loop does not check the final position, as we shift on the byte // after the sequence (so would get an <API key> in the final position). while (arraySearchPosition < finalPosition) { if (sequence.matches(reader, searchPosition)) { return SearchUtils.singleResult(searchPosition, sequence); } final int shift = safeShifts[array[arraySearchPosition] & 0xFF]; searchPosition += shift; arraySearchPosition += shift; } // Check final position if necessary: if (arraySearchPosition == finalPosition || searchPosition == toPosition) { if (sequence.matches(reader, searchPosition)) { return SearchUtils.singleResult(searchPosition, sequence); } searchPosition += safeShifts[array[arraySearchPosition] & 0xFF]; } } return SearchUtils.noResults(); } /** * {@inheritDoc} */ @Override public List<SearchResult<SequenceMatcher>> searchBackwards(final byte[] bytes, final int fromPosition, final int toPosition) { // Get objects needed to search: final int[] safeShifts = backwardInfo.get(); final SequenceMatcher sequence = getMatcher(); // Calculate safe bounds for the search: final int lastLoopPosition = toPosition > 1? toPosition : 1; final int <API key> = bytes.length - sequence.length(); int searchPosition = fromPosition < <API key> ? fromPosition : <API key>; // Search backwards. The loop does not check the // first position in the array, because we shift on the byte // immediately before the current search position. while (searchPosition >= lastLoopPosition) { if (sequence.<API key>(bytes, searchPosition)) { return SearchUtils.singleResult(searchPosition, sequence); } searchPosition -= safeShifts[bytes[searchPosition - 1] & 0xFF]; } // Check for first position if necessary: if (searchPosition == 0 && toPosition < 1 && sequence.matches(bytes, 0)) { return SearchUtils.singleResult(0, sequence); } return SearchUtils.noResults(); } /** * {@inheritDoc} */ @Override public List<SearchResult<SequenceMatcher>> doSearchBackwards(final WindowReader reader, final long fromPosition, final long toPosition ) throws IOException { // Initialise final int[] safeShifts = forwardInfo.get(); final SequenceMatcher sequence = getMatcher(); long searchPosition = fromPosition; // While there is a window to search in... // If there is no window immediately before the sequence, // then there is no match, since this is only invoked if the // sequence is already crossing into another window. Window window; while (searchPosition >= toPosition && (window = reader.getWindow(searchPosition - 1)) != null) { // Initialise array search: final byte[] array = window.getArray(); final int arrayStartPosition = reader.getWindowOffset(searchPosition - 1); // Search to the beginning of the array, or the final search position, // whichver comes first. final long endRelativeToWindow = toPosition - window.getWindowPosition(); final int <API key> = endRelativeToWindow > 0? (int) endRelativeToWindow : 0; int arraySearchPosition = arrayStartPosition; // Search backwards in the array using the reader interface to match. // The loop does not check the final position, as we shift on the byte // before it. while (arraySearchPosition > <API key>) { if (sequence.matches(reader, searchPosition)) { return SearchUtils.singleResult(searchPosition, sequence); } final int shift = safeShifts[array[arraySearchPosition] & 0xFF]; searchPosition -= shift; arraySearchPosition -= shift; } // Check final position if necessary: if (arraySearchPosition == <API key> || searchPosition == toPosition) { if (sequence.matches(reader, searchPosition)) { return SearchUtils.singleResult(searchPosition, sequence); } searchPosition -= safeShifts[array[arraySearchPosition] & 0xFF]; } } return SearchUtils.noResults(); } /** * {@inheritDoc} */ @Override public void prepareForwards() { forwardInfo.get(); } /** * {@inheritDoc} */ @Override public void prepareBackwards() { backwardInfo.get(); } @Override public String toString() { return getClass().getSimpleName() + "[sequence:" + matcher + ']'; } private final class ForwardInfoFactory implements ObjectFactory<int[]> { private ForwardInfoFactory() { } /** * Calculates the safe shifts to use if searching forwards. * A safe shift is either the length of the sequence plus one, if the * byte does not appear in the {@link SequenceMatcher}, or * the shortest distance it appears from the end of the matcher. */ @Override public int[] create() { // First set the default shift to the length of the sequence plus one. final int[] shifts = new int[256]; final SequenceMatcher sequence = getMatcher(); final int numBytes = sequence.length(); Arrays.fill(shifts, numBytes + 1); // Now set specific byte shifts for the bytes actually in // the sequence itself. The shift is the distance of each character // from the end of the sequence, where the last position equals 1. // Each position can match more than one byte (e.g. if a byte class appears). for (int sequenceByteIndex = 0; sequenceByteIndex < numBytes; sequenceByteIndex++) { final ByteMatcher aMatcher = sequence.<API key>(sequenceByteIndex); final byte[] matchingBytes = aMatcher.getMatchingBytes(); final int distanceFromEnd = numBytes - sequenceByteIndex; for (final byte b : matchingBytes) { shifts[b & 0xFF] = distanceFromEnd; } } return shifts; } } private final class BackwardInfoFactory implements ObjectFactory<int[]> { private BackwardInfoFactory() { } /** * Calculates the safe shifts to use if searching backwards. * A safe shift is either the length of the sequence plus one, if the * byte does not appear in the {@link SequenceMatcher}, or * the shortest distance it appears from the beginning of the matcher. */ @Override public int[] create() { // First set the default shift to the length of the sequence // (negative if search direction is reversed) final int[] shifts = new int[256]; final SequenceMatcher sequence = getMatcher(); final int numBytes = sequence.length(); Arrays.fill(shifts, numBytes + 1); // Now set specific byte shifts for the bytes actually in // the sequence itself. The shift is the distance of each character // from the start of the sequence, where the first position equals 1. // Each position can match more than one byte (e.g. if a byte class appears). for (int sequenceByteIndex = numBytes - 1; sequenceByteIndex >= 0; sequenceByteIndex final ByteMatcher aMatcher = sequence.<API key>(sequenceByteIndex); final byte[] matchingBytes = aMatcher.getMatchingBytes(); final int distanceFromStart = sequenceByteIndex + 1; for (final byte b : matchingBytes) { shifts[b & 0xFF] = distanceFromStart; } } return shifts; } } }
# `pub.dev` API for developers ## Stay informed This document describes the officially supported API of the `pub.dev` site. `pub.dev` may expose API endpoints that are available publicly, but unless they are documented here, we don't consider them as officially supported, and may change or remove them without notice. Changes to the officially supported `pub.dev` API will be announced at [Dart announce][announce]. ## Hosted Pub Repository API `pub.dev` implements the [Hosted Pub Repository Specification V2][repo-v2], used by the `pub` command line client application. ## Additional APIs Package names for name completion **GET** `https://pub.dev/api/<API key>` **Headers:** * `accept-encoding: gzip` **Response** * `cache-control: public, max-age=28800` * `content-encoding: gzip` * `content-type: application/json; charset="utf-8"` js { "packages": [ "http", "provider", /* further package names */ ] } The API returns the top package names on `pub.dev`. To reduce payload size the result may not include all package names. The size limitation is subject to change. The response is always a gzip-ed JSON content, and should be cached on the client side for at least 8 hours between requests (as indicated by the `cache-control` header). Notes: * Not all package names are included in this response. * The inclusion criteria used by `pub.dev` may change without notice. ## FAQ I'd like to implement search, what API can I use? Please use the above [package names for name completion data](#<API key>) to fetch the list of package names, and implement search in your app based on that list. I'd like to request a new API. What should I do? Please check if there is already a similar request or open a [new issue][pub-dev-issues]. The following requirements are must have for an API endpoint to be considered as official: * The data must be public. * The API must be without side effects (e.g. read-only). * The response must be cacheable (e.g. we should be able to offload it to a CDN). [announce]: https://groups.google.com/a/dartlang.org/g/announce [repo-v2]: https://github.com/dart-lang/pub/blob/master/doc/repository-spec-v2.md [pub-dev-issues]: https://github.com/dart-lang/pub-dev/issues
<?php use yii\helpers\Html; use yii\widgets\ActiveForm; use app\models\general\GeneralLabel; /* @var $this yii\web\View */ /* @var $model app\models\<API key> */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="<API key>"> <p class="text-muted"><span style="color: red">*</span> <?= GeneralLabel::lapangan_mandatori ?></p> <?php $form = ActiveForm::begin(); ?> <?= $form->field($model, 'desc')->textInput(['maxlength' => true]) ?> <?php $model->isNewRecord ? $model->aktif = 1: $model->aktif = $model->aktif ; ?> <?= $form->field($model, 'aktif')->radioList(array(true=>GeneralLabel::yes,false=>GeneralLabel::no)); ?> <div class="form-group"> <?= Html::submitButton($model->isNewRecord ? GeneralLabel::create : GeneralLabel::update, ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> </div> <?php ActiveForm::end(); ?> </div>
#!/usr/bin/env python # -*- mode: python; sh-basic-offset: 4; indent-tabs-mode: nil; coding: utf-8 -*- # vim: tabstop=4 softtabstop=4 expandtab shiftwidth=4 fileencoding=utf-8 # Shell command import argparse import os import sys import clusto from clusto import script_helper class Console(script_helper.Script): ''' Use clusto's hardware port mappings to console to a remote server using the serial console. ''' def __init__(self): script_helper.Script.__init__(self) def _add_arguments(self, parser): user = os.environ.get('USER') parser.add_argument('--user', '-u', default=user, help='SSH User (you can also set this in clusto.conf too' 'in console.user: --user > clusto.conf:console.user > "%s")' % user) parser.add_argument('server', nargs=1, help='Object to console to (IP or name)') def add_subparser(self, subparsers): parser = self._setup_subparser(subparsers) self._add_arguments(parser) def run(self, args): try: server = clusto.get(args.server[0]) if not server: raise LookupError('Object "%s" does not exist' % args.server) except Exception as e: self.debug(e) self.error('No object like "%s" was found' % args.server) return 1 server = server[0] if not hasattr(server, 'console'): self.error('The object %s lacks a console method' % server.name) return 2 user = os.environ.get('USER') if args.user: self.debug('Grabbing user from parameter') user = args.user else: self.debug('Grabbing user from config file or default') user = self.get_conf('console.user', user) self.debug('User is "%s"' % user) return(server.console(ssh_user=user)) def main(): console, args = script_helper.init_arguments(Console) return(console.run(args)) if __name__ == '__main__': sys.exit(main())
package com.impossibl.postgres.system.procs; /** * Marker interface for dynamically loaded postgis data types, to be used by {@link ServiceLoader}. */ public interface <API key> extends ProcProvider { }
package org.ductilej.tests; import org.junit.Test; import static org.junit.Assert.*; /** * Tests handling of varags with parameterized variable argument. Edge case extraordinaire! */ public class ParamVarArgsTest { public static interface Predicate<T> { boolean apply (T arg); } public static <T> Predicate<T> or (final Predicate<? super T>... preds) { return new Predicate<T>() { public boolean apply (T arg) { for (Predicate<? super T> pred : preds) { if (pred.apply(arg)) { return true; } } return false; } }; } @SuppressWarnings("unchecked") // this use of parameterized varargs is safe @Test public void testParamVarArgs () { Predicate<Integer> test = or(FALSE); assertEquals(false, test.apply(1)); } protected static final Predicate<Integer> FALSE = new Predicate<Integer>() { public boolean apply (Integer arg) { return false; } }; }
package ga; import engine.*; import java.util.*; public class GAPopulation { /* Evolutionary parameters: */ public int size; // size of the population public int ngens; // total number of generations public int currgen; // current generation /* Crossover parameters */ int tournamentK; // size of tournament int elite; // size of elite int immigrant; // number of new random individuals double mutrate; // chance that a mutation will occur double xoverrate; // chance that the xover will occur /* Containers */ public ArrayList<Genome> individual; Genome parent; Trainer T; /* Progress data */ public double[] max_fitness; public double[] avg_fitness; public double[] terminals; // average total number of terminals public double[] bigterminals; // average total number of sig. terminals /** * Initialize and load parameters. * Parameter comp is a node from a previous * scenario, which is used for distance calculations. */ public GAPopulation(Genome comp) { individual = new ArrayList<Genome>(); parent = comp; // reading parameters Parameter param = Parameter.getInstance(); String paramval; paramval = param.getParam("population size"); if (paramval != null) size = Integer.valueOf(paramval); else { System.err.println("\"population size\" not defined on parameter file."); size = 10; } paramval = param.getParam("generation number"); if (paramval != null) ngens = Integer.valueOf(paramval); else { System.err.println("\"generation number\" not defined on parameter file."); ngens = 10; } paramval = param.getParam("tournament K"); if (paramval != null) tournamentK = Integer.valueOf(paramval); else { System.err.println("\"tournament K\" not defined on parameter file."); tournamentK = 5; } paramval = param.getParam("elite size"); if (paramval != null) elite = Integer.valueOf(paramval); else { System.err.println("\"elite size\" not defined on parameter file."); elite = 1; } paramval = param.getParam("immigrant size"); if (paramval != null) immigrant = Integer.valueOf(paramval); else { System.err.println("\"immigrant size\" not defined on parameter file."); immigrant = 0;; } paramval = param.getParam("mutation rate"); if (paramval != null) mutrate = Double.valueOf(paramval); else { System.err.println("\"mutation rate\" not defined on parameter file."); mutrate = 0.01; } paramval = param.getParam("crossover rate"); if (paramval != null) xoverrate = Double.valueOf(paramval); else { System.err.println("\"crossover rate\" not defined on parameter file."); xoverrate = 0.9; } } /** * Initialize the new population and the local * variables. Startd is the target date for the * @param startd */ public void initPopulation(Date startd) { T = new Trainer(startd); currgen = 0; for (int i = 0; i < size; i++) { Genome n = new Genome(); n.init(); individual.add(n); } max_fitness = new double[ngens]; avg_fitness = new double[ngens]; terminals = new double[ngens]; bigterminals = new double[ngens]; } /** * Runs one generation loop * */ public void runGeneration() { eval(); breed(); currgen++; } /** * update the values of the maxfitness/avg fitness/etc * public arrays; */ public void updateStatus() { Parameter p = Parameter.getInstance(); String param = p.getParam("asset treshold"); double tresh = Double.valueOf(param); avg_fitness[currgen-1] = 0; terminals[currgen-1] = 0; bigterminals[currgen-1] = 0; for (int i = 0; i < individual.size(); i++) { avg_fitness[currgen-1] += individual.get(i).fitness; terminals[currgen-1] += individual.get(i).countAsset(0.0); bigterminals[currgen-1] += individual.get(i).countAsset(tresh); } max_fitness[currgen-1] = individual.get(0).fitness; avg_fitness[currgen-1] /= size; terminals[currgen-1] /= size; bigterminals[currgen-1] /= size; } /** * Calculates the fitness value for each individual * in the population. */ public void eval() { for (int i = 0; i < size; i++) { individual.get(i).eval(T); } Collections.sort(individual); } /** * Perform selection, crossover, mutation in * order to create a new population. * * Assumes the eval function has already been * performed. * */ public void breed() { RNG d = RNG.getInstance(); ArrayList<Genome> nextGen = new ArrayList<Genome>(); Genome p1,p2; // elite: (few copied individuals) for (int i = 0; i < elite; i++) { nextGen.add(individual.get(i).copy()); } // immigrant: (usually 0) for (int i = 0; i < immigrant; i++) { Genome n = new Genome(); n.init(); nextGen.add(n); } // crossover: for (int i = 0; i < size - (immigrant + elite); i+=2) { // selection - the selection function should // return copies already. p1 = Tournament(); p2 = Tournament(); // rolls for xover if (d.nextDouble() < xoverrate) { p1.crossover(p2); } // rolls for mutation if (d.nextDouble() < mutrate) p1.mutation(); if (d.nextDouble() < mutrate) p2.mutation(); nextGen.add(p1); nextGen.add(p2); } individual = nextGen; } /** * Select one parent from the population by using * <API key> tournament selection * (eat candidate has a chance proportional to his * fitness of being chosen). * * The function copy the chosen candidate and send * him back. * @return */ public Genome Tournament() { RNG d = RNG.getInstance(); Genome[] list = new Genome[tournamentK]; double[] rank = new double[tournamentK]; double sum = 0.0; double ticket = 0.0; double min = 0.0; /* Selects individuals and removes negative fitness */ for (int i = 0; i < tournamentK; i++) { list[i] = individual.get(d.nextInt(size)); if (list[i].fitness < min) min = list[i].fitness; } /* I'm not sure if this is the best way to * make the proportion between the fitnesses. * Some sort of scaling factor should be put here * to avoit high fitnesses from superdominating. * * But maybe the tournament proccess already guarantees this? */ for (int i = 0; i < tournamentK; i++) { sum += list[i].fitness - min; rank[i] = sum; } ticket = d.nextDouble()*sum; for (int i = 0; i < tournamentK; i++) { if ((ticket) <= rank[i]) return list[i].copy(); } // should never get here System.err.println("x" + ticket + " + " + sum); System.err.println("Warning: MemeTournament - reached unreachable line"); return list[0].copy(); } }
#include "common/renesas.hpp" #include "common/fifo.hpp" #include "common/uart_io.hpp" #include "common/command.hpp" #include "common/format.hpp" #include "common/trb_io.hpp" #include "common/spi_io.hpp" #include "chip/ST7565.hpp" #include "common/monograph.hpp" namespace { device::trb_io<utils::null_task, uint8_t> timer_b_; typedef utils::fifo<uint8_t, 16> buffer; typedef device::uart_io<device::UART0, buffer, buffer> uart; uart uart_; utils::command<64> command_; // LCD SCL: P4_2(1) typedef device::PORT<device::PORT4, device::bitpos::B2> SPI_SCL; // LCD SDA: P4_5(12) typedef device::PORT<device::PORT4, device::bitpos::B5> SPI_SDA; // MISO, MOSI, SCK typedef device::spi_io<device::NULL_PORT, SPI_SDA, SPI_SCL, device::soft_spi_mode::CK10> SPI; SPI spi_; // LCD /CS: P3_7(2) typedef device::PORT<device::PORT3, device::bitpos::B7> LCD_SEL; // LCD A0: P1_6(14) typedef device::PORT<device::PORT1, device::bitpos::B6> LCD_A0; // LCD RESET typedef device::NULL_PORT LCD_RES; typedef chip::ST7565<SPI, LCD_SEL, LCD_A0, LCD_RES> LCD; LCD lcd_(spi_); class PLOT { public: typedef int8_t value_type; static const int8_t WIDTH = 128; static const int8_t HEIGHT = 64; void clear(uint8_t v = 0) { } void operator() (int8_t x, int8_t y, bool val) { if(x < 0 || x >= WIDTH) return; if(y < 0 || y >= HEIGHT) return; } }; graphics::kfont_null kfont_; graphics::monograph<PLOT> bitmap_(kfont_); } extern "C" { void sci_putch(char ch) { uart_.putch(ch); } char sci_getch(void) { return uart_.getch(); } uint16_t sci_length() { return uart_.length(); } void sci_puts(const char* str) { uart_.puts(str); } void TIMER_RB_intr(void) { timer_b_.itask(); } void UART0_TX_intr(void) { uart_.isend(); } void UART0_RX_intr(void) { uart_.irecv(); } } static uint8_t v_ = 91; static uint8_t m_ = 123; #if 0 static void randmize_(uint8_t v, uint8_t m) { v_ = v; m_ = m; } #endif static uint8_t rand_() { v_ += v_ << 2; ++v_; uint8_t n = 0; if(m_ & 0x02) n = 1; if(m_ & 0x40) n ^= 1; m_ += m_; if(n == 0) ++m_; return v_ ^ m_; } // __attribute__ ((section (".exttext"))) int main(int argc, char *argv[]) { using namespace device; PRCR.PRC0 = 1; // (20MHz) OCOCR.HOCOE = 1; utils::delay::micro_second(1); // >=30us(125KHz) SCKCR.HSCKSEL = 1; CKSTPR.SCKSEL = 1; { uint8_t ir_level = 2; timer_b_.start(60, ir_level); } // UART (P1_4: TXD0[out], P1_5: RXD0[in]) { utils::PORT_MAP(utils::port_map::P14::TXD0); utils::PORT_MAP(utils::port_map::P15::RXD0); uint8_t ir_level = 1; uart_.start(57600, ir_level); } // SPI { spi_.start(10000000); } // LCD { lcd_.start(0x00); spi_.start(0); // Boost SPI clock bitmap_.clear(0); } sci_puts("Start R8C LCD monitor\n"); command_.set_prompt(" // LED // PD1.B0 = 1; uint8_t cnt = 0; uint16_t x = rand_() & 127; uint16_t y = rand_() & 31; uint16_t xx; uint16_t yy; uint8_t loop = 20; while(1) { timer_b_.sync(); lcd_.copy(bitmap_.fb(), bitmap_.page_num()); if(loop >= 20) { loop = 0; bitmap_.clear(0); bitmap_.frame(0, 0, 128, 32, 1); } xx = rand_() & 127; yy = rand_() & 31; bitmap_.line(x, y, xx, yy, 1); x = xx; y = yy; ++loop; // bitmap_.line(0, 0, 127, 31, 1); // bitmap_.line(0, 31, 127, 0, 1); if(cnt >= 20) { cnt = 0; } ++cnt; if(command_.service()) { } } }
<?php namespace Application\Entity\Repository; use Doctrine\ORM\EntityRepository; Class RubricsRepository extends EntityRepository{ }
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} module Ircbrowse.View.Template where import Ircbrowse.View import Ircbrowse.Types.Import import qualified Text.Blaze.Html5 as H import Data.Text (Text) template :: AttributeValue -> Text -> Html -> Html -> Html template name thetitle innerhead innerbody = do docType html $ do head $ do H.title $ toHtml thetitle link ! rel "stylesheet" ! type_ "text/css" ! href "/css/bootstrap.min.css" link ! rel "stylesheet" ! type_ "text/css" ! href "/css/<API key>.css" link ! rel "stylesheet" ! type_ "text/css" ! href "/css/ircbrowse.css" meta ! httpEquiv "Content-Type" ! content "text/html; charset=UTF-8" innerhead body !# name $ do innerbody preEscapedToHtml ("<script type=\"text/javascript\"> var _gaq = _gaq \ \|| []; _gaq.push(['_setAccount', 'UA-38975161-1']);\ \ _gaq.push(['_trackPageview']); (function() {var ga\ \ = document.createElement('script'); ga.type = 'tex\ \t/javascript'; ga.async = true; ga.src = ('https:' \ \== document.location.protocol ? 'https://ssl' : \ \'http://www') + '.google-analytics.com/ga.js'; var\ \ s = document.<API key>('script')[0]; \ \s.parentNode.insertBefore(ga, s);})(); </script>" :: Text) channelNav :: Channel -> Html channelNav channel = div !. "navbar navbar-static-top navbar-inverse" $ div !. "navbar-inner" $ do div !. "container" $ do a !. "brand" ! href "/" $ "IRCBrowse" ul !. "nav" $ do li $ a ! href (toValue ("/" ++ showChan channel)) $ do (toHtml (prettyChan channel)) li $ a ! href (toValue ("/browse/" ++ showChan channel)) $ do "Browse" -- li $ a ! href (toValue ("/day/" ++ showChan channel ++ "/today/recent")) $ do -- "Recent" -- li $ a ! href (toValue ("/day/" ++ showChan channel ++ "/today")) $ do -- "Today" -- li $ a ! href (toValue ("/calendar/" ++ showChan channel)) $ do -- "Calendar" -- li $ a ! href (toValue ("/nicks/" ++ showChan channel)) $ do -- "Nicks" -- li $ a ! href (toValue ("/pdfs/" ++ showChan channel)) $ do -- "PDFs" showCount :: (Show n,Integral n) => n -> String showCount = reverse . foldr merge "" . zip ("000,00,00,00"::String) . reverse . show where merge (f,c) rest | f == ',' = "," ++ [c] ++ rest | otherwise = [c] ++ rest footer :: Html footer = div !# "footer" $ div !. "container" $ do p !. "muted credit" $ do a ! href "http://ircbrowse.net" $ "IRC Browse" " by " a ! href "http://chrisdone.com" $ "Chris Done" " | " a ! href "https://github.com/chrisdone/ircbrowse" $ "Source code" " | " a ! href "http://haskell.org/" $ "Haskell" mainHeading :: Html -> Html mainHeading inner = h1 $ do a ! href "/" $ do "IRC Browse" ": " inner
<!-- This comment will put IE 6, 7 and 8 in quirks mode --> <!DOCTYPE html PUBLIC "- <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>eusci_a_uart.c File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="$relpath/search.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <table width="100%"> <tr> <td bgcolor="black" width="1"><a href="http: <td bgcolor="red"><img src="titagline.gif" /></td> </tr> </table> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">MSP430 Driver Library &#160;<span id="projectnumber">1.90.00.65</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related&#160;Pages</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File&#160;List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="<API key>.html">cygdrive</a></li><li class="navelem"><a class="el" href="<API key>.html">c</a></li><li class="navelem"><a class="el" href="<API key>.html">msp430-driverlib</a></li><li class="navelem"><a class="el" href="<API key>.html">driverlib</a></li><li class="navelem"><a class="el" href="<API key>.html">MSP430i2xx</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">eusci_a_uart.c File Reference</div> </div> </div><!--header <div class="contents"> <div class="textblock"><code>#include &quot;<a class="el" href="<API key>.html">inc/hw_regaccess.h</a>&quot;</code><br/> <code>#include &quot;<a class="el" href="<API key>.html">inc/hw_memmap.h</a>&quot;</code><br/> <code>#include &quot;<a class="el" href="<API key>.html">eusci_a_uart.h</a>&quot;</code><br/> <code>#include &lt;assert.h&gt;</code><br/> </div><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>">EUSCI_A_UART_init</a> (uint16_t baseAddress, <a class="el" href="<API key>.html"><API key></a> *param)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Advanced initialization routine for the UART block. The values to be written into the clockPrescalar, firstModReg, secondModReg and overSampling parameters should be pre-computed and passed into the initialization function. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress, uint8_t transmitData)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transmits a byte from the UART Module. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Receives a byte that has been sent to the UART Module. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress, uint8_t mask)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables individual UART interrupt sources. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress, uint8_t mask)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables individual UART interrupt sources. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress, uint8_t mask)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the current UART interrupt status. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress, uint8_t mask)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears UART interrupt sources. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>">EUSCI_A_UART_enable</a> (uint16_t baseAddress)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the UART block. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the UART block. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress, uint8_t mask)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the current UART status flags. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the UART module in dormant mode. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Re-enables UART module from dormant mode. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress, uint8_t transmitAddress)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transmits the next byte to be transmitted marked as address depending on selected multiprocessor mode. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transmit break. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the address of the RX Buffer of the UART for the DMA module. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the address of the TX Buffer of the UART for the DMA module. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>"><API key></a> (uint16_t baseAddress, uint16_t deglitchTime)</td></tr> <tr class="memdesc:<API key>"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the deglitch time. <a href="<API key>.html#<API key>">More...</a><br/></td></tr> <tr class="separator:<API key>"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> </div><!-- contents --> <hr size="1" /><small> Copyright 2014, Texas Instruments Incorporated</small> </body> </html>
#import <Foundation/Foundation.h> #import <<API key>/<API key>.h> <API key> @interface <API key> : NSObject <<API key>> @property (nonatomic, strong) id<<API key>> task; @end <API key>
<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Hodograph &mdash; MetPy 0.8</title> <link rel="shortcut icon" href="../../_static/metpy_32x32.ico"/> <link rel="canonical" href="https://unidata.github.io/MetPy/latest/api/generated/metpy.plots.Hodograph.html"/> <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="../../_static/gallery.css" type="text/css" /> <link rel="stylesheet" href="../../_static/theme_override.css" type="text/css" /> <link rel="index" title="Index" href="../../genindex.html"/> <link rel="search" title="Search" href="../../search.html"/> <link rel="top" title="MetPy 0.8" href="../../index.html"/> <link rel="up" title="plots" href="metpy.plots.html"/> <link rel="next" title="SkewT" href="metpy.plots.SkewT.html"/> <link rel="prev" title="read_colortable" href="metpy.plots.read_colortable.html"/> <script src="../../_static/js/modernizr.min.js"></script> </head> <body class="wy-body-for-nav" role="document"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search"> <a href="../../index.html" class="icon icon-home"> MetPy <img src="../../_static/metpy_150x150.png" class="logo" /> </a> <div class="version"> <div class="version-dropdown"> <select class="version-list" id="version-list"> <option value=''>0.8</option> <option value="../latest">latest</option> <option value="../dev">dev</option> </select> </div> </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../../installguide.html">Installation Guide</a></li> <li class="toctree-l1"><a class="reference internal" href="../../units.html">Unit Support</a></li> <li class="toctree-l1"><a class="reference internal" href="../../examples/index.html">MetPy Examples</a></li> <li class="toctree-l1"><a class="reference internal" href="../../tutorials/index.html">MetPy Tutorials</a></li> <li class="toctree-l1 current"><a class="reference internal" href="../index.html">The MetPy API</a><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="metpy.constants.html">constants</a></li> <li class="toctree-l2"><a class="reference internal" href="metpy.units.html">units</a></li> <li class="toctree-l2"><a class="reference internal" href="metpy.io.html">io</a></li> <li class="toctree-l2"><a class="reference internal" href="metpy.io.cdm.html">cdm</a></li> <li class="toctree-l2"><a class="reference internal" href="metpy.calc.html">calc</a></li> <li class="toctree-l2 current"><a class="reference internal" href="metpy.plots.html">plots</a><ul class="current"> <li class="toctree-l3"><a class="reference internal" href="metpy.plots.add_metpy_logo.html">add_metpy_logo</a></li> <li class="toctree-l3"><a class="reference internal" href="metpy.plots.add_timestamp.html">add_timestamp</a></li> <li class="toctree-l3"><a class="reference internal" href="metpy.plots.add_unidata_logo.html">add_unidata_logo</a></li> <li class="toctree-l3"><a class="reference internal" href="metpy.plots.read_colortable.html">read_colortable</a></li> <li class="toctree-l3 current"><a class="current reference internal" href="#">Hodograph</a><ul> <li class="toctree-l4"><a class="reference internal" href="#<API key>">Examples using <code class="docutils literal notranslate"><span class="pre">metpy.plots.Hodograph</span></code></a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="metpy.plots.SkewT.html">SkewT</a></li> <li class="toctree-l3"><a class="reference internal" href="metpy.plots.StationPlot.html">StationPlot</a></li> <li class="toctree-l3"><a class="reference internal" href="metpy.plots.StationPlotLayout.html">StationPlotLayout</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="metpy.plots.ctables.html">ctables</a></li> <li class="toctree-l2"><a class="reference internal" href="metpy.gridding.html">gridding</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../../gempak.html">GEMPAK Conversion Guide</a></li> <li class="toctree-l1"><a class="reference internal" href="../../CONTRIBUTING.html">Contributors Guide</a></li> <li class="toctree-l1"><a class="reference internal" href="../../infrastructureguide.html">Infrastructure Guide</a></li> <li class="toctree-l1"><a class="reference internal" href="../../citing.html">Citing MetPy</a></li> <li class="toctree-l1"><a class="reference internal" href="../../references.html">References</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="../../index.html">MetPy</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="../../index.html">Docs</a> &raquo;</li> <li><a href="../index.html">The MetPy API</a> &raquo;</li> <li><a href="metpy.plots.html">plots</a> &raquo;</li> <li>Hodograph</li> <li class="source-link"> <a href="https://github.com/Unidata/MetPy/issues/new?title=Suggested%20improvement%20for%20api/generated/metpy.plots.Hodograph&body=Please%20describe%20what%20could%20be%20improved%20about%20this%20page%20or%20the%20typo/mistake%20that%20you%20found%3A" class="fa fa-github"> Improve this page</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="hodograph"> <h1>Hodograph<a class="headerlink" href=" <dl class="class"> <dt id="metpy.plots.Hodograph"> <em class="property">class </em><code class="descclassname">metpy.plots.</code><code class="descname">Hodograph</code><span class="sig-paren">(</span><em>ax=None</em>, <em>component_range=80</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/metpy/plots/skewt.html <dd><p>Make a hodograph of wind data.</p> <p>Plots the u and v components of the wind along the x and y axes, respectively.</p> <p>This class simplifies the process of creating a hodograph using matplotlib. It provides helpers for creating a circular grid and for plotting the wind as a line colored by another value (such as wind speed).</p> <dl class="attribute"> <dt id="metpy.plots.Hodograph.ax"> <code class="descname">ax</code><a class="headerlink" href=" <dd><p><a class="reference external" href="https://matplotlib.org/api/axes_api.html </dd></dl> <p>Create a Hodograph instance.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>ax</strong> (<a class="reference external" href="https://matplotlib.org/api/axes_api.html <li><strong>component_range</strong> (<em>value</em>) – The maximum range of the plot. Used to set plot bounds and control the maximum number of grid rings needed.</li> </ul> </td> </tr> </tbody> </table> <p class="rubric">Methods Summary</p> <table border="1" class="longtable docutils"> <colgroup> <col width="10%" /> <col width="90%" /> </colgroup> <tbody valign="top"> <tr class="row-odd"><td><a class="reference internal" href="#metpy.plots.Hodograph.__init__" title="metpy.plots.Hodograph.__init__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code></a>([ax,&nbsp;component_range])</td> <td>Create a Hodograph instance.</td> </tr> <tr class="row-even"><td><a class="reference internal" href="#metpy.plots.Hodograph.add_grid" title="metpy.plots.Hodograph.add_grid"><code class="xref py py-obj docutils literal notranslate"><span class="pre">add_grid</span></code></a>([increment])</td> <td>Add grid lines to hodograph.</td> </tr> <tr class="row-odd"><td><a class="reference internal" href="#metpy.plots.Hodograph.plot" title="metpy.plots.Hodograph.plot"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot</span></code></a>(u,&nbsp;v,&nbsp;**kwargs)</td> <td>Plot u, v data.</td> </tr> <tr class="row-even"><td><a class="reference internal" href="#metpy.plots.Hodograph.plot_colormapped" title="metpy.plots.Hodograph.plot_colormapped"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_colormapped</span></code></a>(u,&nbsp;v,&nbsp;c[,&nbsp;bounds,&nbsp;colors])</td> <td>Plot u, v data, with line colored based on a third set of data.</td> </tr> <tr class="row-odd"><td><a class="reference internal" href="#metpy.plots.Hodograph.wind_vectors" title="metpy.plots.Hodograph.wind_vectors"><code class="xref py py-obj docutils literal notranslate"><span class="pre">wind_vectors</span></code></a>(u,&nbsp;v,&nbsp;**kwargs)</td> <td>Plot u, v data as wind vectors.</td> </tr> </tbody> </table> <p class="rubric">Methods Documentation</p> <dl class="method"> <dt id="metpy.plots.Hodograph.__init__"> <code class="descname">__init__</code><span class="sig-paren">(</span><em>ax=None</em>, <em>component_range=80</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/metpy/plots/skewt.html <dd><p>Create a Hodograph instance.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>ax</strong> (<a class="reference external" href="https://matplotlib.org/api/axes_api.html <li><strong>component_range</strong> (<em>value</em>) – The maximum range of the plot. Used to set plot bounds and control the maximum number of grid rings needed.</li> </ul> </td> </tr> </tbody> </table> </dd></dl> <dl class="method"> <dt id="metpy.plots.Hodograph.add_grid"> <code class="descname">add_grid</code><span class="sig-paren">(</span><em>increment=10.0</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/metpy/plots/skewt.html <dd><p>Add grid lines to hodograph.</p> <p>Creates lines for the x- and y-axes, as well as circles denoting wind speed values.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> <li><strong>increment</strong> (<em>value</em><em>, </em><em>optional</em>) – The value increment between rings</li> <li><strong>kwargs</strong> – Other kwargs to control appearance of lines</li> </ul> </td> </tr> </tbody> </table> <div class="admonition seealso"> <p class="first admonition-title">See also</p> <p class="last"><a class="reference external" href="https://matplotlib.org/api/_as_gen/matplotlib.patches.Circle.html </div> </dd></dl> <dl class="method"> <dt id="metpy.plots.Hodograph.plot"> <code class="descname">plot</code><span class="sig-paren">(</span><em>u</em>, <em>v</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/metpy/plots/skewt.html <dd><p>Plot u, v data.</p> <p>Plots the wind data on the hodograph.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>u</strong> (<em>array_like</em>) – u-component of wind</li> <li><strong>v</strong> (<em>array_like</em>) – v-component of wind</li> <li><strong>kwargs</strong> – Other keyword arguments to pass to <a class="reference external" href="https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.plot.html#matplotlib.axes.Axes.plot" title="(in Matplotlib v2.2.2)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">matplotlib.axes.Axes.plot()</span></code></a></li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><em>list[matplotlib.lines.Line2D]</em> – lines plotted</p> </td> </tr> </tbody> </table> <div class="admonition seealso"> <p class="first admonition-title">See also</p> <p class="last"><a class="reference internal" href="#metpy.plots.Hodograph.plot_colormapped" title="metpy.plots.Hodograph.plot_colormapped"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Hodograph.plot_colormapped()</span></code></a></p> </div> </dd></dl> <dl class="method"> <dt id="metpy.plots.Hodograph.plot_colormapped"> <code class="descname">plot_colormapped</code><span class="sig-paren">(</span><em>u</em>, <em>v</em>, <em>c</em>, <em>bounds=None</em>, <em>colors=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/metpy/plots/skewt.html <dd><p>Plot u, v data, with line colored based on a third set of data.</p> <p>Plots the wind data on the hodograph, but with a colormapped line. Takes a third variable besides the winds and either a colormap to color it with or a series of bounds and colors to create a colormap and norm to control colormapping. The bounds must always be in increasing order. For using custom bounds with height data, the function will automatically interpolate to the actual bounds from the height and wind data, as well as convert the input bounds from height AGL to height above MSL to work with the provided heights.</p> <p>Simple wrapper around plot so that pressure is the first (independent) input. This is essentially a wrapper around <em class="xref py py-obj">semilogy</em>. It also sets some appropriate ticking and plot ranges.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>u</strong> (<em>array_like</em>) – u-component of wind</li> <li><strong>v</strong> (<em>array_like</em>) – v-component of wind</li> <li><strong>c</strong> (<em>array_like</em>) – data to use for colormapping</li> <li><strong>bounds</strong> (<em>array-like</em><em>, </em><em>optional</em>) – Array of bounds for c to use in coloring the hodograph.</li> <li><strong>colors</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html <li><strong>kwargs</strong> – Other keyword arguments to pass to <a class="reference external" href="https://matplotlib.org/api/collections_api.html#matplotlib.collections.LineCollection" title="(in Matplotlib v2.2.2)"><code class="xref py py-class docutils literal notranslate"><span class="pre">matplotlib.collections.LineCollection</span></code></a></li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><em>matplotlib.collections.LineCollection</em> – instance created</p> </td> </tr> </tbody> </table> <div class="admonition seealso"> <p class="first admonition-title">See also</p> <p class="last"><a class="reference internal" href="#metpy.plots.Hodograph.plot" title="metpy.plots.Hodograph.plot"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Hodograph.plot()</span></code></a></p> </div> </dd></dl> <dl class="method"> <dt id="metpy.plots.Hodograph.wind_vectors"> <code class="descname">wind_vectors</code><span class="sig-paren">(</span><em>u</em>, <em>v</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/metpy/plots/skewt.html <dd><p>Plot u, v data as wind vectors.</p> <p>Plot the wind data as vectors for each level, beginning at the origin.</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> <li><strong>u</strong> (<em>array_like</em>) – u-component of wind</li> <li><strong>v</strong> (<em>array_like</em>) – v-component of wind</li> <li><strong>kwargs</strong> – Other keyword arguments to pass to <a class="reference external" href="https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.quiver.html#matplotlib.axes.Axes.quiver" title="(in Matplotlib v2.2.2)"><code class="xref py py-meth docutils literal notranslate"><span class="pre">matplotlib.axes.Axes.quiver()</span></code></a></li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last"><em>matplotlib.quiver.Quiver</em> – arrows plotted</p> </td> </tr> </tbody> </table> </dd></dl> </dd></dl> <div class="section" id="<API key>"> <h2>Examples using <code class="docutils literal notranslate"><span class="pre">metpy.plots.Hodograph</span></code><a class="headerlink" href=" <div class="<API key>" tooltip="Combine a Skew-T and a hodograph using Matplotlib&#x27;s `GridSpec` layout capability. "><div class="figure" id="id1"> <img alt="../../_images/<API key>.png" src="../../_images/<API key>.png" /> <p class="caption"><span class="caption-text"><a class="reference internal" href="../../examples/plots/Skew-T_Layout.html#<API key>"><span class="std std-ref">Skew-T with Complex Layout</span></a></span></p> </div> </div><div class="<API key>" tooltip="Layout a Skew-T plot with a hodograph inset into the plot. "><div class="figure" id="id2"> <img alt="../../_images/<API key>.png" src="../../_images/<API key>.png" /> <p class="caption"><span class="caption-text"><a class="reference internal" href="../../examples/plots/Hodograph_Inset.html#<API key>"><span class="std std-ref">Hodograph Inset</span></a></span></p> </div> </div><div class="<API key>" tooltip="Upper air analysis is a staple of many synoptic and mesoscale analysis problems. In this tutori..."><div class="figure" id="id3"> <img alt="../../_images/<API key>.png" src="../../_images/<API key>.png" /> <p class="caption"><span class="caption-text"><a class="reference internal" href="../../tutorials/upperair_soundings.html#<API key>"><span class="std std-ref">Upper Air Sounding Tutorial</span></a></span></p> </div> </div><div style='clear:both'></div></div> </div> </div> <div class="articleComments"> </div> </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <a href="metpy.plots.SkewT.html" class="btn btn-neutral float-right" title="SkewT" accesskey="n" rel="next">Next <span class="fa <API key>"></span></a> <a href="metpy.plots.read_colortable.html" class="btn btn-neutral" title="read_colortable" accesskey="p" rel="prev"><span class="fa <API key>"></span> Previous</a> </div> <hr/> <div role="contentinfo"> <p> &copy; Copyright 2017, MetPy Developers. Last updated on May 17, 2018 at 20:56:37. </p> </div> Built with <a href="http: <script> (function(i,s,o,g,r,a,m){i['<API key>']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.<API key>(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https: ga('create', 'UA-92978945-1', 'auto'); ga('send', 'pageview'); </script> <script>var version_json_loc = "../../../versions.json";</script> <p>Do you enjoy using MetPy? <a href="https://saythanks.io/to/unidata" class="btn btn-neutral" title="Say Thanks!" accesskey="n">Say Thanks!</a> </p> </footer> </div> </div> </section> </div> <script type="text/javascript"> var <API key> = { URL_ROOT:'../../', VERSION:'0.8.0', LANGUAGE:'None', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="../../_static/jquery.js"></script> <script type="text/javascript" src="../../_static/underscore.js"></script> <script type="text/javascript" src="../../_static/doctools.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=<API key>"></script> <script type="text/javascript" src="../../_static/pop_ver.js"></script> <script type="text/javascript" src="../../_static/js/theme.js"></script> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.StickyNav.enable(); }); </script> </body> </html>
#include "third_party/blink/renderer/core/script/<API key>.h" #include "base/test/scoped_feature_list.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/common/features.h" #include "third_party/blink/renderer/bindings/core/v8/<API key>.h" #include "third_party/blink/renderer/bindings/core/v8/script_function.h" #include "third_party/blink/renderer/bindings/core/v8/<API key>.h" #include "third_party/blink/renderer/bindings/core/v8/script_value.h" #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h" #include "third_party/blink/renderer/bindings/core/v8/<API key>.h" #include "third_party/blink/renderer/core/dom/document.h" #include "third_party/blink/renderer/core/loader/modulescript/<API key>.h" #include "third_party/blink/renderer/core/script/js_module_script.h" #include "third_party/blink/renderer/core/testing/dummy_modulator.h" #include "third_party/blink/renderer/core/testing/module_test_base.h" #include "v8/include/v8.h" namespace blink { namespace { constexpr const char* kTestReferrerURL = "https://example.com/referrer.js"; constexpr const char* kTestDependencyURL = "https://example.com/dependency.js"; const KURL TestReferrerURL() { return KURL(kTestReferrerURL); } const KURL TestDependencyURL() { return KURL(kTestDependencyURL); } class <API key> final : public DummyModulator { public: explicit <API key>(ScriptState* script_state) : script_state_(script_state) {} ~<API key>() override = default; void ResolveTreeFetch(ModuleScript* module_script) { ASSERT_TRUE(pending_client_); pending_client_-><API key>(module_script); pending_client_ = nullptr; } void <API key>(const KURL& url) { <API key> = url; } bool <API key>() const { return <API key>; } void Trace(Visitor*) override; private: // Implements Modulator: ScriptState* GetScriptState() final { return script_state_; } ModuleScript* <API key>(const KURL& url) final { EXPECT_EQ(TestReferrerURL(), url); ModuleScript* module_script = JSModuleScript::CreateForTest(this, v8::Local<v8::Module>(), url); return module_script; } KURL <API key>(const String& module_request, const KURL& base_url, String* failure_reason) final { if (module_request == "invalid-specifier") return KURL(); return KURL(base_url, module_request); } void <API key>() final {} void FetchTree(const KURL& url, ResourceFetcher*, mojom::RequestContextType, network::mojom::RequestDestination, const ScriptFetchOptions&, <API key> custom_fetch_type, ModuleTreeClient* client) final { EXPECT_EQ(<API key>, url); // Currently there are no usage of custom fetch hooks for dynamic import in // web specifications. EXPECT_EQ(<API key>::kNone, custom_fetch_type); pending_client_ = client; <API key> = true; } <API key> ExecuteModule( ModuleScript* module_script, <API key> capture_error) final { EXPECT_EQ(<API key>::kCapture, capture_error); ScriptState::EscapableScope scope(script_state_); <API key> result = ModuleRecord::Evaluate( script_state_, module_script->V8Module(), module_script->SourceURL()); return result.Escape(&scope); } Member<ScriptState> script_state_; Member<ModuleTreeClient> pending_client_; KURL <API key>; bool <API key> = false; }; void <API key>::Trace(Visitor* visitor) { visitor->Trace(script_state_); visitor->Trace(pending_client_); DummyModulator::Trace(visitor); } // <API key> implements a javascript function // with a single argument of type module namespace. // <API key> captures the exported string value // from the module namespace as a WTF::String, exposed via CapturedValue(). class <API key> final : public ScriptFunction { public: <API key>(ScriptState* script_state, const String& export_name) : ScriptFunction(script_state), export_name_(export_name) {} v8::Local<v8::Function> Bind() { return BindToV8Function(); } bool WasCalled() const { return was_called_; } const String& CapturedValue() const { return captured_value_; } private: ScriptValue Call(ScriptValue value) override { was_called_ = true; v8::Isolate* isolate = GetScriptState()->GetIsolate(); v8::Local<v8::Context> context = GetScriptState()->GetContext(); v8::Local<v8::Object> module_namespace = value.V8Value()->ToObject(context).ToLocalChecked(); v8::Local<v8::Value> exported_value = module_namespace->Get(context, V8String(isolate, export_name_)) .ToLocalChecked(); captured_value_ = ToCoreString(exported_value->ToString(context).ToLocalChecked()); return ScriptValue(); } const String export_name_; bool was_called_ = false; String captured_value_; }; // <API key> implements a javascript function which captures // name and error of the exception passed as its argument. class <API key> final : public ScriptFunction { public: explicit <API key>(ScriptState* script_state) : ScriptFunction(script_state) {} v8::Local<v8::Function> Bind() { return BindToV8Function(); } bool WasCalled() const { return was_called_; } const String& Name() const { return name_; } const String& Message() const { return message_; } private: ScriptValue Call(ScriptValue value) override { was_called_ = true; v8::Isolate* isolate = GetScriptState()->GetIsolate(); v8::Local<v8::Context> context = GetScriptState()->GetContext(); v8::Local<v8::Object> error_object = value.V8Value()->ToObject(context).ToLocalChecked(); v8::Local<v8::Value> name = error_object->Get(context, V8String(isolate, "name")).ToLocalChecked(); name_ = ToCoreString(name->ToString(context).ToLocalChecked()); v8::Local<v8::Value> message = error_object->Get(context, V8String(isolate, "message")) .ToLocalChecked(); message_ = ToCoreString(message->ToString(context).ToLocalChecked()); return ScriptValue(); } bool was_called_ = false; String name_; String message_; }; class <API key> final : public ScriptFunction { public: static v8::Local<v8::Function> CreateFunction(ScriptState* script_state) { auto* not_reached = <API key><<API key>>(script_state); return not_reached->BindToV8Function(); } explicit <API key>(ScriptState* script_state) : ScriptFunction(script_state) {} private: ScriptValue Call(ScriptValue) override { ADD_FAILURE(); return ScriptValue(); } }; class <API key> : public testing::Test, public <API key> { public: void SetUp() override { <API key>::SetUp(); } void TearDown() override { <API key>::TearDown(); } }; } // namespace TEST_P(<API key>, ResolveSuccess) { V8TestingScope scope; auto* modulator = <API key><<API key>>( scope.GetScriptState()); modulator-><API key>(TestDependencyURL()); auto* promise_resolver = <API key><<API key>>(scope.GetScriptState()); ScriptPromise promise = promise_resolver->Promise(); auto* capture = <API key><<API key>>( scope.GetScriptState(), "foo"); promise.Then(capture->Bind(), <API key>::CreateFunction( scope.GetScriptState())); auto* resolver = <API key><<API key>>(modulator); resolver->ResolveDynamically("./dependency.js", TestReferrerURL(), ReferrerScriptInfo(), promise_resolver); v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); EXPECT_FALSE(capture->WasCalled()); v8::Local<v8::Module> record = ModuleRecord::Compile( scope.GetIsolate(), "export const foo = 'hello';", TestReferrerURL(), TestReferrerURL(), ScriptFetchOptions(), TextPosition::MinimumPosition(), ASSERT_NO_EXCEPTION); ModuleScript* module_script = JSModuleScript::CreateForTest(modulator, record, TestDependencyURL()); EXPECT_TRUE(ModuleRecord::Instantiate(scope.GetScriptState(), record, TestReferrerURL()) .IsEmpty()); modulator->ResolveTreeFetch(module_script); v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); EXPECT_TRUE(capture->WasCalled()); EXPECT_EQ("hello", capture->CapturedValue()); } TEST_P(<API key>, <API key>) { V8TestingScope scope; auto* modulator = <API key><<API key>>( scope.GetScriptState()); modulator-><API key>(TestDependencyURL()); auto* promise_resolver = <API key><<API key>>(scope.GetScriptState()); ScriptPromise promise = promise_resolver->Promise(); auto* capture = <API key><<API key>>(scope.GetScriptState()); promise.Then(<API key>::CreateFunction( scope.GetScriptState()), capture->Bind()); auto* resolver = <API key><<API key>>(modulator); resolver->ResolveDynamically("invalid-specifier", TestReferrerURL(), ReferrerScriptInfo(), promise_resolver); v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); EXPECT_TRUE(capture->WasCalled()); EXPECT_EQ("TypeError", capture->Name()); EXPECT_TRUE(capture->Message().StartsWith("Failed to resolve")); } TEST_P(<API key>, FetchFailure) { V8TestingScope scope; auto* modulator = <API key><<API key>>( scope.GetScriptState()); modulator-><API key>(TestDependencyURL()); auto* promise_resolver = <API key><<API key>>(scope.GetScriptState()); ScriptPromise promise = promise_resolver->Promise(); auto* capture = <API key><<API key>>(scope.GetScriptState()); promise.Then(<API key>::CreateFunction( scope.GetScriptState()), capture->Bind()); auto* resolver = <API key><<API key>>(modulator); resolver->ResolveDynamically("./dependency.js", TestReferrerURL(), ReferrerScriptInfo(), promise_resolver); EXPECT_FALSE(capture->WasCalled()); modulator->ResolveTreeFetch(nullptr); v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); EXPECT_TRUE(capture->WasCalled()); EXPECT_EQ("TypeError", capture->Name()); EXPECT_TRUE(capture->Message().StartsWith("Failed to fetch")); } TEST_P(<API key>, ExceptionThrown) { V8TestingScope scope; auto* modulator = <API key><<API key>>( scope.GetScriptState()); modulator-><API key>(TestDependencyURL()); auto* promise_resolver = <API key><<API key>>(scope.GetScriptState()); ScriptPromise promise = promise_resolver->Promise(); auto* capture = <API key><<API key>>(scope.GetScriptState()); promise.Then(<API key>::CreateFunction( scope.GetScriptState()), capture->Bind()); auto* resolver = <API key><<API key>>(modulator); resolver->ResolveDynamically("./dependency.js", TestReferrerURL(), ReferrerScriptInfo(), promise_resolver); EXPECT_FALSE(capture->WasCalled()); v8::Local<v8::Module> record = ModuleRecord::Compile( scope.GetIsolate(), "throw Error('bar')", TestReferrerURL(), TestReferrerURL(), ScriptFetchOptions(), TextPosition::MinimumPosition(), ASSERT_NO_EXCEPTION); ModuleScript* module_script = JSModuleScript::CreateForTest(modulator, record, TestDependencyURL()); EXPECT_TRUE(ModuleRecord::Instantiate(scope.GetScriptState(), record, TestReferrerURL()) .IsEmpty()); modulator->ResolveTreeFetch(module_script); v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); EXPECT_TRUE(capture->WasCalled()); EXPECT_EQ("Error", capture->Name()); EXPECT_EQ("bar", capture->Message()); } TEST_P(<API key>, <API key>) { V8TestingScope scope; scope.GetDocument().SetURL(KURL("https://example.com")); auto* modulator = <API key><<API key>>( scope.GetScriptState()); modulator-><API key>(TestDependencyURL()); auto* promise_resolver = <API key><<API key>>(scope.GetScriptState()); ScriptPromise promise = promise_resolver->Promise(); auto* capture = <API key><<API key>>( scope.GetScriptState(), "foo"); promise.Then(capture->Bind(), <API key>::CreateFunction( scope.GetScriptState())); auto* resolver = <API key><<API key>>(modulator); resolver->ResolveDynamically("./dependency.js", /* null referrer */ KURL(), ReferrerScriptInfo(), promise_resolver); v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); EXPECT_FALSE(capture->WasCalled()); v8::Local<v8::Module> record = ModuleRecord::Compile( scope.GetIsolate(), "export const foo = 'hello';", TestDependencyURL(), TestDependencyURL(), ScriptFetchOptions(), TextPosition::MinimumPosition(), ASSERT_NO_EXCEPTION); ModuleScript* module_script = JSModuleScript::CreateForTest(modulator, record, TestDependencyURL()); EXPECT_TRUE(ModuleRecord::Instantiate(scope.GetScriptState(), record, TestDependencyURL()) .IsEmpty()); modulator->ResolveTreeFetch(module_script); v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); EXPECT_TRUE(capture->WasCalled()); EXPECT_EQ("hello", capture->CapturedValue()); } TEST_P(<API key>, <API key>) { V8TestingScope scope; scope.GetDocument().SetURL(KURL("https://example.com")); auto* modulator = <API key><<API key>>( scope.GetScriptState()); modulator-><API key>( KURL("https://example.com/correct/dependency.js")); auto* promise_resolver = <API key><<API key>>(scope.GetScriptState()); auto* resolver = <API key><<API key>>(modulator); KURL wrong_base_url("https://example.com/wrong/bar.js"); KURL correct_base_url("https://example.com/correct/baz.js"); resolver->ResolveDynamically( "./dependency.js", wrong_base_url, ReferrerScriptInfo(correct_base_url, ScriptFetchOptions()), promise_resolver); v8::MicrotasksScope::PerformCheckpoint(scope.GetIsolate()); EXPECT_TRUE(modulator-><API key>()); } // Instantiate tests once with TLA and once without: <API key>(<API key>, <API key>, testing::Bool(), <API key>()); } // namespace blink
<?php namespace app\models; use Yii; /** * This is the model class for table "book". * * @property integer $id * @property string $title * @property string $published_date * * @property BookAuthor[] $bookAuthors * @property BookGenre[] $bookGenres */ class Book extends \yii\db\ActiveRecord { /** * @inheritdoc */ public static function tableName() { return 'book'; } /** * @inheritdoc */ public function rules() { return [ [['title', 'published_date'], 'required'], [['published_date'], 'safe'], [['title'], 'string', 'max' => 256] ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'title' => 'Title', 'published_date' => 'Published Date', ]; } /** * @return \yii\db\ActiveQuery */ public function getBookAuthors() { return $this->hasMany('book_author', ['book_id' => 'id']); } /** * @return \yii\db\ActiveQuery */ public function getBookGenres() { return $this->hasMany('book_genre', ['book_id' => 'id']); } /** * @inheritdoc * @return BookQuery the active query used by this AR class. */ public static function find() { return new BookQuery(get_called_class()); } }
<?php namespace app\models; use Yii; /** * This is the model class for table "content". * * @property integer $id * @property string $title * @property integer $moderation * @property integer $listsql_id * @property integer $parent_id * @property integer $grade_id * @property string $<API key> * @property integer $<API key> * @property string $<API key> * @property string $<API key> * @property integer $<API key> * @property string $<API key> * @property string $<API key> * @property integer $<API key> * @property string $<API key> * @property string $<API key> * @property integer $<API key> * @property string $<API key> * @property string $<API key> * @property integer $<API key> * @property string $<API key> * @property string $<API key> * @property integer $<API key> * @property string $<API key> */ class Content extends \yii\db\ActiveRecord { /** * @inheritdoc */ public static function tableName() { return 'content'; } /** * @inheritdoc */ public function rules() { return [ [['title', 'moderation', 'listsql_id', 'parent_id', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>'], 'required'], [['moderation', 'listsql_id', 'parent_id', 'grade_id', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>'], 'integer'], [['<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>'], 'string'], [['<API key>', '<API key>', '<API key>', '<API key>', '<API key>', '<API key>'], 'safe'], [['title'], 'string', 'max' => 500], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'title' => 'Title', 'moderation' => 'Moderation', 'listsql_id' => 'Listsql ID', 'parent_id' => 'Parent ID', 'grade_id' => 'Grade ID', '<API key>' => 'Comment Tutor About Pupil1', '<API key>' => 'Mark Tutor About Pupil1', '<API key>' => 'Date Tutor About Pupil1', '<API key>' => 'Comment Pupil1 About Tutor', '<API key>' => 'Mark Pupil1 About Tutor', '<API key>' => 'Date Pupil1 About Tutor', '<API key>' => 'Comment Maximum Tutor About Pupil1', '<API key>' => 'Mark Maximum Tutor About Pupil1', '<API key>' => 'Date Maximum Tutor About Pupil1', '<API key>' => 'Comment Maximum Pupil1 About Tutor', '<API key>' => 'Mark Maximum Pupil1 About Tutor', '<API key>' => 'Date Maximum Pupil1 About Tutor', '<API key>' => 'Comment Pupil1 About Pupil1', '<API key>' => 'Mark Pupil1 About Pupil1', '<API key>' => 'Date Pupil1 About Pupil1', '<API key>' => 'Comment Maximum Pupil1 About Pupil1', '<API key>' => 'Mark Maximum Pupil1 About Pupil1', '<API key>' => 'Date Maximum Pupil1 About Pupil1', ]; } }
<!DOCTYPE HTML PUBLIC "- <!--NewPage <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_18) on Thu Jan 06 21:19:32 CET 2011 --> <TITLE> Uses of Package util </TITLE> <META NAME="date" CONTENT="2011-01-06"> <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 Package util"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <A NAME="navbar_top"></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#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-files/index-1.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?util/package-use.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-use.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> <HR> <CENTER> <H2> <B>Uses of Package<br>util</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="../util/package-summary.html">util</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#util"><B>util</B></A></TD> <TD>contains some helper classes used by this framework&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="util"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Classes in <A HREF="../util/package-summary.html">util</A> used by <A HREF="../util/package-summary.html">util</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><B><A HREF="../util/class-use/PackedArray.html#util"><B>PackedArray</B></A></B> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the implementation of a simple packing algorithm, to reduce the size of an integer array with a fixed number of positive elements and where the highest value is known.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><B><A HREF="../util/class-use/SortedQueue.html#util"><B>SortedQueue</B></A></B> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An unbounded sorted queue able to update its elements.</TD> </TR> </TABLE> &nbsp; <P> <HR> <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="<API key>"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#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-files/index-1.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?util/package-use.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-use.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> <HR> </BODY> </HTML>
from unittest import TestCase from django.core.management import call_command class <API key>(TestCase): def test_run_command(self): call_command('send_ai_pics_stats')
/* TEMPLATE GENERATED TESTCASE FILE Filename: <API key>.c Label Definition File: <API key>.label.xml Template File: sources-sink-03.tmpl.c */ /* * @description * CWE: 194 Unexpected Sign Extension * BadSource: fgets Read data from the console using fgets() * GoodSource: Positive integer * Sink: malloc * BadSink : Allocate memory using malloc() with the size of data * Flow Variant: 03 Control flow: if(5==5) and if(5!=5) * * */ #include "std_testcase.h" /* Must be at least 8 for atoi() to work properly */ #define CHAR_ARRAY_SIZE 8 #ifndef OMITBAD void <API key>() { short data; /* Initialize data */ data = 0; if(5==5) { { char inputBuffer[CHAR_ARRAY_SIZE] = ""; /* FLAW: Use a value input from the console using fgets() */ if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) { /* Convert to short */ data = (short)atoi(inputBuffer); } else { printLine("fgets() failed."); } } } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); if (dataBuffer == NULL) {exit(-1);} /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B1() - use goodsource and badsink by changing the 5==5 to 5!=5 */ static void goodG2B1() { short data; /* Initialize data */ data = 0; if(5!=5) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ printLine("Benign, fixed string"); } else { /* FIX: Use a positive integer less than &InitialDataSize&*/ data = 100-1; } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); if (dataBuffer == NULL) {exit(-1);} /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } } /* goodG2B2() - use goodsource and badsink by reversing the blocks in the if statement */ static void goodG2B2() { short data; /* Initialize data */ data = 0; if(5==5) { /* FIX: Use a positive integer less than &InitialDataSize&*/ data = 100-1; } /* Assume we want to allocate a relatively small buffer */ if (data < 100) { /* POTENTIAL FLAW: malloc() takes a size_t (unsigned int) as input and therefore if it is negative, * the conversion will cause malloc() to allocate a very large amount of data or fail */ char * dataBuffer = (char *)malloc(data); if (dataBuffer == NULL) {exit(-1);} /* Do something with dataBuffer */ memset(dataBuffer, 'A', data-1); dataBuffer[data-1] = '\0'; printLine(dataBuffer); free(dataBuffer); } } void <API key>() { goodG2B1(); goodG2B2(); } #endif /* OMITGOOD */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); <API key>(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); <API key>(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
#include "ash/system/settings/tray_settings.h" #include "ash/shell.h" #include "ash/system/power/power_status_view.h" #include "ash/system/tray/<API key>.h" #include "ash/system/tray/tray_constants.h" #include "ash/system/tray/tray_views.h" #include "base/logging.h" #include "base/<API key>.h" #include "grit/ash_resources.h" #include "grit/ash_strings.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/base/accessibility/<API key>.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/image/image.h" #include "ui/views/controls/image_view.h" #include "ui/views/controls/label.h" #include "ui/views/layout/box_layout.h" #include "ui/views/layout/fill_layout.h" #include "ui/views/view.h" namespace ash { namespace internal { namespace tray { class SettingsDefaultView : public ash::internal::ActionableView { public: explicit SettingsDefaultView(user::LoginStatus status) : login_status_(status), label_(NULL), power_status_view_(NULL) { SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, ash::<API key>, 0, ash::<API key>)); bool <API key> = false; if (login_status_ != user::LOGGED_IN_NONE && login_status_ != user::LOGGED_IN_LOCKED) { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); views::ImageView* icon = new ash::internal::FixedSizedImageView(0, ash::<API key>); icon->SetImage( rb.GetImageNamed(<API key>).ToImageSkia()); AddChildView(icon); string16 text = rb.GetLocalizedString(<API key>); label_ = new views::Label(text); AddChildView(label_); SetAccessibleName(text); <API key> = true; } PowerSupplyStatus power_status = ash::Shell::GetInstance()->tray_delegate()-><API key>(); if (power_status.battery_is_present) { power_status_view_ = new ash::internal::PowerStatusView( ash::internal::PowerStatusView::VIEW_DEFAULT, <API key>); AddChildView(power_status_view_); UpdatePowerStatus(power_status); } } virtual ~SettingsDefaultView() {} void UpdatePowerStatus(const PowerSupplyStatus& status) { if (power_status_view_) power_status_view_->UpdatePowerStatus(status); } // Overridden from ash::internal::ActionableView. virtual bool PerformAction(const ui::Event& event) OVERRIDE { if (login_status_ == user::LOGGED_IN_NONE || login_status_ == user::LOGGED_IN_LOCKED) return false; ash::Shell::GetInstance()->tray_delegate()->ShowSettings(); return true; } // Overridden from views::View. virtual void Layout() OVERRIDE { views::View::Layout(); if (label_ && power_status_view_) { // Let the box-layout do the layout first. Then move power_status_view_ // to right align if it is created. gfx::Size size = power_status_view_->GetPreferredSize(); gfx::Rect bounds(size); bounds.set_x(width() - size.width() - ash::<API key>); bounds.set_y((height() - size.height()) / 2); power_status_view_->SetBoundsRect(bounds); } } // Overridden from views::View. virtual void <API key>(views::View* child) OVERRIDE { views::View::<API key>(child); Layout(); } private: user::LoginStatus login_status_; views::Label* label_; ash::internal::PowerStatusView* power_status_view_; <API key>(SettingsDefaultView); }; } // namespace tray TraySettings::TraySettings(SystemTray* system_tray) : SystemTrayItem(system_tray), default_view_(NULL) { } TraySettings::~TraySettings() {} views::View* TraySettings::CreateTrayView(user::LoginStatus status) { return NULL; } views::View* TraySettings::CreateDefaultView(user::LoginStatus status) { if ((status == user::LOGGED_IN_NONE || status == user::LOGGED_IN_LOCKED) && (!ash::Shell::GetInstance()->tray_delegate()-> <API key>().battery_is_present)) return NULL; CHECK(default_view_ == NULL); default_view_ = new tray::SettingsDefaultView(status); return default_view_; } views::View* TraySettings::CreateDetailedView(user::LoginStatus status) { NOTIMPLEMENTED(); return NULL; } void TraySettings::DestroyTrayView() { } void TraySettings::DestroyDefaultView() { default_view_ = NULL; } void TraySettings::DestroyDetailedView() { } void TraySettings::<API key>(user::LoginStatus status) { } // Overridden from PowerStatusObserver. void TraySettings::<API key>(const PowerSupplyStatus& status) { if (default_view_) default_view_->UpdatePowerStatus(status); } } // namespace internal } // namespace ash
var Turtle = function () { this.d = 0; this.x = 0; this.y = 0; this.rounding = false; this.invert = false; } Turtle.prototype.setX = function (val) { this.x = val; return this; } Turtle.prototype.setY = function (val) { this.y = val; return this; } Turtle.prototype.setDegree = function (deg) { this.d = deg; return this; } Turtle.prototype.setInvert = function (bool) { this.invert = bool; return this; } Turtle.prototype.setRounding = function (bool) { this.rounding = bool; return this; } Turtle.prototype.rt = function (degrees) { if (this.invert) { this.d += degrees; } else { this.d -= degrees; this.d += 360; // to ensure that the number is positive } this.d %= 360; return this; } Turtle.prototype.lt = function (degrees) { if (this.invert) { this.d -= degrees; this.d += 360; // to ensure that the number is positive } else { this.d += degrees; } this.d %= 360; return this; } Turtle.prototype.adj = function (degrees, hyp) { var adj = Math.cos(degrees * Math.PI / 180) * hyp; if (this.rounding) { return Math.round(adj); } else { return adj; } } Turtle.prototype.opp = function (degrees, hyp) { var opp = Math.sin(degrees * Math.PI / 180) * hyp; if (this.rounding) { return Math.round(opp); } else { return opp; } } Turtle.prototype.fd = function (magnitude) { if (this.d < 90) { // x == adjacent this.x += this.adj(this.d, magnitude); // y == opposite this.y += this.opp(this.d, magnitude); } else if (this.d < 180) { // x == -opposite this.x -= this.opp(this.d - 90, magnitude); // y == adjacent this.y += this.adj(this.d - 90, magnitude); } else if (this.d < 270) { // x == -adjacent this.x -= this.adj(this.d - 180, magnitude); // y == -opposite this.y -= this.opp(this.d - 180, magnitude); } else if (this.d < 360) { // x == opposite this.x += this.opp(this.d - 270, magnitude); // y == -adjacent this.y -= this.adj(this.d - 270, magnitude); } return this; } Turtle.prototype.bk = function (magnitude) { if (this.d < 90) { // x -= adjacent this.x -= this.adj(this.d, magnitude); // y -= opposite this.y -= this.opp(this.d, magnitude); } else if (this.d < 180) { // x == +opposite this.x += this.opp(this.d - 90, magnitude); // y == -adjacent this.y -= this.adj(this.d - 90, magnitude); } else if (this.d < 270) { // x == opposite this.x += this.adj(this.d - 180, magnitude); // y == adjacent this.y += this.opp(this.d - 180, magnitude); } else if (this.d < 360) { // x == -opposite this.x -= this.opp(this.d - 270, magnitude); // y == adjacent this.y += this.adj(this.d - 270, magnitude); } return this; }
# property including but not limited to intellectual property relating # to a hardware implementation of the functionality of the software # terms below provided that you ensure that this notice is replicated # unmodified and in its entirety in all distributions of the software, # modified or unmodified, in source code or in binary form. # modification, are permitted provided that the following conditions are # documentation and/or other materials provided with the distribution; # contributors may be used to endorse or promote products derived from # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # 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. # Authors: Andreas Sandberg from m5.objects import * from arm_generic import * import switcheroo root = <API key>( mem_class=DDR3_1600_x64, cpu_classes=(AtomicSimpleCPU, AtomicSimpleCPU) ).create_root() # Setup a custom test method that uses the switcheroo tester that # switches between CPU models. run_test = switcheroo.run_test
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Code Coverage for /var/www/html/Album/vendor/zendframework/zendframework/library/Zend/Loader/StandardAutoloader.php</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/<API key>.min.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> <!--[if lt IE 9]> <script src="js/html5shiv.js"></script> <![endif] </head> <body> <header> <div class="container"> <div class="row"> <div class="span12"> <ul class="breadcrumb"> <li><a href="index.html">/var/www/html/Album</a> <span class="divider">/</span></li> <li><a href="vendor.html">vendor</a> <span class="divider">/</span></li> <li><a href="<API key>.html">zendframework</a> <span class="divider">/</span></li> <li><a href="<API key>.html">zendframework</a> <span class="divider">/</span></li> <li><a href="<API key>.html">library</a> <span class="divider">/</span></li> <li><a href="<API key>.html">Zend</a> <span class="divider">/</span></li> <li><a href="<API key>.html">Loader</a> <span class="divider">/</span></li> <li class="active">StandardAutoloader.php</li> </ul> </div> </div> </div> </header> <div class="container"> <table class="table table-bordered"> <thead> <tr> <td>&nbsp;</td> <td colspan="10"><div align="center"><strong>Code Coverage</strong></div></td> </tr> <tr> <td>&nbsp;</td> <td colspan="3"><div align="center"><strong>Classes and Traits</strong></div></td> <td colspan="4"><div align="center"><strong>Functions and Methods</strong></div></td> <td colspan="3"><div align="center"><strong>Lines</strong></div></td> </tr> </thead> <tbody> <tr> <td class="danger">Total</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 15.38%;"></div> </div> </td> <td class="danger small"><div align="right">15.38%</div></td> <td class="danger small"><div align="right">2&nbsp;/&nbsp;13</div></td> <td class="danger small"><abbr title="Change Risk Anti-Patterns (CRAP) Index">CRAP</abbr></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 20.59%;"></div> </div> </td> <td class="danger small"><div align="right">20.59%</div></td> <td class="danger small"><div align="right">21&nbsp;/&nbsp;102</div></td> </tr> <tr> <td class="danger">StandardAutoloader</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 15.38%;"></div> </div> </td> <td class="danger small"><div align="right">15.38%</div></td> <td class="danger small"><div align="right">2&nbsp;/&nbsp;13</div></td> <td class="danger small">1201.82</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 20.59%;"></div> </div> </td> <td class="danger small"><div align="right">20.59%</div></td> <td class="danger small"><div align="right">21&nbsp;/&nbsp;102</div></td> </tr> <tr> <td class="danger" colspan="4">&nbsp;<a href="#51">__construct($options = null)</a></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger small">6</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;4</div></td> </tr> <tr> <td class="danger" colspan="4">&nbsp;<a href="#80">setOptions($options)</a></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger small">182</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;26</div></td> </tr> <tr> <td class="danger" colspan="4">&nbsp;<a href="#120"><API key>($flag)</a></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger small">2</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;2</div></td> </tr> <tr> <td class="success" colspan="4">&nbsp;<a href="#131"><API key>()</a></td> <td class="success big"> <div class="progress progress-success" style="width: 100px;"> <div class="bar" style="width: 100.00%;"></div> </div> </td> <td class="success small"><div align="right">100.00%</div></td> <td class="success small"><div align="right">1&nbsp;/&nbsp;1</div></td> <td class="success small">1</td> <td class="success big"> <div class="progress progress-success" style="width: 100px;"> <div class="bar" style="width: 100.00%;"></div> </div> </td> <td class="success small"><div align="right">100.00%</div></td> <td class="success small"><div align="right">1&nbsp;/&nbsp;1</div></td> </tr> <tr> <td class="danger" colspan="4">&nbsp;<a href="#143">registerNamespace($namespace, $directory)</a></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger small">2</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;3</div></td> </tr> <tr> <td class="danger" colspan="4">&nbsp;<a href="#157">registerNamespaces($namespaces)</a></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger small">20</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;7</div></td> </tr> <tr> <td class="danger" colspan="4">&nbsp;<a href="#177">registerPrefix($prefix, $directory)</a></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger small">2</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;3</div></td> </tr> <tr> <td class="danger" colspan="4">&nbsp;<a href="#191">registerPrefixes($prefixes)</a></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger small">20</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;7</div></td> </tr> <tr> <td class="danger" colspan="4">&nbsp;<a href="#210">autoload($class)</a></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger small">35.00</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 25.00%;"></div> </div> </td> <td class="danger small"><div align="right">25.00%</div></td> <td class="danger small"><div align="right">4&nbsp;/&nbsp;16</div></td> </tr> <tr> <td class="danger" colspan="4">&nbsp;<a href="#240">register()</a></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger small">2</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;2</div></td> </tr> <tr> <td class="success" colspan="4">&nbsp;<a href="#252"><API key>($class, $directory)</a></td> <td class="success big"> <div class="progress progress-success" style="width: 100px;"> <div class="bar" style="width: 100.00%;"></div> </div> </td> <td class="success small"><div align="right">100.00%</div></td> <td class="success small"><div align="right">1&nbsp;/&nbsp;1</div></td> <td class="success small">3</td> <td class="success big"> <div class="progress progress-success" style="width: 100px;"> <div class="bar" style="width: 100.00%;"></div> </div> </td> <td class="success small"><div align="right">100.00%</div></td> <td class="success small"><div align="right">7&nbsp;/&nbsp;7</div></td> </tr> <tr> <td class="danger" colspan="4">&nbsp;<a href="#276">loadClass($class, $type)</a></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger small">13.12</td> <td class="warning big"> <div class="progress progress-warning" style="width: 100px;"> <div class="bar" style="width: 50.00%;"></div> </div> </td> <td class="warning small"><div align="right">50.00%</div></td> <td class="warning small"><div align="right">9&nbsp;/&nbsp;18</div></td> </tr> <tr> <td class="danger" colspan="4">&nbsp;<a href="#317">normalizeDirectory($directory)</a></td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;1</div></td> <td class="danger small">6</td> <td class="danger big"> <div class="progress progress-danger" style="width: 100px;"> <div class="bar" style="width: 0.00%;"></div> </div> </td> <td class="danger small"><div align="right">0.00%</div></td> <td class="danger small"><div align="right">0&nbsp;/&nbsp;6</div></td> </tr> </tbody> </table> <table class="table table-borderless table-condensed"> <tbody> <tr><td><div align="right"><a name="1"></a><a href="#1">1</a></div></td><td class="codeLine">&lt;?php</td></tr> <tr><td><div align="right"><a name="9"></a><a href="#9">9</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="10"></a><a href="#10">10</a></div></td><td class="codeLine">namespace Zend\Loader;</td></tr> <tr><td><div align="right"><a name="11"></a><a href="#11">11</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="12"></a><a href="#12">12</a></div></td><td class="codeLine">// Grab SplAutoloader interface</td></tr> <tr><td><div align="right"><a name="13"></a><a href="#13">13</a></div></td><td class="codeLine">require_once __DIR__ . '/SplAutoloader.php';</td></tr> <tr><td><div align="right"><a name="14"></a><a href="#14">14</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="15"></a><a href="#15">15</a></div></td><td class="codeLine">/**</td></tr> <tr><td><div align="right"><a name="16"></a><a href="#16">16</a></div></td><td class="codeLine"> * PSR-0 compliant autoloader</td></tr> <tr><td><div align="right"><a name="17"></a><a href="#17">17</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="18"></a><a href="#18">18</a></div></td><td class="codeLine"> * Allows autoloading both namespaced and vendor-prefixed classes. Class</td></tr> <tr><td><div align="right"><a name="19"></a><a href="#19">19</a></div></td><td class="codeLine"> * lookups are performed on the filesystem. If a class file for the referenced</td></tr> <tr><td><div align="right"><a name="20"></a><a href="#20">20</a></div></td><td class="codeLine"> * class is not found, a PHP warning will be raised by include().</td></tr> <tr><td><div align="right"><a name="21"></a><a href="#21">21</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="22"></a><a href="#22">22</a></div></td><td class="codeLine">class StandardAutoloader implements SplAutoloader</td></tr> <tr><td><div align="right"><a name="23"></a><a href="#23">23</a></div></td><td class="codeLine">{</td></tr> <tr><td><div align="right"><a name="24"></a><a href="#24">24</a></div></td><td class="codeLine"> const NS_SEPARATOR = '\\';</td></tr> <tr><td><div align="right"><a name="25"></a><a href="#25">25</a></div></td><td class="codeLine"> const PREFIX_SEPARATOR = '_';</td></tr> <tr><td><div align="right"><a name="26"></a><a href="#26">26</a></div></td><td class="codeLine"> const LOAD_NS = 'namespaces';</td></tr> <tr><td><div align="right"><a name="27"></a><a href="#27">27</a></div></td><td class="codeLine"> const LOAD_PREFIX = 'prefixes';</td></tr> <tr><td><div align="right"><a name="28"></a><a href="#28">28</a></div></td><td class="codeLine"> const ACT_AS_FALLBACK = 'fallback_autoloader';</td></tr> <tr><td><div align="right"><a name="29"></a><a href="#29">29</a></div></td><td class="codeLine"> const AUTOREGISTER_ZF = 'autoregister_zf';</td></tr> <tr><td><div align="right"><a name="30"></a><a href="#30">30</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="31"></a><a href="#31">31</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="32"></a><a href="#32">32</a></div></td><td class="codeLine"> * @var array Namespace/directory pairs to search; ZF library added by default</td></tr> <tr><td><div align="right"><a name="33"></a><a href="#33">33</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="34"></a><a href="#34">34</a></div></td><td class="codeLine"> protected $namespaces = array();</td></tr> <tr><td><div align="right"><a name="35"></a><a href="#35">35</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="36"></a><a href="#36">36</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="37"></a><a href="#37">37</a></div></td><td class="codeLine"> * @var array Prefix/directory pairs to search</td></tr> <tr><td><div align="right"><a name="38"></a><a href="#38">38</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="39"></a><a href="#39">39</a></div></td><td class="codeLine"> protected $prefixes = array();</td></tr> <tr><td><div align="right"><a name="40"></a><a href="#40">40</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="41"></a><a href="#41">41</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="42"></a><a href="#42">42</a></div></td><td class="codeLine"> * @var bool Whether or not the autoloader should also act as a fallback autoloader</td></tr> <tr><td><div align="right"><a name="43"></a><a href="#43">43</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="44"></a><a href="#44">44</a></div></td><td class="codeLine"> protected $<API key> = false;</td></tr> <tr><td><div align="right"><a name="45"></a><a href="#45">45</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="46"></a><a href="#46">46</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="47"></a><a href="#47">47</a></div></td><td class="codeLine"> * Constructor</td></tr> <tr><td><div align="right"><a name="48"></a><a href="#48">48</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="49"></a><a href="#49">49</a></div></td><td class="codeLine"> * @param null|array|\Traversable $options</td></tr> <tr><td><div align="right"><a name="50"></a><a href="#50">50</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="51"></a><a href="#51">51</a></div></td><td class="codeLine"> public function __construct($options = null)</td></tr> <tr><td><div align="right"><a name="52"></a><a href="#52">52</a></div></td><td class="codeLine"> {</td></tr> <tr class="danger"><td><div align="right"><a name="53"></a><a href="#53">53</a></div></td><td class="codeLine"> if (null !== $options) {</td></tr> <tr class="danger"><td><div align="right"><a name="54"></a><a href="#54">54</a></div></td><td class="codeLine"> $this-&gt;setOptions($options);</td></tr> <tr class="danger"><td><div align="right"><a name="55"></a><a href="#55">55</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="56"></a><a href="#56">56</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="57"></a><a href="#57">57</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="58"></a><a href="#58">58</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="59"></a><a href="#59">59</a></div></td><td class="codeLine"> * Configure autoloader</td></tr> <tr><td><div align="right"><a name="60"></a><a href="#60">60</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="61"></a><a href="#61">61</a></div></td><td class="codeLine"> * Allows specifying both &quot;namespace&quot; and &quot;prefix&quot; pairs, using the</td></tr> <tr><td><div align="right"><a name="62"></a><a href="#62">62</a></div></td><td class="codeLine"> * following structure:</td></tr> <tr><td><div align="right"><a name="63"></a><a href="#63">63</a></div></td><td class="codeLine"> * &lt;code&gt;</td></tr> <tr><td><div align="right"><a name="64"></a><a href="#64">64</a></div></td><td class="codeLine"> * array(</td></tr> <tr><td><div align="right"><a name="65"></a><a href="#65">65</a></div></td><td class="codeLine"> * 'namespaces' =&gt; array(</td></tr> <tr><td><div align="right"><a name="66"></a><a href="#66">66</a></div></td><td class="codeLine"> * 'Zend' =&gt; '/path/to/Zend/library',</td></tr> <tr><td><div align="right"><a name="67"></a><a href="#67">67</a></div></td><td class="codeLine"> * 'Doctrine' =&gt; '/path/to/Doctrine/library',</td></tr> <tr><td><div align="right"><a name="68"></a><a href="#68">68</a></div></td><td class="codeLine"> * ),</td></tr> <tr><td><div align="right"><a name="69"></a><a href="#69">69</a></div></td><td class="codeLine"> * 'prefixes' =&gt; array(</td></tr> <tr><td><div align="right"><a name="70"></a><a href="#70">70</a></div></td><td class="codeLine"> * 'Phly_' =&gt; '/path/to/Phly/library',</td></tr> <tr><td><div align="right"><a name="71"></a><a href="#71">71</a></div></td><td class="codeLine"> * ),</td></tr> <tr><td><div align="right"><a name="72"></a><a href="#72">72</a></div></td><td class="codeLine"> * 'fallback_autoloader' =&gt; true,</td></tr> <tr><td><div align="right"><a name="73"></a><a href="#73">73</a></div></td><td class="codeLine"> * )</td></tr> <tr><td><div align="right"><a name="74"></a><a href="#74">74</a></div></td><td class="codeLine"> * &lt;/code&gt;</td></tr> <tr><td><div align="right"><a name="75"></a><a href="#75">75</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="76"></a><a href="#76">76</a></div></td><td class="codeLine"> * @param array|\Traversable $options</td></tr> <tr><td><div align="right"><a name="77"></a><a href="#77">77</a></div></td><td class="codeLine"> * @throws Exception\<API key></td></tr> <tr><td><div align="right"><a name="78"></a><a href="#78">78</a></div></td><td class="codeLine"> * @return StandardAutoloader</td></tr> <tr><td><div align="right"><a name="79"></a><a href="#79">79</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="80"></a><a href="#80">80</a></div></td><td class="codeLine"> public function setOptions($options)</td></tr> <tr><td><div align="right"><a name="81"></a><a href="#81">81</a></div></td><td class="codeLine"> {</td></tr> <tr class="danger"><td><div align="right"><a name="82"></a><a href="#82">82</a></div></td><td class="codeLine"> if (!is_array($options) &amp;&amp; !($options instanceof \Traversable)) {</td></tr> <tr class="danger"><td><div align="right"><a name="83"></a><a href="#83">83</a></div></td><td class="codeLine"> require_once __DIR__ . '/Exception/<API key>.php';</td></tr> <tr class="danger"><td><div align="right"><a name="84"></a><a href="#84">84</a></div></td><td class="codeLine"> throw new Exception\<API key>('Options must be either an array or Traversable');</td></tr> <tr><td><div align="right"><a name="85"></a><a href="#85">85</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="86"></a><a href="#86">86</a></div></td><td class="codeLine"></td></tr> <tr class="danger"><td><div align="right"><a name="87"></a><a href="#87">87</a></div></td><td class="codeLine"> foreach ($options as $type =&gt; $pairs) {</td></tr> <tr><td><div align="right"><a name="88"></a><a href="#88">88</a></div></td><td class="codeLine"> switch ($type) {</td></tr> <tr class="danger"><td><div align="right"><a name="89"></a><a href="#89">89</a></div></td><td class="codeLine"> case self::AUTOREGISTER_ZF:</td></tr> <tr class="danger"><td><div align="right"><a name="90"></a><a href="#90">90</a></div></td><td class="codeLine"> if ($pairs) {</td></tr> <tr class="danger"><td><div align="right"><a name="91"></a><a href="#91">91</a></div></td><td class="codeLine"> $this-&gt;registerNamespace('Zend', dirname(__DIR__));</td></tr> <tr class="danger"><td><div align="right"><a name="92"></a><a href="#92">92</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="93"></a><a href="#93">93</a></div></td><td class="codeLine"> break;</td></tr> <tr class="danger"><td><div align="right"><a name="94"></a><a href="#94">94</a></div></td><td class="codeLine"> case self::LOAD_NS:</td></tr> <tr class="danger"><td><div align="right"><a name="95"></a><a href="#95">95</a></div></td><td class="codeLine"> if (is_array($pairs) || $pairs instanceof \Traversable) {</td></tr> <tr class="danger"><td><div align="right"><a name="96"></a><a href="#96">96</a></div></td><td class="codeLine"> $this-&gt;registerNamespaces($pairs);</td></tr> <tr class="danger"><td><div align="right"><a name="97"></a><a href="#97">97</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="98"></a><a href="#98">98</a></div></td><td class="codeLine"> break;</td></tr> <tr class="danger"><td><div align="right"><a name="99"></a><a href="#99">99</a></div></td><td class="codeLine"> case self::LOAD_PREFIX:</td></tr> <tr class="danger"><td><div align="right"><a name="100"></a><a href="#100">100</a></div></td><td class="codeLine"> if (is_array($pairs) || $pairs instanceof \Traversable) {</td></tr> <tr class="danger"><td><div align="right"><a name="101"></a><a href="#101">101</a></div></td><td class="codeLine"> $this-&gt;registerPrefixes($pairs);</td></tr> <tr class="danger"><td><div align="right"><a name="102"></a><a href="#102">102</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="103"></a><a href="#103">103</a></div></td><td class="codeLine"> break;</td></tr> <tr class="danger"><td><div align="right"><a name="104"></a><a href="#104">104</a></div></td><td class="codeLine"> case self::ACT_AS_FALLBACK:</td></tr> <tr class="danger"><td><div align="right"><a name="105"></a><a href="#105">105</a></div></td><td class="codeLine"> $this-&gt;<API key>($pairs);</td></tr> <tr class="danger"><td><div align="right"><a name="106"></a><a href="#106">106</a></div></td><td class="codeLine"> break;</td></tr> <tr class="danger"><td><div align="right"><a name="107"></a><a href="#107">107</a></div></td><td class="codeLine"> default:</td></tr> <tr><td><div align="right"><a name="108"></a><a href="#108">108</a></div></td><td class="codeLine"> // ignore</td></tr> <tr class="danger"><td><div align="right"><a name="109"></a><a href="#109">109</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="110"></a><a href="#110">110</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="111"></a><a href="#111">111</a></div></td><td class="codeLine"> return $this;</td></tr> <tr><td><div align="right"><a name="112"></a><a href="#112">112</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="113"></a><a href="#113">113</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="114"></a><a href="#114">114</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="115"></a><a href="#115">115</a></div></td><td class="codeLine"> * Set flag indicating fallback autoloader status</td></tr> <tr><td><div align="right"><a name="116"></a><a href="#116">116</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="117"></a><a href="#117">117</a></div></td><td class="codeLine"> * @param bool $flag</td></tr> <tr><td><div align="right"><a name="118"></a><a href="#118">118</a></div></td><td class="codeLine"> * @return StandardAutoloader</td></tr> <tr><td><div align="right"><a name="119"></a><a href="#119">119</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="120"></a><a href="#120">120</a></div></td><td class="codeLine"> public function <API key>($flag)</td></tr> <tr><td><div align="right"><a name="121"></a><a href="#121">121</a></div></td><td class="codeLine"> {</td></tr> <tr class="danger"><td><div align="right"><a name="122"></a><a href="#122">122</a></div></td><td class="codeLine"> $this-&gt;<API key> = (bool) $flag;</td></tr> <tr class="danger"><td><div align="right"><a name="123"></a><a href="#123">123</a></div></td><td class="codeLine"> return $this;</td></tr> <tr><td><div align="right"><a name="124"></a><a href="#124">124</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="125"></a><a href="#125">125</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="126"></a><a href="#126">126</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="127"></a><a href="#127">127</a></div></td><td class="codeLine"> * Is this autoloader acting as a fallback autoloader?</td></tr> <tr><td><div align="right"><a name="128"></a><a href="#128">128</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="129"></a><a href="#129">129</a></div></td><td class="codeLine"> * @return bool</td></tr> <tr><td><div align="right"><a name="130"></a><a href="#130">130</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="131"></a><a href="#131">131</a></div></td><td class="codeLine"> public function <API key>()</td></tr> <tr><td><div align="right"><a name="132"></a><a href="#132">132</a></div></td><td class="codeLine"> {</td></tr> <tr class="success popin" data-title="2 tests cover line 133" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="133"></a><a href="#133">133</a></div></td><td class="codeLine"> return $this-&gt;<API key>;</td></tr> <tr><td><div align="right"><a name="134"></a><a href="#134">134</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="135"></a><a href="#135">135</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="136"></a><a href="#136">136</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="137"></a><a href="#137">137</a></div></td><td class="codeLine"> * Register a namespace/directory pair</td></tr> <tr><td><div align="right"><a name="138"></a><a href="#138">138</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="139"></a><a href="#139">139</a></div></td><td class="codeLine"> * @param string $namespace</td></tr> <tr><td><div align="right"><a name="140"></a><a href="#140">140</a></div></td><td class="codeLine"> * @param string $directory</td></tr> <tr><td><div align="right"><a name="141"></a><a href="#141">141</a></div></td><td class="codeLine"> * @return StandardAutoloader</td></tr> <tr><td><div align="right"><a name="142"></a><a href="#142">142</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="143"></a><a href="#143">143</a></div></td><td class="codeLine"> public function registerNamespace($namespace, $directory)</td></tr> <tr><td><div align="right"><a name="144"></a><a href="#144">144</a></div></td><td class="codeLine"> {</td></tr> <tr class="danger"><td><div align="right"><a name="145"></a><a href="#145">145</a></div></td><td class="codeLine"> $namespace = rtrim($namespace, self::NS_SEPARATOR) . self::NS_SEPARATOR;</td></tr> <tr class="danger"><td><div align="right"><a name="146"></a><a href="#146">146</a></div></td><td class="codeLine"> $this-&gt;namespaces[$namespace] = $this-&gt;normalizeDirectory($directory);</td></tr> <tr class="danger"><td><div align="right"><a name="147"></a><a href="#147">147</a></div></td><td class="codeLine"> return $this;</td></tr> <tr><td><div align="right"><a name="148"></a><a href="#148">148</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="149"></a><a href="#149">149</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="150"></a><a href="#150">150</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="151"></a><a href="#151">151</a></div></td><td class="codeLine"> * Register many namespace/directory pairs at once</td></tr> <tr><td><div align="right"><a name="152"></a><a href="#152">152</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="153"></a><a href="#153">153</a></div></td><td class="codeLine"> * @param array $namespaces</td></tr> <tr><td><div align="right"><a name="154"></a><a href="#154">154</a></div></td><td class="codeLine"> * @throws Exception\<API key></td></tr> <tr><td><div align="right"><a name="155"></a><a href="#155">155</a></div></td><td class="codeLine"> * @return StandardAutoloader</td></tr> <tr><td><div align="right"><a name="156"></a><a href="#156">156</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="157"></a><a href="#157">157</a></div></td><td class="codeLine"> public function registerNamespaces($namespaces)</td></tr> <tr><td><div align="right"><a name="158"></a><a href="#158">158</a></div></td><td class="codeLine"> {</td></tr> <tr class="danger"><td><div align="right"><a name="159"></a><a href="#159">159</a></div></td><td class="codeLine"> if (!is_array($namespaces) &amp;&amp; !$namespaces instanceof \Traversable) {</td></tr> <tr class="danger"><td><div align="right"><a name="160"></a><a href="#160">160</a></div></td><td class="codeLine"> require_once __DIR__ . '/Exception/<API key>.php';</td></tr> <tr class="danger"><td><div align="right"><a name="161"></a><a href="#161">161</a></div></td><td class="codeLine"> throw new Exception\<API key>('Namespace pairs must be either an array or Traversable');</td></tr> <tr><td><div align="right"><a name="162"></a><a href="#162">162</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="163"></a><a href="#163">163</a></div></td><td class="codeLine"></td></tr> <tr class="danger"><td><div align="right"><a name="164"></a><a href="#164">164</a></div></td><td class="codeLine"> foreach ($namespaces as $namespace =&gt; $directory) {</td></tr> <tr class="danger"><td><div align="right"><a name="165"></a><a href="#165">165</a></div></td><td class="codeLine"> $this-&gt;registerNamespace($namespace, $directory);</td></tr> <tr class="danger"><td><div align="right"><a name="166"></a><a href="#166">166</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="167"></a><a href="#167">167</a></div></td><td class="codeLine"> return $this;</td></tr> <tr><td><div align="right"><a name="168"></a><a href="#168">168</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="169"></a><a href="#169">169</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="170"></a><a href="#170">170</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="171"></a><a href="#171">171</a></div></td><td class="codeLine"> * Register a prefix/directory pair</td></tr> <tr><td><div align="right"><a name="172"></a><a href="#172">172</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="173"></a><a href="#173">173</a></div></td><td class="codeLine"> * @param string $prefix</td></tr> <tr><td><div align="right"><a name="174"></a><a href="#174">174</a></div></td><td class="codeLine"> * @param string $directory</td></tr> <tr><td><div align="right"><a name="175"></a><a href="#175">175</a></div></td><td class="codeLine"> * @return StandardAutoloader</td></tr> <tr><td><div align="right"><a name="176"></a><a href="#176">176</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="177"></a><a href="#177">177</a></div></td><td class="codeLine"> public function registerPrefix($prefix, $directory)</td></tr> <tr><td><div align="right"><a name="178"></a><a href="#178">178</a></div></td><td class="codeLine"> {</td></tr> <tr class="danger"><td><div align="right"><a name="179"></a><a href="#179">179</a></div></td><td class="codeLine"> $prefix = rtrim($prefix, self::PREFIX_SEPARATOR). self::PREFIX_SEPARATOR;</td></tr> <tr class="danger"><td><div align="right"><a name="180"></a><a href="#180">180</a></div></td><td class="codeLine"> $this-&gt;prefixes[$prefix] = $this-&gt;normalizeDirectory($directory);</td></tr> <tr class="danger"><td><div align="right"><a name="181"></a><a href="#181">181</a></div></td><td class="codeLine"> return $this;</td></tr> <tr><td><div align="right"><a name="182"></a><a href="#182">182</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="183"></a><a href="#183">183</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="184"></a><a href="#184">184</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="185"></a><a href="#185">185</a></div></td><td class="codeLine"> * Register many namespace/directory pairs at once</td></tr> <tr><td><div align="right"><a name="186"></a><a href="#186">186</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="187"></a><a href="#187">187</a></div></td><td class="codeLine"> * @param array $prefixes</td></tr> <tr><td><div align="right"><a name="188"></a><a href="#188">188</a></div></td><td class="codeLine"> * @throws Exception\<API key></td></tr> <tr><td><div align="right"><a name="189"></a><a href="#189">189</a></div></td><td class="codeLine"> * @return StandardAutoloader</td></tr> <tr><td><div align="right"><a name="190"></a><a href="#190">190</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="191"></a><a href="#191">191</a></div></td><td class="codeLine"> public function registerPrefixes($prefixes)</td></tr> <tr><td><div align="right"><a name="192"></a><a href="#192">192</a></div></td><td class="codeLine"> {</td></tr> <tr class="danger"><td><div align="right"><a name="193"></a><a href="#193">193</a></div></td><td class="codeLine"> if (!is_array($prefixes) &amp;&amp; !$prefixes instanceof \Traversable) {</td></tr> <tr class="danger"><td><div align="right"><a name="194"></a><a href="#194">194</a></div></td><td class="codeLine"> require_once __DIR__ . '/Exception/<API key>.php';</td></tr> <tr class="danger"><td><div align="right"><a name="195"></a><a href="#195">195</a></div></td><td class="codeLine"> throw new Exception\<API key>('Prefix pairs must be either an array or Traversable');</td></tr> <tr><td><div align="right"><a name="196"></a><a href="#196">196</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="197"></a><a href="#197">197</a></div></td><td class="codeLine"></td></tr> <tr class="danger"><td><div align="right"><a name="198"></a><a href="#198">198</a></div></td><td class="codeLine"> foreach ($prefixes as $prefix =&gt; $directory) {</td></tr> <tr class="danger"><td><div align="right"><a name="199"></a><a href="#199">199</a></div></td><td class="codeLine"> $this-&gt;registerPrefix($prefix, $directory);</td></tr> <tr class="danger"><td><div align="right"><a name="200"></a><a href="#200">200</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="201"></a><a href="#201">201</a></div></td><td class="codeLine"> return $this;</td></tr> <tr><td><div align="right"><a name="202"></a><a href="#202">202</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="203"></a><a href="#203">203</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="204"></a><a href="#204">204</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="205"></a><a href="#205">205</a></div></td><td class="codeLine"> * Defined by Autoloadable; autoload a class</td></tr> <tr><td><div align="right"><a name="206"></a><a href="#206">206</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="207"></a><a href="#207">207</a></div></td><td class="codeLine"> * @param string $class</td></tr> <tr><td><div align="right"><a name="208"></a><a href="#208">208</a></div></td><td class="codeLine"> * @return false|string</td></tr> <tr><td><div align="right"><a name="209"></a><a href="#209">209</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="210"></a><a href="#210">210</a></div></td><td class="codeLine"> public function autoload($class)</td></tr> <tr><td><div align="right"><a name="211"></a><a href="#211">211</a></div></td><td class="codeLine"> {</td></tr> <tr class="success popin" data-title="2 tests cover line 212" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="212"></a><a href="#212">212</a></div></td><td class="codeLine"> $isFallback = $this-&gt;<API key>();</td></tr> <tr class="success popin" data-title="2 tests cover line 213" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="213"></a><a href="#213">213</a></div></td><td class="codeLine"> if (false !== strpos($class, self::NS_SEPARATOR)) {</td></tr> <tr class="success popin" data-title="2 tests cover line 214" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="214"></a><a href="#214">214</a></div></td><td class="codeLine"> if ($this-&gt;loadClass($class, self::LOAD_NS)) {</td></tr> <tr class="success popin" data-title="2 tests cover line 215" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="215"></a><a href="#215">215</a></div></td><td class="codeLine"> return $class;</td></tr> <tr class="danger"><td><div align="right"><a name="216"></a><a href="#216">216</a></div></td><td class="codeLine"> } elseif ($isFallback) {</td></tr> <tr class="danger"><td><div align="right"><a name="217"></a><a href="#217">217</a></div></td><td class="codeLine"> return $this-&gt;loadClass($class, self::ACT_AS_FALLBACK);</td></tr> <tr><td><div align="right"><a name="218"></a><a href="#218">218</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="219"></a><a href="#219">219</a></div></td><td class="codeLine"> return false;</td></tr> <tr><td><div align="right"><a name="220"></a><a href="#220">220</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="221"></a><a href="#221">221</a></div></td><td class="codeLine"> if (false !== strpos($class, self::PREFIX_SEPARATOR)) {</td></tr> <tr class="danger"><td><div align="right"><a name="222"></a><a href="#222">222</a></div></td><td class="codeLine"> if ($this-&gt;loadClass($class, self::LOAD_PREFIX)) {</td></tr> <tr class="danger"><td><div align="right"><a name="223"></a><a href="#223">223</a></div></td><td class="codeLine"> return $class;</td></tr> <tr class="danger"><td><div align="right"><a name="224"></a><a href="#224">224</a></div></td><td class="codeLine"> } elseif ($isFallback) {</td></tr> <tr class="danger"><td><div align="right"><a name="225"></a><a href="#225">225</a></div></td><td class="codeLine"> return $this-&gt;loadClass($class, self::ACT_AS_FALLBACK);</td></tr> <tr><td><div align="right"><a name="226"></a><a href="#226">226</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="227"></a><a href="#227">227</a></div></td><td class="codeLine"> return false;</td></tr> <tr><td><div align="right"><a name="228"></a><a href="#228">228</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="229"></a><a href="#229">229</a></div></td><td class="codeLine"> if ($isFallback) {</td></tr> <tr class="danger"><td><div align="right"><a name="230"></a><a href="#230">230</a></div></td><td class="codeLine"> return $this-&gt;loadClass($class, self::ACT_AS_FALLBACK);</td></tr> <tr><td><div align="right"><a name="231"></a><a href="#231">231</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="232"></a><a href="#232">232</a></div></td><td class="codeLine"> return false;</td></tr> <tr><td><div align="right"><a name="233"></a><a href="#233">233</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="234"></a><a href="#234">234</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="235"></a><a href="#235">235</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="236"></a><a href="#236">236</a></div></td><td class="codeLine"> * Register the autoloader with spl_autoload</td></tr> <tr><td><div align="right"><a name="237"></a><a href="#237">237</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="238"></a><a href="#238">238</a></div></td><td class="codeLine"> * @return void</td></tr> <tr><td><div align="right"><a name="239"></a><a href="#239">239</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="240"></a><a href="#240">240</a></div></td><td class="codeLine"> public function register()</td></tr> <tr><td><div align="right"><a name="241"></a><a href="#241">241</a></div></td><td class="codeLine"> {</td></tr> <tr class="danger"><td><div align="right"><a name="242"></a><a href="#242">242</a></div></td><td class="codeLine"> <API key>(array($this, 'autoload'));</td></tr> <tr class="danger"><td><div align="right"><a name="243"></a><a href="#243">243</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="244"></a><a href="#244">244</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="245"></a><a href="#245">245</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="246"></a><a href="#246">246</a></div></td><td class="codeLine"> * Transform the class name to a filename</td></tr> <tr><td><div align="right"><a name="247"></a><a href="#247">247</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="248"></a><a href="#248">248</a></div></td><td class="codeLine"> * @param string $class</td></tr> <tr><td><div align="right"><a name="249"></a><a href="#249">249</a></div></td><td class="codeLine"> * @param string $directory</td></tr> <tr><td><div align="right"><a name="250"></a><a href="#250">250</a></div></td><td class="codeLine"> * @return string</td></tr> <tr><td><div align="right"><a name="251"></a><a href="#251">251</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="252"></a><a href="#252">252</a></div></td><td class="codeLine"> protected function <API key>($class, $directory)</td></tr> <tr><td><div align="right"><a name="253"></a><a href="#253">253</a></div></td><td class="codeLine"> {</td></tr> <tr><td><div align="right"><a name="254"></a><a href="#254">254</a></div></td><td class="codeLine"> // $class may contain a namespace portion, in which case we need</td></tr> <tr><td><div align="right"><a name="255"></a><a href="#255">255</a></div></td><td class="codeLine"> // to preserve any underscores in that portion.</td></tr> <tr class="success popin" data-title="2 tests cover line 256" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="256"></a><a href="#256">256</a></div></td><td class="codeLine"> $matches = array();</td></tr> <tr class="success popin" data-title="2 tests cover line 257" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="257"></a><a href="#257">257</a></div></td><td class="codeLine"> preg_match('/(?P&lt;namespace&gt;.+\\\)?(?P&lt;class&gt;[^\\\]+$)/', $class, $matches);</td></tr> <tr><td><div align="right"><a name="258"></a><a href="#258">258</a></div></td><td class="codeLine"></td></tr> <tr class="success popin" data-title="2 tests cover line 259" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="259"></a><a href="#259">259</a></div></td><td class="codeLine"> $class = (isset($matches['class'])) ? $matches['class'] : '';</td></tr> <tr class="success popin" data-title="2 tests cover line 260" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="260"></a><a href="#260">260</a></div></td><td class="codeLine"> $namespace = (isset($matches['namespace'])) ? $matches['namespace'] : '';</td></tr> <tr><td><div align="right"><a name="261"></a><a href="#261">261</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="262"></a><a href="#262">262</a></div></td><td class="codeLine"> return $directory</td></tr> <tr class="success popin" data-title="2 tests cover line 263" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="263"></a><a href="#263">263</a></div></td><td class="codeLine"> . str_replace(self::NS_SEPARATOR, '/', $namespace)</td></tr> <tr class="success popin" data-title="2 tests cover line 264" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="264"></a><a href="#264">264</a></div></td><td class="codeLine"> . str_replace(self::PREFIX_SEPARATOR, '/', $class)</td></tr> <tr class="success popin" data-title="2 tests cover line 265" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="265"></a><a href="#265">265</a></div></td><td class="codeLine"> . '.php';</td></tr> <tr><td><div align="right"><a name="266"></a><a href="#266">266</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="267"></a><a href="#267">267</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="268"></a><a href="#268">268</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="269"></a><a href="#269">269</a></div></td><td class="codeLine"> * Load a class, based on its type (namespaced or prefixed)</td></tr> <tr><td><div align="right"><a name="270"></a><a href="#270">270</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="271"></a><a href="#271">271</a></div></td><td class="codeLine"> * @param string $class</td></tr> <tr><td><div align="right"><a name="272"></a><a href="#272">272</a></div></td><td class="codeLine"> * @param string $type</td></tr> <tr><td><div align="right"><a name="273"></a><a href="#273">273</a></div></td><td class="codeLine"> * @return bool|string</td></tr> <tr><td><div align="right"><a name="274"></a><a href="#274">274</a></div></td><td class="codeLine"> * @throws Exception\<API key></td></tr> <tr><td><div align="right"><a name="275"></a><a href="#275">275</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="276"></a><a href="#276">276</a></div></td><td class="codeLine"> protected function loadClass($class, $type)</td></tr> <tr><td><div align="right"><a name="277"></a><a href="#277">277</a></div></td><td class="codeLine"> {</td></tr> <tr class="success popin" data-title="2 tests cover line 278" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="278"></a><a href="#278">278</a></div></td><td class="codeLine"> if (!in_array($type, array(self::LOAD_NS, self::LOAD_PREFIX, self::ACT_AS_FALLBACK))) {</td></tr> <tr class="danger"><td><div align="right"><a name="279"></a><a href="#279">279</a></div></td><td class="codeLine"> require_once __DIR__ . '/Exception/<API key>.php';</td></tr> <tr class="danger"><td><div align="right"><a name="280"></a><a href="#280">280</a></div></td><td class="codeLine"> throw new Exception\<API key>();</td></tr> <tr><td><div align="right"><a name="281"></a><a href="#281">281</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="282"></a><a href="#282">282</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="283"></a><a href="#283">283</a></div></td><td class="codeLine"> // Fallback autoloading</td></tr> <tr class="success popin" data-title="2 tests cover line 284" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="284"></a><a href=" <tr><td><div align="right"><a name="285"></a><a href="#285">285</a></div></td><td class="codeLine"> // create filename</td></tr> <tr class="danger"><td><div align="right"><a name="286"></a><a href="#286">286</a></div></td><td class="codeLine"> $filename = $this-&gt;<API key>($class, '');</td></tr> <tr class="danger"><td><div align="right"><a name="287"></a><a href="#287">287</a></div></td><td class="codeLine"> $resolvedName = <API key>($filename);</td></tr> <tr class="danger"><td><div align="right"><a name="288"></a><a href="#288">288</a></div></td><td class="codeLine"> if ($resolvedName !== false) {</td></tr> <tr class="danger"><td><div align="right"><a name="289"></a><a href="#289">289</a></div></td><td class="codeLine"> return include $resolvedName;</td></tr> <tr><td><div align="right"><a name="290"></a><a href="#290">290</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="291"></a><a href="#291">291</a></div></td><td class="codeLine"> return false;</td></tr> <tr><td><div align="right"><a name="292"></a><a href="#292">292</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="293"></a><a href="#293">293</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="294"></a><a href="#294">294</a></div></td><td class="codeLine"> // Namespace and/or prefix autoloading</td></tr> <tr class="success popin" data-title="2 tests cover line 295" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="295"></a><a href="#295">295</a></div></td><td class="codeLine"> foreach ($this-&gt;$type as $leader =&gt; $path) {</td></tr> <tr class="success popin" data-title="2 tests cover line 296" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="296"></a><a href=" <tr><td><div align="right"><a name="297"></a><a href="#297">297</a></div></td><td class="codeLine"> // Trim off leader (namespace or prefix)</td></tr> <tr class="success popin" data-title="2 tests cover line 298" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="298"></a><a href="#298">298</a></div></td><td class="codeLine"> $trimmedClass = substr($class, strlen($leader));</td></tr> <tr><td><div align="right"><a name="299"></a><a href="#299">299</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="300"></a><a href="#300">300</a></div></td><td class="codeLine"> // create filename</td></tr> <tr class="success popin" data-title="2 tests cover line 301" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="301"></a><a href="#301">301</a></div></td><td class="codeLine"> $filename = $this-&gt;<API key>($trimmedClass, $path);</td></tr> <tr class="success popin" data-title="2 tests cover line 302" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="302"></a><a href="#302">302</a></div></td><td class="codeLine"> if (file_exists($filename)) {</td></tr> <tr class="success popin" data-title="2 tests cover line 303" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="303"></a><a href="#303">303</a></div></td><td class="codeLine"> return include $filename;</td></tr> <tr><td><div align="right"><a name="304"></a><a href="#304">304</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="305"></a><a href="#305">305</a></div></td><td class="codeLine"> return false;</td></tr> <tr><td><div align="right"><a name="306"></a><a href="#306">306</a></div></td><td class="codeLine"> }</td></tr> <tr class="success popin" data-title="2 tests cover line 307" data-content="&lt;ul&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;li class=&quot;success&quot;&gt;AlbumRestTest\Controller\<API key>::<API key>&lt;/li&gt;&lt;/ul&gt;" data-placement="bottom" data-html="true"><td><div align="right"><a name="307"></a><a href="#307">307</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="308"></a><a href="#308">308</a></div></td><td class="codeLine"> return false;</td></tr> <tr><td><div align="right"><a name="309"></a><a href="#309">309</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="310"></a><a href="#310">310</a></div></td><td class="codeLine"></td></tr> <tr><td><div align="right"><a name="311"></a><a href="#311">311</a></div></td><td class="codeLine"> /**</td></tr> <tr><td><div align="right"><a name="312"></a><a href="#312">312</a></div></td><td class="codeLine"> * Normalize the directory to include a trailing directory separator</td></tr> <tr><td><div align="right"><a name="313"></a><a href="#313">313</a></div></td><td class="codeLine"> *</td></tr> <tr><td><div align="right"><a name="314"></a><a href="#314">314</a></div></td><td class="codeLine"> * @param string $directory</td></tr> <tr><td><div align="right"><a name="315"></a><a href="#315">315</a></div></td><td class="codeLine"> * @return string</td></tr> <tr><td><div align="right"><a name="316"></a><a href="#316">316</a></div></td><td class="codeLine"> */</td></tr> <tr><td><div align="right"><a name="317"></a><a href="#317">317</a></div></td><td class="codeLine"> protected function normalizeDirectory($directory)</td></tr> <tr><td><div align="right"><a name="318"></a><a href="#318">318</a></div></td><td class="codeLine"> {</td></tr> <tr class="danger"><td><div align="right"><a name="319"></a><a href="#319">319</a></div></td><td class="codeLine"> $last = $directory[strlen($directory) - 1];</td></tr> <tr class="danger"><td><div align="right"><a name="320"></a><a href="#320">320</a></div></td><td class="codeLine"> if (in_array($last, array('/', '\\'))) {</td></tr> <tr class="danger"><td><div align="right"><a name="321"></a><a href="#321">321</a></div></td><td class="codeLine"> $directory[strlen($directory) - 1] = DIRECTORY_SEPARATOR;</td></tr> <tr class="danger"><td><div align="right"><a name="322"></a><a href="#322">322</a></div></td><td class="codeLine"> return $directory;</td></tr> <tr><td><div align="right"><a name="323"></a><a href="#323">323</a></div></td><td class="codeLine"> }</td></tr> <tr class="danger"><td><div align="right"><a name="324"></a><a href="#324">324</a></div></td><td class="codeLine"> $directory .= DIRECTORY_SEPARATOR;</td></tr> <tr class="danger"><td><div align="right"><a name="325"></a><a href="#325">325</a></div></td><td class="codeLine"> return $directory;</td></tr> <tr><td><div align="right"><a name="326"></a><a href="#326">326</a></div></td><td class="codeLine"> }</td></tr> <tr><td><div align="right"><a name="327"></a><a href="#327">327</a></div></td><td class="codeLine">}</td></tr> </tbody> </table> <footer> <h4>Legend</h4> <p> <span class="success"><strong>Executed</strong></span> <span class="danger"><strong>Not Executed</strong></span> <span class="warning"><strong>Dead Code</strong></span> </p> <p> <small>Generated by <a href="http: </p> </footer> </div> <script src="js/jquery.min.js" type="text/javascript"></script> <script src="js/bootstrap.min.js" type="text/javascript"></script> <script type="text/javascript">$('.popin').popover({trigger: 'hover'});</script> </body> </html>
<@row> <@columns> <@box color='success'> <@boxHeader title='#i18n{portal.users.create_attribute.<API key>}' /> <@boxBody> <@tform action='jsp/admin/user/attribute/DoCreateAttribute.jsp' method='post'> <@input type='hidden' name='token' value='${token}' /> <@input type='hidden' name='<API key>' value='${attribute_type.className}' /> <@formGroup labelKey='#i18n{portal.users.create_attribute.labelTitle} *' labelFor='attr_title' helpKey='#i18n{portal.users.create_attribute.labelTitleComment}' mandatory=true> <@input type='text' name='title' id='attr_title' maxlength=255 /> </@formGroup> <@formGroup labelKey='#i18n{portal.users.create_attribute.labelHelpMessage}' labelFor='help_message' helpKey='#i18n{portal.users.create_attribute.<API key>}'> <@input type='textarea' name='help_message' id='help_message' cols=80 rows=5 /> </@formGroup> <@formGroup> <@checkBox name='<API key>' id='<API key>' labelKey='#i18n{portal.users.create_attribute.<API key>}' value='1' /> </@formGroup> <@formGroup> <@checkBox name='mandatory' id='mandatory' labelKey='#i18n{portal.users.create_attribute.labelMandatory}' value='1' /> </@formGroup> <@formGroup labelKey='#i18n{portal.users.create_attribute.labelWidth}' labelFor='width'> <@input type='text' name='width' id='width' value='50' /> </@formGroup> <@formGroup labelKey='#i18n{portal.users.create_attribute.labelHeight}' labelFor='height'> <@input type='text' name='height' id='height' value='50' /> </@formGroup> <@formGroup> <@button type='submit' name='save' value='save' buttonIcon='check' title='#i18n{portal.users.create_attribute.buttonValidate}' size='' /> <@button type='submit' name='apply' value='apply' buttonIcon='check' title='#i18n{portal.users.create_attribute.buttonApply}' size='' /> <@button type='submit' name='cancel' value='cancel' buttonIcon='times' title='#i18n{portal.admin.message.buttonCancel}' cancel=true size='' /> </@formGroup> </@tform> </@boxBody> </@box> </@columns> </@row>
#ifndef <API key> #define <API key> #include <memory> #include "base/compiler_specific.h" #include "base/macros.h" #include "build/chromeos_buildflags.h" #include "chrome/common/<API key>.mojom.h" #include "components/content_settings/common/<API key>.mojom.h" #include "components/content_settings/core/common/content_settings.h" #include "content/public/renderer/<API key>.h" #include "mojo/public/cpp/bindings/<API key>.h" #include "mojo/public/cpp/bindings/<API key>.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/receiver.h" #if BUILDFLAG(IS_CHROMEOS_ASH) #include "chrome/renderer/<API key>.h" #endif // BUILDFLAG(IS_CHROMEOS_ASH) namespace blink { class <API key>; } // namespace blink namespace visitedlink { class VisitedLinkReader; } // This class filters the incoming control messages (i.e. ones not destined for // a RenderView) for Chrome specific messages that the content layer doesn't // happen. If a few messages are related, they should probably have their own // observer. class <API key> : public content::<API key>, public chrome::mojom::<API key> { public: #if BUILDFLAG(IS_CHROMEOS_ASH) // A helper class to handle Mojo calls that need to be dispatched to the IO // thread instead of the main thread as is the norm. // This class is thread-safe. class ChromeOSListener : public chrome::mojom::ChromeOSListener, public base::<API key><ChromeOSListener> { public: static scoped_refptr<ChromeOSListener> Create( mojo::PendingReceiver<chrome::mojom::ChromeOSListener> <API key>); ChromeOSListener(const ChromeOSListener&) = delete; ChromeOSListener& operator=(const ChromeOSListener&) = delete; // Is the merge session still running? bool <API key>() const; // Run |callback| on the calling sequence when the merge session has // finished (or timed out). void <API key>(<API key>::Callback callback); protected: // chrome::mojom::ChromeOSListener: void <API key>() override; private: friend class base::<API key><ChromeOSListener>; ChromeOSListener(); ~ChromeOSListener() override; void BindOnIOThread(mojo::PendingReceiver<chrome::mojom::ChromeOSListener> <API key>); scoped_refptr<<API key>> <API key>; bool <API key> GUARDED_BY(lock_); mutable base::Lock lock_; mojo::Receiver<chrome::mojom::ChromeOSListener> receiver_{this}; }; #endif // BUILDFLAG(IS_CHROMEOS_ASH) <API key>(); <API key>(const <API key>&) = delete; <API key>& operator=(const <API key>&) = delete; ~<API key>() override; static bool <API key>() { return <API key>; } // Return the dynamic parameters - those that may change while the // render process is running. static const chrome::mojom::DynamicParams& GetDynamicParams(); // Returns a pointer to the content setting rules owned by // |<API key>|. const <API key>* <API key>() const; visitedlink::VisitedLinkReader* visited_link_reader() { return <API key>.get(); } #if BUILDFLAG(IS_CHROMEOS_ASH) scoped_refptr<ChromeOSListener> chromeos_listener() const { return chromeos_listener_; } #endif // BUILDFLAG(IS_CHROMEOS_ASH) content_settings::mojom::<API key>* <API key>() { if (<API key>) return <API key>.get(); return nullptr; } private: // content::<API key>: void <API key>( blink::<API key>* <API key>) override; void <API key>( blink::<API key>* <API key>) override; // chrome::mojom::<API key>: void <API key>( bool <API key>, mojo::PendingReceiver<chrome::mojom::ChromeOSListener> <API key>, mojo::PendingRemote<content_settings::mojom::<API key>> <API key>) override; void SetConfiguration(chrome::mojom::DynamicParamsPtr params) override; void <API key>( const <API key>& rules) override; void <API key>( mojo::<API key><chrome::mojom::<API key>> receiver); static bool <API key>; std::unique_ptr<blink::<API key>> <API key>; <API key> <API key>; mojo::Remote<content_settings::mojom::<API key>> <API key>; std::unique_ptr<visitedlink::VisitedLinkReader> <API key>; mojo::<API key><chrome::mojom::<API key>> <API key>; #if BUILDFLAG(IS_CHROMEOS_ASH) // Only set if the Chrome OS merge session was running when the renderer // was started. scoped_refptr<ChromeOSListener> chromeos_listener_; #endif // BUILDFLAG(IS_CHROMEOS_ASH) }; #endif // <API key>
/* TEMPLATE GENERATED TESTCASE FILE Filename: <API key>.cpp Label Definition File: <API key>.label.xml Template File: sources-sink-82_bad.tmpl.cpp */ /* * @description * CWE: 121 Stack Based Buffer Overflow * BadSource: Set data pointer to the bad buffer * GoodSource: Set data pointer to the good buffer * Sinks: memcpy * BadSink : Copy twoIntsStruct array to data using memcpy * Flow Variant: 82 Data flow: data passed in a parameter to an virtual method called via a pointer * * */ #ifndef OMITBAD #include "std_testcase.h" #include "<API key>.h" namespace <API key> { void <API key>::action(twoIntsStruct * data) { { twoIntsStruct source[100]; { size_t i; /* Initialize array */ for (i = 0; i < 100; i++) { source[i].intOne = 0; source[i].intTwo = 0; } } /* POTENTIAL FLAW: Possible buffer overflow if data < 100 */ memcpy(data, source, 100*sizeof(twoIntsStruct)); printStructLine(&data[0]); } } } #endif /* OMITBAD */
# -*- coding: utf-8 -*- """ Display a fortune-telling, swimming fish. Wanda has no use what-so-ever. It only takes up disk space and compilation time, and if loaded, it also takes up precious bar space, memory, and cpu cycles. Anybody found using it should be promptly sent for a psychiatric evaluation. Configuration parameters: cache_timeout: refresh interval for this module (default 0) format: display format for this module (default '{nomotion}[{fortune} ]{wanda}{motion}') fortune_timeout: refresh interval for fortune (default 60) Format placeholders: {fortune} one of many aphorisms or vague prophecies {wanda} name of one of the most commonly kept freshwater aquarium fish {motion} biologically propelled motion through a liquid medium {nomotion} opposite behavior of motion to prevent modules from shifting Optional: fortune-mod: the fortune cookie program from bsd games Examples: # disable motions when not in use wanda_the_fish { format = '[\?if=fortune {nomotion}][{fortune} ]' format += '{wanda}[\?if=fortune {motion}]' } # no updates, no motions, yes fortunes, you click wanda_the_fish { format = '[{fortune} ]{wanda}' cache_timeout = -1 } # wanda moves, fortunes stays wanda_the_fish { format = '[{fortune} ]{nomotion}{wanda}{motion}' } # wanda is swimming too fast, slow down wanda wanda_the_fish { cache_timeout = 2 } @author lasers SAMPLE OUTPUT [ {'full_text': 'innovate, v.: To annoy people.'}, {'full_text': ' <', 'color': '#ffa500'}, {'full_text': '\xba', 'color': '#add8e6'}, {'full_text': ',', 'color': '#ff8c00'}, {'full_text': '))', 'color': '#ffa500'}, {'full_text': '))>< ', 'color': '#ff8c00'}, ] idle [ {'full_text': ' <', 'color': '#ffa500'}, {'full_text': '\xba', 'color': '#add8e6'}, {'full_text': ',', 'color': '#ff8c00'}, {'full_text': '))', 'color': '#ffa500'}, {'full_text': '))>3', 'color': '#ff8c00'}, ] py3status [ {'full_text': 'py3status is so cool!'}, {'full_text': ' <', 'color': '#ffa500'}, {'full_text': '\xba', 'color': '#add8e6'}, {'full_text': ',', 'color': '#ff8c00'}, {'full_text': '))', 'color': '#ffa500'}, {'full_text': '))>< ', 'color': '#ff8c00'}, ] """ from time import time class Py3status: # available configuration parameters cache_timeout = 0 format = "{nomotion}[{fortune} ]{wanda}{motion}" fortune_timeout = 60 def post_config_hook(self): body = ( "[\?color=orange&show <" "[\?color=lightblue&show º]" "[\?color=darkorange&show ,]))" "[\?color=darkorange&show ))>%s]]" ) wanda = [body % fin for fin in ("<", ">", "<", "3")] self.wanda = [self.py3.safe_format(x) for x in wanda] self.wanda_length = len(self.wanda) self.index = 0 self.fortune_command = ["fortune", "-as"] self.fortune = self.py3.storage_get("fortune") or None self.toggled = self.py3.storage_get("toggled") or False self.motions = {"motion": " ", "nomotion": ""} # deal with {new,old} timeout between storage fortune_timeout = self.py3.storage_get("fortune_timeout") timeout = None if self.fortune_timeout != fortune_timeout: timeout = time() + self.fortune_timeout self.time = ( timeout or self.py3.storage_get("time") or (time() + self.fortune_timeout) ) def _set_fortune(self, state=None, new=False): if not self.fortune_command: return if new: try: fortune_data = self.py3.command_output(self.fortune_command) except self.py3.CommandError: self.fortune = "" self.fortune_command = None else: self.fortune = " ".join(fortune_data.split()) self.time = time() + self.fortune_timeout elif state is None: if self.toggled and time() >= self.time: self._set_fortune(new=True) else: self.toggled = state if state: self._set_fortune(new=True) else: self.fortune = None def _set_motion(self): for k in self.motions: self.motions[k] = "" if self.motions[k] else " " def _set_wanda(self): self.index += 1 if self.index >= self.wanda_length: self.index = 0 def wanda_the_fish(self): self._set_fortune() self._set_motion() self._set_wanda() return { "cached_until": self.py3.time_in(self.cache_timeout), "full_text": self.py3.safe_format( self.format, { "fortune": self.fortune, "motion": self.motions["motion"], "nomotion": self.motions["nomotion"], "wanda": self.wanda[self.index], }, ), } def kill(self): self.py3.storage_set("toggled", self.toggled) self.py3.storage_set("fortune", self.fortune) self.py3.storage_set("fortune_timeout", self.fortune_timeout) self.py3.storage_set("time", self.time) def on_click(self, event): if not self.fortune_command: return self._set_fortune(not self.toggled) if __name__ == "__main__": """ Run module in test mode. """ from py3status.module_test import module_test module_test(Py3status)
[](README_ZH.md) # rawbuf - Scalable & Efficient Serialization Library # ![rawbuf logo](res/logo.png) `rawbuf` is a powerful tool kit used in object serialization and deserialization with **full automation** feature, all new design based on [YAS](https://github.com/jobs-github/yas). The design of rawbuf: ![design](res/design.png) ## What is rawbuf ? ## `rawbuf` is inspired by [flatbuffers](https: `rawbuf` uses flatbuffers-like protocol to describe data, and uses [YAS](https://github.com/jobs-github/yas) for automation. So it is faster than `slothjson` and easier than `flatbuffers`. Please refer to [slothjson](https://github.com/jobs-github/slothjson) for more details. ## Features ## * Efficient (4x faster than `slothjson`) * Succinct interface for people (everything can be done with just a single line of code) * Simple, powerful code generator with full automation (not need to implement serialize/deserialize interfaces manually) * Support optional field (easy to serialize/deserialize field optionally) * Flexible schema (support array, dict, nested object and **nested array & dict**) * Succinct design (no tricky C++ template technology, easy to understand), reusable, extensible (easy to support new types) * Cross-Platform (Windows & Linux & OS X) ## Usage ## Take C++ implement of rawbuf as an example. In the beginning, you need to add the following items to your project: * `rawbuf`: refer to `cpp/include/rawbuf.h` and `cpp/include/rawbuf.cpp`, the library of rawbuf **That's all the dependency**. Then, write a schema named `fxxx_gfw.json`: { "structs": [ { "type": "fxxx_gfw_t", "members": [ ["bool", "bool_val", "100"], ["int8_t", "int8_val"], ["int32_t", "int32_val"], ["uint64_t", "uint64_val"], ["double", "double_val", "101"], ["string", "str_val"], ["[int32_t]", "vec_val", "110"], ["{string}", "dict_val"] ] } ] } Run command line: python cpp/generator/rawbuf.py -f cpp/src/fxxx_gfw.json It will generate `fxxx_gfw.h` and `fxxx_gfw.cpp`, which you need to add to your project. Then you can code like this: rawbuf::fxxx_gfw_t obj_val; // set the value of "obj_val" ... // output as instance of "rb_buf_t" rawbuf::rb_buf_t rb_val = rawbuf::rb_create_buf(rawbuf::rb_sizeof(obj_val)); bool rc = rawbuf::rb_encode(obj_val, rb_val); // use value of "rb_val" ... rawbuf::rb_dispose_buf(rb_val); // do not forget! // output as file std::string path = "fxxx_gfw_t.bin"; bool rc = rawbuf::rb_dump(obj_val, path); If you don't want to serialize all fields, code like this: obj_val.skip_dict_val(); // call "skip_xxx" The same as deserialize: rawbuf::rb_buf_t rb_val = rawbuf::rb_create_buf(rawbuf::rb_sizeof(obj_val)); // set the value of "rb_val" ... // load from "rb_val" rawbuf::fxxx_gfw_t obj_val; bool rc = rawbuf::rb_decode(rb_val, 0, obj_val); ... rawbuf::rb_dispose_buf(rb_val); // do not forget! // load from file std::string path = "fxxx_gfw_t.bin"; rawbuf::fxxx_gfw_t obj_val; bool rc = rawbuf::rb_load(path, obj_val); After deserialized, if you need to know **whether a field is in binary buffer or not**, code like this: if (obj_val.rb_has_dict_val()) // call "rb_has_xxx()" { ... } That's all about the usage, simple & stupid, isn't it ? ## Supported Programming Languages ## * C++ * C * Go I implement rawbuf using php & python, but not merge to master branch as the performance does not come up to expectation. Welcome contribution on other programming languages' implementation. * [php-alpha](https://github.com/jobs-github/rawbuf/tree/php-alpha) * [python-alpha](https://github.com/jobs-github/rawbuf/tree/python-alpha) * [php-beta](https://github.com/jobs-github/rawbuf/tree/php-beta) * [python-beta](https://github.com/jobs-github/rawbuf/tree/python-beta) Note: the performance of `beta` is better than `alpha`. ## Implement on YAS Extension ## Language | Implement YAS Extension C++ | Yes C | No go | No php-alpha | Yes python-alpha | Yes php-beta | No python-beta | No ## Platforms ## Platform | Description Linux | CentOS 6.x & Ubuntu 10.04 (kernel 2.6.32) GCC 4.4.7 Win32 | Windows 7, MSVC 10.0 OS X | Mac OS X EI Capitan, GCC 4.2.1, Apple LLVM version 7.3.0 ## Performance ## ## Details ## `rawbuf` and `slothjson` share the **same design, same schema**. The difference between them is the protocol (`text` vs `binary`) and performance. You can get all details from [here](https: ## Protocol ## scalar ![scalar](res/scalar.png) string ![string](res/string.png) object ![object](res/object.png) array ![array](res/array.png) dict ![dict](res/dict.png) `rawbuf` is licensed under [New BSD License](https: ## Author ## * chengzhuo (jobs, yao050421103@163.com) ## More ## - Yet Another Schema - [YAS](https://github.com/jobs-github/yas) - Object Serialization Artifact For Lazy Man - [slothjson](https://github.com/jobs-github/slothjson) - High-performance Distributed Storage - [huststore](https://github.com/Qihoo360/huststore)
/* Module: LegTrnaslationFuncs.h */ /* Description: This module provides compatibility support to allow */ /* QST 2.x applications run on QST 1.x firmware. */ /* modification, are permitted provided that the following conditions are */ /* met: */ /* the documentation and/or other materials provided with the */ /* distribution. */ /* - Neither the name of Intel Corporation nor the names of its */ /* contributors may be used to endorse or promote products derived */ /* 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 */ /* INTEL CORPORATION OR THE 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. */ #ifndef <API key> #define <API key> // Error platform independent error codes for using this module typedef enum { <API key> = 0, <API key>, <API key>, <API key>, <API key> } <API key>; // Function prototypes BOOL <API key>( void ); BOOL <API key>( void ); BOOL <API key>( void ); <API key> <API key>( IN void *pvCmdBuf, // Address of buffer contaiing command packet IN size_t tCmdSize, // Size of command packet OUT void *pvRspBuf, // Address of buffer for response packet IN size_t tRspSize // Expected size of response packet ); <API key> <API key>( IN void *pvCmdBuf, // Address of buffer contaiing command packet IN size_t tCmdSize, // Size of command packet OUT void *pvRspBuf, // Address of buffer for response packet IN size_t tRspSize // Expected size of response packet ); BOOL CommonCmdHandler( IN void *pvCmdBuf, // Address of buffer contaiing command packet IN size_t tCmdSize, // Size of command packet OUT void *pvRspBuf, // Address of buffer for response packet IN size_t tRspSize // Expected size of response packet ); #endif // ndef <API key>
#ifndef <API key> #define <API key> #include <libv/libv.h> #include <common/utility.h> #include <apps_sfdl_gen/fannkuch_v_inp_gen.h> /* * Provides the ability for user-defined input creation */ class <API key> : public InputCreator { public: <API key>(Venezia* v); void create_input(mpq_t* input_q, int num_inputs); private: Venezia* v; <API key> <API key>; }; #endif // <API key>
#!/bin/bash # Run a shell command on all slave hosts. # Environment Variables # HADOOP_SLAVES File naming remote hosts. # Default is ${HADOOP_CONF_DIR}/slaves. # HADOOP_CONF_DIR Alternate conf dir. Default is ${HADOOP_HOME}/conf. # HADOOP_SLAVE_SLEEP Seconds to sleep between spawning remote commands. # HADOOP_SSH_OPTS Options passed to ssh when running remote commands. usage="Usage: slaves.sh [--config confdir] command..." # if no args specified, show usage if [ $# -le 0 ]; then echo $usage exit 1 fi bin=`dirname "$0"` bin=`cd "$bin"; pwd` . "$bin"/hadoop-config.sh # If the slaves file is specified in the command line, # then it takes precedence over the definition in # hadoop-env.sh. Save it here. HOSTLIST=$HADOOP_SLAVES if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then . "${HADOOP_CONF_DIR}/hadoop-env.sh" fi if [ "$HOSTLIST" = "" ]; then if [ "$HADOOP_SLAVES" = "" ]; then export HOSTLIST="${HADOOP_CONF_DIR}/slaves" else export HOSTLIST="${HADOOP_SLAVES}" fi fi for slave in `cat "$HOSTLIST"`; do ssh $HADOOP_SSH_OPTS $slave $"${@ 2>&1 | sed "s/^/$slave: /" & if [ "$HADOOP_SLAVE_SLEEP" != "" ]; then sleep $HADOOP_SLAVE_SLEEP fi done wait
package com.tibco.ps.deploytool.services; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.<API key>; import com.tibco.ps.common.CommonConstants; import com.tibco.ps.common.exception.CompositeException; import com.tibco.ps.common.util.CommonUtils; import com.tibco.ps.deploytool.dao.ServerDAO; import com.tibco.ps.deploytool.dao.wsapi.ServerWSDAOImpl; public class ServerManagerImpl implements ServerManager { private ServerDAO serverDAO = null; // Get the configuration property file set in the environment with a default of deploy.properties String propertyFile = CommonUtils.<API key>(CommonConstants.propertyFile, "<API key>"); private static Log logger = LogFactory.getLog(ServerManagerImpl.class); // @Override public void startServer(String serverId, String pathToServersXML) throws CompositeException { String prefix = "startServer"; // Extract variables for the serverId serverId = CommonUtils.extractVariable(prefix, serverId, propertyFile, true); if(logger.isDebugEnabled()){ logger.debug(" Entering ServerManagerImpl.start() with following params - serverId: " + serverId + ", pathToServersXML: " + pathToServersXML); } try { serverManagerAction(ServerDAO.action.START.name(), serverId, pathToServersXML); } catch (CompositeException e) { logger.error("Error while starting server: " , e); throw new <API key>(e.getMessage(), e); } } // @Override public void stopServer(String serverId, String pathToServersXML) throws CompositeException { String prefix = "stopServer"; // Extract variables for the serverId serverId = CommonUtils.extractVariable(prefix, serverId, propertyFile, true); if(logger.isDebugEnabled()){ logger.debug(" Entering ServerManagerImpl.start() with following params - serverId: " + serverId + ", pathToServersXML: " + pathToServersXML); } try { serverManagerAction(ServerDAO.action.STOP.name(), serverId, pathToServersXML); } catch (CompositeException e) { logger.error("Error while stopping server: " , e); throw new <API key>(e.getMessage(), e); } } // @Override public void restartServer(String serverId, String pathToServersXML) throws CompositeException { String prefix = "restartServer"; // Extract variables for the serverId serverId = CommonUtils.extractVariable(prefix, serverId, propertyFile, true); if(logger.isDebugEnabled()){ logger.debug(" Entering ServerManagerImpl.start() with following params - serverId: " + serverId + ", pathToServersXML: " + pathToServersXML); } try { serverManagerAction(ServerDAO.action.RESTART.name(), serverId, pathToServersXML); } catch (CompositeException e) { logger.error("Error while restarting server: " , e); throw new <API key>(e.getMessage(), e); } } private void serverManagerAction(String actionName, String serverId, String pathToServersXML) throws CompositeException { String prefix = "serverManagerAction"; String processedIds = null; // Extract variables for the serverId serverId = CommonUtils.extractVariable(prefix, serverId, propertyFile, true); // Set the Module Action Objective String s1 = (serverId == null) ? "no_serverId" : "Ids="+serverId; System.setProperty("<API key>", actionName+" : "+s1); // Validate whether the files exist or not if (!CommonUtils.fileExists(pathToServersXML)) { throw new CompositeException("File ["+pathToServersXML+"] does not exist."); } try { if(logger.isInfoEnabled()){ logger.info("processing action "+ actionName + " on server "+ serverId); } getServerDAO().<API key>(actionName, serverId, pathToServersXML); } catch (CompositeException e) { logger.error("Error on server action (" + actionName + "): ", e); throw new <API key>(e.getMessage(), e); } } /** * @return serverDAO */ public ServerDAO getServerDAO() { if(this.serverDAO == null){ this.serverDAO = new ServerWSDAOImpl(); } return serverDAO; } /** * @param set serverDAO */ public void setServerDAO(ServerDAO serverDAO) { this.serverDAO = serverDAO; } }
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-05 14:25 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("elections", "0049_move_status")] operations = [ migrations.RemoveField(model_name="election", name="rejection_reason"), migrations.RemoveField(model_name="election", name="suggested_status"), migrations.RemoveField(model_name="election", name="suggestion_reason"), ]
from __future__ import print_function import re import logging logging.basicConfig(level=logging.INFO) class Executor(object): def __init__(self, op_map): processed = {} for pattern, f in op_map.iteritems(): s = self.<API key>(pattern.lower()) processed[re.compile(s)] = f self.operations = processed def execute(self, context, op): s = "%04x" % op for pattern, f in self.operations.iteritems(): m = pattern.match(s) if m: return f(context, *[int(v, base=16) for v in m.groups()]) assert False, s def <API key>(self, pattern): s = pattern.replace('?', '.') for id in ['x', 'y', 'z']: m = re.search('%s+' % id, s) if m: s = s[:m.start()] + ('(.{%s})' % (m.end() - m.start())) + s[m.end():] return '^' + s + '$' def set_mem_v0_vx(context, x): for i in range(x): context.memory.write_byte(context.index_reg + i, context.v[i]) context.pc += 2 def fill_v0_vx(context, x): for i in range(x+1): context.v[i] = context.memory.get_byte(context.index_reg + i) context.pc += 2 def set_bcd_vx(context, x): val = int(context.v[x]) context.memory.write_byte(context.index_reg, val / 100) context.memory.write_byte(context.index_reg + 1, val % 100 / 10) context.memory.write_byte(context.index_reg + 2, val % 100 % 10) context.pc += 2 def set_i_font(context, x): context.index_reg = context.memory.get_font_address(context.v[x]) context.pc += 2 def add_reg_ind(context, x): context.index_reg += context.v[x] context.pc += 2 def set_delay_timer(context, x): context.delay_timer = context.v[x] context.pc += 2 def set_sound_timer(context, x): context.sound_timer = context.v[x] context.pc += 2 def set_vx_key_pressed(context, x): context.v[x] = context.keypad.wait_for_keypress() context.pc += 2 def set_vx_delay_timer(context, x): context.v[x] = context.delay_timer context.pc += 2 def skip_key_vx(context, x, result=True): if context.keypad.is_keypressed(context.v[x]) == result: context.pc += 2 context.pc += 2 def draw_sprite(context, x, y, n): sprite = [] for cb in range(n): sprite.append(context.memory.get_byte(context.index_reg + cb)) collision = context.screen.draw(context.v[x], context.v[y], sprite) context.v[15] = collision context.pc += 2 def jump_nnn_v0(context, nnn): context.pc = context.v[0] + nnn def set_vx_rand(context, x, nn): import random context.v[x] = random.randint(0, 0xFF) & nn context.pc += 2 def jump_noteq(context, x, y): if context.v[x] != context.v[y]: context.pc += 2 context.pc += 2 def shift_vy_left(context, x, y): context.v[15] = context.v[15] >> 7 # First value context.v[x] = (context.v[y] << 1) % 255 context.pc += 2 def shift_right(context, x, y): context.v[15] = context.v[y] & 0x1 context.v[x] = context.v[y] >> 1 context.pc += 2 def sub_vx_vy_vf(context, x, y): logging.info('Setting V[X] = V[X] - V[Y], V[F] = 1 if V[Y] > V[X]') context.v[15] = 1 if context.v[y] > context.v[x] else 0 context.v[x] = context.v[x] - context.v[y] context.pc += 2 def add_vx_vy(context, x, y): logging.info('Setting V[X] = V[X] + V[Y]') val = context.v[x] + context.v[y] context.v[15] = 1 if val > 255 else 0 context.v[x] = val % 256 context.pc += 2 def sub_vx_vy(context, x, y): logging.info('Setting V[X] = V[X] - V[Y]') val = context.v[x] - context.v[y] context.v[15] = 1 if val < 0 else 0 context.v[x] = val % 256 context.pc += 2 def set_vx_or_vy(context, x, y): logging.info('Setting V[X] = V[X] | V[Y]') context.v[x] = context.v[x] | context.v[y] context.pc += 2 def set_vx_xor_vy(context, x, y): logging.info('Setting V[X] = V[X] ^ V[Y]') context.v[x] = context.v[x] ^ context.v[y] context.pc += 2 def set_vx_and_vy(context, x, y): logging.info('Setting V[X] = V[X] & V[Y]') context.v[x] = context.v[x] & context.v[y] context.pc += 2 def set_vx_vy(context, x, y): logging.info('Setting V[X] = V[Y]') context.v[x] = context.v[y] context.pc += 2 def add_reg(context, x, nnn): logging.info('Adding NNN to V[X]') context.v[x] = (context.v[x] + nnn) % 256 context.pc += 2 def set_i(context, nnn): logging.info('Setting NNN to index_reg') context.index_reg = nnn context.pc += 2 def pop_stack(context): logging.info('Returning from a subroutine') context.pc = context.stack.pop() def call_rca1082(context, address): #TODO print("operation not implemented yet:", address) context.pc += 1 def clear(context): logging.info('Clearing screen') context.screen.clear() context.pc += 2 def jump(context, address): logging.info('Jump at 0x%2x address' % address) context.pc = address def call(context, address): logging.info('Calling subroutine at 0x%2x address' % address) context.pc += 2 context.stack.append(context.pc) context.pc = address def skip_equal(context, x, nnn, ifeq=True): logging.info('Skip if V[X] === NNN is %s' % ifeq) if (context.v[x] == nnn) == ifeq: context.pc += 2 context.pc += 2 def skip_eq_reg(context, x, y): logging.info('Skip if V[X] === V[Y]') if context.v[x] == context.v[y]: context.pc += 2 context.pc += 2 def set_reg(context, x, nnn): logging.info('Set NNN to cpu reg V[x]') context.v[x] = nnn context.pc += 2 op_map = { '0?E0': clear, '0?EE': pop_stack, '0XXX': call_rca1082, '1XXX': jump, '2XXX': call, '3XYY': skip_equal, '4XYY': lambda context, x, nn: skip_equal(context, x, nn, ifeq = False), '5XY0': skip_eq_reg, '6XYY': set_reg, '7XYY': add_reg, '8XY0': set_vx_vy, '8XY1': set_vx_or_vy, '8XY2': set_vx_and_vy, '8XY3': set_vx_xor_vy, '8XY4': add_vx_vy, '8XY5': sub_vx_vy, '8XY6': shift_right, '8XY7': sub_vx_vy_vf, '8XYE': shift_vy_left, '9XY0': jump_noteq, 'AXXX': set_i, 'BXXX': jump_nnn_v0, 'CXYY': set_vx_rand, 'DXYZ': draw_sprite, 'EX9E': lambda context, x: skip_key_vx(x, result=False), 'EXA1': skip_key_vx, 'FX07': set_vx_delay_timer, 'FX0A': set_vx_key_pressed, 'FX15': set_delay_timer, 'FX18': set_sound_timer, 'FX1E': add_reg_ind, 'FX29': set_i_font, 'FX33': set_bcd_vx, 'FX55': set_mem_v0_vx, 'FX65': fill_v0_vx }
<!DOCTYPE html> <html xmlns="http: <head> <meta charset="utf-8" /> <title>statsmodels.tsa.vector_ar.var_model.VARProcess.acorr &#8212; statsmodels v0.10.0 documentation</title> <link rel="stylesheet" href="../_static/nature.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" type="text/css" href="../_static/graphviz.css" /> <script type="text/javascript" id="<API key>" data-url_root="../" src="../_static/<API key>.js"></script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/language_data.js"></script> <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=<API key>"></script> <link rel="shortcut icon" href="../_static/<API key>.ico"/> <link rel="author" title="About these documents" href="../about.html" /> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="statsmodels.tsa.vector_ar.var_model.VARProcess.forecast" href="statsmodels.tsa.vector_ar.var_model.VARProcess.forecast.html" /> <link rel="prev" title="statsmodels.tsa.vector_ar.var_model.VARProcess.acf" href="statsmodels.tsa.vector_ar.var_model.VARProcess.acf.html" /> <link rel="stylesheet" href="../_static/examples.css" type="text/css" /> <link rel="stylesheet" href="../_static/facebox.css" type="text/css" /> <script type="text/javascript" src="../_static/scripts.js"> </script> <script type="text/javascript" src="../_static/facebox.js"> </script> <script type="text/javascript"> $.facebox.settings.closeImage = "../_static/closelabel.png" $.facebox.settings.loadingImage = "../_static/loading.gif" </script> <script> $(document).ready(function() { $.getJSON("../../versions.json", function(versions) { var dropdown = document.createElement("div"); dropdown.className = "dropdown"; var button = document.createElement("button"); button.className = "dropbtn"; button.innerHTML = "Other Versions"; var content = document.createElement("div"); content.className = "dropdown-content"; dropdown.appendChild(button); dropdown.appendChild(content); $(".header").prepend(dropdown); for (var i = 0; i < versions.length; i++) { if (versions[i].substring(0, 1) == "v") { versions[i] = [versions[i], versions[i].substring(1)]; } else { versions[i] = [versions[i], versions[i]]; }; }; for (var i = 0; i < versions.length; i++) { var a = document.createElement("a"); a.innerHTML = versions[i][1]; a.href = "../../" + versions[i][0] + "/index.html"; a.title = versions[i][1]; $(".dropdown-content").append(a); }; }); }); </script> </head><body> <div class="headerwrap"> <div class = "header"> <a href = "../index.html"> <img src="../_static/<API key>.png" alt="Logo" style="padding-left: 15px"/></a> </div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="statsmodels.tsa.vector_ar.var_model.VARProcess.forecast.html" title="statsmodels.tsa.vector_ar.var_model.VARProcess.forecast" accesskey="N">next</a> |</li> <li class="right" > <a href="statsmodels.tsa.vector_ar.var_model.VARProcess.acf.html" title="statsmodels.tsa.vector_ar.var_model.VARProcess.acf" accesskey="P">previous</a> |</li> <li><a href ="../install.html">Install</a></li> &nbsp;|&nbsp; <li><a href="https://groups.google.com/forum/?hl=en#!forum/pystatsmodels">Support</a></li> &nbsp;|&nbsp; <li><a href="https://github.com/statsmodels/statsmodels/issues">Bugs</a></li> &nbsp;|&nbsp; <li><a href="../dev/index.html">Develop</a></li> &nbsp;|&nbsp; <li><a href="../examples/index.html">Examples</a></li> &nbsp;|&nbsp; <li><a href="../faq.html">FAQ</a></li> &nbsp;|&nbsp; <li class="nav-item nav-item-1"><a href="../vector_ar.html" >Vector Autoregressions <code class="xref py py-mod docutils literal notranslate"><span class="pre">tsa.vector_ar</span></code></a> |</li> <li class="nav-item nav-item-2"><a href="statsmodels.tsa.vector_ar.var_model.VARProcess.html" accesskey="U">statsmodels.tsa.vector_ar.var_model.VARProcess</a> |</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="<API key>"> <h1>statsmodels.tsa.vector_ar.var_model.VARProcess.acorr<a class="headerlink" href=" <p>method</p> <dl class="method"> <dt id="statsmodels.tsa.vector_ar.var_model.VARProcess.acorr"> <code class="sig-prename descclassname">VARProcess.</code><code class="sig-name descname">acorr</code><span class="sig-paren">(</span><em class="sig-param">nlags=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/statsmodels/tsa/vector_ar/var_model.html <dd><p>Compute theoretical autocorrelation function</p> <dl class="field-list simple"> <dt class="field-odd">Returns</dt> <dd class="field-odd"><dl class="simple"> <dt><strong>acorr</strong><span class="classifier">ndarray (p x k x k)</span></dt><dd></dd> </dl> </dd> </dl> </dd></dl> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="<API key>"> <h4>Previous topic</h4> <p class="topless"><a href="statsmodels.tsa.vector_ar.var_model.VARProcess.acf.html" title="previous chapter">statsmodels.tsa.vector_ar.var_model.VARProcess.acf</a></p> <h4>Next topic</h4> <p class="topless"><a href="statsmodels.tsa.vector_ar.var_model.VARProcess.forecast.html" title="next chapter">statsmodels.tsa.vector_ar.var_model.VARProcess.forecast</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/generated/statsmodels.tsa.vector_ar.var_model.VARProcess.acorr.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" /> <input type="submit" value="Go" /> </form> </div> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="footer" role="contentinfo"> & Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.1.2. </div> </body> </html>
package org.tolweb.tapestry; import java.util.Collection; import org.apache.tapestry.BaseComponent; import org.apache.tapestry.IRequestCycle; import org.tolweb.hibernate.TitleIllustration; import org.tolweb.tapestry.injections.BaseInjectable; import org.tolweb.tapestry.injections.ImageInjectable; import org.tolweb.treegrow.main.Contributor; import org.tolweb.treegrow.main.ImageVersion; import org.tolweb.treegrow.main.NodeImage; import org.tolweb.treegrow.main.StringUtils; /** * @author dmandel * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ public abstract class TitleIllustrations extends BaseComponent implements ImageInjectable, BaseInjectable { @SuppressWarnings("unchecked") public abstract Collection getIllustrations(); public abstract TitleIllustration <API key>(); public abstract void <API key>(TitleIllustration value); public abstract void <API key>(boolean value); public abstract boolean <API key>(); public abstract int getIndex(); public abstract void setContributor(Contributor contributor); public String getAltText() { if (<API key>().getImage() != null) { NodeImage img = <API key>().getImage(); if (StringUtils.notEmpty(img.getAltText())) { return img.getAltText(); } else { return " "; } } else { return " "; } } public void prepareForRender(IRequestCycle cycle) { super.prepareForRender(cycle); if (getIllustrations() != null && getIllustrations().size() == 1) { <API key>(true); } else { <API key>(false); } } public String <API key>() { TitleIllustration currentIllustration = <API key>(); ImageVersion version = currentIllustration.getVersion(); String url; if (StringUtils.isEmpty(version.getFileName())) { url = getImageDAO().<API key>(version); } else { url = getImageUtils().getVersionUrl(currentIllustration.getVersion()); } return url; } public String <API key>() { if (<API key>()) { return "singletillus"; } else { return null; } } }
//! \file <API key>.cpp //! \author Alex Robinson //! \brief Basic particle state class definition. // FRENSIE Includes #include "<API key>.hpp" #include "<API key>.hpp" #include "<API key>.hpp" namespace MonteCarlo{ // Default constructor /*! \details The default constructor should only be called before loading the * particle state from an archive. */ ParticleState::ParticleState() : d_history_number( 0 ), d_particle_type(), d_position(), d_direction{0.0,0.0,1.0}, d_energy( 0.0 ), d_time( 0.0 ), d_collision_number( 0 ), d_generation_number( 0 ), d_weight( 1.0 ), d_cell( Geometry::ModuleTraits::<API key> ), d_lost( false ), d_gone( false ), d_ray( d_position, d_direction, false ) { } // Constructor ParticleState::ParticleState( const ParticleState::historyNumberType history_number, const ParticleType type ) : d_history_number( history_number ), d_particle_type( type ), d_position(), d_direction(), d_energy( 0.0 ), d_time( 0.0 ), d_collision_number( 0 ), d_generation_number( 0 ), d_weight( 1.0 ), d_cell( Geometry::ModuleTraits::<API key> ), d_lost( false ), d_gone( false ), d_ray( d_position, d_direction, false ) { } // Copy constructor /*! \details When copied, the new particle is assumed to not be lost and * not be gone. */ ParticleState::ParticleState( const ParticleState& existing_base_state, const ParticleType new_type, const bool <API key>, const bool <API key> ) : d_history_number( existing_base_state.d_history_number ), d_particle_type( new_type ), d_position{existing_base_state.d_position[0], existing_base_state.d_position[1], existing_base_state.d_position[2]}, d_direction{existing_base_state.d_direction[0], existing_base_state.d_direction[1], existing_base_state.d_direction[2]}, d_energy( existing_base_state.d_energy ), d_time( existing_base_state.d_time ), d_collision_number( existing_base_state.d_collision_number ), d_generation_number( existing_base_state.d_generation_number ), d_weight( existing_base_state.d_weight ), d_cell( existing_base_state.d_cell ), d_lost( false ), d_gone( false ), d_ray( d_position, d_direction, false ) { // Increment the generation number if requested if( <API key> ) ++d_generation_number; // Reset the collision number if requested if( <API key> ) d_collision_number = 0u; } // Clone the particle state but change the history number /*! \details This method returns a heap-allocated pointer. It is only safe * to call this method inside of a smart pointer constructor or reset method. * The clone will only need a new history number in very rare circumstances * (e.g. state source). */ ParticleState* ParticleState::clone( const ParticleState::historyNumberType new_history_number ) const { ParticleState* clone_state = this->clone(); clone_state->d_history_number = new_history_number; return clone_state; } // Return the history number ParticleState::historyNumberType ParticleState::getHistoryNumber() const { return d_history_number; } // Return the particle type ParticleType ParticleState::getParticleType() const { return d_particle_type; } // Return the cell handle for the cell containing the particle Geometry::ModuleTraits::InternalCellHandle ParticleState::getCell() const { return d_cell; } // Set the cell containing the particle void ParticleState::setCell( const Geometry::ModuleTraits::InternalCellHandle cell ) { // Make sure the cell handle is valid testPrecondition( cell != Geometry::ModuleTraits::<API key>); d_cell = cell; } // Return the x position of the particle double ParticleState::getXPosition() const { return d_position[0]; } // Return the y position of the particle double ParticleState::getYPosition() const { return d_position[1]; } // Return the z position of the particle double ParticleState::getZPosition() const { return d_position[2]; } // Return the position of the particle const double* ParticleState::getPosition() const { return d_position; } // Set the position of the particle void ParticleState::setPosition( const double x_position, const double y_position, const double z_position ) { // Make sure the coordinates are valid testPrecondition( !ST::isnaninf( x_position ) ); testPrecondition( !ST::isnaninf( y_position ) ); testPrecondition( !ST::isnaninf( z_position ) ); d_position[0] = x_position; d_position[1] = y_position; d_position[2] = z_position; } // Return the x direction of the particle double ParticleState::getXDirection() const { return d_direction[0]; } // Return the y direction of the particle double ParticleState::getYDirection() const { return d_direction[1]; } // Return the z direction of the particle double ParticleState::getZDirection() const { return d_direction[2]; } // Return the direction of the particle const double* ParticleState::getDirection() const { return d_direction; } // Set the direction of the particle void ParticleState::setDirection( const double x_direction, const double y_direction, const double z_direction ) { // Make sure the direction coordinates are valid testPrecondition( !ST::isnaninf( x_direction ) ); testPrecondition( !ST::isnaninf( y_direction ) ); testPrecondition( !ST::isnaninf( z_direction ) ); // Make sure the direction is a unit vector testPrecondition( Utility::validDirection( x_direction, y_direction, z_direction ) ); d_direction[0] = x_direction; d_direction[1] = y_direction; d_direction[2] = z_direction; } // Rotate the direction of the particle using polar a. cosine and azimuthal a. /*! \details The polar angle cosine and azimuthal angle are w.r.t. the * current particle direction and not the global coordinate system. These * are the variables the commonly occur when sampling a new direction * for the particle from a scattering distribution. This function is therefore * meant to avoid duplicate code that would otherwise arise when determining * the new particle direction */ void ParticleState::rotateDirection( const double polar_angle_cosine, const double azimuthal_angle ) { // Make sure the current particle direction is valid (initialized) testPrecondition( Utility::validDirection( this->getDirection() ) ); // Make sure the polar angle cosine is valid testPrecondition( polar_angle_cosine >= -1.0 ); testPrecondition( polar_angle_cosine <= 1.0 ); // Make sure the azimuthal angle is valid testPrecondition( azimuthal_angle >= 0.0 ); testPrecondition( azimuthal_angle <= 2*Utility::PhysicalConstants::pi ); double outgoing_direction[3]; Utility::<API key>( polar_angle_cosine, azimuthal_angle, this->getDirection(), outgoing_direction ); this->setDirection( outgoing_direction ); } // Advance the particle along its direction by the requested distance void ParticleState::advance( const double distance ) { // Make sure the distance is valid testPrecondition( !ST::isnaninf( distance ) ); d_position[0] += d_direction[0]*distance; d_position[1] += d_direction[1]*distance; d_position[2] += d_direction[2]*distance; // Compute the time to traverse the distance d_time += <API key>( distance ); } // Set the energy of the particle /*! The default implementation is only valid for massless particles (It is * assumed that the speed of the particle does not change with the energy). */ void ParticleState::setEnergy( const ParticleState::energyType energy ) { // Make sure the energy is valid testPrecondition( !ST::isnaninf( energy ) ); testPrecondition( energy > 0.0 ); d_energy = energy; } // Return the time state of the particle ParticleState::timeType ParticleState::getTime() const { return d_time; } // Set the time state of the particle void ParticleState::setTime( const ParticleState::timeType time ) { d_time = time; } // Return the collision number of the particle ParticleState::collisionNumberType ParticleState::getCollisionNumber() const { return d_collision_number; } // Increment the collision number void ParticleState::<API key>() { ++d_collision_number; } // Reset the collision number /*! \details This should rarely be used - try to rely on the contructor to * reset the collision number. */ void ParticleState::<API key>() { d_collision_number = 0u; } // Return the generation number of the particle ParticleState::<API key> ParticleState::getGenerationNumber() const { return d_generation_number; } // Increment the generation number void ParticleState::<API key>() { ++d_generation_number; } // Return the weight of the particle double ParticleState::getWeight() const { return d_weight; } // Set the weight of the particle void ParticleState::setWeight( const double weight ) { d_weight = weight; } // Multiply the weight of the particle by a factor void ParticleState::multiplyWeight( const double weight_factor ) { // Make sure that the current weight is valid testPrecondition( d_weight > 0.0 ); d_weight *= weight_factor; } // Return if the particle is lost bool ParticleState::isLost() const { return d_lost; } // Set the particle as lost void ParticleState::setAsLost() { d_lost = true; } // Return if the particle is gone bool ParticleState::isGone() const { return d_gone; } // Set the particle as gone void ParticleState::setAsGone() { d_gone = true; } } // end MonteCarlo // end <API key>.cpp
#include "chrome/browser/chromeos/set_time_dialog.h" #include "base/metrics/user_metrics.h" #include "base/strings/string16.h" #include "chrome/common/url_constants.h" #include "chromeos/login/login_state/login_state.h" #include "ui/gfx/geometry/size.h" namespace chromeos { namespace { // Dialog width and height in DIPs. const int kDefaultWidth = 530; const int <API key> = 286; const int <API key> = 228; } // namespace // static void SetTimeDialog::ShowDialog(gfx::NativeWindow parent) { base::RecordAction(base::UserMetricsAction("<API key>")); auto* dialog = new SetTimeDialog(); dialog->ShowSystemDialog(parent); } // static bool SetTimeDialog::ShouldShowTimezone() { // After login the user should set the timezone via Settings, which applies // additional restrictions. return !LoginState::Get()->IsUserLoggedIn(); } SetTimeDialog::SetTimeDialog() : <API key>(GURL(chrome::kChromeUISetTimeURL), base::string16() /* title */) {} SetTimeDialog::~SetTimeDialog() = default; void SetTimeDialog::GetDialogSize(gfx::Size* size) const { size->SetSize(kDefaultWidth, ShouldShowTimezone() ? <API key> : <API key>); } } // namespace chromeos
package jpview.graphics; /** * This class creates a kernel for use by an AffineTransformOp * * @author clyon */ public class GaussianKernel { private int radius = 5; private float sigma = 1; private float[] kernel; /** Creates a new instance of GaussianKernel */ public GaussianKernel() { kernel = makeKernel(); } /** * Creates a gaussian kernel with the provided radius * * @param r * the radius for the gaussian kernel */ public GaussianKernel(int r) { radius = r; kernel = makeKernel(); } /** * Creates a gaussian kernel with the provided radius and sigma value * * @param r * the radius of the blur * @param s * the sigma value for the kernel */ public GaussianKernel(int r, float s) { radius = r; sigma = s; kernel = makeKernel(); } private float[] makeKernel() { kernel = new float[radius * radius]; float sum = 0; for (int y = 0; y < radius; y++) { for (int x = 0; x < radius; x++) { int off = y * radius + x; int xx = x - radius / 2; int yy = y - radius / 2; kernel[off] = (float) Math.pow(Math.E, -(xx * xx + yy * yy) / (2 * (sigma * sigma))); sum += kernel[off]; } } for (int i = 0; i < kernel.length; i++) kernel[i] /= sum; return kernel; } /** * Dumps a string representation of the kernel to standard out */ public void dump() { for (int x = 0; x < radius; x++) { for (int y = 0; y < radius; y++) { System.out.print(kernel[y * radius + x] + "\t"); } System.out.println(); } } /** * returns the kernel as a float [] suitable for use with an affine * transform * * @return the kernel values */ public float[] getKernel() { return kernel; } public static void main(String args[]) { GaussianKernel gk = new GaussianKernel(5, 100f); gk.dump(); } }
<?php declare(strict_types=1); namespace ProophExample\FunctionalFlavour; use Prooph\EventMachine\Messaging\Message; use Prooph\EventMachine\Messaging\MessageBag; use Prooph\EventMachine\Runtime\Functional\Port; use ProophExample\FunctionalFlavour\Api\Command; use ProophExample\FunctionalFlavour\Api\Event; use ProophExample\FunctionalFlavour\Api\Query; final class <API key> implements Port { /** * {@inheritdoc} */ public function deserialize(Message $message) { //Note: we use a very simple mapping strategy here //You could also use a deserializer or other techniques switch ($message->messageType()) { case Message::TYPE_COMMAND: return Command::<API key>($message->messageName(), $message->payload()); case Message::TYPE_EVENT: return Event::<API key>($message->messageName(), $message->payload()); case Message::TYPE_QUERY: return Query::<API key>($message->messageName(), $message->payload()); } } /** * {@inheritdoc} */ public function serializePayload($customMessage): array { //Since, we use objects with public properties as custom messages, casting to array is enough //In a production setting, you should use your own immutable messages and a serializer return (array) $customMessage; } /** * {@inheritdoc} */ public function decorateEvent($customEvent): MessageBag { return new MessageBag( Event::nameOf($customEvent), MessageBag::TYPE_EVENT, $customEvent ); } /** * {@inheritdoc} */ public function <API key>(string $<API key>, $command): string { //Duck typing, do not do this in production but rather use your own interfaces return $command->{$<API key>}; } /** * {@inheritdoc} */ public function <API key>($customCommand, $preProcessor) { //Duck typing, do not do this in production but rather use your own interfaces return $preProcessor->preProcess($customCommand); } /** * {@inheritdoc} */ public function callContextProvider($customCommand, $contextProvider) { //Duck typing, do not do this in production but rather use your own interfaces return $contextProvider->provide($customCommand); } }
#ifndef <API key> #define <API key> #include "ash/ash_export.h" #include "base/macros.h" namespace ash { namespace test { class <API key>; } // namespace test // Central controller to handle material design modes. class ASH_EXPORT <API key> { public: // The different material design modes for Chrome OS system UI. enum Mode { // Not initialized. UNINITIALIZED = -1, // Classic, non-material design. NON_MATERIAL = 0, // Basic material design. MATERIAL_NORMAL = 1, // Material design with experimental features. <API key> = 2 }; // Initializes |mode_|. Must be called before calling IsMaterial(), // <API key>(), IsMaterialNormal(), or GetMode(). static void Initialize(); // Returns the currently initialized <API key>::Mode type for // Chrome OS system UI. static Mode GetMode(); // Returns true if overview mode is using Material Design. static bool IsOverviewMaterial(); // Returns true if Material Design features are enabled for Chrome OS shelf. static bool IsShelfMaterial(); // Returns true if Material Design features are enabled for Chrome OS system // tray menu. static bool <API key>(); // Returns true if material design versions of icons should be used in the // status tray and system menu. static bool <API key>(); private: friend class test::<API key>; // Declarations only. Do not allow construction of an object. <API key>(); ~<API key>(); // Material Design |Mode| for Chrome OS system UI. Used only by tests. static Mode mode(); // Returns true if Material Design is enabled in Chrome OS system UI. // Maps to "ash-md" flag "enabled" or "experimental" values. static bool IsMaterial(); // Returns true if Material Design normal features are enabled in Chrome OS // system UI. Maps to "--ash-md=enabled" command line switch value. static bool IsMaterialNormal(); // Returns true if Material Design experimental features are enabled in // Chrome OS system UI. Maps to "--ash-md=experimental" command line switch // value. static bool <API key>(); // Returns the per-platform default material design variant. static Mode DefaultMode(); // Sets |mode_| to |mode|. Can be used by tests to directly set the mode. static void SetMode(Mode mode); // Resets the initialization state to uninitialized. To be used by tests to // allow calling Initialize() more than once. static void Uninitialize(); <API key>(<API key>); }; } // namespace ash #endif // <API key>
#ifndef <API key> #define <API key> #include <string> #include "base/callback.h" #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "chrome/browser/image_decoder.h" class SkBitmap; namespace base { class SequencedTaskRunner; } namespace user_manager { class UserImage; } namespace chromeos { // Helper that reads, decodes and optionally resizes an image on a background // thread. Returns the image in the form of an SkBitmap. class UserImageLoader : public base::<API key><UserImageLoader> { public: // Callback used to return the result of an image load operation. typedef base::Callback<void(const user_manager::UserImage& user_image)> LoadedCallback; // All file I/O, decoding and resizing are done via |<API key>|. UserImageLoader( ImageDecoder::ImageCodec image_codec, scoped_refptr<base::SequencedTaskRunner> <API key>); // Load an image in the background and call |loaded_cb| with the resulting // UserImage (which may be empty in case of error). If |pixels_per_side| is // positive, the image is cropped to a square and shrunk so that it does not // exceed |pixels_per_side|x|pixels_per_side|. The first variant of this // method reads the image from |filepath| on disk, the second processes |data| // read into memory already. void Start(const std::string& filepath, int pixels_per_side, const LoadedCallback& loaded_cb); void Start(scoped_ptr<std::string> data, int pixels_per_side, const LoadedCallback& loaded_cb); private: friend class base::<API key><UserImageLoader>; // Contains attributes we need to know about each image we decode. struct ImageInfo { ImageInfo(const std::string& file_path, int pixels_per_side, const LoadedCallback& loaded_cb); ~ImageInfo(); const std::string file_path; const int pixels_per_side; const LoadedCallback loaded_cb; }; class UserImageRequest : public ImageDecoder::ImageRequest { public: UserImageRequest(const ImageInfo& image_info, const std::string& image_data, UserImageLoader* user_image_loader); // ImageDecoder::ImageRequest implementation. These callbacks will only be // invoked via user_image_loader_'s <API key>. void OnImageDecoded(const SkBitmap& decoded_image) override; void OnDecodeImageFailed() override; private: ~UserImageRequest() override; const ImageInfo image_info_; std::vector<unsigned char> image_data_; UserImageLoader* user_image_loader_; }; ~UserImageLoader(); // Reads the image from |image_info.file_path| and starts the decoding // process. This method may only be invoked via the |<API key>|. void ReadAndDecodeImage(const ImageInfo& image_info); // Decodes the image |data|. This method may only be invoked via the // |<API key>|. void DecodeImage(const scoped_ptr<std::string> data, const ImageInfo& image_info); // The foreground task runner on which |this| is instantiated, Start() is // called and LoadedCallbacks are invoked. scoped_refptr<base::SequencedTaskRunner> <API key>; // The background task runner on which file I/O, image decoding and resizing // are done. scoped_refptr<base::SequencedTaskRunner> <API key>; // Specify how the file should be decoded in the utility process. const ImageDecoder::ImageCodec image_codec_; <API key>(UserImageLoader); }; } // namespace chromeos #endif // <API key>
// <API key>: Apache-2.0 WITH LLVM-exception #ifndef <API key> #define <API key> #include "lldb/Utility/IOObject.h" #include "lldb/Utility/Status.h" #include "llvm/Support/ErrorHandling.h" #include <functional> namespace lldb_private { // The purpose of this class is to enable multiplexed processing of data from // different sources without resorting to multi-threading. Clients can register // IOObjects, which will be monitored for readability, and when they become // ready, the specified callback will be invoked. Monitoring for writability is // not supported, but can be easily added if needed. // The RegisterReadObject function return a handle, which controls the duration // of the monitoring. When this handle is destroyed, the callback is // deregistered. // This class simply defines the interface common for all platforms, actual // implementations are platform-specific. class MainLoopBase { private: class ReadHandle; public: MainLoopBase() {} virtual ~MainLoopBase() {} typedef std::unique_ptr<ReadHandle> ReadHandleUP; typedef std::function<void(MainLoopBase &)> Callback; virtual ReadHandleUP RegisterReadObject(const lldb::IOObjectSP &object_sp, const Callback &callback, Status &error) { llvm_unreachable("Not implemented"); } // Waits for registered events and invoke the proper callbacks. Returns when // all callbacks deregister themselves or when someone requests termination. virtual Status Run() { llvm_unreachable("Not implemented"); } // Requests the exit of the Run() function. virtual void RequestTermination() { llvm_unreachable("Not implemented"); } protected: ReadHandleUP CreateReadHandle(const lldb::IOObjectSP &object_sp) { return ReadHandleUP(new ReadHandle(*this, object_sp->GetWaitableHandle())); } virtual void <API key>(IOObject::WaitableHandle handle) { llvm_unreachable("Not implemented"); } private: class ReadHandle { public: ~ReadHandle() { m_mainloop.<API key>(m_handle); } private: ReadHandle(MainLoopBase &mainloop, IOObject::WaitableHandle handle) : m_mainloop(mainloop), m_handle(handle) {} MainLoopBase &m_mainloop; IOObject::WaitableHandle m_handle; friend class MainLoopBase; <API key>(ReadHandle); }; private: <API key>(MainLoopBase); }; } // namespace lldb_private #endif // <API key>
\hypertarget{<API key>}{\section{framework/\-Chassis\-Turn\-Rate.cpp File Reference} \label{<API key>}\index{framework/\-Chassis\-Turn\-Rate.\-cpp@{framework/\-Chassis\-Turn\-Rate.\-cpp}} } \hyperlink{<API key>}{Chassis\-Turn\-Rate} is a strictly defined type for specifying the turn rate of a moving chassis. {\ttfamily \#include \char`\"{}Chassis\-Turn\-Rate.\-hpp\char`\"{}}\\* \subsection{Detailed Description} \hyperlink{<API key>}{Chassis\-Turn\-Rate} is a strictly defined type for specifying the turn rate of a moving chassis. \begin{DoxyCopyright}{Copyright} (c) 2017 Mark R. Jenkins. All rights reserved. \end{DoxyCopyright} \begin{DoxyAuthor}{Author} M\-Jenkins, E\-N\-P\-M 808\-X Spring 2017 \end{DoxyAuthor} \begin{DoxyDate}{Date} Mar 13, 2017 -\/ Creation \end{DoxyDate} \hyperlink{classChassis}{Chassis} turn rates may be specified in a variety of ways; the one implemented here is as a degree of turn per foot of movement. This class creates a strict type for chassis turn rates, and can provide a variety of accessor functiont so allow setting/getting the turn rate in different units. The class stores the turn rate internaly as \char`\"{}\-Degrees per Foot of movement\char`\"{}. Note that a zero turn rate indicates movement straight ahead, a negative turn rate indicates a deviation (turn) to the left, and a positive turn rate indicates a deviation (turn) to the right.