code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.beam.runners.dataflow; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertThat; import com.google.common.collect.Iterables; import java.io.Serializable; import java.util.List; import org.apache.beam.runners.dataflow.PrimitiveParDoSingleFactory.ParDoSingle; import org.apache.beam.sdk.coders.VarIntCoder; import org.apache.beam.sdk.runners.PTransformOverrideFactory.PTransformReplacement; import org.apache.beam.sdk.testing.TestPipeline; import org.apache.beam.sdk.transforms.AppliedPTransform; import org.apache.beam.sdk.transforms.Create; import org.apache.beam.sdk.transforms.DoFn; import org.apache.beam.sdk.transforms.ParDo; import org.apache.beam.sdk.transforms.Sum; import org.apache.beam.sdk.transforms.View; import org.apache.beam.sdk.transforms.display.DisplayData; import org.apache.beam.sdk.transforms.display.DisplayDataEvaluator; import org.apache.beam.sdk.values.PCollection; import org.apache.beam.sdk.values.PCollectionView; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** * Tests for {@link PrimitiveParDoSingleFactory}. */ @RunWith(JUnit4.class) public class PrimitiveParDoSingleFactoryTest implements Serializable { // Create a pipeline for testing Side Input propagation. This won't actually run any Pipelines, // so disable enforcement. @Rule public transient TestPipeline pipeline = TestPipeline.create().enableAbandonedNodeEnforcement(false); private PrimitiveParDoSingleFactory<Integer, Long> factory = new PrimitiveParDoSingleFactory<>(); /** * A test that demonstrates that the replacement transform has the Display Data of the * {@link ParDo.SingleOutput} it replaces. */ @Test public void getReplacementTransformPopulateDisplayData() { ParDo.SingleOutput<Integer, Long> originalTransform = ParDo.of(new ToLongFn()); DisplayData originalDisplayData = DisplayData.from(originalTransform); PCollection<? extends Integer> input = pipeline.apply(Create.of(1, 2, 3)); AppliedPTransform< PCollection<? extends Integer>, PCollection<Long>, ParDo.SingleOutput<Integer, Long>> application = AppliedPTransform.of( "original", input.expand(), input.apply(originalTransform).expand(), originalTransform, pipeline); PTransformReplacement<PCollection<? extends Integer>, PCollection<Long>> replacement = factory.getReplacementTransform(application); DisplayData replacementDisplayData = DisplayData.from(replacement.getTransform()); assertThat(replacementDisplayData, equalTo(originalDisplayData)); DisplayData primitiveDisplayData = Iterables.getOnlyElement( DisplayDataEvaluator.create() .displayDataForPrimitiveTransforms(replacement.getTransform(), VarIntCoder.of())); assertThat(primitiveDisplayData, equalTo(replacementDisplayData)); } @Test public void getReplacementTransformGetSideInputs() { PCollectionView<Long> sideLong = pipeline .apply("LongSideInputVals", Create.of(-1L, -2L, -4L)) .apply("SideLongView", Sum.longsGlobally().asSingletonView()); PCollectionView<List<String>> sideStrings = pipeline .apply("StringSideInputVals", Create.of("foo", "bar", "baz")) .apply("SideStringsView", View.<String>asList()); ParDo.SingleOutput<Integer, Long> originalTransform = ParDo.of(new ToLongFn()).withSideInputs(sideLong, sideStrings); PCollection<? extends Integer> input = pipeline.apply(Create.of(1, 2, 3)); AppliedPTransform< PCollection<? extends Integer>, PCollection<Long>, ParDo.SingleOutput<Integer, Long>> application = AppliedPTransform.of( "original", input.expand(), input.apply(originalTransform).expand(), originalTransform, pipeline); PTransformReplacement<PCollection<? extends Integer>, PCollection<Long>> replacementTransform = factory.getReplacementTransform(application); ParDoSingle<Integer, Long> parDoSingle = (ParDoSingle<Integer, Long>) replacementTransform.getTransform(); assertThat(parDoSingle.getSideInputs(), containsInAnyOrder(sideStrings, sideLong)); } @Test public void getReplacementTransformGetFn() { DoFn<Integer, Long> originalFn = new ToLongFn(); ParDo.SingleOutput<Integer, Long> originalTransform = ParDo.of(originalFn); PCollection<? extends Integer> input = pipeline.apply(Create.of(1, 2, 3)); AppliedPTransform< PCollection<? extends Integer>, PCollection<Long>, ParDo.SingleOutput<Integer, Long>> application = AppliedPTransform.of( "original", input.expand(), input.apply(originalTransform).expand(), originalTransform, pipeline); PTransformReplacement<PCollection<? extends Integer>, PCollection<Long>> replacementTransform = factory.getReplacementTransform(application); ParDoSingle<Integer, Long> parDoSingle = (ParDoSingle<Integer, Long>) replacementTransform.getTransform(); assertThat(parDoSingle.getFn(), equalTo(originalTransform.getFn())); assertThat(parDoSingle.getFn(), equalTo(originalFn)); } private static class ToLongFn extends DoFn<Integer, Long> { @ProcessElement public void toLong(ProcessContext ctxt) { ctxt.output(ctxt.element().longValue()); } public boolean equals(Object other) { return other != null && other.getClass().equals(getClass()); } public int hashCode() { return getClass().hashCode(); } } }
vikkyrk/incubator-beam
runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/PrimitiveParDoSingleFactoryTest.java
Java
apache-2.0
6,616
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/wellarchitected/WellArchitected_EXPORTS.h> #include <aws/wellarchitected/WellArchitectedRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/wellarchitected/model/WorkloadEnvironment.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <utility> #include <aws/core/utils/UUID.h> namespace Aws { namespace WellArchitected { namespace Model { /** * <p>Input for workload creation.</p><p><h3>See Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/wellarchitected-2020-03-31/CreateWorkloadInput">AWS * API Reference</a></p> */ class AWS_WELLARCHITECTED_API CreateWorkloadRequest : public WellArchitectedRequest { public: CreateWorkloadRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateWorkload"; } Aws::String SerializePayload() const override; inline const Aws::String& GetWorkloadName() const{ return m_workloadName; } inline bool WorkloadNameHasBeenSet() const { return m_workloadNameHasBeenSet; } inline void SetWorkloadName(const Aws::String& value) { m_workloadNameHasBeenSet = true; m_workloadName = value; } inline void SetWorkloadName(Aws::String&& value) { m_workloadNameHasBeenSet = true; m_workloadName = std::move(value); } inline void SetWorkloadName(const char* value) { m_workloadNameHasBeenSet = true; m_workloadName.assign(value); } inline CreateWorkloadRequest& WithWorkloadName(const Aws::String& value) { SetWorkloadName(value); return *this;} inline CreateWorkloadRequest& WithWorkloadName(Aws::String&& value) { SetWorkloadName(std::move(value)); return *this;} inline CreateWorkloadRequest& WithWorkloadName(const char* value) { SetWorkloadName(value); return *this;} inline const Aws::String& GetDescription() const{ return m_description; } inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } inline CreateWorkloadRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} inline CreateWorkloadRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} inline CreateWorkloadRequest& WithDescription(const char* value) { SetDescription(value); return *this;} inline const WorkloadEnvironment& GetEnvironment() const{ return m_environment; } inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; } inline void SetEnvironment(const WorkloadEnvironment& value) { m_environmentHasBeenSet = true; m_environment = value; } inline void SetEnvironment(WorkloadEnvironment&& value) { m_environmentHasBeenSet = true; m_environment = std::move(value); } inline CreateWorkloadRequest& WithEnvironment(const WorkloadEnvironment& value) { SetEnvironment(value); return *this;} inline CreateWorkloadRequest& WithEnvironment(WorkloadEnvironment&& value) { SetEnvironment(std::move(value)); return *this;} inline const Aws::Vector<Aws::String>& GetAccountIds() const{ return m_accountIds; } inline bool AccountIdsHasBeenSet() const { return m_accountIdsHasBeenSet; } inline void SetAccountIds(const Aws::Vector<Aws::String>& value) { m_accountIdsHasBeenSet = true; m_accountIds = value; } inline void SetAccountIds(Aws::Vector<Aws::String>&& value) { m_accountIdsHasBeenSet = true; m_accountIds = std::move(value); } inline CreateWorkloadRequest& WithAccountIds(const Aws::Vector<Aws::String>& value) { SetAccountIds(value); return *this;} inline CreateWorkloadRequest& WithAccountIds(Aws::Vector<Aws::String>&& value) { SetAccountIds(std::move(value)); return *this;} inline CreateWorkloadRequest& AddAccountIds(const Aws::String& value) { m_accountIdsHasBeenSet = true; m_accountIds.push_back(value); return *this; } inline CreateWorkloadRequest& AddAccountIds(Aws::String&& value) { m_accountIdsHasBeenSet = true; m_accountIds.push_back(std::move(value)); return *this; } inline CreateWorkloadRequest& AddAccountIds(const char* value) { m_accountIdsHasBeenSet = true; m_accountIds.push_back(value); return *this; } inline const Aws::Vector<Aws::String>& GetAwsRegions() const{ return m_awsRegions; } inline bool AwsRegionsHasBeenSet() const { return m_awsRegionsHasBeenSet; } inline void SetAwsRegions(const Aws::Vector<Aws::String>& value) { m_awsRegionsHasBeenSet = true; m_awsRegions = value; } inline void SetAwsRegions(Aws::Vector<Aws::String>&& value) { m_awsRegionsHasBeenSet = true; m_awsRegions = std::move(value); } inline CreateWorkloadRequest& WithAwsRegions(const Aws::Vector<Aws::String>& value) { SetAwsRegions(value); return *this;} inline CreateWorkloadRequest& WithAwsRegions(Aws::Vector<Aws::String>&& value) { SetAwsRegions(std::move(value)); return *this;} inline CreateWorkloadRequest& AddAwsRegions(const Aws::String& value) { m_awsRegionsHasBeenSet = true; m_awsRegions.push_back(value); return *this; } inline CreateWorkloadRequest& AddAwsRegions(Aws::String&& value) { m_awsRegionsHasBeenSet = true; m_awsRegions.push_back(std::move(value)); return *this; } inline CreateWorkloadRequest& AddAwsRegions(const char* value) { m_awsRegionsHasBeenSet = true; m_awsRegions.push_back(value); return *this; } inline const Aws::Vector<Aws::String>& GetNonAwsRegions() const{ return m_nonAwsRegions; } inline bool NonAwsRegionsHasBeenSet() const { return m_nonAwsRegionsHasBeenSet; } inline void SetNonAwsRegions(const Aws::Vector<Aws::String>& value) { m_nonAwsRegionsHasBeenSet = true; m_nonAwsRegions = value; } inline void SetNonAwsRegions(Aws::Vector<Aws::String>&& value) { m_nonAwsRegionsHasBeenSet = true; m_nonAwsRegions = std::move(value); } inline CreateWorkloadRequest& WithNonAwsRegions(const Aws::Vector<Aws::String>& value) { SetNonAwsRegions(value); return *this;} inline CreateWorkloadRequest& WithNonAwsRegions(Aws::Vector<Aws::String>&& value) { SetNonAwsRegions(std::move(value)); return *this;} inline CreateWorkloadRequest& AddNonAwsRegions(const Aws::String& value) { m_nonAwsRegionsHasBeenSet = true; m_nonAwsRegions.push_back(value); return *this; } inline CreateWorkloadRequest& AddNonAwsRegions(Aws::String&& value) { m_nonAwsRegionsHasBeenSet = true; m_nonAwsRegions.push_back(std::move(value)); return *this; } inline CreateWorkloadRequest& AddNonAwsRegions(const char* value) { m_nonAwsRegionsHasBeenSet = true; m_nonAwsRegions.push_back(value); return *this; } inline const Aws::Vector<Aws::String>& GetPillarPriorities() const{ return m_pillarPriorities; } inline bool PillarPrioritiesHasBeenSet() const { return m_pillarPrioritiesHasBeenSet; } inline void SetPillarPriorities(const Aws::Vector<Aws::String>& value) { m_pillarPrioritiesHasBeenSet = true; m_pillarPriorities = value; } inline void SetPillarPriorities(Aws::Vector<Aws::String>&& value) { m_pillarPrioritiesHasBeenSet = true; m_pillarPriorities = std::move(value); } inline CreateWorkloadRequest& WithPillarPriorities(const Aws::Vector<Aws::String>& value) { SetPillarPriorities(value); return *this;} inline CreateWorkloadRequest& WithPillarPriorities(Aws::Vector<Aws::String>&& value) { SetPillarPriorities(std::move(value)); return *this;} inline CreateWorkloadRequest& AddPillarPriorities(const Aws::String& value) { m_pillarPrioritiesHasBeenSet = true; m_pillarPriorities.push_back(value); return *this; } inline CreateWorkloadRequest& AddPillarPriorities(Aws::String&& value) { m_pillarPrioritiesHasBeenSet = true; m_pillarPriorities.push_back(std::move(value)); return *this; } inline CreateWorkloadRequest& AddPillarPriorities(const char* value) { m_pillarPrioritiesHasBeenSet = true; m_pillarPriorities.push_back(value); return *this; } inline const Aws::String& GetArchitecturalDesign() const{ return m_architecturalDesign; } inline bool ArchitecturalDesignHasBeenSet() const { return m_architecturalDesignHasBeenSet; } inline void SetArchitecturalDesign(const Aws::String& value) { m_architecturalDesignHasBeenSet = true; m_architecturalDesign = value; } inline void SetArchitecturalDesign(Aws::String&& value) { m_architecturalDesignHasBeenSet = true; m_architecturalDesign = std::move(value); } inline void SetArchitecturalDesign(const char* value) { m_architecturalDesignHasBeenSet = true; m_architecturalDesign.assign(value); } inline CreateWorkloadRequest& WithArchitecturalDesign(const Aws::String& value) { SetArchitecturalDesign(value); return *this;} inline CreateWorkloadRequest& WithArchitecturalDesign(Aws::String&& value) { SetArchitecturalDesign(std::move(value)); return *this;} inline CreateWorkloadRequest& WithArchitecturalDesign(const char* value) { SetArchitecturalDesign(value); return *this;} inline const Aws::String& GetReviewOwner() const{ return m_reviewOwner; } inline bool ReviewOwnerHasBeenSet() const { return m_reviewOwnerHasBeenSet; } inline void SetReviewOwner(const Aws::String& value) { m_reviewOwnerHasBeenSet = true; m_reviewOwner = value; } inline void SetReviewOwner(Aws::String&& value) { m_reviewOwnerHasBeenSet = true; m_reviewOwner = std::move(value); } inline void SetReviewOwner(const char* value) { m_reviewOwnerHasBeenSet = true; m_reviewOwner.assign(value); } inline CreateWorkloadRequest& WithReviewOwner(const Aws::String& value) { SetReviewOwner(value); return *this;} inline CreateWorkloadRequest& WithReviewOwner(Aws::String&& value) { SetReviewOwner(std::move(value)); return *this;} inline CreateWorkloadRequest& WithReviewOwner(const char* value) { SetReviewOwner(value); return *this;} inline const Aws::String& GetIndustryType() const{ return m_industryType; } inline bool IndustryTypeHasBeenSet() const { return m_industryTypeHasBeenSet; } inline void SetIndustryType(const Aws::String& value) { m_industryTypeHasBeenSet = true; m_industryType = value; } inline void SetIndustryType(Aws::String&& value) { m_industryTypeHasBeenSet = true; m_industryType = std::move(value); } inline void SetIndustryType(const char* value) { m_industryTypeHasBeenSet = true; m_industryType.assign(value); } inline CreateWorkloadRequest& WithIndustryType(const Aws::String& value) { SetIndustryType(value); return *this;} inline CreateWorkloadRequest& WithIndustryType(Aws::String&& value) { SetIndustryType(std::move(value)); return *this;} inline CreateWorkloadRequest& WithIndustryType(const char* value) { SetIndustryType(value); return *this;} inline const Aws::String& GetIndustry() const{ return m_industry; } inline bool IndustryHasBeenSet() const { return m_industryHasBeenSet; } inline void SetIndustry(const Aws::String& value) { m_industryHasBeenSet = true; m_industry = value; } inline void SetIndustry(Aws::String&& value) { m_industryHasBeenSet = true; m_industry = std::move(value); } inline void SetIndustry(const char* value) { m_industryHasBeenSet = true; m_industry.assign(value); } inline CreateWorkloadRequest& WithIndustry(const Aws::String& value) { SetIndustry(value); return *this;} inline CreateWorkloadRequest& WithIndustry(Aws::String&& value) { SetIndustry(std::move(value)); return *this;} inline CreateWorkloadRequest& WithIndustry(const char* value) { SetIndustry(value); return *this;} inline const Aws::Vector<Aws::String>& GetLenses() const{ return m_lenses; } inline bool LensesHasBeenSet() const { return m_lensesHasBeenSet; } inline void SetLenses(const Aws::Vector<Aws::String>& value) { m_lensesHasBeenSet = true; m_lenses = value; } inline void SetLenses(Aws::Vector<Aws::String>&& value) { m_lensesHasBeenSet = true; m_lenses = std::move(value); } inline CreateWorkloadRequest& WithLenses(const Aws::Vector<Aws::String>& value) { SetLenses(value); return *this;} inline CreateWorkloadRequest& WithLenses(Aws::Vector<Aws::String>&& value) { SetLenses(std::move(value)); return *this;} inline CreateWorkloadRequest& AddLenses(const Aws::String& value) { m_lensesHasBeenSet = true; m_lenses.push_back(value); return *this; } inline CreateWorkloadRequest& AddLenses(Aws::String&& value) { m_lensesHasBeenSet = true; m_lenses.push_back(std::move(value)); return *this; } inline CreateWorkloadRequest& AddLenses(const char* value) { m_lensesHasBeenSet = true; m_lenses.push_back(value); return *this; } inline const Aws::String& GetNotes() const{ return m_notes; } inline bool NotesHasBeenSet() const { return m_notesHasBeenSet; } inline void SetNotes(const Aws::String& value) { m_notesHasBeenSet = true; m_notes = value; } inline void SetNotes(Aws::String&& value) { m_notesHasBeenSet = true; m_notes = std::move(value); } inline void SetNotes(const char* value) { m_notesHasBeenSet = true; m_notes.assign(value); } inline CreateWorkloadRequest& WithNotes(const Aws::String& value) { SetNotes(value); return *this;} inline CreateWorkloadRequest& WithNotes(Aws::String&& value) { SetNotes(std::move(value)); return *this;} inline CreateWorkloadRequest& WithNotes(const char* value) { SetNotes(value); return *this;} inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; } inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; } inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; } inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); } inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); } inline CreateWorkloadRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;} inline CreateWorkloadRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;} inline CreateWorkloadRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;} private: Aws::String m_workloadName; bool m_workloadNameHasBeenSet; Aws::String m_description; bool m_descriptionHasBeenSet; WorkloadEnvironment m_environment; bool m_environmentHasBeenSet; Aws::Vector<Aws::String> m_accountIds; bool m_accountIdsHasBeenSet; Aws::Vector<Aws::String> m_awsRegions; bool m_awsRegionsHasBeenSet; Aws::Vector<Aws::String> m_nonAwsRegions; bool m_nonAwsRegionsHasBeenSet; Aws::Vector<Aws::String> m_pillarPriorities; bool m_pillarPrioritiesHasBeenSet; Aws::String m_architecturalDesign; bool m_architecturalDesignHasBeenSet; Aws::String m_reviewOwner; bool m_reviewOwnerHasBeenSet; Aws::String m_industryType; bool m_industryTypeHasBeenSet; Aws::String m_industry; bool m_industryHasBeenSet; Aws::Vector<Aws::String> m_lenses; bool m_lensesHasBeenSet; Aws::String m_notes; bool m_notesHasBeenSet; Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet; }; } // namespace Model } // namespace WellArchitected } // namespace Aws
jt70471/aws-sdk-cpp
aws-cpp-sdk-wellarchitected/include/aws/wellarchitected/model/CreateWorkloadRequest.h
C
apache-2.0
16,726
package com.tpb.projects.repo.fragments; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.ActivityOptionsCompat; import android.support.v4.util.Pair; import android.support.v4.widget.SwipeRefreshLayout; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; import com.tpb.github.data.APIHandler; import com.tpb.github.data.Loader; import com.tpb.github.data.models.Repository; import com.tpb.github.data.models.User; import com.tpb.mdtext.Markdown; import com.tpb.mdtext.views.MarkdownTextView; import com.tpb.projects.R; import com.tpb.projects.common.NetworkImageView; import com.tpb.projects.common.fab.FloatingActionButton; import com.tpb.projects.repo.content.ContentActivity; import com.tpb.projects.user.UserActivity; import com.tpb.projects.util.UI; import com.tpb.projects.util.Util; import java.util.List; import java.util.Locale; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import butterknife.Unbinder; /** * Created by theo on 25/03/17. */ public class RepoInfoFragment extends RepoFragment { private static final String TAG = RepoInfoFragment.class.getSimpleName(); private Unbinder unbinder; private Loader mLoader; @BindView(R.id.repo_info_refresher) SwipeRefreshLayout mRefresher; @BindView(R.id.user_avatar) NetworkImageView mAvatar; @BindView(R.id.user_name) TextView mUserName; @BindView(R.id.repo_description) MarkdownTextView mDescription; @BindView(R.id.repo_collaborators) LinearLayout mCollaborators; @BindView(R.id.repo_contributors) LinearLayout mContributors; @BindView(R.id.repo_size) TextView mSize; @BindView(R.id.repo_stars) TextView mStars; @BindView(R.id.repo_issues) TextView mIssues; @BindView(R.id.repo_forks) TextView mForks; @BindView(R.id.repo_license) TextView mLicense; public static RepoInfoFragment newInstance() { return new RepoInfoFragment(); } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.fragment_repo_info, container, false); unbinder = ButterKnife.bind(this, view); mAreViewsValid = true; mRefresher.setRefreshing(true); mLoader = Loader.getLoader(getContext()); mRefresher.setOnRefreshListener(() -> { Loader.getLoader(getContext()).loadRepository(new Loader.ItemLoader<Repository>() { @Override public void loadComplete(Repository data) { repoLoaded(data); } @Override public void loadError(APIHandler.APIError error) { mRefresher.setRefreshing(false); } }, mRepo.getFullName()); }); if(mRepo != null) repoLoaded(mRepo); return view; } @Override public void repoLoaded(Repository repo) { mRepo = repo; if(!areViewsValid()) return; mRefresher.setRefreshing(false); mAvatar.setImageUrl(repo.getUserAvatarUrl()); mUserName.setText(repo.getUserLogin()); mIssues.setText(String.valueOf(repo.getIssues())); mForks.setText(String.valueOf(repo.getForks())); mSize.setText(Util.formatKB(repo.getSize())); mStars.setText(String.valueOf(repo.getStarGazers())); if(Util.isNotNullOrEmpty(mRepo.getDescription())) { mDescription.setVisibility(View.VISIBLE); mDescription.setMarkdown(Markdown.formatMD( mRepo.getDescription(), mRepo.getFullName()) ); } else { mDescription.setVisibility(View.GONE); } if(mRepo.hasLicense()) { mLicense.setText(repo.getLicenseShortName()); } else { mLicense.setText(R.string.text_no_license); } loadRelevantUsers(); } @Override public void handleFab(FloatingActionButton fab) { fab.hide(true); } private void loadRelevantUsers() { mLoader.loadCollaborators(new Loader.ListLoader<User>() { @Override public void listLoadComplete(List<User> collaborators) { displayCollaborators(collaborators); } @Override public void listLoadError(APIHandler.APIError error) { mCollaborators.setVisibility(View.GONE); ButterKnife.findById(getActivity(), R.id.repo_collaborators_text) .setVisibility(View.GONE); } }, mRepo.getFullName()); mLoader.loadContributors(new Loader.ListLoader<User>() { @Override public void listLoadComplete(List<User> contributors) { displayContributors(contributors); } @Override public void listLoadError(APIHandler.APIError error) { mContributors.setVisibility(View.GONE); ButterKnife.findById(getActivity(), R.id.repo_contributors_text) .setVisibility(View.GONE); } }, mRepo.getFullName()); } private void displayCollaborators(List<User> collaborators) { mCollaborators.removeAllViews(); if(collaborators.size() > 1) { mCollaborators.setVisibility(View.VISIBLE); ButterKnife.findById(getActivity(), R.id.repo_collaborators_text) .setVisibility(View.VISIBLE); for(final User u : collaborators) mCollaborators.addView(getUserView(u)); } else { mCollaborators.setVisibility(View.GONE); ButterKnife.findById(getActivity(), R.id.repo_collaborators_text) .setVisibility(View.GONE); } } private void displayContributors(List<User> contributors) { if(!areViewsValid()) return; mContributors.removeAllViews(); if(contributors.size() > 1) { mContributors.setVisibility(View.VISIBLE); ButterKnife.findById(getActivity(), R.id.repo_contributors_text) .setVisibility(View.VISIBLE); for(final User u : contributors) mContributors.addView(getUserView(u)); } else { mContributors.setVisibility(View.GONE); ButterKnife.findById(getActivity(), R.id.repo_contributors_text) .setVisibility(View.GONE); } } private View getUserView(User u) { final LinearLayout layout = (LinearLayout) getActivity() .getLayoutInflater() .inflate(R.layout.shard_user, mCollaborators, false); layout.setId(View.generateViewId()); final NetworkImageView avatar = ButterKnife.findById(layout, R.id.user_avatar); avatar.setId(View.generateViewId()); avatar.setImageUrl(u.getAvatarUrl()); avatar.setScaleType(ImageView.ScaleType.FIT_XY); final TextView login = ButterKnife.findById(layout, R.id.user_login); login.setId(View.generateViewId()); if(u.getContributions() > 0) { login.setText(String.format(Locale.getDefault(), "%1$s\n%2$d", u.getLogin(), u.getContributions() )); } else { login.setText(u.getLogin()); } layout.setOnClickListener((v) -> { final Intent us = new Intent(getActivity(), UserActivity.class); us.putExtra(getString(R.string.intent_username), u.getLogin()); UI.setDrawableForIntent(avatar, us); getActivity().startActivity(us, ActivityOptionsCompat.makeSceneTransitionAnimation( getActivity(), Pair.create(login, getString(R.string.transition_username)), Pair.create(avatar, getString(R.string.transition_user_image) ) ).toBundle() ); }); return layout; } @OnClick({R.id.repo_license, R.id.repo_license_drawable, R.id.repo_license_text}) void showLicense() { if(mRepo.hasLicense()) { final ProgressDialog pd = new ProgressDialog(getContext()); pd.setTitle(R.string.title_loading_license); pd.setMessage(mRepo.getLicenseName()); pd.show(); mLoader.loadLicenseBody(new Loader.ItemLoader<String>() { @Override public void loadComplete(String data) { pd.dismiss(); new AlertDialog.Builder(getContext()) .setTitle(mRepo.getLicenseName()) .setMessage(data) .setPositiveButton(R.string.action_ok, null) .create() .show(); } @Override public void loadError(APIHandler.APIError error) { pd.dismiss(); Toast.makeText(getContext(), R.string.error_loading_license, Toast.LENGTH_SHORT) .show(); } }, mRepo.getLicenseUrl()); } } @OnClick({R.id.user_avatar, R.id.user_name}) void openUser() { if(mRepo != null) { final Intent i = new Intent(getContext(), UserActivity.class); i.putExtra(getString(R.string.intent_username), mRepo.getUserLogin()); UI.setDrawableForIntent(mAvatar, i); startActivity(i, ActivityOptionsCompat.makeSceneTransitionAnimation( getActivity(), Pair.create(mUserName, getString(R.string.transition_username)), Pair.create(mAvatar, getString(R.string.transition_user_image)) ).toBundle() ); } } @OnClick(R.id.repo_show_files) void showFiles() { if(mRepo != null) { final Intent i = new Intent(getContext(), ContentActivity.class); i.putExtra(getString(R.string.intent_repo), mRepo.getFullName()); startActivity(i); } } @Override public void notifyBackPressed() { } @Override public void onDestroyView() { super.onDestroyView(); unbinder.unbind(); } }
tpb1908/AndroidProjectsClient
app/src/main/java/com/tpb/projects/repo/fragments/RepoInfoFragment.java
Java
apache-2.0
10,823
package com.kk.taurus.avplayer.adapter; import android.content.Context; import androidx.core.view.ViewCompat; import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import android.view.ViewTreeObserver; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import com.kk.taurus.avplayer.R; import com.kk.taurus.avplayer.bean.VideoBean; import com.kk.taurus.avplayer.utils.ImageDisplayEngine; import com.kk.taurus.avplayer.utils.PUtil; import com.kk.taurus.playerbase.log.PLog; import java.util.List; import com.kk.taurus.avplayer.play.ListPlayer; public class ListAdapter extends RecyclerView.Adapter<ListAdapter.VideoItemHolder> { private final String TAG = "ListAdapter"; private Context mContext; private List<VideoBean> mItems; private RecyclerView mRecycler; private OnListListener onListListener; private int mScreenUseW; private int mScreenH; private int mPlayPosition = -1; private int mVerticalRecyclerStart; public ListAdapter(Context context, RecyclerView recyclerView, List<VideoBean> list){ this.mContext = context; this.mRecycler = recyclerView; this.mItems = list; mScreenUseW = PUtil.getScreenW(context) - PUtil.dip2px(context, 6*2); init(); } public int getPlayPosition(){ return mPlayPosition; } public void reset(){ mPlayPosition = -1; notifyDataSetChanged(); } private void init() { mScreenH = PUtil.getScreenH(mRecycler.getContext()); mRecycler.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { int[] location = new int[2]; mRecycler.getLocationOnScreen(location); mVerticalRecyclerStart = location[1]; mRecycler.getViewTreeObserver().removeOnGlobalLayoutListener(this); } }); mRecycler.addOnScrollListener(new RecyclerView.OnScrollListener() { @Override public void onScrollStateChanged(RecyclerView recyclerView, int newState) { super.onScrollStateChanged(recyclerView, newState); } @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { super.onScrolled(recyclerView, dx, dy); int itemVisibleRectHeight = getItemVisibleRectHeight(mPlayPosition); if(mPlayPosition >= 0 && itemVisibleRectHeight <= 0 && dy != 0){ PLog.d(TAG,"onScrollStateChanged stop itemVisibleRectHeight = " + itemVisibleRectHeight); ListPlayer.get().stop(); notifyItemChanged(mPlayPosition); mPlayPosition = -1; } } }); } public void setOnListListener(OnListListener onListListener) { this.onListListener = onListListener; } @Override public VideoItemHolder onCreateViewHolder(ViewGroup parent, int viewType) { return new VideoItemHolder(View.inflate(mContext, R.layout.item_video, null)); } @Override public void onBindViewHolder(final VideoItemHolder holder, final int position) { ViewCompat.setElevation(holder.card, PUtil.dip2px(mContext, 3)); updateWH(holder); final VideoBean item = getItem(position); ImageDisplayEngine.display(mContext, holder.albumImage, item.getPath(), R.mipmap.ic_launcher); holder.title.setText(item.getDisplayName()); holder.layoutContainer.removeAllViews(); holder.playIcon.setVisibility(mPlayPosition==position?View.GONE:View.VISIBLE); if(onListListener!=null){ holder.albumLayout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(mPlayPosition >= 0) notifyItemChanged(mPlayPosition); holder.playIcon.setVisibility(View.GONE); mPlayPosition = position; onListListener.playItem(holder, item, position); } }); holder.title.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { onListListener.onTitleClick(holder, item, position); } }); } } private void updateWH(ListAdapter.VideoItemHolder holder) { ViewGroup.LayoutParams layoutParams = holder.layoutBox.getLayoutParams(); layoutParams.width = mScreenUseW; layoutParams.height = mScreenUseW * 9/16; holder.layoutBox.setLayoutParams(layoutParams); } public VideoBean getItem(int position){ if(mItems==null) return null; return mItems.get(position); } @Override public int getItemCount() { if(mItems==null) return 0; return mItems.size(); } public static class VideoItemHolder extends RecyclerView.ViewHolder{ View card; public FrameLayout layoutContainer; public RelativeLayout layoutBox; View albumLayout; ImageView albumImage; ImageView playIcon; TextView title; public VideoItemHolder(View itemView) { super(itemView); card = itemView.findViewById(R.id.card); layoutContainer = itemView.findViewById(R.id.layoutContainer); layoutBox = itemView.findViewById(R.id.layBox); albumLayout = itemView.findViewById(R.id.album_layout); albumImage = itemView.findViewById(R.id.albumImage); playIcon = itemView.findViewById(R.id.playIcon); title = itemView.findViewById(R.id.tv_title); } } public VideoItemHolder getCurrentHolder(){ if(mPlayPosition < 0) return null; return getItemHolder(mPlayPosition); } /** * 获取Item中渲染视图的可见高度 * @param position * @return */ private int getItemVisibleRectHeight(int position){ VideoItemHolder itemHolder = getItemHolder(position); if(itemHolder==null) return 0; int[] location = new int[2]; itemHolder.layoutBox.getLocationOnScreen(location); int height = itemHolder.layoutBox.getHeight(); int visibleRect; if(location[1] <= mVerticalRecyclerStart){ visibleRect = location[1] - mVerticalRecyclerStart + height; }else{ if(location[1] + height >= mScreenH){ visibleRect = mScreenH - location[1]; }else{ visibleRect = height; } } return visibleRect; } private VideoItemHolder getItemHolder(int position){ RecyclerView.ViewHolder viewHolder = mRecycler.findViewHolderForAdapterPosition(position); if(viewHolder!=null && viewHolder instanceof VideoItemHolder){ return (VideoItemHolder)viewHolder; } return null; } public interface OnListListener{ void onTitleClick(VideoItemHolder holder, VideoBean item, int position); void playItem(VideoItemHolder holder, VideoBean item, int position); } }
jiajunhui/PlayerBase
app/src/main/java/com/kk/taurus/avplayer/adapter/ListAdapter.java
Java
apache-2.0
7,465
// FileRobotDlg.h : Header-Datei // #pragma once ///////////////////////////////////////////////////////////////////////////// // CFileRobotDlg Dialogfeld class CFileRobotDlg : public CDialog { // Konstruktion public: CFileRobotDlg(CWnd* pParent = NULL); // Standard-Konstructor ~CFileRobotDlg (); // Dialogfelddaten enum { IDD = IDD_FILEROBOT_DIALOG }; CString m_strURL; CString m_strFileName; CString m_strStatus; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV-Unterstützung // Implementierung protected: HICON m_hIcon; // Generierte Message-Map-Funktionen virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnButtonAddFile(); afx_msg void OnButtonRemoveFile(); afx_msg void OnButtonStart(); DECLARE_MESSAGE_MAP() private: bool GetURLFile (const CString& strURL); CInternetSession* m_pSession; CString CreateURL (const CString& strURL, const CString& strFile) const; };
gisfromscratch/windowsappsamples
Visual Studio 6/Kapitel 5/FileRobot2/FileRobotDlg.h
C
apache-2.0
1,032
package com.epai.contract.model.sys; import lombok.Getter; import lombok.Setter; import java.io.Serializable; /** * @Author jihua.li * @Date 2017/2/8 15:02 */ @Getter @Setter public class SysResources implements Serializable{ private int id; private String name; private int parentId; private String resKey; private int type; private String resUrl; private int order; private String permis; private String description; }
smart-vole/web-project-parent
web-service-contract/src/main/java/com/epai/contract/model/sys/SysResources.java
Java
apache-2.0
464
/* * Copyright 2017 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jbpm.workbench.cm.client.util; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.HashMap; import java.util.ArrayList; import org.jboss.errai.ui.client.local.spi.TranslationService; import org.jbpm.workbench.cm.model.CaseDefinitionSummary; import org.jbpm.workbench.cm.model.CaseRoleAssignmentSummary; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import static java.util.Collections.*; import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; @RunWith(MockitoJUnitRunner.class) public class CaseRolesValidationsTest { @Mock private TranslationService translationService; @InjectMocks private CaseRolesValidations caseRolesValidations; @Test public void testValidateRolesAssignments_roleCardinalityReached() { final Map<String, Integer> role = Collections.singletonMap("test", 1); final CaseDefinitionSummary cds = CaseDefinitionSummary.builder().roles(role).build(); final List<CaseRoleAssignmentSummary> roles = singletonList(CaseRoleAssignmentSummary.builder().name("test").users(singletonList("user1")).build()); final List<String> errors = caseRolesValidations.validateRolesAssignments(cds, roles); verify(translationService, never()).format(anyString(), anyString(), anyInt()); assertThat(errors).isEmpty(); } @Test public void testValidateRolesAssignments_roleCardinalityExceeded() { final String caseRole = "test"; final Integer caseRoleCardinality = 1; final Map<String, Integer> role = Collections.singletonMap(caseRole, caseRoleCardinality); final CaseDefinitionSummary cds = CaseDefinitionSummary.builder().roles(role).build(); final List<CaseRoleAssignmentSummary> roles = singletonList(CaseRoleAssignmentSummary.builder().name("test").users(singletonList("user1")).groups(singletonList("group1")).build()); final List<String> errors = caseRolesValidations.validateRolesAssignments(cds, roles); verify(translationService).format(eq("InvalidRoleAssignment"), eq(caseRole), eq(caseRoleCardinality)); assertThat(errors).hasSize(1); } @Test public void testValidateRolesAssignments_multipleRolesCardinalityExceeded() { final Map<String, Integer> roles = new HashMap<>(); final Integer roleCardinality = 1; roles.put("caseRole1", roleCardinality); roles.put("caseRole2", roleCardinality); final CaseDefinitionSummary cds = CaseDefinitionSummary.builder().roles(roles).build(); final List<CaseRoleAssignmentSummary> roleAssignments = new ArrayList<>(); roleAssignments.add(CaseRoleAssignmentSummary.builder().name("caseRole1").users(singletonList("user1")).groups(singletonList("group1")).build()); final List<String> assignedUsers = new ArrayList<>(); assignedUsers.add("user2"); assignedUsers.add("user3"); roleAssignments.add(CaseRoleAssignmentSummary.builder().name("caseRole2").users(assignedUsers).build()); final List<String> errors = caseRolesValidations.validateRolesAssignments(cds, roleAssignments); verify(translationService, times(2)).format(eq("InvalidRoleAssignment"), anyString(), eq(roleCardinality)); assertThat(errors).hasSize(2); } @Test public void testValidateRolesAssignments_roleWithInfiniteCardinality() { final String caseRole = "test"; final Integer caseRoleCardinality = -1; final Map<String, Integer> role = Collections.singletonMap(caseRole, caseRoleCardinality); final CaseDefinitionSummary cds = CaseDefinitionSummary.builder().roles(role).build(); final CaseRoleAssignmentSummary caseRoleAssignmentSummaryMock = mock(CaseRoleAssignmentSummary.class); final List<CaseRoleAssignmentSummary> roles = singletonList(caseRoleAssignmentSummaryMock); when(caseRoleAssignmentSummaryMock.getName()).thenReturn(caseRole); try{ caseRolesValidations.validateRolesAssignments(cds, roles); } catch (NullPointerException e) { Assert.fail("Case role cardinality = " + caseRoleCardinality + ", role assignments check should be skipped"); } } }
droolsjbpm/jbpm-wb
jbpm-wb-case-mgmt/jbpm-wb-case-mgmt-client/src/test/java/org/jbpm/workbench/cm/client/util/CaseRolesValidationsTest.java
Java
apache-2.0
5,823
/* * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.eclipse.ceylon.langtools.tools.javac.util; /** Utility class for static conversion methods between numbers * and strings in various formats. * * <p>Note regarding UTF-8. * The JVMS defines its own version of the UTF-8 format so that it * contains no zero bytes (modified UTF-8). This is not actually the same * as Charset.forName("UTF-8"). * * <p> * See also: * <ul> * <li><a href="https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4.7"> * JVMS 4.4.7 </a></li> * <li><a href="https://docs.oracle.com/javase/7/docs/api/java/io/DataInput.html#modified-utf-8"> java.io.DataInput: Modified UTF-8 </a></li> <li><a href="https://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8"> Modified UTF-8 (wikipedia) </a></li> * </ul> * * The methods here support modified UTF-8. * * <p><b>This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice.</b> */ public class Convert { /** Convert string to integer. */ public static int string2int(String s, int radix) throws NumberFormatException { if (radix == 10) { return Integer.parseInt(s, radix); } else { char[] cs = s.toCharArray(); int limit = Integer.MAX_VALUE / (radix/2); int n = 0; for (int i = 0; i < cs.length; i++) { int d = Character.digit(cs[i], radix); if (n < 0 || n > limit || n * radix > Integer.MAX_VALUE - d) throw new NumberFormatException(); n = n * radix + d; } return n; } } /** Convert string to long integer. */ public static long string2long(String s, int radix) throws NumberFormatException { if (radix == 10) { return Long.parseLong(s, radix); } else { char[] cs = s.toCharArray(); long limit = Long.MAX_VALUE / (radix/2); long n = 0; for (int i = 0; i < cs.length; i++) { int d = Character.digit(cs[i], radix); if (n < 0 || n > limit || n * radix > Long.MAX_VALUE - d) throw new NumberFormatException(); n = n * radix + d; } return n; } } /* Conversion routines between names, strings, and byte arrays in Utf8 format */ /** Convert `len' bytes from utf8 to characters. * Parameters are as in System.arraycopy * Return first index in `dst' past the last copied char. * @param src The array holding the bytes to convert. * @param sindex The start index from which bytes are converted. * @param dst The array holding the converted characters.. * @param dindex The start index from which converted characters * are written. * @param len The maximum number of bytes to convert. */ public static int utf2chars(byte[] src, int sindex, char[] dst, int dindex, int len) { int i = sindex; int j = dindex; int limit = sindex + len; while (i < limit) { int b = src[i++] & 0xFF; if (b >= 0xE0) { b = (b & 0x0F) << 12; b = b | (src[i++] & 0x3F) << 6; b = b | (src[i++] & 0x3F); } else if (b >= 0xC0) { b = (b & 0x1F) << 6; b = b | (src[i++] & 0x3F); } dst[j++] = (char)b; } return j; } /** Return bytes in Utf8 representation as an array of characters. * @param src The array holding the bytes. * @param sindex The start index from which bytes are converted. * @param len The maximum number of bytes to convert. */ public static char[] utf2chars(byte[] src, int sindex, int len) { char[] dst = new char[len]; int len1 = utf2chars(src, sindex, dst, 0, len); char[] result = new char[len1]; System.arraycopy(dst, 0, result, 0, len1); return result; } /** Return all bytes of a given array in Utf8 representation * as an array of characters. * @param src The array holding the bytes. */ public static char[] utf2chars(byte[] src) { return utf2chars(src, 0, src.length); } /** Return bytes in Utf8 representation as a string. * @param src The array holding the bytes. * @param sindex The start index from which bytes are converted. * @param len The maximum number of bytes to convert. */ public static String utf2string(byte[] src, int sindex, int len) { char dst[] = new char[len]; int len1 = utf2chars(src, sindex, dst, 0, len); return new String(dst, 0, len1); } /** Return all bytes of a given array in Utf8 representation * as a string. * @param src The array holding the bytes. */ public static String utf2string(byte[] src) { return utf2string(src, 0, src.length); } /** Copy characters in source array to bytes in target array, * converting them to Utf8 representation. * The target array must be large enough to hold the result. * returns first index in `dst' past the last copied byte. * @param src The array holding the characters to convert. * @param sindex The start index from which characters are converted. * @param dst The array holding the converted characters.. * @param dindex The start index from which converted bytes * are written. * @param len The maximum number of characters to convert. */ public static int chars2utf(char[] src, int sindex, byte[] dst, int dindex, int len) { int j = dindex; int limit = sindex + len; for (int i = sindex; i < limit; i++) { char ch = src[i]; if (1 <= ch && ch <= 0x7F) { dst[j++] = (byte)ch; } else if (ch <= 0x7FF) { dst[j++] = (byte)(0xC0 | (ch >> 6)); dst[j++] = (byte)(0x80 | (ch & 0x3F)); } else { dst[j++] = (byte)(0xE0 | (ch >> 12)); dst[j++] = (byte)(0x80 | ((ch >> 6) & 0x3F)); dst[j++] = (byte)(0x80 | (ch & 0x3F)); } } return j; } /** Return characters as an array of bytes in Utf8 representation. * @param src The array holding the characters. * @param sindex The start index from which characters are converted. * @param len The maximum number of characters to convert. */ public static byte[] chars2utf(char[] src, int sindex, int len) { byte[] dst = new byte[len * 3]; int len1 = chars2utf(src, sindex, dst, 0, len); byte[] result = new byte[len1]; System.arraycopy(dst, 0, result, 0, len1); return result; } /** Return all characters in given array as an array of bytes * in Utf8 representation. * @param src The array holding the characters. */ public static byte[] chars2utf(char[] src) { return chars2utf(src, 0, src.length); } /** Return string as an array of bytes in in Utf8 representation. */ public static byte[] string2utf(String s) { return chars2utf(s.toCharArray()); } /** * Escapes each character in a string that has an escape sequence or * is non-printable ASCII. Leaves non-ASCII characters alone. */ public static String quote(String s) { StringBuilder buf = new StringBuilder(); for (int i = 0; i < s.length(); i++) { buf.append(quote(s.charAt(i))); } return buf.toString(); } /** * Escapes a character if it has an escape sequence or is * non-printable ASCII. Leaves non-ASCII characters alone. */ public static String quote(char ch) { switch (ch) { case '\b': return "\\b"; case '\f': return "\\f"; case '\n': return "\\n"; case '\r': return "\\r"; case '\t': return "\\t"; case '\'': return "\\'"; case '\"': return "\\\""; case '\\': return "\\\\"; default: return (isPrintableAscii(ch)) ? String.valueOf(ch) : String.format("\\u%04x", (int) ch); } } /** * Is a character printable ASCII? */ private static boolean isPrintableAscii(char ch) { return ch >= ' ' && ch <= '~'; } /** Escape all unicode characters in string. */ public static String escapeUnicode(String s) { int len = s.length(); int i = 0; while (i < len) { char ch = s.charAt(i); if (ch > 255) { StringBuilder buf = new StringBuilder(); buf.append(s.substring(0, i)); while (i < len) { ch = s.charAt(i); if (ch > 255) { buf.append("\\u"); buf.append(Character.forDigit((ch >> 12) % 16, 16)); buf.append(Character.forDigit((ch >> 8) % 16, 16)); buf.append(Character.forDigit((ch >> 4) % 16, 16)); buf.append(Character.forDigit((ch ) % 16, 16)); } else { buf.append(ch); } i++; } s = buf.toString(); } else { i++; } } return s; } /* Conversion routines for qualified name splitting */ /** Return the last part of a class name. */ public static Name shortName(Name classname) { return classname.subName( classname.lastIndexOf((byte)'.') + 1, classname.getByteLength()); } public static String shortName(String classname) { return classname.substring(classname.lastIndexOf('.') + 1); } /** Return the package name of a class name, excluding the trailing '.', * "" if not existent. */ public static Name packagePart(Name classname) { return classname.subName(0, classname.lastIndexOf((byte)'.')); } public static String packagePart(String classname) { int lastDot = classname.lastIndexOf('.'); return (lastDot < 0 ? "" : classname.substring(0, lastDot)); } public static List<Name> enclosingCandidates(Name name) { List<Name> names = List.nil(); int index; while ((index = name.lastIndexOf((byte)'$')) > 0) { name = name.subName(0, index); names = names.prepend(name); } return names; } }
ceylon/ceylon
compiler-java/langtools/src/share/classes/org/eclipse/ceylon/langtools/tools/javac/util/Convert.java
Java
apache-2.0
12,401
import { LayoutModule } from '@angular/cdk/layout'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatListModule } from '@angular/material/list'; import { MatSidenavModule } from '@angular/material/sidenav'; import { MatToolbarModule } from '@angular/material/toolbar'; import { RouterTestingModule } from '@angular/router/testing'; import { AppComponent } from './app.component'; describe('AppComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule, NoopAnimationsModule, LayoutModule, MatButtonModule, MatIconModule, MatListModule, MatSidenavModule, MatToolbarModule, ], declarations: [ AppComponent ], }).compileComponents(); })); it('should create the app', () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; expect(app).toBeTruthy(); }); it(`should have as title 'angular-launchpod'`, () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; expect(app.title).toEqual('angular-launchpod'); }); it('should render title', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.nativeElement; expect(compiled.querySelector('.content span').textContent).toContain('angular-launchpod app is running!'); }); });
googleinterns/step18-2020
launchpod/angular-launchpod/src/app/app.component.spec.ts
TypeScript
apache-2.0
1,711
/* * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.appstream.model.transform; import java.math.*; import javax.annotation.Generated; import com.amazonaws.services.appstream.model.*; import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import com.fasterxml.jackson.core.JsonToken; import static com.fasterxml.jackson.core.JsonToken.*; /** * EntitlementAttribute JSON Unmarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EntitlementAttributeJsonUnmarshaller implements Unmarshaller<EntitlementAttribute, JsonUnmarshallerContext> { public EntitlementAttribute unmarshall(JsonUnmarshallerContext context) throws Exception { EntitlementAttribute entitlementAttribute = new EntitlementAttribute(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Name", targetDepth)) { context.nextToken(); entitlementAttribute.setName(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("Value", targetDepth)) { context.nextToken(); entitlementAttribute.setValue(context.getUnmarshaller(String.class).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return entitlementAttribute; } private static EntitlementAttributeJsonUnmarshaller instance; public static EntitlementAttributeJsonUnmarshaller getInstance() { if (instance == null) instance = new EntitlementAttributeJsonUnmarshaller(); return instance; } }
aws/aws-sdk-java
aws-java-sdk-appstream/src/main/java/com/amazonaws/services/appstream/model/transform/EntitlementAttributeJsonUnmarshaller.java
Java
apache-2.0
3,029
# Mapouria brachypoda Müll.Arg. SPECIES #### Status SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Gentianales/Rubiaceae/Psychotria/Psychotria brachypoda/ Syn. Mapouria brachypoda/README.md
Markdown
apache-2.0
187
# Radiophrya Rossolimo, 1926 GENUS #### Status ACCEPTED #### According to Interim Register of Marine and Nonmarine Genera #### Published in Arch. Protistenk. , 54, 480. #### Original name null ### Remarks null
mdoering/backbone
life/Protozoa/Ciliophora/Oligohymenophorea/Astomatida/Radiophryidae/Radiophrya/README.md
Markdown
apache-2.0
214
# Bryopsis triploramosa Kobara & Chihara SPECIES #### Status ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Chlorophyta/Bryopsidophyceae/Bryopsidales/Bryopsidaceae/Bryopsis/Bryopsis triploramosa/README.md
Markdown
apache-2.0
196
# Isachne refracta Hook.f. SPECIES #### Status SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Liliopsida/Poales/Poaceae/Panicum/Panicum hochstetteri/ Syn. Isachne refracta/README.md
Markdown
apache-2.0
181
# Rosa omeiensis f. pteracantha (Franch.) Rehder & E.H.Wilson FORM #### Status ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Rosales/Rosaceae/Rosa/Rosa omeiensis/Rosa omeiensis pteracantha/README.md
Markdown
apache-2.0
214
# Stachys sessiliflora Raf. SPECIES #### Status ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Lamiales/Lamiaceae/Stachys/Stachys sessiliflora/README.md
Markdown
apache-2.0
175
# Orthosiphon wilmsii Gürke SPECIES #### Status ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Lamiales/Lamiaceae/Orthosiphon/Orthosiphon wilmsii/README.md
Markdown
apache-2.0
176
/* * Copyright 2017 StreamSets Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.streamsets.pipeline.stage.origin.logtail; import com.streamsets.pipeline.api.ConfigDefBean; import com.streamsets.pipeline.api.ConfigGroups; import com.streamsets.pipeline.api.ExecutionMode; import com.streamsets.pipeline.api.GenerateResourceBundle; import com.streamsets.pipeline.api.RawSource; import com.streamsets.pipeline.api.Source; import com.streamsets.pipeline.api.StageDef; import com.streamsets.pipeline.config.FileRawSourcePreviewer; import com.streamsets.pipeline.configurablestage.DSource; @StageDef( version = 4, label = "File Tail", description = "Tails a file. It handles rolling files within the same directory", icon = "fileTail.png", execution = {ExecutionMode.STANDALONE, ExecutionMode.EDGE}, outputStreams = FileTailOutputStreams.class, recordsByRef = true, upgrader = FileTailSourceUpgrader.class, resetOffset = true, producesEvents = true, onlineHelpRefUrl = "index.html#Origins/FileTail.html#task_unq_wdw_yq" ) @RawSource(rawSourcePreviewer = FileRawSourcePreviewer.class) @ConfigGroups(Groups.class) @GenerateResourceBundle public class FileTailDSource extends DSource { @ConfigDefBean public FileTailConfigBean conf; @Override protected Source createSource() { return new FileTailSource(conf); } }
z123/datacollector
basic-lib/src/main/java/com/streamsets/pipeline/stage/origin/logtail/FileTailDSource.java
Java
apache-2.0
1,899
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package vista; import javax.swing.JOptionPane; import javax.swing.table.DefaultTableModel; import modelo.formularios.Interfaz_Clientes; /** * * @author Eisner López Acevedo <eisner.lopez at gmail.com> */ public class Frm_BusquedaClientes_FacturaCCC extends javax.swing.JInternalFrame { /** * Creates new form FrmBusquedaClientes * * Este formulario de busquedas es para el reporte de imprimir una factura * una cantidad de cabinas alquiladas por el mismo cliente */ public Frm_BusquedaClientes_FacturaCCC() { initComponents(); mostrar(""); } private void mostrar(String buscar) { try { DefaultTableModel modelo; Interfaz_Clientes func = new Interfaz_Clientes(); modelo = func.mostrar(buscar); tablalistado.setModel(modelo); ocultar_columnas(); lbltotalregistros.setText("Total Registros " + Integer.toString(func.totalregistros)); } catch (Exception e) { JOptionPane.showConfirmDialog(rootPane, e); } } void ocultar_columnas() { tablalistado.getColumnModel().getColumn(0).setMaxWidth(0); tablalistado.getColumnModel().getColumn(0).setMinWidth(0); tablalistado.getColumnModel().getColumn(0).setPreferredWidth(0); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel2 = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); tablalistado = new javax.swing.JTable(); jLabel9 = new javax.swing.JLabel(); txtbuscar = new javax.swing.JTextField(); btnbuscar = new javax.swing.JButton(); lbltotalregistros = new javax.swing.JLabel(); setTitle("Busqueda de Clientes"); jPanel2.setBackground(new java.awt.Color(204, 204, 204)); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Listado de Clientes")); tablalistado.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); tablalistado.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tablalistadoMouseClicked(evt); } public void mousePressed(java.awt.event.MouseEvent evt) { tablalistadoMousePressed(evt); } }); jScrollPane3.setViewportView(tablalistado); jLabel9.setText("Buscar"); txtbuscar.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtbuscarKeyTyped(evt); } }); btnbuscar.setBackground(new java.awt.Color(51, 51, 51)); btnbuscar.setForeground(new java.awt.Color(255, 255, 255)); btnbuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Files/buscar.png"))); // NOI18N btnbuscar.setText("Buscar"); btnbuscar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnbuscarActionPerformed(evt); } }); lbltotalregistros.setText("Registros"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane3) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lbltotalregistros, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel9) .addGap(18, 18, 18) .addComponent(txtbuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(83, 83, 83) .addComponent(btnbuscar) .addGap(26, 26, 26))) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addGap(20, 20, 20) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9) .addComponent(txtbuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnbuscar)) .addGap(18, 18, 18) .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE) .addGap(9, 9, 9) .addComponent(lbltotalregistros)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }// </editor-fold>//GEN-END:initComponents private void tablalistadoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablalistadoMouseClicked }//GEN-LAST:event_tablalistadoMouseClicked private void tablalistadoMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablalistadoMousePressed // TODO add your handling code here: if (evt.getClickCount() == 2) { int fila = tablalistado.getSelectedRow(); String cod; String nombre; cod = tablalistado.getValueAt(fila, 0).toString(); nombre = tablalistado.getValueAt(fila, 1).toString(); Frm_GrupoCabinasxCliente.txtnombreCliente.setText(nombre); Frm_GrupoCabinasxCliente.txtidCliente.setText(cod); this.dispose(); } }//GEN-LAST:event_tablalistadoMousePressed private void txtbuscarKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtbuscarKeyTyped // TODO add your handling code here: mostrar(txtbuscar.getText()); }//GEN-LAST:event_txtbuscarKeyTyped private void btnbuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnbuscarActionPerformed // TODO add your handling code here: mostrar(txtbuscar.getText()); }//GEN-LAST:event_btnbuscarActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btnbuscar; private javax.swing.JLabel jLabel9; private javax.swing.JPanel jPanel2; private javax.swing.JScrollPane jScrollPane3; private javax.swing.JLabel lbltotalregistros; private javax.swing.JTable tablalistado; private javax.swing.JTextField txtbuscar; // End of variables declaration//GEN-END:variables }
eisnerh/PCT_315
TropiCabinas/src/vista/Frm_BusquedaClientes_FacturaCCC.java
Java
apache-2.0
8,746
# -*- coding: utf-8 -*- # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Base abstract class for metadata builders.""" import abc _ABC = abc.ABCMeta("ABC", (object,), {"__slots__": ()}) class MetadataBuilder(_ABC): """Abstract base class for metadata builders.""" @abc.abstractmethod def get_metadata(self): """Returns the current metadata as a dictionary.""" @abc.abstractmethod def get_metadata_protobuf(self): """Returns the current metadata as ExplanationMetadata protobuf"""
googleapis/python-aiplatform
google/cloud/aiplatform/explain/metadata/metadata_builder.py
Python
apache-2.0
1,054
package com.gotcreations.emojilibrary.model; import android.util.SparseIntArray; import com.gotcreations.emojilibrary.R; /** * Created by Leonardo Assunção on 18/02/2016. */ public class Nature { public static final Emoji[] DATA = new Emoji[]{ Emoji.fromCodePoint(0x1f436), Emoji.fromCodePoint(0x1f43a), Emoji.fromCodePoint(0x1f431), Emoji.fromCodePoint(0x1f42d), Emoji.fromCodePoint(0x1f439), Emoji.fromCodePoint(0x1f430), Emoji.fromCodePoint(0x1f438), Emoji.fromCodePoint(0x1f42f), Emoji.fromCodePoint(0x1f428), Emoji.fromCodePoint(0x1f43b), Emoji.fromCodePoint(0x1f437), Emoji.fromCodePoint(0x1f43d), Emoji.fromCodePoint(0x1f42e), Emoji.fromCodePoint(0x1f417), Emoji.fromCodePoint(0x1f435), Emoji.fromCodePoint(0x1f412), Emoji.fromCodePoint(0x1f434), Emoji.fromCodePoint(0x1f411), Emoji.fromCodePoint(0x1f418), Emoji.fromCodePoint(0x1f43c), Emoji.fromCodePoint(0x1f427), Emoji.fromCodePoint(0x1f426), Emoji.fromCodePoint(0x1f424), Emoji.fromCodePoint(0x1f425), Emoji.fromCodePoint(0x1f423), Emoji.fromCodePoint(0x1f414), Emoji.fromCodePoint(0x1f40d), Emoji.fromCodePoint(0x1f422), Emoji.fromCodePoint(0x1f41b), Emoji.fromCodePoint(0x1f41d), Emoji.fromCodePoint(0x1f41c), Emoji.fromCodePoint(0x1f41e), Emoji.fromCodePoint(0x1f40c), Emoji.fromCodePoint(0x1f419), Emoji.fromCodePoint(0x1f41a), Emoji.fromCodePoint(0x1f420), Emoji.fromCodePoint(0x1f41f), Emoji.fromCodePoint(0x1f42c), Emoji.fromCodePoint(0x1f433), Emoji.fromCodePoint(0x1f40b), Emoji.fromCodePoint(0x1f404), Emoji.fromCodePoint(0x1f40f), Emoji.fromCodePoint(0x1f400), Emoji.fromCodePoint(0x1f403), Emoji.fromCodePoint(0x1f405), Emoji.fromCodePoint(0x1f407), Emoji.fromCodePoint(0x1f409), Emoji.fromCodePoint(0x1f40e), Emoji.fromCodePoint(0x1f410), Emoji.fromCodePoint(0x1f413), Emoji.fromCodePoint(0x1f415), Emoji.fromCodePoint(0x1f416), Emoji.fromCodePoint(0x1f401), Emoji.fromCodePoint(0x1f402), Emoji.fromCodePoint(0x1f432), Emoji.fromCodePoint(0x1f421), Emoji.fromCodePoint(0x1f40a), Emoji.fromCodePoint(0x1f42b), Emoji.fromCodePoint(0x1f42a), Emoji.fromCodePoint(0x1f406), Emoji.fromCodePoint(0x1f408), Emoji.fromCodePoint(0x1f429), Emoji.fromCodePoint(0x1f43e), Emoji.fromCodePoint(0x1f490), Emoji.fromCodePoint(0x1f338), Emoji.fromCodePoint(0x1f337), Emoji.fromCodePoint(0x1f340), Emoji.fromCodePoint(0x1f339), Emoji.fromCodePoint(0x1f33b), Emoji.fromCodePoint(0x1f33a), Emoji.fromCodePoint(0x1f341), Emoji.fromCodePoint(0x1f343), Emoji.fromCodePoint(0x1f342), Emoji.fromCodePoint(0x1f33f), Emoji.fromCodePoint(0x1f33e), Emoji.fromCodePoint(0x1f344), Emoji.fromCodePoint(0x1f335), Emoji.fromCodePoint(0x1f334), Emoji.fromCodePoint(0x1f332), Emoji.fromCodePoint(0x1f333), Emoji.fromCodePoint(0x1f330), Emoji.fromCodePoint(0x1f331), Emoji.fromCodePoint(0x1f33c), Emoji.fromCodePoint(0x1f310), Emoji.fromCodePoint(0x1f31e), Emoji.fromCodePoint(0x1f31d), Emoji.fromCodePoint(0x1f31a), Emoji.fromCodePoint(0x1f311), Emoji.fromCodePoint(0x1f312), Emoji.fromCodePoint(0x1f313), Emoji.fromCodePoint(0x1f314), Emoji.fromCodePoint(0x1f315), Emoji.fromCodePoint(0x1f316), Emoji.fromCodePoint(0x1f317), Emoji.fromCodePoint(0x1f318), Emoji.fromCodePoint(0x1f31c), Emoji.fromCodePoint(0x1f31b), Emoji.fromCodePoint(0x1f319), Emoji.fromCodePoint(0x1f30d), Emoji.fromCodePoint(0x1f30e), Emoji.fromCodePoint(0x1f30f), Emoji.fromCodePoint(0x1f30b), Emoji.fromCodePoint(0x1f30c), Emoji.fromCodePoint(0x1f320), Emoji.fromChar((char) 0x2b50), Emoji.fromChar((char) 0x2600), Emoji.fromChar((char) 0x26c5), Emoji.fromChar((char) 0x2601), Emoji.fromChar((char) 0x26a1), Emoji.fromChar((char) 0x2614), Emoji.fromChar((char) 0x2744), Emoji.fromChar((char) 0x26c4), Emoji.fromCodePoint(0x1f300), Emoji.fromCodePoint(0x1f301), Emoji.fromCodePoint(0x1f308), Emoji.fromCodePoint(0x1f30a), }; public static void bindEmojis(SparseIntArray map) { map.put(0x1f436, R.drawable.emoji_1f436); map.put(0x1f43a, R.drawable.emoji_1f43a); map.put(0x1f431, R.drawable.emoji_1f431); map.put(0x1f42d, R.drawable.emoji_1f42d); map.put(0x1f439, R.drawable.emoji_1f439); map.put(0x1f430, R.drawable.emoji_1f430); map.put(0x1f438, R.drawable.emoji_1f438); map.put(0x1f42f, R.drawable.emoji_1f42f); map.put(0x1f428, R.drawable.emoji_1f428); map.put(0x1f43b, R.drawable.emoji_1f43b); map.put(0x1f437, R.drawable.emoji_1f437); map.put(0x1f43d, R.drawable.emoji_1f43d); map.put(0x1f42e, R.drawable.emoji_1f42e); map.put(0x1f417, R.drawable.emoji_1f417); map.put(0x1f435, R.drawable.emoji_1f435); map.put(0x1f412, R.drawable.emoji_1f412); map.put(0x1f434, R.drawable.emoji_1f434); map.put(0x1f411, R.drawable.emoji_1f411); map.put(0x1f418, R.drawable.emoji_1f418); map.put(0x1f43c, R.drawable.emoji_1f43c); map.put(0x1f427, R.drawable.emoji_1f427); map.put(0x1f426, R.drawable.emoji_1f426); map.put(0x1f424, R.drawable.emoji_1f424); map.put(0x1f425, R.drawable.emoji_1f425); map.put(0x1f423, R.drawable.emoji_1f423); map.put(0x1f414, R.drawable.emoji_1f414); map.put(0x1f40d, R.drawable.emoji_1f40d); map.put(0x1f422, R.drawable.emoji_1f422); map.put(0x1f41b, R.drawable.emoji_1f41b); map.put(0x1f41d, R.drawable.emoji_1f41d); map.put(0x1f41c, R.drawable.emoji_1f41c); map.put(0x1f41e, R.drawable.emoji_1f41e); map.put(0x1f40c, R.drawable.emoji_1f40c); map.put(0x1f419, R.drawable.emoji_1f419); map.put(0x1f41a, R.drawable.emoji_1f41a); map.put(0x1f420, R.drawable.emoji_1f420); map.put(0x1f41f, R.drawable.emoji_1f41f); map.put(0x1f42c, R.drawable.emoji_1f42c); map.put(0x1f433, R.drawable.emoji_1f433); map.put(0x1f40b, R.drawable.emoji_1f40b); map.put(0x1f404, R.drawable.emoji_1f404); map.put(0x1f40f, R.drawable.emoji_1f40f); map.put(0x1f400, R.drawable.emoji_1f400); map.put(0x1f403, R.drawable.emoji_1f403); map.put(0x1f405, R.drawable.emoji_1f405); map.put(0x1f407, R.drawable.emoji_1f407); map.put(0x1f409, R.drawable.emoji_1f409); map.put(0x1f40e, R.drawable.emoji_1f40e); map.put(0x1f410, R.drawable.emoji_1f410); map.put(0x1f413, R.drawable.emoji_1f413); map.put(0x1f415, R.drawable.emoji_1f415); map.put(0x1f416, R.drawable.emoji_1f416); map.put(0x1f401, R.drawable.emoji_1f401); map.put(0x1f402, R.drawable.emoji_1f402); map.put(0x1f432, R.drawable.emoji_1f432); map.put(0x1f421, R.drawable.emoji_1f421); map.put(0x1f40a, R.drawable.emoji_1f40a); map.put(0x1f42b, R.drawable.emoji_1f42b); map.put(0x1f42a, R.drawable.emoji_1f42a); map.put(0x1f406, R.drawable.emoji_1f406); map.put(0x1f408, R.drawable.emoji_1f408); map.put(0x1f429, R.drawable.emoji_1f429); map.put(0x1f43e, R.drawable.emoji_1f43e); map.put(0x1f490, R.drawable.emoji_1f490); map.put(0x1f338, R.drawable.emoji_1f338); map.put(0x1f337, R.drawable.emoji_1f337); map.put(0x1f340, R.drawable.emoji_1f340); map.put(0x1f339, R.drawable.emoji_1f339); map.put(0x1f33b, R.drawable.emoji_1f33b); map.put(0x1f33a, R.drawable.emoji_1f33a); map.put(0x1f341, R.drawable.emoji_1f341); map.put(0x1f343, R.drawable.emoji_1f343); map.put(0x1f342, R.drawable.emoji_1f342); map.put(0x1f33f, R.drawable.emoji_1f33f); map.put(0x1f33e, R.drawable.emoji_1f33e); map.put(0x1f344, R.drawable.emoji_1f344); map.put(0x1f335, R.drawable.emoji_1f335); map.put(0x1f334, R.drawable.emoji_1f334); map.put(0x1f332, R.drawable.emoji_1f332); map.put(0x1f333, R.drawable.emoji_1f333); map.put(0x1f330, R.drawable.emoji_1f330); map.put(0x1f331, R.drawable.emoji_1f331); map.put(0x1f33c, R.drawable.emoji_1f33c); map.put(0x1f310, R.drawable.emoji_1f310); map.put(0x1f31e, R.drawable.emoji_1f31e); map.put(0x1f31d, R.drawable.emoji_1f31d); map.put(0x1f31a, R.drawable.emoji_1f31a); map.put(0x1f311, R.drawable.emoji_1f311); map.put(0x1f312, R.drawable.emoji_1f312); map.put(0x1f313, R.drawable.emoji_1f313); map.put(0x1f314, R.drawable.emoji_1f314); map.put(0x1f315, R.drawable.emoji_1f315); map.put(0x1f316, R.drawable.emoji_1f316); map.put(0x1f317, R.drawable.emoji_1f317); map.put(0x1f318, R.drawable.emoji_1f318); map.put(0x1f31c, R.drawable.emoji_1f31c); map.put(0x1f31b, R.drawable.emoji_1f31b); map.put(0x1f319, R.drawable.emoji_1f319); map.put(0x1f30d, R.drawable.emoji_1f30d); map.put(0x1f30e, R.drawable.emoji_1f30e); map.put(0x1f30f, R.drawable.emoji_1f30f); map.put(0x1f30b, R.drawable.emoji_1f30b); map.put(0x1f30c, R.drawable.emoji_1f30c); map.put(0x1f320, R.drawable.emoji_1f303); map.put(0x2b50, R.drawable.emoji_2b50); map.put(0x2600, R.drawable.emoji_2600); map.put(0x26c5, R.drawable.emoji_26c5); map.put(0x2601, R.drawable.emoji_2601); map.put(0x26a1, R.drawable.emoji_26a1); map.put(0x2614, R.drawable.emoji_2614); map.put(0x2744, R.drawable.emoji_2744); map.put(0x26c4, R.drawable.emoji_26c4); map.put(0x1f300, R.drawable.emoji_1f300); map.put(0x1f301, R.drawable.emoji_1f301); map.put(0x1f308, R.drawable.emoji_1f308); map.put(0x1f30a, R.drawable.emoji_1f30a); map.put(0x26c8, R.drawable.emoji_26c8); map.put(0x1f324, R.drawable.emoji_1f324); map.put(0x1f325, R.drawable.emoji_1f325); map.put(0x1f326, R.drawable.emoji_1f326); map.put(0x1f327, R.drawable.emoji_1f327); map.put(0x1f328, R.drawable.emoji_1f328); map.put(0x1f329, R.drawable.emoji_1f329); map.put(0x1f32a, R.drawable.emoji_1f32a); map.put(0x1f32b, R.drawable.emoji_1f32b); map.put(0x1f32c, R.drawable.emoji_1f32c); map.put(0x2602, R.drawable.emoji_2602); map.put(0x26f1, R.drawable.emoji_26f1); map.put(0x1f981, R.drawable.emoji_1f981); map.put(0x1f984, R.drawable.emoji_1f984); map.put(0x1f43f, R.drawable.emoji_1f43f); map.put(0x1f983, R.drawable.emoji_1f983); map.put(0x1f54a, R.drawable.emoji_1f54a); map.put(0x1f980, R.drawable.emoji_1f980); map.put(0x1f577, R.drawable.emoji_1f577); map.put(0x1f578, R.drawable.emoji_1f578); map.put(0x1f982, R.drawable.emoji_1f982); map.put(0x1f3f5, R.drawable.emoji_1f3f5); map.put(0x2618, R.drawable.emoji_2618); } public static void bindSoftBankEmojis(SparseIntArray map) { map.put(0xe030, R.drawable.emoji_1f338); map.put(0xe031, R.drawable.emoji_1f531); map.put(0xe032, R.drawable.emoji_1f339); map.put(0xe033, R.drawable.emoji_1f384); map.put(0xe019, R.drawable.emoji_1f3a3); map.put(0xe01a, R.drawable.emoji_1f434); map.put(0xe048, R.drawable.emoji_26c4); map.put(0xe049, R.drawable.emoji_2601); map.put(0xe04a, R.drawable.emoji_2600); map.put(0xe04b, R.drawable.emoji_2614); map.put(0xe04c, R.drawable.emoji_1f313); map.put(0xe04d, R.drawable.emoji_1f304); map.put(0xe04f, R.drawable.emoji_1f431); map.put(0xe050, R.drawable.emoji_1f42f); map.put(0xe051, R.drawable.emoji_1f43b); map.put(0xe052, R.drawable.emoji_1f429); map.put(0xe053, R.drawable.emoji_1f42d); map.put(0xe054, R.drawable.emoji_1f433); map.put(0xe055, R.drawable.emoji_1f427); map.put(0xe10a, R.drawable.emoji_1f419); map.put(0xe10b, R.drawable.emoji_1f437); map.put(0xe10c, R.drawable.emoji_1f47d); map.put(0xe110, R.drawable.emoji_1f331); map.put(0xe111, R.drawable.emoji_1f48f); map.put(0xe117, R.drawable.emoji_1f386); map.put(0xe118, R.drawable.emoji_1f341); map.put(0xe119, R.drawable.emoji_1f342); map.put(0xe304, R.drawable.emoji_1f337); map.put(0xe305, R.drawable.emoji_1f33b); map.put(0xe306, R.drawable.emoji_1f490); map.put(0xe307, R.drawable.emoji_1f334); map.put(0xe308, R.drawable.emoji_1f335); map.put(0xe520, R.drawable.emoji_1f42c); map.put(0xe521, R.drawable.emoji_1f426); map.put(0xe522, R.drawable.emoji_1f420); map.put(0xe523, R.drawable.emoji_1f423); map.put(0xe524, R.drawable.emoji_1f439); map.put(0xe525, R.drawable.emoji_1f41b); map.put(0xe526, R.drawable.emoji_1f418); map.put(0xe527, R.drawable.emoji_1f428); map.put(0xe528, R.drawable.emoji_1f412); map.put(0xe529, R.drawable.emoji_1f411); map.put(0xe52a, R.drawable.emoji_1f43a); map.put(0xe52b, R.drawable.emoji_1f42e); map.put(0xe52c, R.drawable.emoji_1f430); map.put(0xe52d, R.drawable.emoji_1f40d); map.put(0xe52e, R.drawable.emoji_1f414); map.put(0xe52f, R.drawable.emoji_1f417); map.put(0xe530, R.drawable.emoji_1f42b); map.put(0xe531, R.drawable.emoji_1f438); map.put(0xe440, R.drawable.emoji_1f387); map.put(0xe441, R.drawable.emoji_1f41a); map.put(0xe442, R.drawable.emoji_1f390); map.put(0xe443, R.drawable.emoji_1f300); map.put(0xe444, R.drawable.emoji_1f33e); map.put(0xe445, R.drawable.emoji_1f383); map.put(0xe446, R.drawable.emoji_1f391); map.put(0xe447, R.drawable.emoji_1f343); } }
ander7agar/emoji-keyboard
emoji-library/src/main/java/com/gotcreations/emojilibrary/model/Nature.java
Java
apache-2.0
15,044
global.stub_out_jquery(); add_dependencies({ people: 'js/people.js', stream_data: 'js/stream_data.js', util: 'js/util.js', }); set_global('page_params', {}); set_global('feature_flags', {}); var Filter = require('js/filter.js'); var _ = global._; var me = { email: 'me@example.com', user_id: 30, full_name: 'Me Myself', }; var joe = { email: 'joe@example.com', user_id: 31, full_name: 'joe', }; var steve = { email: 'STEVE@foo.com', user_id: 32, full_name: 'steve', }; people.add(me); people.add(joe); people.add(steve); people.initialize_current_user(me.user_id); function assert_same_operators(result, terms) { terms = _.map(terms, function (term) { // If negated flag is undefined, we explicitly // set it to false. var negated = term.negated; if (!negated) { negated = false; } return { negated: negated, operator: term.operator, operand: term.operand, }; }); assert.deepEqual(result, terms); } (function test_basics() { var operators = [ {operator: 'stream', operand: 'foo'}, {operator: 'stream', operand: 'exclude_stream', negated: true}, {operator: 'topic', operand: 'bar'}, ]; var filter = new Filter(operators); assert_same_operators(filter.operators(), operators); assert.deepEqual(filter.operands('stream'), ['foo']); assert(filter.has_operator('stream')); assert(!filter.has_operator('search')); assert(filter.has_operand('stream', 'foo')); assert(!filter.has_operand('stream', 'exclude_stream')); assert(!filter.has_operand('stream', 'nada')); assert(!filter.is_search()); assert(filter.can_apply_locally()); operators = [ {operator: 'stream', operand: 'foo'}, {operator: 'topic', operand: 'bar'}, {operator: 'search', operand: 'pizza'}, ]; filter = new Filter(operators); assert(filter.is_search()); assert(! filter.can_apply_locally()); // If our only stream operator is negated, then for all intents and purposes, // we don't consider ourselves to have a stream operator, because we don't // want to have the stream in the tab bar or unsubscribe messaging, etc. operators = [ {operator: 'stream', operand: 'exclude', negated: true}, ]; filter = new Filter(operators); assert(!filter.has_operator('stream')); // Negated searches are just like positive searches for our purposes, since // the search logic happens on the back end and we need to have can_apply_locally() // be false, and we want "Search results" in the tab bar. operators = [ {operator: 'search', operand: 'stop_word', negated: true}, ]; filter = new Filter(operators); assert(filter.has_operator('search')); assert(!filter.can_apply_locally()); // Similar logic applies to negated "has" searches. operators = [ {operator: 'has', operand: 'images', negated: true}, ]; filter = new Filter(operators); assert(filter.has_operator('has')); assert(!filter.can_apply_locally()); }()); (function test_topic_stuff() { var operators = [ {operator: 'stream', operand: 'foo'}, {operator: 'topic', operand: 'old topic'}, ]; var filter = new Filter(operators); assert(filter.has_topic('foo', 'old topic')); assert(!filter.has_topic('wrong', 'old topic')); assert(!filter.has_topic('foo', 'wrong')); var new_filter = filter.filter_with_new_topic('new topic'); assert.deepEqual(new_filter.operands('stream'), ['foo']); assert.deepEqual(new_filter.operands('topic'), ['new topic']); }()); (function test_new_style_operators() { var term = { operator: 'stream', operand: 'foo', }; var operators = [term]; var filter = new Filter(operators); assert.deepEqual(filter.operands('stream'), ['foo']); }()); (function test_public_operators() { var operators = [ {operator: 'stream', operand: 'foo'}, {operator: 'in', operand: 'all'}, {operator: 'topic', operand: 'bar'}, ]; var filter = new Filter(operators); assert_same_operators(filter.public_operators(), operators); global.page_params.narrow_stream = 'default'; operators = [ {operator: 'stream', operand: 'default'}, ]; filter = new Filter(operators); assert_same_operators(filter.public_operators(), []); }()); (function test_canonicalizations() { assert.equal(Filter.canonicalize_operator('Is'), 'is'); assert.equal(Filter.canonicalize_operator('Stream'), 'stream'); assert.equal(Filter.canonicalize_operator('Subject'), 'topic'); var term; term = Filter.canonicalize_term({operator: 'Stream', operand: 'Denmark'}); assert.equal(term.operator, 'stream'); assert.equal(term.operand, 'Denmark'); term = Filter.canonicalize_term({operator: 'sender', operand: 'me'}); assert.equal(term.operator, 'sender'); assert.equal(term.operand, 'me@example.com'); term = Filter.canonicalize_term({operator: 'pm-with', operand: 'me'}); assert.equal(term.operator, 'pm-with'); assert.equal(term.operand, 'me@example.com'); term = Filter.canonicalize_term({operator: 'search', operand: 'foo'}); assert.equal(term.operator, 'search'); assert.equal(term.operand, 'foo'); term = Filter.canonicalize_term({operator: 'search', operand: 'fOO'}); assert.equal(term.operator, 'search'); assert.equal(term.operand, 'foo'); term = Filter.canonicalize_term({operator: 'search', operand: 123}); assert.equal(term.operator, 'search'); assert.equal(term.operand, '123'); term = Filter.canonicalize_term({operator: 'search', operand: 'abc “xyz”'}); assert.equal(term.operator, 'search'); assert.equal(term.operand, 'abc "xyz"'); term = Filter.canonicalize_term({operator: 'has', operand: 'attachments'}); assert.equal(term.operator, 'has'); assert.equal(term.operand, 'attachment'); term = Filter.canonicalize_term({operator: 'has', operand: 'images'}); assert.equal(term.operator, 'has'); assert.equal(term.operand, 'image'); term = Filter.canonicalize_term({operator: 'has', operand: 'links'}); assert.equal(term.operator, 'has'); assert.equal(term.operand, 'link'); }()); function get_predicate(operators) { operators = _.map(operators, function (op) { return {operator: op[0], operand: op[1]}; }); return new Filter(operators).predicate(); } (function test_predicate_basics() { // Predicates are functions that accept a message object with the message // attributes (not content), and return true if the message belongs in a // given narrow. If the narrow parameters include a search, the predicate // passes through all messages. // // To keep these tests simple, we only pass objects with a few relevant attributes // rather than full-fledged message objects. var predicate = get_predicate([['stream', 'Foo'], ['topic', 'Bar']]); assert(predicate({type: 'stream', stream: 'foo', subject: 'bar'})); assert(!predicate({type: 'stream', stream: 'foo', subject: 'whatever'})); assert(!predicate({type: 'stream', stream: 'wrong'})); assert(!predicate({type: 'private'})); predicate = get_predicate([['search', 'emoji']]); assert(predicate({})); predicate = get_predicate([['topic', 'Bar']]); assert(!predicate({type: 'private'})); predicate = get_predicate([['is', 'private']]); assert(predicate({type: 'private'})); assert(!predicate({type: 'stream'})); predicate = get_predicate([['is', 'starred']]); assert(predicate({starred: true})); assert(!predicate({starred: false})); predicate = get_predicate([['is', 'alerted']]); assert(predicate({alerted: true})); assert(!predicate({alerted: false})); assert(!predicate({})); predicate = get_predicate([['is', 'mentioned']]); assert(predicate({mentioned: true})); assert(!predicate({mentioned: false})); predicate = get_predicate([['in', 'all']]); assert(predicate({})); predicate = get_predicate([['in', 'home']]); assert(!predicate({stream: 'unsub'})); assert(predicate({type: 'private'})); global.page_params.narrow_stream = 'kiosk'; assert(predicate({stream: 'kiosk'})); predicate = get_predicate([['near', 5]]); assert(predicate({})); predicate = get_predicate([['id', 5]]); assert(predicate({id: 5})); assert(!predicate({id: 6})); predicate = get_predicate([['id', 5], ['topic', 'lunch']]); assert(predicate({type: 'stream', id: 5, subject: 'lunch'})); assert(!predicate({type: 'stream', id: 5, subject: 'dinner'})); predicate = get_predicate([['sender', 'Joe@example.com']]); assert(predicate({sender_id: joe.user_id})); assert(!predicate({sender_email: steve.user_id})); predicate = get_predicate([['pm-with', 'Joe@example.com']]); assert(predicate({ type: 'private', display_recipient: [{id: joe.user_id}], })); assert(!predicate({ type: 'private', display_recipient: [{user_id: steve.user_id}], })); assert(!predicate({ type: 'private', display_recipient: [{user_id: 999999}], })); assert(!predicate({type: 'stream'})); predicate = get_predicate([['pm-with', 'nobody@example.com']]); assert(!predicate({ type: 'private', display_recipient: [{id: joe.user_id}], })); }()); (function test_negated_predicates() { var predicate; var narrow; narrow = [ {operator: 'stream', operand: 'social', negated: true}, ]; predicate = new Filter(narrow).predicate(); assert(predicate({type: 'stream', stream: 'devel'})); assert(!predicate({type: 'stream', stream: 'social'})); }()); (function test_mit_exceptions() { global.page_params.is_zephyr_mirror_realm = true; var predicate = get_predicate([['stream', 'Foo'], ['topic', 'personal']]); assert(predicate({type: 'stream', stream: 'foo', subject: 'personal'})); assert(predicate({type: 'stream', stream: 'foo.d', subject: 'personal'})); assert(predicate({type: 'stream', stream: 'foo.d', subject: ''})); assert(!predicate({type: 'stream', stream: 'wrong'})); assert(!predicate({type: 'stream', stream: 'foo', subject: 'whatever'})); assert(!predicate({type: 'private'})); predicate = get_predicate([['stream', 'Foo'], ['topic', 'bar']]); assert(predicate({type: 'stream', stream: 'foo', subject: 'bar.d'})); // Try to get the MIT regex to explode for an empty stream. var terms = [ {operator: 'stream', operand: ''}, {operator: 'topic', operand: 'bar'}, ]; predicate = new Filter(terms).predicate(); assert(!predicate({type: 'stream', stream: 'foo', subject: 'bar'})); // Try to get the MIT regex to explode for an empty topic. terms = [ {operator: 'stream', operand: 'foo'}, {operator: 'topic', operand: ''}, ]; predicate = new Filter(terms).predicate(); assert(!predicate({type: 'stream', stream: 'foo', subject: 'bar'})); }()); (function test_predicate_edge_cases() { var predicate; // The code supports undefined as an operator to Filter, which results // in a predicate that accepts any message. predicate = new Filter().predicate(); assert(predicate({})); // Upstream code should prevent Filter.predicate from being called with // invalid operator/operand combinations, but right now we just silently // return a function that accepts all messages. predicate = get_predicate([['in', 'bogus']]); assert(predicate({})); predicate = get_predicate([['bogus', 33]]); assert(predicate({})); predicate = get_predicate([['is', 'bogus']]); assert(predicate({})); // Exercise caching feature. var terms = [ {operator: 'stream', operand: 'Foo'}, {operator: 'topic', operand: 'bar'}, ]; var filter = new Filter(terms); predicate = filter.predicate(); predicate = filter.predicate(); // get cached version assert(predicate({type: 'stream', stream: 'foo', subject: 'bar'})); }()); (function test_parse() { var string; var operators; function _test() { var result = Filter.parse(string); assert_same_operators(result, operators); } string = 'stream:Foo topic:Bar yo'; operators = [ {operator: 'stream', operand: 'Foo'}, {operator: 'topic', operand: 'Bar'}, {operator: 'search', operand: 'yo'}, ]; _test(); string = 'pm-with:leo+test@zulip.com'; operators = [ {operator: 'pm-with', operand: 'leo+test@zulip.com'}, ]; _test(); string = 'sender:leo+test@zulip.com'; operators = [ {operator: 'sender', operand: 'leo+test@zulip.com'}, ]; _test(); string = 'stream:With+Space'; operators = [ {operator: 'stream', operand: 'With Space'}, ]; _test(); string = 'https://www.google.com'; operators = [ {operator: 'search', operand: 'https://www.google.com'}, ]; _test(); string = 'stream:foo -stream:exclude'; operators = [ {operator: 'stream', operand: 'foo'}, {operator: 'stream', operand: 'exclude', negated: true}, ]; _test(); string = 'text stream:foo more text'; operators = [ {operator: 'stream', operand: 'foo'}, {operator: 'search', operand: 'text more text'}, ]; _test(); string = 'stream:foo :emoji: are cool'; operators = [ {operator: 'stream', operand: 'foo'}, {operator: 'search', operand: ':emoji: are cool'}, ]; _test(); string = ':stream: stream:foo :emoji: are cool'; operators = [ {operator: 'stream', operand: 'foo'}, {operator: 'search', operand: ':stream: :emoji: are cool'}, ]; _test(); string = ':stream: stream:foo -:emoji: are cool'; operators = [ {operator: 'stream', operand: 'foo'}, {operator: 'search', operand: ':stream: -:emoji: are cool'}, ]; _test(); }()); (function test_unparse() { var string; var operators; operators = [ {operator: 'stream', operand: 'Foo'}, {operator: 'topic', operand: 'Bar', negated: true}, {operator: 'search', operand: 'yo'}, ]; string = 'stream:Foo -topic:Bar yo'; assert.deepEqual(Filter.unparse(operators), string); operators = [ {operator: 'id', operand: 50}, ]; string = 'id:50'; assert.deepEqual(Filter.unparse(operators), string); operators = [ {operator: 'near', operand: 150}, ]; string = 'near:150'; assert.deepEqual(Filter.unparse(operators), string); }()); (function test_describe() { var narrow; var string; narrow = [ {operator: 'stream', operand: 'devel'}, {operator: 'is', operand: 'starred'}, ]; string = 'Narrow to stream devel, Narrow to starred messages'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'stream', operand: 'devel'}, {operator: 'topic', operand: 'JS'}, ]; string = 'Narrow to devel > JS'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'is', operand: 'private'}, {operator: 'search', operand: 'lunch'}, ]; string = 'Narrow to all private messages, Search for lunch'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'id', operand: 99}, ]; string = 'Narrow to message ID 99'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'in', operand: 'home'}, ]; string = 'Narrow to messages in home'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'is', operand: 'mentioned'}, ]; string = 'Narrow to mentioned messages'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'is', operand: 'alerted'}, ]; string = 'Narrow to alerted messages'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'is', operand: 'something_we_do_not_support'}, ]; string = 'Narrow to (unknown operator)'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'bogus', operand: 'foo'}, ]; string = 'Narrow to (unknown operator)'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'stream', operand: 'devel'}, {operator: 'topic', operand: 'JS', negated: true}, ]; string = 'Narrow to stream devel, Exclude topic JS'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'is', operand: 'private'}, {operator: 'search', operand: 'lunch', negated: true}, ]; string = 'Narrow to all private messages, Exclude lunch'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'stream', operand: 'devel'}, {operator: 'is', operand: 'starred', negated: true}, ]; string = 'Narrow to stream devel, Exclude starred messages'; assert.equal(Filter.describe(narrow), string); narrow = [ {operator: 'stream', operand: 'devel'}, {operator: 'has', operand: 'image', negated: true}, ]; string = 'Narrow to stream devel, Exclude messages with one or more image'; assert.equal(Filter.describe(narrow), string); }()); (function test_update_email() { var terms = [ {operator: 'pm-with', operand: 'steve@foo.com'}, {operator: 'sender', operand: 'steve@foo.com'}, {operator: 'stream', operand: 'steve@foo.com'}, // try to be tricky ]; var filter = new Filter(terms); filter.update_email(steve.user_id, 'showell@foo.com'); assert.deepEqual(filter.operands('pm-with'), ['showell@foo.com']); assert.deepEqual(filter.operands('sender'), ['showell@foo.com']); assert.deepEqual(filter.operands('stream'), ['steve@foo.com']); }()); (function test_error_cases() { // This test just gives us 100% line coverage on defensive code that // should not be reached unless we break other code. people.pm_with_user_ids = function () {}; var predicate = get_predicate([['pm-with', 'Joe@example.com']]); assert(!predicate({type: 'private'})); }());
SmartPeople/zulip
frontend_tests/node_tests/filter.js
JavaScript
apache-2.0
18,450
package org.ovirt.engine.core.vdsbroker.vdsbroker; import org.ovirt.engine.core.common.errors.EngineError; import org.ovirt.engine.core.common.errors.VDSError; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core.vdsbroker.ResourceManager; public class CancelMigrateVDSCommand<P extends CancelMigrationVDSParameters> extends VdsBrokerCommand<P> { public CancelMigrateVDSCommand(P parameters) { super(parameters); } @Override protected void executeVdsBrokerCommand() { Guid vmId = getParameters().getVmId(); status = getBroker().migrateCancel(vmId.toString()); proceedProxyReturnValue(); if (!getParameters().isRerunAfterCancel()) { ResourceManager.getInstance().removeAsyncRunningVm(vmId); } } /** * overrode to improve error handling when cancel migration failed because the VM doesn't exist on the target host.<BR> * may happen when migration already ended. */ @Override protected void proceedProxyReturnValue() { EngineError returnStatus = getReturnValueFromStatus(getReturnStatus()); switch (returnStatus) { case noVM: VDSExceptionBase outEx = createDefaultConcreteException("Cancel migration has failed. Please try again in a few moments and track the VM's event list for details"); initializeVdsError(returnStatus); outEx.setVdsError(new VDSError(EngineError.MIGRATION_CANCEL_ERROR_NO_VM, getReturnStatus().message)); throw outEx; default: super.proceedProxyReturnValue(); } } }
OpenUniversity/ovirt-engine
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/CancelMigrateVDSCommand.java
Java
apache-2.0
1,638
#include <SFML/Graphics.hpp> #include <iostream> #pragma once /** *\file unit.h * *\brief deze library bevat de klasse unit * * \class unit * * \brief de klasse unit is de hoofd klasse van de verschillende eenheden * * \author Olaf van der Kruk * \author Ben Meulenberg * \author Peter Markotic * * \version 1.0 * * \date 2013/11/07 */ class unit { protected: int health, damage, range, speed, castle_damage; float factor; enum Direction { Left, Right, attackLeft, attackRight }; float frameCounter, switchFrame, frameSpeed; sf::Vector2i source; sf::Texture pTexture; sf::Sprite playerImage; sf::RectangleShape health_bar_back; sf::RectangleShape health_bar; sf::Clock clock; public: /** \brief maakt een unit object aan */ unit(); /** \brief deze methode is virtual omdat de eenheden verschillende dingen doen bij het doodgaan */ virtual ~unit(){}; /** \brief verandert de hoeveelheid health van de eenheid * \param val de hoeveelheid health om er af te halen * \return void */ void health_down(int val) { health=health-val; } /** \brief geeft de hoeveelheid health terug van de eenheid * \return int health */ int get_health(){ return health*factor; } /** \brief geeft de hoeveelheid damage terug van de eenheid * \return int damage */ int get_damage(){ return damage; } /** \brief geeft de hoeveelheid damage die de eenheid aan een kasteel kan doen * \return int castle_damage */ int get_castle_damage(){ return castle_damage; } /** \brief geeft de afstand waarover een eenheid schade kan doen * \return int afstand */ int get_range(){ return range; } /** \brief geeft de x positie terug van de eenheid * \return int roept de get position methode aan van de afbeelding */ int get_x() { return playerImage.getPosition().x; } /** \brief bepaald de x positie terug van de eenheid * \return void */ void set_x(int pos){ playerImage.setPosition(sf::Vector2f(pos, 468)); } /** \brief geeft de x positie terug van de eenheid * \param &Window de window waarnaar deze draw functie moet schrijven * \param direction bepaald de richting van de eenheid * \param movement bepaald of de eenheid moet bewegen * \param attack bepaald of de eenheid moet aanvallen * \return void */ void draw(sf::RenderWindow &Window, int direction, bool movement, bool attack); };
olijf/Gerald-BeyondEvil
Game8/unit.h
C
apache-2.0
2,483
/* Copyright 2019 The Vitess Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* Package automation contains code to execute high-level cluster operations (e.g. resharding) as a series of low-level operations (e.g. vtctl, shell commands, ...). */ package automation import ( "errors" "fmt" "sync" "context" "vitess.io/vitess/go/vt/log" automationpb "vitess.io/vitess/go/vt/proto/automation" "vitess.io/vitess/go/vt/vterrors" ) type schedulerState int32 const ( stateNotRunning schedulerState = iota stateRunning stateShuttingDown stateShutdown ) type taskCreator func(string) Task // Scheduler executes automation tasks and maintains the execution state. type Scheduler struct { idGenerator IDGenerator mu sync.Mutex // Guarded by "mu". registeredClusterOperations map[string]bool // Guarded by "mu". toBeScheduledClusterOperations chan ClusterOperationInstance // Guarded by "mu". state schedulerState // Guarded by "taskCreatorMu". May be overridden by testing code. taskCreator taskCreator taskCreatorMu sync.Mutex pendingOpsWg *sync.WaitGroup muOpList sync.Mutex // Guarded by "muOpList". // The key of the map is ClusterOperationInstance.ID. // This map contains a copy of the ClusterOperationInstance which is currently processed. // The scheduler may update the copy with the latest status. activeClusterOperations map[string]ClusterOperationInstance // Guarded by "muOpList". // The key of the map is ClusterOperationInstance.ID. finishedClusterOperations map[string]ClusterOperationInstance } // NewScheduler creates a new instance. func NewScheduler() (*Scheduler, error) { defaultClusterOperations := map[string]bool{ "HorizontalReshardingTask": true, "VerticalSplitTask": true, } s := &Scheduler{ registeredClusterOperations: defaultClusterOperations, idGenerator: IDGenerator{}, toBeScheduledClusterOperations: make(chan ClusterOperationInstance, 10), state: stateNotRunning, taskCreator: defaultTaskCreator, pendingOpsWg: &sync.WaitGroup{}, activeClusterOperations: make(map[string]ClusterOperationInstance), finishedClusterOperations: make(map[string]ClusterOperationInstance), } return s, nil } func (s *Scheduler) registerClusterOperation(clusterOperationName string) { s.mu.Lock() defer s.mu.Unlock() s.registeredClusterOperations[clusterOperationName] = true } // Run processes queued cluster operations. func (s *Scheduler) Run() { s.mu.Lock() s.state = stateRunning s.mu.Unlock() s.startProcessRequestsLoop() } func (s *Scheduler) startProcessRequestsLoop() { // Use a WaitGroup instead of just a done channel, because we want // to be able to shut down the scheduler even if Run() was never executed. s.pendingOpsWg.Add(1) go s.processRequestsLoop() } func (s *Scheduler) processRequestsLoop() { defer s.pendingOpsWg.Done() for op := range s.toBeScheduledClusterOperations { s.processClusterOperation(op) } log.Infof("Stopped processing loop for ClusterOperations.") } func (s *Scheduler) processClusterOperation(clusterOp ClusterOperationInstance) { if clusterOp.State == automationpb.ClusterOperationState_CLUSTER_OPERATION_DONE { log.Infof("ClusterOperation: %v skipping because it is already done. Details: %v", clusterOp.Id, clusterOp) return } log.Infof("ClusterOperation: %v running. Details: %v", clusterOp.Id, clusterOp) clusterOpLoop: for i := 0; i < len(clusterOp.SerialTasks); i++ { taskContainer := clusterOp.SerialTasks[i] for _, taskProto := range taskContainer.ParallelTasks { newTaskContainers, output, err := s.runTask(taskProto, clusterOp.Id) if err != nil { MarkTaskFailed(taskProto, output, err) clusterOp.Error = err.Error() break clusterOpLoop } else { MarkTaskSucceeded(taskProto, output) } if newTaskContainers != nil { // Make sure all new tasks do not miss any required parameters. err := s.validateTaskContainers(newTaskContainers) if err != nil { err = vterrors.Wrapf(err, "task: %v (%v/%v) emitted a new task which is not valid. Error: %v", taskProto.Name, clusterOp.Id, taskProto.Id, err) log.Error(err) MarkTaskFailed(taskProto, output, err) clusterOp.Error = err.Error() break clusterOpLoop } clusterOp.InsertTaskContainers(newTaskContainers, i+1) log.Infof("ClusterOperation: %v %d new task containers added by %v (%v/%v). Updated ClusterOperation: %v", clusterOp.Id, len(newTaskContainers), taskProto.Name, clusterOp.Id, taskProto.Id, clusterOp) } s.Checkpoint(clusterOp) } } clusterOp.State = automationpb.ClusterOperationState_CLUSTER_OPERATION_DONE log.Infof("ClusterOperation: %v finished. Details: %v", clusterOp.Id, clusterOp) s.Checkpoint(clusterOp) // Move operation from active to finished. s.muOpList.Lock() defer s.muOpList.Unlock() if _, ok := s.activeClusterOperations[clusterOp.Id]; !ok { panic("Pending ClusterOperation was not recorded as active, but should have.") } delete(s.activeClusterOperations, clusterOp.Id) s.finishedClusterOperations[clusterOp.Id] = clusterOp } func (s *Scheduler) runTask(taskProto *automationpb.Task, clusterOpID string) ([]*automationpb.TaskContainer, string, error) { if taskProto.State == automationpb.TaskState_DONE { // Task is already done (e.g. because we resume from a checkpoint). if taskProto.Error != "" { log.Errorf("Task: %v (%v/%v) failed before. Aborting the ClusterOperation. Error: %v Details: %v", taskProto.Name, clusterOpID, taskProto.Id, taskProto.Error, taskProto) return nil, "", errors.New(taskProto.Error) } log.Infof("Task: %v (%v/%v) skipped because it is already done. Full Details: %v", taskProto.Name, clusterOpID, taskProto.Id, taskProto) return nil, taskProto.Output, nil } task, err := s.createTaskInstance(taskProto.Name) if err != nil { log.Errorf("Task: %v (%v/%v) could not be instantiated. Error: %v Details: %v", taskProto.Name, clusterOpID, taskProto.Id, err, taskProto) return nil, "", err } taskProto.State = automationpb.TaskState_RUNNING log.Infof("Task: %v (%v/%v) running. Details: %v", taskProto.Name, clusterOpID, taskProto.Id, taskProto) newTaskContainers, output, err := task.Run(taskProto.Parameters) log.Infof("Task: %v (%v/%v) finished. newTaskContainers: %v, output: %v, error: %v", taskProto.Name, clusterOpID, taskProto.Id, newTaskContainers, output, err) return newTaskContainers, output, err } func (s *Scheduler) validateTaskContainers(newTaskContainers []*automationpb.TaskContainer) error { for _, newTaskContainer := range newTaskContainers { for _, newTaskProto := range newTaskContainer.ParallelTasks { err := s.validateTaskSpecification(newTaskProto.Name, newTaskProto.Parameters) if err != nil { return fmt.Errorf("error: %v task: %v", err, newTaskProto) } } } return nil } func defaultTaskCreator(taskName string) Task { switch taskName { case "HorizontalReshardingTask": return &HorizontalReshardingTask{} case "VerticalSplitTask": return &VerticalSplitTask{} case "CopySchemaShardTask": return &CopySchemaShardTask{} case "MigrateServedFromTask": return &MigrateServedFromTask{} case "MigrateServedTypesTask": return &MigrateServedTypesTask{} case "RebuildKeyspaceGraph": return &RebuildKeyspaceGraphTask{} case "SplitCloneTask": return &SplitCloneTask{} case "SplitDiffTask": return &SplitDiffTask{} case "VerticalSplitCloneTask": return &VerticalSplitCloneTask{} case "VerticalSplitDiffTask": return &VerticalSplitDiffTask{} case "WaitForFilteredReplicationTask": return &WaitForFilteredReplicationTask{} default: return nil } } func (s *Scheduler) setTaskCreator(creator taskCreator) { s.taskCreatorMu.Lock() defer s.taskCreatorMu.Unlock() s.taskCreator = creator } func (s *Scheduler) validateTaskSpecification(taskName string, parameters map[string]string) error { taskInstanceForParametersCheck, err := s.createTaskInstance(taskName) if err != nil { return err } errParameters := validateParameters(taskInstanceForParametersCheck, parameters) if errParameters != nil { return errParameters } return nil } func (s *Scheduler) createTaskInstance(taskName string) (Task, error) { s.taskCreatorMu.Lock() taskCreator := s.taskCreator s.taskCreatorMu.Unlock() task := taskCreator(taskName) if task == nil { return nil, fmt.Errorf("no implementation found for: %v", taskName) } return task, nil } // validateParameters returns an error if not all required parameters are provided in "parameters". // Unknown parameters (neither required nor optional) result in an error. func validateParameters(task Task, parameters map[string]string) error { validParams := make(map[string]bool) var missingParams []string for _, reqParam := range task.RequiredParameters() { if _, ok := parameters[reqParam]; ok { validParams[reqParam] = true } else { missingParams = append(missingParams, reqParam) } } if len(missingParams) > 0 { return fmt.Errorf("required parameters are missing: %v", missingParams) } for _, optParam := range task.OptionalParameters() { validParams[optParam] = true } for param := range parameters { if !validParams[param] { return fmt.Errorf("parameter %v is not allowed. Allowed required parameters: %v optional parameters: %v", param, task.RequiredParameters(), task.OptionalParameters()) } } return nil } // EnqueueClusterOperation can be used to start a new cluster operation. func (s *Scheduler) EnqueueClusterOperation(ctx context.Context, req *automationpb.EnqueueClusterOperationRequest) (*automationpb.EnqueueClusterOperationResponse, error) { s.mu.Lock() defer s.mu.Unlock() if s.state != stateRunning { return nil, fmt.Errorf("scheduler is not running. State: %v", s.state) } if !s.registeredClusterOperations[req.Name] { return nil, fmt.Errorf("no ClusterOperation with name: %v is registered", req.Name) } err := s.validateTaskSpecification(req.Name, req.Parameters) if err != nil { return nil, err } clusterOpID := s.idGenerator.GetNextID() taskIDGenerator := IDGenerator{} initialTask := NewTaskContainerWithSingleTask(req.Name, req.Parameters) clusterOp := NewClusterOperationInstance(clusterOpID, initialTask, &taskIDGenerator) s.muOpList.Lock() s.activeClusterOperations[clusterOpID] = clusterOp.Clone() s.muOpList.Unlock() s.toBeScheduledClusterOperations <- clusterOp return &automationpb.EnqueueClusterOperationResponse{ Id: clusterOp.Id, }, nil } // findClusterOp checks for a given ClusterOperation ID if it's in the list of active or finished operations. func (s *Scheduler) findClusterOp(id string) (ClusterOperationInstance, error) { var ok bool var clusterOp ClusterOperationInstance s.muOpList.Lock() defer s.muOpList.Unlock() clusterOp, ok = s.activeClusterOperations[id] if !ok { clusterOp, ok = s.finishedClusterOperations[id] } if !ok { return clusterOp, fmt.Errorf("ClusterOperation with id: %v not found", id) } return clusterOp.Clone(), nil } // Checkpoint should be called every time the state of the cluster op changes. // It is used to update the copy of the state in activeClusterOperations. func (s *Scheduler) Checkpoint(clusterOp ClusterOperationInstance) { // TODO(mberlin): Add here support for persistent checkpoints. s.muOpList.Lock() defer s.muOpList.Unlock() s.activeClusterOperations[clusterOp.Id] = clusterOp.Clone() } // GetClusterOperationDetails can be used to query the full details of active or finished operations. func (s *Scheduler) GetClusterOperationDetails(ctx context.Context, req *automationpb.GetClusterOperationDetailsRequest) (*automationpb.GetClusterOperationDetailsResponse, error) { clusterOp, err := s.findClusterOp(req.Id) if err != nil { return nil, err } return &automationpb.GetClusterOperationDetailsResponse{ ClusterOp: &clusterOp.ClusterOperation, }, nil } // ShutdownAndWait shuts down the scheduler and waits infinitely until all pending cluster operations have finished. func (s *Scheduler) ShutdownAndWait() { s.mu.Lock() if s.state != stateShuttingDown { s.state = stateShuttingDown close(s.toBeScheduledClusterOperations) } s.mu.Unlock() log.Infof("Scheduler was shut down. Waiting for pending ClusterOperations to finish.") s.pendingOpsWg.Wait() s.mu.Lock() s.state = stateShutdown s.mu.Unlock() log.Infof("All pending ClusterOperations finished.") }
tinyspeck/vitess
go/vt/automation/scheduler.go
GO
apache-2.0
12,971
<div class="details active"> <a href="javascript:void(0)" class="details__summary">.github/workflows/optional_review_deployment.yml</a> <div class="details__content" markdown="1"> {% raw %} ```yaml name: Optional Review Deployment on: pull_request: types: - labeled - unlabeled - synchronize jobs: optional_converge_or_dismiss: name: Optional Converge or Dismiss runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 with: fetch-depth: 0 - name: Define environment url run: | pr_id=${{ github.event.number }} github_repository_id=$(echo ${GITHUB_REPOSITORY} | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z) echo WERF_SET_ENV_URL=global.env_url=http://${github_repository_id}-${pr_id}.kube.DOMAIN >> $GITHUB_ENV if: contains( github.event.pull_request.labels.*.name, 'review' ) - name: Converge uses: werf/actions/converge@v1.2 with: env: review-${{ github.event.number }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} if: contains( github.event.pull_request.labels.*.name, 'review' ) - name: Dismiss uses: werf/actions/dismiss@v1.2 with: env: review-${{ github.event.number }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} if: "!contains( github.event.pull_request.labels.*.name, 'review' )" ``` {% endraw %} </div> </div> <div class="details active"> <a href="javascript:void(0)" class="details__summary">.github/workflows/review_deployment_dismiss.yml</a> <div class="details__content" markdown="1"> {% raw %} ```yaml name: Review Deployment Dismiss on: pull_request: types: [closed] jobs: dismiss: name: Dismiss runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Dismiss uses: werf/actions/dismiss@v1.2 with: env: review-${{ github.event.number }} kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }} ``` {% endraw %} </div> </div>
flant/dapp
docs/documentation/_includes/advanced/ci_cd/github_actions/review_3.md
Markdown
apache-2.0
2,174
/* * Copyright (c) 2011 Google, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.truth; import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assert_; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** * Tests for introspective Subject behaviour. * * @author Christian Gruber (cgruber@israfil.net) */ @RunWith(JUnit4.class) public class ClassSubjectTest { @Test public void testIsAssignableTo_same() { assertThat(String.class).isAssignableTo(String.class); } @Test public void testIsAssignableTo_parent() { assertThat(String.class).isAssignableTo(Object.class); assertThat(NullPointerException.class).isAssignableTo(Exception.class); } @Test public void testIsAssignableTo_reversed() { try { assertThat(Object.class).isAssignableTo(String.class); assert_().fail("Should have thrown an assertion error."); } catch (AssertionError expected) { assertThat(expected) .hasMessage( "Not true that <class java.lang.Object> " + "is assignable to <class java.lang.String>"); } } @Test public void testIsAssignableTo_reversedDifferentTypes() { try { assertThat(String.class).isAssignableTo(Exception.class); assert_().fail("Should have thrown an assertion error."); } catch (AssertionError expected) { assertThat(expected) .hasMessage( "Not true that <class java.lang.String> " + "is assignable to <class java.lang.Exception>"); } } }
dahlstrom-g/truth
core/src/test/java/com/google/common/truth/ClassSubjectTest.java
Java
apache-2.0
2,143
/* * Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.directory.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.Request; import com.amazonaws.http.HttpMethodName; import com.amazonaws.services.directory.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.protocol.*; import com.amazonaws.annotation.SdkInternalApi; /** * CreateMicrosoftADRequest Marshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") @SdkInternalApi public class CreateMicrosoftADRequestProtocolMarshaller implements Marshaller<Request<CreateMicrosoftADRequest>, CreateMicrosoftADRequest> { private static final OperationInfo SDK_OPERATION_BINDING = OperationInfo.builder().protocol(Protocol.AWS_JSON).requestUri("/") .httpMethodName(HttpMethodName.POST).hasExplicitPayloadMember(false).hasPayloadMembers(true) .operationIdentifier("DirectoryService_20150416.CreateMicrosoftAD").serviceName("AWSDirectoryService").build(); private final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory; public CreateMicrosoftADRequestProtocolMarshaller(com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory) { this.protocolFactory = protocolFactory; } public Request<CreateMicrosoftADRequest> marshall(CreateMicrosoftADRequest createMicrosoftADRequest) { if (createMicrosoftADRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { final ProtocolRequestMarshaller<CreateMicrosoftADRequest> protocolMarshaller = protocolFactory.createProtocolMarshaller(SDK_OPERATION_BINDING, createMicrosoftADRequest); protocolMarshaller.startMarshalling(); CreateMicrosoftADRequestMarshaller.getInstance().marshall(createMicrosoftADRequest, protocolMarshaller); return protocolMarshaller.finishMarshalling(); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
dagnir/aws-sdk-java
aws-java-sdk-directory/src/main/java/com/amazonaws/services/directory/model/transform/CreateMicrosoftADRequestProtocolMarshaller.java
Java
apache-2.0
2,703
/* * Copyright (C) 2017-2019 Dremio Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.dremio.exec.maestro; import com.dremio.exec.planner.fragment.PlanningSet; import com.dremio.exec.proto.UserBitShared.AttemptEvent; import com.dremio.exec.proto.UserBitShared.FragmentRpcSizeStats; import com.dremio.exec.proto.UserBitShared.QueryProfile; import com.dremio.exec.work.QueryWorkUnit; import com.dremio.exec.work.foreman.ExecutionPlan; import com.dremio.resource.ResourceSchedulingDecisionInfo; public interface MaestroObserver { /** * Called to report the beginning of a new state. * Called multiple times during a query lifetime */ void beginState(AttemptEvent event); /** * Called to report the wait in the command pool. * May be called multiple times during a query lifetime, as often as the query's tasks are put into the command pool */ void commandPoolWait(long waitInMillis); /** * Generic ability to record extra information in a job. * @param name The name of the extra info. This can be thought of as a list rather than set and calls with the same name will all be recorded. * @param bytes The data to persist. */ void recordExtraInfo(String name, byte[] bytes); /** * The planning and parallelization phase of the query is completed. * * An {@link ExecutionPlan execution plan} is provided to observer. */ void planCompleted(ExecutionPlan plan); /** * The execution of the query started. * @param profile The initial query profile for the query. */ void execStarted(QueryProfile profile); /** * Executor nodes were selected for the query */ void executorsSelected(long millisTaken, int idealNumFragments, int idealNumNodes, int numExecutors, String detailsText); /** * Parallelization planning started */ void planParallelStart(); /** * The decisions made for parallelizations and fragments were completed. * @param planningSet */ void planParallelized(PlanningSet planningSet); /** * Time taken to assign fragments to nodes. * @param millisTaken time in milliseconds */ void planAssignmentTime(long millisTaken); /** * Time taken to generate fragments. * @param millisTaken time in milliseconds */ void planGenerationTime(long millisTaken); /** * The decisions for distribution of work are completed. * @param unit The distribution decided for each node. */ void plansDistributionComplete(QueryWorkUnit unit); /** * Number of records processed * @param recordCount records processed */ void recordsProcessed(long recordCount); /** * Time taken for sending start fragment rpcs to all nodes. * @param millisTaken */ void fragmentsStarted(long millisTaken, FragmentRpcSizeStats stats); /** * Time taken for sending activate fragment rpcs to all nodes. * @param millisTaken */ void fragmentsActivated(long millisTaken); /** * Failed to activate fragment. * @param ex */ void activateFragmentFailed(Exception ex); /** * ResourceScheduling related information * @param resourceSchedulingDecisionInfo */ void resourcesScheduled(ResourceSchedulingDecisionInfo resourceSchedulingDecisionInfo); }
dremio/dremio-oss
sabot/kernel/src/main/java/com/dremio/exec/maestro/MaestroObserver.java
Java
apache-2.0
3,762
using System; using System.Diagnostics; using System.Diagnostics.Tracing; using System.Text; using Microsoft.Diagnostics.Tracing; using Address = System.UInt64; #pragma warning disable 1591 // disable warnings on XML comments not being present // This code was automatically generated by the TraceParserGen tool, which converts // an ETW event manifest into strongly typed C# classes. namespace Microsoft.Diagnostics.Tracing.Parsers { using Microsoft.Diagnostics.Tracing.Parsers.NetricInterceptClr; [System.CodeDom.Compiler.GeneratedCode("traceparsergen", "2.0")] public sealed class NetricInterceptClrTraceEventParser : TraceEventParser { public static string ProviderName = "Netric.Intercept.Clr"; public static Guid ProviderGuid = new Guid(unchecked((int) 0x768eb926), unchecked((short) 0x20f5), unchecked((short) 0x5a90), 0x1d, 0x4f, 0xd5, 0x4d, 0xa6, 0x61, 0xbd, 0x49); public enum Keywords : long { Session3 = 0x100000000000, Session2 = 0x200000000000, Session1 = 0x400000000000, Session0 = 0x800000000000, }; public NetricInterceptClrTraceEventParser(TraceEventSource source) : base(source) {} public event Action<EventSourceMessageArgs> EventSourceMessage { add { source.RegisterEventTemplate(EventSourceMessageTemplate(value)); } remove { source.UnregisterEventTemplate(value, 0, ProviderGuid); } } public event Action<OnEnterArgs> OnEnter { add { source.RegisterEventTemplate(OnEnterTemplate(value)); } remove { source.UnregisterEventTemplate(value, 1, ProviderGuid); } } public event Action<OnLeaveArgs> OnLeave { add { source.RegisterEventTemplate(OnLeaveTemplate(value)); } remove { source.UnregisterEventTemplate(value, 2, ProviderGuid); } } #region private protected override string GetProviderName() { return ProviderName; } static private EventSourceMessageArgs EventSourceMessageTemplate(Action<EventSourceMessageArgs> action) { // action, eventid, taskid, taskName, taskGuid, opcode, opcodeName, providerGuid, providerName return new EventSourceMessageArgs(action, 0, 65534, "EventSourceMessage", Guid.Empty, 0, "", ProviderGuid, ProviderName ); } static private OnEnterArgs OnEnterTemplate(Action<OnEnterArgs> action) { // action, eventid, taskid, taskName, taskGuid, opcode, opcodeName, providerGuid, providerName return new OnEnterArgs(action, 1, 65533, "OnEnter", Guid.Empty, 0, "", ProviderGuid, ProviderName ); } static private OnLeaveArgs OnLeaveTemplate(Action<OnLeaveArgs> action) { // action, eventid, taskid, taskName, taskGuid, opcode, opcodeName, providerGuid, providerName return new OnLeaveArgs(action, 2, 65532, "OnLeave", Guid.Empty, 0, "", ProviderGuid, ProviderName ); } static private volatile TraceEvent[] s_templates; protected override void EnumerateTemplates(Func<string, string, EventFilterResponse> eventsToObserve, Action<TraceEvent> callback) { if (s_templates == null) { var templates = new TraceEvent[3]; templates[0] = EventSourceMessageTemplate(null); templates[1] = OnEnterTemplate(null); templates[2] = OnLeaveTemplate(null); s_templates = templates; } foreach (var template in s_templates) if (eventsToObserve == null || eventsToObserve(template.ProviderName, template.EventName) == EventFilterResponse.AcceptEvent) callback(template); } #endregion } } namespace Microsoft.Diagnostics.Tracing.Parsers.NetricInterceptClr { public sealed class EventSourceMessageArgs : TraceEvent { public string message { get { return GetUnicodeStringAt(0); } } #region Private internal EventSourceMessageArgs(Action<EventSourceMessageArgs> target, int eventID, int task, string taskName, Guid taskGuid, int opcode, string opcodeName, Guid providerGuid, string providerName) : base(eventID, task, taskName, taskGuid, opcode, opcodeName, providerGuid, providerName) { this.m_target = target; } protected override void Dispatch() { m_target(this); } protected override void Validate() { Debug.Assert(!(Version == 0 && EventDataLength != SkipUnicodeString(0))); Debug.Assert(!(Version > 0 && EventDataLength < SkipUnicodeString(0))); } protected override Delegate Target { get { return m_target; } set { m_target = (Action<EventSourceMessageArgs>) value; } } public override StringBuilder ToXml(StringBuilder sb) { Prefix(sb); XmlAttrib(sb, "message", message); sb.Append("/>"); return sb; } public override string[] PayloadNames { get { if (payloadNames == null) payloadNames = new string[] { "message"}; return payloadNames; } } public override object PayloadValue(int index) { switch (index) { case 0: return message; default: Debug.Assert(false, "Bad field index"); return null; } } private event Action<EventSourceMessageArgs> m_target; #endregion } public sealed class OnEnterArgs : TraceEvent { public string Method { get { return GetUnicodeStringAt(0); } } public long CallId { get { return GetInt64At(SkipUnicodeString(0)); } } #region Private internal OnEnterArgs(Action<OnEnterArgs> target, int eventID, int task, string taskName, Guid taskGuid, int opcode, string opcodeName, Guid providerGuid, string providerName) : base(eventID, task, taskName, taskGuid, opcode, opcodeName, providerGuid, providerName) { this.m_target = target; } protected override void Dispatch() { m_target(this); } protected override void Validate() { Debug.Assert(!(Version == 0 && EventDataLength != SkipUnicodeString(0)+8)); Debug.Assert(!(Version > 0 && EventDataLength < SkipUnicodeString(0)+8)); } protected override Delegate Target { get { return m_target; } set { m_target = (Action<OnEnterArgs>) value; } } public override StringBuilder ToXml(StringBuilder sb) { Prefix(sb); XmlAttrib(sb, "Method", Method); XmlAttrib(sb, "CallId", CallId); sb.Append("/>"); return sb; } public override string[] PayloadNames { get { if (payloadNames == null) payloadNames = new string[] { "Method", "CallId"}; return payloadNames; } } public override object PayloadValue(int index) { switch (index) { case 0: return Method; case 1: return CallId; default: Debug.Assert(false, "Bad field index"); return null; } } private event Action<OnEnterArgs> m_target; #endregion } public sealed class OnLeaveArgs : TraceEvent { public string Method { get { return GetUnicodeStringAt(0); } } public long CallId { get { return GetInt64At(SkipUnicodeString(0)); } } #region Private internal OnLeaveArgs(Action<OnLeaveArgs> target, int eventID, int task, string taskName, Guid taskGuid, int opcode, string opcodeName, Guid providerGuid, string providerName) : base(eventID, task, taskName, taskGuid, opcode, opcodeName, providerGuid, providerName) { this.m_target = target; } protected override void Dispatch() { m_target(this); } protected override void Validate() { Debug.Assert(!(Version == 0 && EventDataLength != SkipUnicodeString(0)+8)); Debug.Assert(!(Version > 0 && EventDataLength < SkipUnicodeString(0)+8)); } protected override Delegate Target { get { return m_target; } set { m_target = (Action<OnLeaveArgs>) value; } } public override StringBuilder ToXml(StringBuilder sb) { Prefix(sb); XmlAttrib(sb, "Method", Method); XmlAttrib(sb, "CallId", CallId); sb.Append("/>"); return sb; } public override string[] PayloadNames { get { if (payloadNames == null) payloadNames = new string[] { "Method", "CallId"}; return payloadNames; } } public override object PayloadValue(int index) { switch (index) { case 0: return Method; case 1: return CallId; default: Debug.Assert(false, "Bad field index"); return null; } } private event Action<OnLeaveArgs> m_target; #endregion } }
MaciekLesiczka/netric
src/Netric.Agent/EventParsers/Netric.Intercept.Clr.cs
C#
apache-2.0
10,093
-- Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute -- Copyright [2016-2020] EMBL-European Bioinformatics Institute -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. # patch_54_55_e.sql # # title: feature_type.class update # # description: # Add some more feature_type.class enums remove some old and update some entries. alter table feature_type modify `class` enum('Insulator','DNA','Regulatory Feature','Histone','RNA','Polymerase','Transcription Factor','Transcription Factor Complex','Overlap','Regulatory Motif','Region','Enhancer','Expression','Pseudo', 'Open Chromatin', 'Search Region', 'Association Locus') DEFAULT NULL; update feature_type set class='Open Chromatin' where name='DNase1'; #What about Region/Pseudo? #mysql> select * from feature_type where class='Region' limit 10; #+-----------------+-------------------------+--------+----------------------------------------------------+ #| feature_type_id | name | class | description | #+-----------------+-------------------------+--------+----------------------------------------------------+ #| 45 | VISTA Target | Region | VISTA target region | #| 46 | VISTA Target - Negative | Region | Enhancer negative region identified by VISTA assay | #| 48 | cisRED Search Region | Region | cisRED search region | #| 178402 | eQTL | Region | Expression Quantitative Trait Loci | #+-----------------+-------------------------+--------+----------------------------------------------------+ update feature_type set class='Search Region' where name in ('VISTA Target', 'VISTA Target - Negative', 'cisRED Search Region'); update feature_type set class='Association Locus' where name='eQTL'; #Now remove region/overlap alter table feature_type modify `class` enum('Insulator','DNA','Regulatory Feature','Histone','RNA','Polymerase','Transcription Factor','Transcription Factor Complex','Regulatory Motif','Enhancer','Expression','Pseudo', 'Open Chromatin', 'Search Region', 'Association Locus') DEFAULT NULL; INSERT INTO meta (species_id, meta_key, meta_value) VALUES (NULL, 'patch', 'patch_54_55_e.sql|feature_type.class_update');
Ensembl/ensembl-funcgen
sql/patch_54_55_e.sql
SQL
apache-2.0
2,883
# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make <target>' where <target> is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/projecto.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/projecto.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/projecto" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/projecto" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
shuhaowu/projecto
docs/Makefile
Makefile
apache-2.0
6,770
## Updating Your Fork Before submitting a pull request, you should ensure that your fork is up to date. You may fork Laravel Passwd: git remote add upstream git://github.com/GrahamCampbell/Laravel-Passwd.git The first command is only necessary the first time. If you have issues merging, you will need to get a merge tool such as [P4Merge](http://perforce.com/product/components/perforce_visual_merge_and_diff_tools). You can then update the branch: git pull --rebase upstream master git push --force origin <branch_name> Once it is set up, run `git mergetool`. Once all conflicts are fixed, run `git rebase --continue`, and `git push --force origin <branch_name>`. ## Pull Requests Please review these guidelines before submitting any pull requests. * When submitting bug fixes, check if a maintenance branch exists for an older series, then pull against that older branch if the bug is present in it. * Before sending a pull request for a new feature, you should first create an issue with [Proposal] in the title. * Please follow the [PSR-2 Coding Style](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) and [PHP-FIG Naming Conventions](https://github.com/php-fig/fig-standards/blob/master/bylaws/002-psr-naming-conventions.md).
GrahamDeprecated/Laravel-Passwd
CONTRIBUTING.md
Markdown
apache-2.0
1,297
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_112) on Fri Jun 16 09:55:16 MST 2017 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class org.wildfly.swarm.config.infinispan.cache_container.InvalidationCache (Public javadocs 2017.6.1 API)</title> <meta name="date" content="2017-06-16"> <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.wildfly.swarm.config.infinispan.cache_container.InvalidationCache (Public javadocs 2017.6.1 API)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">WildFly Swarm API, 2017.6.1</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?org/wildfly/swarm/config/infinispan/cache_container/class-use/InvalidationCache.html" target="_top">Frames</a></li> <li><a href="InvalidationCache.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.wildfly.swarm.config.infinispan.cache_container.InvalidationCache" class="title">Uses of Class<br>org.wildfly.swarm.config.infinispan.cache_container.InvalidationCache</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.wildfly.swarm.config.infinispan">org.wildfly.swarm.config.infinispan</a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="#org.wildfly.swarm.config.infinispan.cache_container">org.wildfly.swarm.config.infinispan.cache_container</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.wildfly.swarm.config.infinispan"> <!-- --> </a> <h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a> in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/package-summary.html">org.wildfly.swarm.config.infinispan</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/package-summary.html">org.wildfly.swarm.config.infinispan</a> that return <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a></code></td> <td class="colLast"><span class="typeNameLabel">CacheContainer.CacheContainerResources.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/CacheContainer.CacheContainerResources.html#invalidationCache-java.lang.String-">invalidationCache</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;key)</code>&nbsp;</td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/package-summary.html">org.wildfly.swarm.config.infinispan</a> that return types with arguments of type <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a>&gt;</code></td> <td class="colLast"><span class="typeNameLabel">CacheContainer.CacheContainerResources.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/CacheContainer.CacheContainerResources.html#invalidationCaches--">invalidationCaches</a></span>()</code> <div class="block">Get the list of InvalidationCache resources</div> </td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/package-summary.html">org.wildfly.swarm.config.infinispan</a> with parameters of type <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../../org/wildfly/swarm/config/infinispan/CacheContainer.html" title="type parameter in CacheContainer">T</a></code></td> <td class="colLast"><span class="typeNameLabel">CacheContainer.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/CacheContainer.html#invalidationCache-org.wildfly.swarm.config.infinispan.cache_container.InvalidationCache-">invalidationCache</a></span>(<a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a>&nbsp;value)</code> <div class="block">Add the InvalidationCache object to the list of subresources</div> </td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Method parameters in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/package-summary.html">org.wildfly.swarm.config.infinispan</a> with type arguments of type <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../../org/wildfly/swarm/config/infinispan/CacheContainer.html" title="type parameter in CacheContainer">T</a></code></td> <td class="colLast"><span class="typeNameLabel">CacheContainer.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/CacheContainer.html#invalidationCaches-java.util.List-">invalidationCaches</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a>&gt;&nbsp;value)</code> <div class="block">Add all InvalidationCache objects to this subresource</div> </td> </tr> </tbody> </table> </li> <li class="blockList"><a name="org.wildfly.swarm.config.infinispan.cache_container"> <!-- --> </a> <h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a> in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/package-summary.html">org.wildfly.swarm.config.infinispan.cache_container</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> <caption><span>Classes in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/package-summary.html">org.wildfly.swarm.config.infinispan.cache_container</a> with type parameters of type <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>class&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a>&lt;T extends <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a>&lt;T&gt;&gt;</span></code> <div class="block">An invalidation cache</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>interface&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCacheConsumer.html" title="interface in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCacheConsumer</a>&lt;T extends <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a>&lt;T&gt;&gt;</span></code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>interface&nbsp;</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCacheSupplier.html" title="interface in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCacheSupplier</a>&lt;T extends <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a>&gt;</span></code>&nbsp;</td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/package-summary.html">org.wildfly.swarm.config.infinispan.cache_container</a> that return <a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">InvalidationCache</a></code></td> <td class="colLast"><span class="typeNameLabel">InvalidationCacheSupplier.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCacheSupplier.html#get--">get</a></span>()</code> <div class="block">Constructed instance of InvalidationCache resource</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../../org/wildfly/swarm/config/infinispan/cache_container/InvalidationCache.html" title="class in org.wildfly.swarm.config.infinispan.cache_container">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">WildFly Swarm API, 2017.6.1</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?org/wildfly/swarm/config/infinispan/cache_container/class-use/InvalidationCache.html" target="_top">Frames</a></li> <li><a href="InvalidationCache.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2017 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p> </body> </html>
wildfly-swarm/wildfly-swarm-javadocs
2017.6.1/apidocs/org/wildfly/swarm/config/infinispan/cache_container/class-use/InvalidationCache.html
HTML
apache-2.0
17,095
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_45) on Sun Jun 09 12:16:06 GMT+05:30 2013 --> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <TITLE> Uses of Class org.apache.solr.response.PythonResponseWriter (Solr 4.3.1 API) </TITLE> <META NAME="date" CONTENT="2013-06-09"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.solr.response.PythonResponseWriter (Solr 4.3.1 API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/apache/solr/response/PythonResponseWriter.html" title="class in org.apache.solr.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/solr/response//class-usePythonResponseWriter.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="PythonResponseWriter.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Class<br>org.apache.solr.response.PythonResponseWriter</B></H2> </CENTER> No usage of org.apache.solr.response.PythonResponseWriter <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/apache/solr/response/PythonResponseWriter.html" title="class in org.apache.solr.response"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/solr/response//class-usePythonResponseWriter.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="PythonResponseWriter.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <i>Copyright &copy; 2000-2013 Apache Software Foundation. All Rights Reserved.</i> <script src='../../../../../prettify.js' type='text/javascript'></script> <script type='text/javascript'> (function(){ var oldonload = window.onload; if (typeof oldonload != 'function') { window.onload = prettyPrint; } else { window.onload = function() { oldonload(); prettyPrint(); } } })(); </script> </BODY> </HTML>
rcr-81/SolrCamper
docs/solr-core/org/apache/solr/response/class-use/PythonResponseWriter.html
HTML
apache-2.0
6,543
#!/usr/bin/env python """ Demonstrate use of pysnmp walks """ import sys import re from pysnmp.entity.rfc3413.oneliner import cmdgen cmdGen = cmdgen.CommandGenerator() devip = sys.argv.pop(1) errorIndication, errorStatus, errorIndex, varBindTable = cmdGen.nextCmd( cmdgen.CommunityData('server', 'galileo', 1), cmdgen.UdpTransportTarget((devip, 161)), cmdgen.MibVariable('IF-MIB', '').loadMibs(), lexicographicMode=True, maxRows=150 ) if errorIndication: print errorIndication else: if errorStatus: print '%s at %s' % ( errorStatus.prettyPrint(), errorIndex and varBindTable[-1][int(errorIndex)-1] or '?' ) else: ifdescr = [] inoctets = [] outoctets = [] for varBindTableRow in varBindTable: for name, val in varBindTableRow: np = name.prettyPrint() vp = val.prettyPrint() if re.search(r"ifDescr\.\d+", np): ifdescr.append(vp) continue if re.search(r"ifInOctets\.\d+", np): inoctets.append(vp) continue if re.search(r"ifOutOctets\.\d+", np): outoctets.append(vp) for l in zip(ifdescr, inoctets, outoctets): print "%s\t%s\t%s" %(l[0], l[1], l[2])
patrebert/pynet_cert
class2/walk2.py
Python
apache-2.0
1,368
package pers.data; public enum InterceptStatus { INTERCEPT_NONE(0b0), //不进行拦截 INTERCEPT_SEND(0b1), // 拦截客户端的请求 INTERCEPT_RECV(0b10), // 拦截server的响应 INTERCEPT_ALL(0b11); private int status = 0; private InterceptStatus(int t) { status = t; } public int GetStatus() { return status; } @Override public String toString() { switch (status) { case 0b0: return "SENT"; case 0b10: return "NOT SEND"; default: return "error"; } } }
uncleheart/Socks-Changer
interface/src/pers/data/InterceptStatus.java
Java
apache-2.0
528
var funcModule = require('./functions'); console.log(funcModule.multiply(10)); console.log(funcModule.getScore());
KalpaD/java_script_tutorial
basics/node_main.js
JavaScript
apache-2.0
115
#region License /* * Copyright © 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #endregion #region Imports using System; using System.Reflection; #endregion namespace Spring.Aop.Framework { /// <summary> /// Simple before advice example that we can use for counting checks. /// </summary> /// <author>Rod Johnson</author> /// <author>Choy Rim (.NET)</author> [Serializable] public class CountingBeforeAdvice : MethodCounter, IMethodBeforeAdvice { public virtual void Before(MethodInfo method, object[] args, object target) { Count(method); } } }
spring-projects/spring-net
test/Spring/Spring.Aop.Tests/Aop/Framework/CountingBeforeAdvice.cs
C#
apache-2.0
1,176
# Qpid Dispatch Router examples Examples on using [Qpid Dispatch Router](http://qpid.apache.org/components/dispatch-router/) project. ## A routing IoT gateway to the Cloud The source code related to the Netduino stuff and Azure IoT Hub describes a specific use case for using the router and are better explained in the following [blog post](https://paolopatierno.wordpress.com/2016/07/23/a-routing-iot-gateway-to-the-cloud/).
ppatierno/qpid-dispatch-examples
README.md
Markdown
apache-2.0
429
package parser import ( "context" "encoding/json" "log" "strings" "time" "cloud.google.com/go/bigquery" "cloud.google.com/go/civil" "github.com/m-lab/annotation-service/api" v2as "github.com/m-lab/annotation-service/api/v2" "github.com/m-lab/etl/etl" "github.com/m-lab/etl/metrics" "github.com/m-lab/etl/row" "github.com/m-lab/etl/schema" "github.com/m-lab/uuid-annotator/annotator" ) //===================================================================================== // Annotation Parser //===================================================================================== // AnnotationParser parses the annotation datatype from the uuid-annotator. type AnnotationParser struct { *row.Base table string suffix string } type nullAnnotator struct{} func (ann *nullAnnotator) GetAnnotations(ctx context.Context, date time.Time, ips []string, info ...string) (*v2as.Response, error) { return &v2as.Response{AnnotatorDate: time.Now(), Annotations: make(map[string]*api.Annotations, 0)}, nil } // NewAnnotationParser creates a new parser for annotation data. func NewAnnotationParser(sink row.Sink, label, suffix string, ann v2as.Annotator) etl.Parser { bufSize := etl.ANNOTATION.BQBufferSize() if ann == nil { ann = &nullAnnotator{} } return &AnnotationParser{ Base: row.NewBase(label, sink, bufSize, ann), table: label, suffix: suffix, } } // TaskError returns non-nil if the task had enough failures to justify // recording the entire task as in error. For now, this is any failure // rate exceeding 10%. func (ap *AnnotationParser) TaskError() error { stats := ap.GetStats() if stats.Total() < 10*stats.Failed { log.Printf("Warning: high row commit errors (more than 10%%): %d failed of %d accepted\n", stats.Failed, stats.Total()) return etl.ErrHighInsertionFailureRate } return nil } // IsParsable returns the canonical test type and whether to parse data. func (ap *AnnotationParser) IsParsable(testName string, data []byte) (string, bool) { // Files look like: "<UUID>.json" if strings.HasSuffix(testName, "json") { return "annotation", true } return "unknown", false } // ParseAndInsert decodes the data.Annotation JSON and inserts it into BQ. func (ap *AnnotationParser) ParseAndInsert(meta map[string]bigquery.Value, testName string, test []byte) error { metrics.WorkerState.WithLabelValues(ap.TableName(), "annotation").Inc() defer metrics.WorkerState.WithLabelValues(ap.TableName(), "annotation").Dec() row := schema.AnnotationRow{ Parser: schema.ParseInfo{ Version: Version(), Time: time.Now(), ArchiveURL: meta["filename"].(string), Filename: testName, GitCommit: GitCommit(), }, } // Parse the raw test. raw := annotator.Annotations{} err := json.Unmarshal(test, &raw) if err != nil { log.Println(err) metrics.TestTotal.WithLabelValues(ap.TableName(), "annotation", "decode-location-error").Inc() return err } // Fill in the row. row.UUID = raw.UUID row.Server = raw.Server row.Client = raw.Client // NOTE: annotations are joined with other tables using the UUID, so // finegrain timestamp is not necessary. // // NOTE: Civil is not TZ adjusted. It takes the year, month, and date from // the given timestamp, regardless of the timestamp's timezone. Since we // run our systems in UTC, all timestamps will be relative to UTC and as // will these dates. row.Date = meta["date"].(civil.Date) // Estimate the row size based on the input JSON size. metrics.RowSizeHistogram.WithLabelValues(ap.TableName()).Observe(float64(len(test))) // Insert the row. if err = ap.Base.Put(&row); err != nil { return err } // Count successful inserts. metrics.TestTotal.WithLabelValues(ap.TableName(), "annotation", "ok").Inc() return nil } // NB: These functions are also required to complete the etl.Parser interface. // For Annotation, we just forward the calls to the Inserter. func (ap *AnnotationParser) Flush() error { return ap.Base.Flush() } func (ap *AnnotationParser) TableName() string { return ap.table } func (ap *AnnotationParser) FullTableName() string { return ap.table + ap.suffix } // RowsInBuffer returns the count of rows currently in the buffer. func (ap *AnnotationParser) RowsInBuffer() int { return ap.GetStats().Pending } // Committed returns the count of rows successfully committed to BQ. func (ap *AnnotationParser) Committed() int { return ap.GetStats().Committed } // Accepted returns the count of all rows received through InsertRow(s) func (ap *AnnotationParser) Accepted() int { return ap.GetStats().Total() } // Failed returns the count of all rows that could not be committed. func (ap *AnnotationParser) Failed() int { return ap.GetStats().Failed }
m-lab/etl
parser/annotation.go
GO
apache-2.0
4,761
#! /usr/bin/env python # Very basic script template. Use this to build new # examples for use in the api-kickstart repository # """ Copyright 2015 Akamai Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ import requests, logging, json from http_calls import EdgeGridHttpCaller from random import randint from akamai.edgegrid import EdgeGridAuth from config import EdgeGridConfig from urlparse import urljoin import urllib session = requests.Session() debug = False verbose = False section_name = "cloudlet" config = EdgeGridConfig({"verbose":debug},section_name) if hasattr(config, "debug") and config.debug: debug = True if hasattr(config, "verbose") and config.verbose: verbose = True # Set the config options session.auth = EdgeGridAuth( client_token=config.client_token, client_secret=config.client_secret, access_token=config.access_token ) # Set the baseurl based on config.host baseurl = '%s://%s/' % ('https', config.host) httpCaller = EdgeGridHttpCaller(session, debug, verbose, baseurl) if __name__ == "__main__": # Get the list of cloudlets to pick the one we want to use endpoint_result = httpCaller.getResult("/cloudlets/api/v2/cloudlet-info") # Result for edge redirector: # { # "location": "/cloudlets/api/v2/cloudlet-info/2", # "cloudletId": 2, # "cloudletCode": "SA", # "apiVersion": "2.0", # "cloudletName": "SAASACCESS" #}, # Get the group ID for the cloudlet we're looking to create endpoint_result = httpCaller.getResult("/cloudlets/api/v2/group-info") # Result for group info: # "groupName": "API Bootcamp", # "location": "/cloudlets/api/v2/group-info/77649", # "parentId": 64867, # "capabilities": [ # { # "cloudletId": 0, # "cloudletCode": "ER", # "capabilities": [ # "View", # "Edit", # "Activate", # "Internal", # "AdvancedEdit" # ] # }, sample_post_body = { "cloudletId": 0, "groupId": 77649, "name": "APIBootcampERv1", "description": "Testing the creation of a policy" } sample_post_result = httpCaller.postResult('/cloudlets/api/v2/policies', json.dumps(sample_post_body)) #{ #"cloudletCode": "SA", #"cloudletId": 2, #"name": "APIBootcampEdgeRedirect", #"propertyName": null, #"deleted": false, #"lastModifiedDate": 1458765299155, #"description": "Testing the creation of a policy", #"apiVersion": "2.0", #"lastModifiedBy": "advocate2", #"serviceVersion": null, #"createDate": 1458765299155, #"location": "/cloudlets/api/v2/policies/11434", #"createdBy": "advocate2", #"activations": [ #{ #"serviceVersion": null, #"policyInfo": { #"status": "inactive", #"name": "APIBootcampEdgeRedirect", #"statusDetail": null, #"detailCode": 0, #"version": 0, #"policyId": 11434, #"activationDate": 0, #"activatedBy": null #}, #"network": "prod", #"apiVersion": "2.0", #"propertyInfo": null #}, #{ #"serviceVersion": null, #"policyInfo": { #"status": "inactive", #"name": "APIBootcampEdgeRedirect", #"statusDetail": null, #"detailCode": 0, #"version": 0, #"policyId": 11434, #"activationDate": 0, #"activatedBy": null #}, #"network": "staging", # "apiVersion": "2.0", #"propertyInfo": null #} #], # "groupId": 77649, # "policyId": 11434 <<<<<<<<<<< # } # Activate by associating with a specific property sample_post_url = "/cloudlets/api/v2/policies/11442/versions/1/activations" sample_post_body = { "network": "staging", "additionalPropertyNames": [ "akamaiapibootcamp.com" ] } sample_post_result = httpCaller.postResult(sample_post_url, json.dumps(sample_post_body)) # Next, add the behavior for cloudlets # PUT the update to activate the cloudlet
dshafik/api-kickstart
examples/python/cloudlet_edge_redirector.py
Python
apache-2.0
4,551
<!-- 收费一览 --> <div class="detail-section honours-section"> <div class="section charge-standard"> <div class="title-contain"> <div class="title-box"> <strong>收费一览</strong> </div> </div> <table border="1" cellspacing="0px" bordercolor="#B6B6B6"> <tr> <th style="width:25%;">会员类型</th> <th style="width:50%;">会员享有的权限</th> <th style="width:25%;">收费价格</th> </tr> <tr> <td>免费会员</td> <td>在没有付费成为VIP会员前,您只可以浏览到<br>网站里的个别小图,无权浏览和下载高清大图</td> <td>免费</td> </tr> </table> <table border="1" cellspacing="0px" bordercolor="#B6B6B6"> <tr> <th style="width:25%;">会员类型</th> <th style="width:50%;">会员享有的权限</th> <th style="width:25%;">收费价格</th> </tr> <tr> <td>VIP会员</td> <td>即:包年会员。在一年365天内可以无限制的浏览网站里所有的资料<br>(因POP旗下每个站点提供的服务不同,<br>具体某个网站包年会员以合同中标注享有的权限为准!)。</td> <td>请咨询上海总部:<br><strong>4008-210-500</strong><br><strong>18301955545</strong></td> </tr> </table> <p class="table-info">POP网站集群现有&nbsp;<strong>4300多万</strong>&nbsp;的流行类款式图片,并且每天(除周日和国定假)增加&nbsp;<strong>近万</strong>&nbsp;张最新款式图片。<br>POP(全球)时尚网络机构旗下有五个网站,全方位为VIP会员提供优质及时的流行款式和资讯。</p> <p><em>POP服装趋势网</em>&nbsp;&nbsp;POP服装趋势网&nbsp;<a href="http://www.pop-fashion.com/" title="服饰">www.pop-fashion.com</a>&nbsp;图片总数&nbsp;<strong>1434余万</strong>&nbsp;,每天更新&nbsp; <strong>10000多个</strong>&nbsp;新款图片。(全部是最新的资料)</p> <p><em>POP鞋子趋势网</em>&nbsp;&nbsp;POP鞋子趋势网&nbsp;<a href="http://www.pop-shoe.com/" title="鞋子">www.pop-shoe.com</a>&nbsp;图片总数&nbsp;<strong>731余万</strong>&nbsp;,每天更新&nbsp; <strong>5000多个</strong>&nbsp;新款图片。(全部是最新的资料)</p> <p><em>POP首饰趋势网</em>&nbsp;&nbsp;POP首饰趋势网&nbsp;<a href="http://www.51shoushi.com/" title="首饰">www.51shoushi.com</a>&nbsp;图片总数&nbsp;<strong>489余万</strong>&nbsp;,每天更新&nbsp; <strong>1000多个</strong>&nbsp;新款图片。(全部是最新的资料)</p> <p><em>POP箱包趋势网</em>&nbsp;&nbsp;POP箱包趋势网&nbsp;<a href="http://www.pop-bags.com/" title="箱包">www.pop-bags.com</a>&nbsp;图片总数&nbsp;<strong>751余万</strong>&nbsp;,每天更新&nbsp; <strong>5000多个</strong>&nbsp;新款图片。(全部是最新的资料)</p> <p><em>POP家纺趋势网</em>&nbsp;&nbsp;POP家纺趋势网&nbsp;<a href="http://www.91jiafang.com/" title="家纺">www.91jiafang.com</a>&nbsp;图片总数&nbsp;<strong>329余万</strong>&nbsp;,每天更新&nbsp; <strong>1000多个</strong>&nbsp;新款图片。(全部是最新的资料)</p> </div> </div>
Binlu/myFunc
angular-item/pop-site/member/cost.html
HTML
apache-2.0
3,416
# Guatteria elegans Scharf SPECIES #### Status ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Magnoliales/Annonaceae/Guatteria/Guatteria elegans/README.md
Markdown
apache-2.0
182
namespace CEvery.Migrations { using System; using System.Data.Entity.Migrations; public partial class added_fields : DbMigration { public override void Up() { } public override void Down() { } } }
bharathkumarms/subscriptionmanager
CEvery/Migrations/201410051420346_added_fields.cs
C#
apache-2.0
279
package cz.muni.fi.pa165.sportsclub.dto; import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonManagedReference; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.util.Objects; import java.util.Set; /** * DTO fot team * * @author 422636 Adam Krajcik */ public class TeamDto { private Long id; @NotNull @Size(min = 3, max = 25) private String name; @JsonManagedReference private CoachDto coach; @JsonBackReference private Set<RosterEntryDto> roster; // move enum private String ageCategory; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public CoachDto getCoach() { return coach; } public void setCoach(CoachDto coach) { this.coach = coach; } public Set<RosterEntryDto> getRoster() { return roster; } public void setRoster(Set<RosterEntryDto> roster) { this.roster = roster; } public String getAgeCategory() { return ageCategory; } public void setAgeCategory(String ageCategory) { this.ageCategory = ageCategory; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TeamDto teamDto = (TeamDto) o; return Objects.equals(getId(), teamDto.getId()) && Objects.equals(getName(), teamDto.getName()) && Objects.equals(getCoach(), teamDto.getCoach()) && Objects.equals(getRoster(), teamDto.getRoster()) && Objects.equals(getAgeCategory(), teamDto.getAgeCategory()); } @Override public int hashCode() { return Objects.hash(getId(), getName(), getAgeCategory()); } }
HonzaCech/PA165-SportClub
api/src/main/java/cz/muni/fi/pa165/sportsclub/dto/TeamDto.java
Java
apache-2.0
2,017
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/sso-admin/SSOAdmin_EXPORTS.h> #include <aws/sso-admin/SSOAdminRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/sso-admin/model/TargetType.h> #include <aws/sso-admin/model/PrincipalType.h> #include <utility> namespace Aws { namespace SSOAdmin { namespace Model { /** */ class AWS_SSOADMIN_API CreateAccountAssignmentRequest : public SSOAdminRequest { public: CreateAccountAssignmentRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateAccountAssignment"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The ARN of the SSO instance under which the operation will be executed. For * more information about ARNs, see <a * href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names * (ARNs) and AWS Service Namespaces</a> in the <i>AWS General Reference</i>.</p> */ inline const Aws::String& GetInstanceArn() const{ return m_instanceArn; } /** * <p>The ARN of the SSO instance under which the operation will be executed. For * more information about ARNs, see <a * href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names * (ARNs) and AWS Service Namespaces</a> in the <i>AWS General Reference</i>.</p> */ inline bool InstanceArnHasBeenSet() const { return m_instanceArnHasBeenSet; } /** * <p>The ARN of the SSO instance under which the operation will be executed. For * more information about ARNs, see <a * href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names * (ARNs) and AWS Service Namespaces</a> in the <i>AWS General Reference</i>.</p> */ inline void SetInstanceArn(const Aws::String& value) { m_instanceArnHasBeenSet = true; m_instanceArn = value; } /** * <p>The ARN of the SSO instance under which the operation will be executed. For * more information about ARNs, see <a * href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names * (ARNs) and AWS Service Namespaces</a> in the <i>AWS General Reference</i>.</p> */ inline void SetInstanceArn(Aws::String&& value) { m_instanceArnHasBeenSet = true; m_instanceArn = std::move(value); } /** * <p>The ARN of the SSO instance under which the operation will be executed. For * more information about ARNs, see <a * href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names * (ARNs) and AWS Service Namespaces</a> in the <i>AWS General Reference</i>.</p> */ inline void SetInstanceArn(const char* value) { m_instanceArnHasBeenSet = true; m_instanceArn.assign(value); } /** * <p>The ARN of the SSO instance under which the operation will be executed. For * more information about ARNs, see <a * href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names * (ARNs) and AWS Service Namespaces</a> in the <i>AWS General Reference</i>.</p> */ inline CreateAccountAssignmentRequest& WithInstanceArn(const Aws::String& value) { SetInstanceArn(value); return *this;} /** * <p>The ARN of the SSO instance under which the operation will be executed. For * more information about ARNs, see <a * href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names * (ARNs) and AWS Service Namespaces</a> in the <i>AWS General Reference</i>.</p> */ inline CreateAccountAssignmentRequest& WithInstanceArn(Aws::String&& value) { SetInstanceArn(std::move(value)); return *this;} /** * <p>The ARN of the SSO instance under which the operation will be executed. For * more information about ARNs, see <a * href="/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names * (ARNs) and AWS Service Namespaces</a> in the <i>AWS General Reference</i>.</p> */ inline CreateAccountAssignmentRequest& WithInstanceArn(const char* value) { SetInstanceArn(value); return *this;} /** * <p>TargetID is an AWS account identifier, typically a 10-12 digit string (For * example, 123456789012).</p> */ inline const Aws::String& GetTargetId() const{ return m_targetId; } /** * <p>TargetID is an AWS account identifier, typically a 10-12 digit string (For * example, 123456789012).</p> */ inline bool TargetIdHasBeenSet() const { return m_targetIdHasBeenSet; } /** * <p>TargetID is an AWS account identifier, typically a 10-12 digit string (For * example, 123456789012).</p> */ inline void SetTargetId(const Aws::String& value) { m_targetIdHasBeenSet = true; m_targetId = value; } /** * <p>TargetID is an AWS account identifier, typically a 10-12 digit string (For * example, 123456789012).</p> */ inline void SetTargetId(Aws::String&& value) { m_targetIdHasBeenSet = true; m_targetId = std::move(value); } /** * <p>TargetID is an AWS account identifier, typically a 10-12 digit string (For * example, 123456789012).</p> */ inline void SetTargetId(const char* value) { m_targetIdHasBeenSet = true; m_targetId.assign(value); } /** * <p>TargetID is an AWS account identifier, typically a 10-12 digit string (For * example, 123456789012).</p> */ inline CreateAccountAssignmentRequest& WithTargetId(const Aws::String& value) { SetTargetId(value); return *this;} /** * <p>TargetID is an AWS account identifier, typically a 10-12 digit string (For * example, 123456789012).</p> */ inline CreateAccountAssignmentRequest& WithTargetId(Aws::String&& value) { SetTargetId(std::move(value)); return *this;} /** * <p>TargetID is an AWS account identifier, typically a 10-12 digit string (For * example, 123456789012).</p> */ inline CreateAccountAssignmentRequest& WithTargetId(const char* value) { SetTargetId(value); return *this;} /** * <p>The entity type for which the assignment will be created.</p> */ inline const TargetType& GetTargetType() const{ return m_targetType; } /** * <p>The entity type for which the assignment will be created.</p> */ inline bool TargetTypeHasBeenSet() const { return m_targetTypeHasBeenSet; } /** * <p>The entity type for which the assignment will be created.</p> */ inline void SetTargetType(const TargetType& value) { m_targetTypeHasBeenSet = true; m_targetType = value; } /** * <p>The entity type for which the assignment will be created.</p> */ inline void SetTargetType(TargetType&& value) { m_targetTypeHasBeenSet = true; m_targetType = std::move(value); } /** * <p>The entity type for which the assignment will be created.</p> */ inline CreateAccountAssignmentRequest& WithTargetType(const TargetType& value) { SetTargetType(value); return *this;} /** * <p>The entity type for which the assignment will be created.</p> */ inline CreateAccountAssignmentRequest& WithTargetType(TargetType&& value) { SetTargetType(std::move(value)); return *this;} /** * <p>The ARN of the permission set that the admin wants to grant the principal * access to.</p> */ inline const Aws::String& GetPermissionSetArn() const{ return m_permissionSetArn; } /** * <p>The ARN of the permission set that the admin wants to grant the principal * access to.</p> */ inline bool PermissionSetArnHasBeenSet() const { return m_permissionSetArnHasBeenSet; } /** * <p>The ARN of the permission set that the admin wants to grant the principal * access to.</p> */ inline void SetPermissionSetArn(const Aws::String& value) { m_permissionSetArnHasBeenSet = true; m_permissionSetArn = value; } /** * <p>The ARN of the permission set that the admin wants to grant the principal * access to.</p> */ inline void SetPermissionSetArn(Aws::String&& value) { m_permissionSetArnHasBeenSet = true; m_permissionSetArn = std::move(value); } /** * <p>The ARN of the permission set that the admin wants to grant the principal * access to.</p> */ inline void SetPermissionSetArn(const char* value) { m_permissionSetArnHasBeenSet = true; m_permissionSetArn.assign(value); } /** * <p>The ARN of the permission set that the admin wants to grant the principal * access to.</p> */ inline CreateAccountAssignmentRequest& WithPermissionSetArn(const Aws::String& value) { SetPermissionSetArn(value); return *this;} /** * <p>The ARN of the permission set that the admin wants to grant the principal * access to.</p> */ inline CreateAccountAssignmentRequest& WithPermissionSetArn(Aws::String&& value) { SetPermissionSetArn(std::move(value)); return *this;} /** * <p>The ARN of the permission set that the admin wants to grant the principal * access to.</p> */ inline CreateAccountAssignmentRequest& WithPermissionSetArn(const char* value) { SetPermissionSetArn(value); return *this;} /** * <p>The entity type for which the assignment will be created.</p> */ inline const PrincipalType& GetPrincipalType() const{ return m_principalType; } /** * <p>The entity type for which the assignment will be created.</p> */ inline bool PrincipalTypeHasBeenSet() const { return m_principalTypeHasBeenSet; } /** * <p>The entity type for which the assignment will be created.</p> */ inline void SetPrincipalType(const PrincipalType& value) { m_principalTypeHasBeenSet = true; m_principalType = value; } /** * <p>The entity type for which the assignment will be created.</p> */ inline void SetPrincipalType(PrincipalType&& value) { m_principalTypeHasBeenSet = true; m_principalType = std::move(value); } /** * <p>The entity type for which the assignment will be created.</p> */ inline CreateAccountAssignmentRequest& WithPrincipalType(const PrincipalType& value) { SetPrincipalType(value); return *this;} /** * <p>The entity type for which the assignment will be created.</p> */ inline CreateAccountAssignmentRequest& WithPrincipalType(PrincipalType&& value) { SetPrincipalType(std::move(value)); return *this;} /** * <p>An identifier for an object in AWS SSO, such as a user or group. PrincipalIds * are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more * information about PrincipalIds in AWS SSO, see the <a * href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">AWS SSO * Identity Store API Reference</a>.</p> */ inline const Aws::String& GetPrincipalId() const{ return m_principalId; } /** * <p>An identifier for an object in AWS SSO, such as a user or group. PrincipalIds * are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more * information about PrincipalIds in AWS SSO, see the <a * href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">AWS SSO * Identity Store API Reference</a>.</p> */ inline bool PrincipalIdHasBeenSet() const { return m_principalIdHasBeenSet; } /** * <p>An identifier for an object in AWS SSO, such as a user or group. PrincipalIds * are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more * information about PrincipalIds in AWS SSO, see the <a * href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">AWS SSO * Identity Store API Reference</a>.</p> */ inline void SetPrincipalId(const Aws::String& value) { m_principalIdHasBeenSet = true; m_principalId = value; } /** * <p>An identifier for an object in AWS SSO, such as a user or group. PrincipalIds * are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more * information about PrincipalIds in AWS SSO, see the <a * href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">AWS SSO * Identity Store API Reference</a>.</p> */ inline void SetPrincipalId(Aws::String&& value) { m_principalIdHasBeenSet = true; m_principalId = std::move(value); } /** * <p>An identifier for an object in AWS SSO, such as a user or group. PrincipalIds * are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more * information about PrincipalIds in AWS SSO, see the <a * href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">AWS SSO * Identity Store API Reference</a>.</p> */ inline void SetPrincipalId(const char* value) { m_principalIdHasBeenSet = true; m_principalId.assign(value); } /** * <p>An identifier for an object in AWS SSO, such as a user or group. PrincipalIds * are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more * information about PrincipalIds in AWS SSO, see the <a * href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">AWS SSO * Identity Store API Reference</a>.</p> */ inline CreateAccountAssignmentRequest& WithPrincipalId(const Aws::String& value) { SetPrincipalId(value); return *this;} /** * <p>An identifier for an object in AWS SSO, such as a user or group. PrincipalIds * are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more * information about PrincipalIds in AWS SSO, see the <a * href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">AWS SSO * Identity Store API Reference</a>.</p> */ inline CreateAccountAssignmentRequest& WithPrincipalId(Aws::String&& value) { SetPrincipalId(std::move(value)); return *this;} /** * <p>An identifier for an object in AWS SSO, such as a user or group. PrincipalIds * are GUIDs (For example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more * information about PrincipalIds in AWS SSO, see the <a * href="/singlesignon/latest/IdentityStoreAPIReference/welcome.html">AWS SSO * Identity Store API Reference</a>.</p> */ inline CreateAccountAssignmentRequest& WithPrincipalId(const char* value) { SetPrincipalId(value); return *this;} private: Aws::String m_instanceArn; bool m_instanceArnHasBeenSet; Aws::String m_targetId; bool m_targetIdHasBeenSet; TargetType m_targetType; bool m_targetTypeHasBeenSet; Aws::String m_permissionSetArn; bool m_permissionSetArnHasBeenSet; PrincipalType m_principalType; bool m_principalTypeHasBeenSet; Aws::String m_principalId; bool m_principalIdHasBeenSet; }; } // namespace Model } // namespace SSOAdmin } // namespace Aws
jt70471/aws-sdk-cpp
aws-cpp-sdk-sso-admin/include/aws/sso-admin/model/CreateAccountAssignmentRequest.h
C
apache-2.0
15,229
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // <auto-generated/> #nullable disable using System; using System.Collections.Generic; using System.Text.Json; using System.Threading; using System.Threading.Tasks; using System.Xml.Linq; using Azure.Core; using Azure.Core.Pipeline; using Azure.Data.Tables.Models; namespace Azure.Data.Tables { internal partial class TableRestClient { private string url; private string version; private ClientDiagnostics _clientDiagnostics; private HttpPipeline _pipeline; /// <summary> Initializes a new instance of TableRestClient. </summary> /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param> /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param> /// <param name="url"> The URL of the service account or table that is the targe of the desired operation. </param> /// <param name="version"> Specifies the version of the operation to use for this request. </param> /// <exception cref="ArgumentNullException"> <paramref name="url"/> or <paramref name="version"/> is null. </exception> public TableRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string url, string version = "2019-02-02") { if (url == null) { throw new ArgumentNullException(nameof(url)); } if (version == null) { throw new ArgumentNullException(nameof(version)); } this.url = url; this.version = version; _clientDiagnostics = clientDiagnostics; _pipeline = pipeline; } internal HttpMessage CreateQueryRequest(string requestId, string nextTableName, QueryOptions queryOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendPath("/Tables", false); if (queryOptions?.Format != null) { uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } if (queryOptions?.Top != null) { uri.AppendQuery("$top", queryOptions.Top.Value, true); } if (queryOptions?.Select != null) { uri.AppendQuery("$select", queryOptions.Select, true); } if (queryOptions?.Filter != null) { uri.AppendQuery("$filter", queryOptions.Filter, true); } if (nextTableName != null) { uri.AppendQuery("NextTableName", nextTableName, true); } request.Uri = uri; request.Headers.Add("x-ms-version", version); if (requestId != null) { request.Headers.Add("x-ms-client-request-id", requestId); } request.Headers.Add("DataServiceVersion", "3.0"); request.Headers.Add("Accept", "application/json"); return message; } /// <summary> Queries tables under the given account. </summary> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="nextTableName"> A table query continuation token from a previous call. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> public async Task<ResponseWithHeaders<TableQueryResponse, TableQueryHeaders>> QueryAsync(string requestId = null, string nextTableName = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { using var message = CreateQueryRequest(requestId, nextTableName, queryOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new TableQueryHeaders(message.Response); switch (message.Response.Status) { case 200: { TableQueryResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); value = TableQueryResponse.DeserializeTableQueryResponse(document.RootElement); return ResponseWithHeaders.FromValue(value, headers, message.Response); } default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Queries tables under the given account. </summary> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="nextTableName"> A table query continuation token from a previous call. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> public ResponseWithHeaders<TableQueryResponse, TableQueryHeaders> Query(string requestId = null, string nextTableName = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { using var message = CreateQueryRequest(requestId, nextTableName, queryOptions); _pipeline.Send(message, cancellationToken); var headers = new TableQueryHeaders(message.Response); switch (message.Response.Status) { case 200: { TableQueryResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); value = TableQueryResponse.DeserializeTableQueryResponse(document.RootElement); return ResponseWithHeaders.FromValue(value, headers, message.Response); } default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } internal HttpMessage CreateCreateRequest(TableProperties tableProperties, string requestId, ResponseFormat? responsePreference, QueryOptions queryOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendPath("/Tables", false); if (queryOptions?.Format != null) { uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; request.Headers.Add("x-ms-version", version); if (requestId != null) { request.Headers.Add("x-ms-client-request-id", requestId); } request.Headers.Add("DataServiceVersion", "3.0"); if (responsePreference != null) { request.Headers.Add("Prefer", responsePreference.Value.ToString()); } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json;odata=nometadata"); var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteObjectValue(tableProperties); request.Content = content; return message; } /// <summary> Creates a new table under the given account. </summary> /// <param name="tableProperties"> The Table properties. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="responsePreference"> Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="tableProperties"/> is null. </exception> public async Task<ResponseWithHeaders<TableResponse, TableCreateHeaders>> CreateAsync(TableProperties tableProperties, string requestId = null, ResponseFormat? responsePreference = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (tableProperties == null) { throw new ArgumentNullException(nameof(tableProperties)); } using var message = CreateCreateRequest(tableProperties, requestId, responsePreference, queryOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new TableCreateHeaders(message.Response); switch (message.Response.Status) { case 201: { TableResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); value = TableResponse.DeserializeTableResponse(document.RootElement); return ResponseWithHeaders.FromValue(value, headers, message.Response); } case 204: return ResponseWithHeaders.FromValue<TableResponse, TableCreateHeaders>(null, headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Creates a new table under the given account. </summary> /// <param name="tableProperties"> The Table properties. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="responsePreference"> Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="tableProperties"/> is null. </exception> public ResponseWithHeaders<TableResponse, TableCreateHeaders> Create(TableProperties tableProperties, string requestId = null, ResponseFormat? responsePreference = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (tableProperties == null) { throw new ArgumentNullException(nameof(tableProperties)); } using var message = CreateCreateRequest(tableProperties, requestId, responsePreference, queryOptions); _pipeline.Send(message, cancellationToken); var headers = new TableCreateHeaders(message.Response); switch (message.Response.Status) { case 201: { TableResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); value = TableResponse.DeserializeTableResponse(document.RootElement); return ResponseWithHeaders.FromValue(value, headers, message.Response); } case 204: return ResponseWithHeaders.FromValue<TableResponse, TableCreateHeaders>(null, headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } internal HttpMessage CreateDeleteRequest(string table, string requestId) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendPath("/Tables('", false); uri.AppendPath(table, true); uri.AppendPath("')", false); request.Uri = uri; request.Headers.Add("x-ms-version", version); if (requestId != null) { request.Headers.Add("x-ms-client-request-id", requestId); } request.Headers.Add("Accept", "application/json"); return message; } /// <summary> Operation permanently deletes the specified table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/> is null. </exception> public async Task<ResponseWithHeaders<TableDeleteHeaders>> DeleteAsync(string table, string requestId = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } using var message = CreateDeleteRequest(table, requestId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new TableDeleteHeaders(message.Response); switch (message.Response.Status) { case 204: return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Operation permanently deletes the specified table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/> is null. </exception> public ResponseWithHeaders<TableDeleteHeaders> Delete(string table, string requestId = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } using var message = CreateDeleteRequest(table, requestId); _pipeline.Send(message, cancellationToken); var headers = new TableDeleteHeaders(message.Response); switch (message.Response.Status) { case 204: return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } internal HttpMessage CreateQueryEntitiesRequest(string table, int? timeout, string requestId, string nextPartitionKey, string nextRowKey, QueryOptions queryOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendPath("/", false); uri.AppendPath(table, true); uri.AppendPath("()", false); if (timeout != null) { uri.AppendQuery("timeout", timeout.Value, true); } if (queryOptions?.Format != null) { uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } if (queryOptions?.Top != null) { uri.AppendQuery("$top", queryOptions.Top.Value, true); } if (queryOptions?.Select != null) { uri.AppendQuery("$select", queryOptions.Select, true); } if (queryOptions?.Filter != null) { uri.AppendQuery("$filter", queryOptions.Filter, true); } if (nextPartitionKey != null) { uri.AppendQuery("NextPartitionKey", nextPartitionKey, true); } if (nextRowKey != null) { uri.AppendQuery("NextRowKey", nextRowKey, true); } request.Uri = uri; request.Headers.Add("x-ms-version", version); if (requestId != null) { request.Headers.Add("x-ms-client-request-id", requestId); } request.Headers.Add("DataServiceVersion", "3.0"); request.Headers.Add("Accept", "application/json"); return message; } /// <summary> Queries entities in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="nextPartitionKey"> An entity query continuation token from a previous call. </param> /// <param name="nextRowKey"> An entity query continuation token from a previous call. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/> is null. </exception> public async Task<ResponseWithHeaders<TableEntityQueryResponse, TableQueryEntitiesHeaders>> QueryEntitiesAsync(string table, int? timeout = null, string requestId = null, string nextPartitionKey = null, string nextRowKey = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } using var message = CreateQueryEntitiesRequest(table, timeout, requestId, nextPartitionKey, nextRowKey, queryOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new TableQueryEntitiesHeaders(message.Response); switch (message.Response.Status) { case 200: { TableEntityQueryResponse value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); value = TableEntityQueryResponse.DeserializeTableEntityQueryResponse(document.RootElement); return ResponseWithHeaders.FromValue(value, headers, message.Response); } default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Queries entities in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="nextPartitionKey"> An entity query continuation token from a previous call. </param> /// <param name="nextRowKey"> An entity query continuation token from a previous call. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/> is null. </exception> public ResponseWithHeaders<TableEntityQueryResponse, TableQueryEntitiesHeaders> QueryEntities(string table, int? timeout = null, string requestId = null, string nextPartitionKey = null, string nextRowKey = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } using var message = CreateQueryEntitiesRequest(table, timeout, requestId, nextPartitionKey, nextRowKey, queryOptions); _pipeline.Send(message, cancellationToken); var headers = new TableQueryEntitiesHeaders(message.Response); switch (message.Response.Status) { case 200: { TableEntityQueryResponse value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); value = TableEntityQueryResponse.DeserializeTableEntityQueryResponse(document.RootElement); return ResponseWithHeaders.FromValue(value, headers, message.Response); } default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } internal HttpMessage CreateQueryEntitiesWithPartitionAndRowKeyRequest(string table, string partitionKey, string rowKey, int? timeout, string requestId, QueryOptions queryOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendPath("/", false); uri.AppendPath(table, true); uri.AppendPath("(PartitionKey='", false); uri.AppendPath(partitionKey, true); uri.AppendPath("',RowKey='", false); uri.AppendPath(rowKey, true); uri.AppendPath("')", false); if (timeout != null) { uri.AppendQuery("timeout", timeout.Value, true); } if (queryOptions?.Format != null) { uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } if (queryOptions?.Select != null) { uri.AppendQuery("$select", queryOptions.Select, true); } if (queryOptions?.Filter != null) { uri.AppendQuery("$filter", queryOptions.Filter, true); } request.Uri = uri; request.Headers.Add("x-ms-version", version); if (requestId != null) { request.Headers.Add("x-ms-client-request-id", requestId); } request.Headers.Add("DataServiceVersion", "3.0"); request.Headers.Add("Accept", "application/json"); return message; } /// <summary> Queries entities in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="partitionKey"> The partition key of the entity. </param> /// <param name="rowKey"> The row key of the entity. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/>, <paramref name="partitionKey"/>, or <paramref name="rowKey"/> is null. </exception> public async Task<ResponseWithHeaders<IReadOnlyDictionary<string, object>, TableQueryEntitiesWithPartitionAndRowKeyHeaders>> QueryEntitiesWithPartitionAndRowKeyAsync(string table, string partitionKey, string rowKey, int? timeout = null, string requestId = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } if (partitionKey == null) { throw new ArgumentNullException(nameof(partitionKey)); } if (rowKey == null) { throw new ArgumentNullException(nameof(rowKey)); } using var message = CreateQueryEntitiesWithPartitionAndRowKeyRequest(table, partitionKey, rowKey, timeout, requestId, queryOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new TableQueryEntitiesWithPartitionAndRowKeyHeaders(message.Response); switch (message.Response.Status) { case 200: { IReadOnlyDictionary<string, object> value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); Dictionary<string, object> dictionary = new Dictionary<string, object>(); foreach (var property in document.RootElement.EnumerateObject()) { dictionary.Add(property.Name, property.Value.GetObject()); } value = dictionary; return ResponseWithHeaders.FromValue(value, headers, message.Response); } default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Queries entities in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="partitionKey"> The partition key of the entity. </param> /// <param name="rowKey"> The row key of the entity. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/>, <paramref name="partitionKey"/>, or <paramref name="rowKey"/> is null. </exception> public ResponseWithHeaders<IReadOnlyDictionary<string, object>, TableQueryEntitiesWithPartitionAndRowKeyHeaders> QueryEntitiesWithPartitionAndRowKey(string table, string partitionKey, string rowKey, int? timeout = null, string requestId = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } if (partitionKey == null) { throw new ArgumentNullException(nameof(partitionKey)); } if (rowKey == null) { throw new ArgumentNullException(nameof(rowKey)); } using var message = CreateQueryEntitiesWithPartitionAndRowKeyRequest(table, partitionKey, rowKey, timeout, requestId, queryOptions); _pipeline.Send(message, cancellationToken); var headers = new TableQueryEntitiesWithPartitionAndRowKeyHeaders(message.Response); switch (message.Response.Status) { case 200: { IReadOnlyDictionary<string, object> value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); Dictionary<string, object> dictionary = new Dictionary<string, object>(); foreach (var property in document.RootElement.EnumerateObject()) { dictionary.Add(property.Name, property.Value.GetObject()); } value = dictionary; return ResponseWithHeaders.FromValue(value, headers, message.Response); } default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } internal HttpMessage CreateUpdateEntityRequest(string table, string partitionKey, string rowKey, int? timeout, string requestId, string ifMatch, IDictionary<string, object> tableEntityProperties, QueryOptions queryOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendPath("/", false); uri.AppendPath(table, true); uri.AppendPath("(PartitionKey='", false); uri.AppendPath(partitionKey, true); uri.AppendPath("',RowKey='", false); uri.AppendPath(rowKey, true); uri.AppendPath("')", false); if (timeout != null) { uri.AppendQuery("timeout", timeout.Value, true); } if (queryOptions?.Format != null) { uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; request.Headers.Add("x-ms-version", version); if (requestId != null) { request.Headers.Add("x-ms-client-request-id", requestId); } request.Headers.Add("DataServiceVersion", "3.0"); if (ifMatch != null) { request.Headers.Add("If-Match", ifMatch); } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); if (tableEntityProperties != null) { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteStartObject(); foreach (var item in tableEntityProperties) { content.JsonWriter.WritePropertyName(item.Key); content.JsonWriter.WriteObjectValue(item.Value); } content.JsonWriter.WriteEndObject(); request.Content = content; } return message; } /// <summary> Update entity in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="partitionKey"> The partition key of the entity. </param> /// <param name="rowKey"> The row key of the entity. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="ifMatch"> Match condition for an entity to be updated. If specified and a matching entity is not found, an error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, an insert will be performed when no existing entity is found to update and a replace will be performed if an existing entity is found. </param> /// <param name="tableEntityProperties"> The properties for the table entity. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/>, <paramref name="partitionKey"/>, or <paramref name="rowKey"/> is null. </exception> public async Task<ResponseWithHeaders<TableUpdateEntityHeaders>> UpdateEntityAsync(string table, string partitionKey, string rowKey, int? timeout = null, string requestId = null, string ifMatch = null, IDictionary<string, object> tableEntityProperties = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } if (partitionKey == null) { throw new ArgumentNullException(nameof(partitionKey)); } if (rowKey == null) { throw new ArgumentNullException(nameof(rowKey)); } using var message = CreateUpdateEntityRequest(table, partitionKey, rowKey, timeout, requestId, ifMatch, tableEntityProperties, queryOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new TableUpdateEntityHeaders(message.Response); switch (message.Response.Status) { case 204: return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Update entity in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="partitionKey"> The partition key of the entity. </param> /// <param name="rowKey"> The row key of the entity. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="ifMatch"> Match condition for an entity to be updated. If specified and a matching entity is not found, an error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, an insert will be performed when no existing entity is found to update and a replace will be performed if an existing entity is found. </param> /// <param name="tableEntityProperties"> The properties for the table entity. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/>, <paramref name="partitionKey"/>, or <paramref name="rowKey"/> is null. </exception> public ResponseWithHeaders<TableUpdateEntityHeaders> UpdateEntity(string table, string partitionKey, string rowKey, int? timeout = null, string requestId = null, string ifMatch = null, IDictionary<string, object> tableEntityProperties = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } if (partitionKey == null) { throw new ArgumentNullException(nameof(partitionKey)); } if (rowKey == null) { throw new ArgumentNullException(nameof(rowKey)); } using var message = CreateUpdateEntityRequest(table, partitionKey, rowKey, timeout, requestId, ifMatch, tableEntityProperties, queryOptions); _pipeline.Send(message, cancellationToken); var headers = new TableUpdateEntityHeaders(message.Response); switch (message.Response.Status) { case 204: return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } internal HttpMessage CreateMergeEntityRequest(string table, string partitionKey, string rowKey, int? timeout, string requestId, string ifMatch, IDictionary<string, object> tableEntityProperties, QueryOptions queryOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendPath("/", false); uri.AppendPath(table, true); uri.AppendPath("(PartitionKey='", false); uri.AppendPath(partitionKey, true); uri.AppendPath("',RowKey='", false); uri.AppendPath(rowKey, true); uri.AppendPath("')", false); if (timeout != null) { uri.AppendQuery("timeout", timeout.Value, true); } if (queryOptions?.Format != null) { uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; request.Headers.Add("x-ms-version", version); if (requestId != null) { request.Headers.Add("x-ms-client-request-id", requestId); } request.Headers.Add("DataServiceVersion", "3.0"); if (ifMatch != null) { request.Headers.Add("If-Match", ifMatch); } request.Headers.Add("Content-Type", "application/json"); request.Headers.Add("Accept", "application/json"); if (tableEntityProperties != null) { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteStartObject(); foreach (var item in tableEntityProperties) { content.JsonWriter.WritePropertyName(item.Key); content.JsonWriter.WriteObjectValue(item.Value); } content.JsonWriter.WriteEndObject(); request.Content = content; } return message; } /// <summary> Merge entity in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="partitionKey"> The partition key of the entity. </param> /// <param name="rowKey"> The row key of the entity. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="ifMatch"> Match condition for an entity to be updated. If specified and a matching entity is not found, an error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, an insert will be performed when no existing entity is found to update and a merge will be performed if an existing entity is found. </param> /// <param name="tableEntityProperties"> The properties for the table entity. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/>, <paramref name="partitionKey"/>, or <paramref name="rowKey"/> is null. </exception> public async Task<ResponseWithHeaders<TableMergeEntityHeaders>> MergeEntityAsync(string table, string partitionKey, string rowKey, int? timeout = null, string requestId = null, string ifMatch = null, IDictionary<string, object> tableEntityProperties = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } if (partitionKey == null) { throw new ArgumentNullException(nameof(partitionKey)); } if (rowKey == null) { throw new ArgumentNullException(nameof(rowKey)); } using var message = CreateMergeEntityRequest(table, partitionKey, rowKey, timeout, requestId, ifMatch, tableEntityProperties, queryOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new TableMergeEntityHeaders(message.Response); switch (message.Response.Status) { case 204: return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Merge entity in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="partitionKey"> The partition key of the entity. </param> /// <param name="rowKey"> The row key of the entity. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="ifMatch"> Match condition for an entity to be updated. If specified and a matching entity is not found, an error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, an insert will be performed when no existing entity is found to update and a merge will be performed if an existing entity is found. </param> /// <param name="tableEntityProperties"> The properties for the table entity. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/>, <paramref name="partitionKey"/>, or <paramref name="rowKey"/> is null. </exception> public ResponseWithHeaders<TableMergeEntityHeaders> MergeEntity(string table, string partitionKey, string rowKey, int? timeout = null, string requestId = null, string ifMatch = null, IDictionary<string, object> tableEntityProperties = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } if (partitionKey == null) { throw new ArgumentNullException(nameof(partitionKey)); } if (rowKey == null) { throw new ArgumentNullException(nameof(rowKey)); } using var message = CreateMergeEntityRequest(table, partitionKey, rowKey, timeout, requestId, ifMatch, tableEntityProperties, queryOptions); _pipeline.Send(message, cancellationToken); var headers = new TableMergeEntityHeaders(message.Response); switch (message.Response.Status) { case 204: return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } internal HttpMessage CreateDeleteEntityRequest(string table, string partitionKey, string rowKey, string ifMatch, int? timeout, string requestId, QueryOptions queryOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendPath("/", false); uri.AppendPath(table, true); uri.AppendPath("(PartitionKey='", false); uri.AppendPath(partitionKey, true); uri.AppendPath("',RowKey='", false); uri.AppendPath(rowKey, true); uri.AppendPath("')", false); if (timeout != null) { uri.AppendQuery("timeout", timeout.Value, true); } if (queryOptions?.Format != null) { uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; request.Headers.Add("x-ms-version", version); if (requestId != null) { request.Headers.Add("x-ms-client-request-id", requestId); } request.Headers.Add("DataServiceVersion", "3.0"); request.Headers.Add("If-Match", ifMatch); request.Headers.Add("Accept", "application/json;odata=minimalmetadata"); return message; } /// <summary> Deletes the specified entity in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="partitionKey"> The partition key of the entity. </param> /// <param name="rowKey"> The row key of the entity. </param> /// <param name="ifMatch"> Match condition for an entity to be deleted. If specified and a matching entity is not found, an error will be raised. To force an unconditional delete, set to the wildcard character (*). </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/>, <paramref name="partitionKey"/>, <paramref name="rowKey"/>, or <paramref name="ifMatch"/> is null. </exception> public async Task<ResponseWithHeaders<TableDeleteEntityHeaders>> DeleteEntityAsync(string table, string partitionKey, string rowKey, string ifMatch, int? timeout = null, string requestId = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } if (partitionKey == null) { throw new ArgumentNullException(nameof(partitionKey)); } if (rowKey == null) { throw new ArgumentNullException(nameof(rowKey)); } if (ifMatch == null) { throw new ArgumentNullException(nameof(ifMatch)); } using var message = CreateDeleteEntityRequest(table, partitionKey, rowKey, ifMatch, timeout, requestId, queryOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new TableDeleteEntityHeaders(message.Response); switch (message.Response.Status) { case 204: return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Deletes the specified entity in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="partitionKey"> The partition key of the entity. </param> /// <param name="rowKey"> The row key of the entity. </param> /// <param name="ifMatch"> Match condition for an entity to be deleted. If specified and a matching entity is not found, an error will be raised. To force an unconditional delete, set to the wildcard character (*). </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/>, <paramref name="partitionKey"/>, <paramref name="rowKey"/>, or <paramref name="ifMatch"/> is null. </exception> public ResponseWithHeaders<TableDeleteEntityHeaders> DeleteEntity(string table, string partitionKey, string rowKey, string ifMatch, int? timeout = null, string requestId = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } if (partitionKey == null) { throw new ArgumentNullException(nameof(partitionKey)); } if (rowKey == null) { throw new ArgumentNullException(nameof(rowKey)); } if (ifMatch == null) { throw new ArgumentNullException(nameof(ifMatch)); } using var message = CreateDeleteEntityRequest(table, partitionKey, rowKey, ifMatch, timeout, requestId, queryOptions); _pipeline.Send(message, cancellationToken); var headers = new TableDeleteEntityHeaders(message.Response); switch (message.Response.Status) { case 204: return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } internal HttpMessage CreateInsertEntityRequest(string table, int? timeout, string requestId, ResponseFormat? responsePreference, IDictionary<string, object> tableEntityProperties, QueryOptions queryOptions) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendPath("/", false); uri.AppendPath(table, true); if (timeout != null) { uri.AppendQuery("timeout", timeout.Value, true); } if (queryOptions?.Format != null) { uri.AppendQuery("$format", queryOptions.Format.Value.ToString(), true); } request.Uri = uri; request.Headers.Add("x-ms-version", version); if (requestId != null) { request.Headers.Add("x-ms-client-request-id", requestId); } request.Headers.Add("DataServiceVersion", "3.0"); if (responsePreference != null) { request.Headers.Add("Prefer", responsePreference.Value.ToString()); } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json;odata=nometadata"); if (tableEntityProperties != null) { var content = new Utf8JsonRequestContent(); content.JsonWriter.WriteStartObject(); foreach (var item in tableEntityProperties) { content.JsonWriter.WritePropertyName(item.Key); content.JsonWriter.WriteObjectValue(item.Value); } content.JsonWriter.WriteEndObject(); request.Content = content; } return message; } /// <summary> Insert entity in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="responsePreference"> Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. </param> /// <param name="tableEntityProperties"> The properties for the table entity. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/> is null. </exception> public async Task<ResponseWithHeaders<IReadOnlyDictionary<string, object>, TableInsertEntityHeaders>> InsertEntityAsync(string table, int? timeout = null, string requestId = null, ResponseFormat? responsePreference = null, IDictionary<string, object> tableEntityProperties = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } using var message = CreateInsertEntityRequest(table, timeout, requestId, responsePreference, tableEntityProperties, queryOptions); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new TableInsertEntityHeaders(message.Response); switch (message.Response.Status) { case 201: { IReadOnlyDictionary<string, object> value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); Dictionary<string, object> dictionary = new Dictionary<string, object>(); foreach (var property in document.RootElement.EnumerateObject()) { dictionary.Add(property.Name, property.Value.GetObject()); } value = dictionary; return ResponseWithHeaders.FromValue(value, headers, message.Response); } case 204: return ResponseWithHeaders.FromValue<IReadOnlyDictionary<string, object>, TableInsertEntityHeaders>(null, headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Insert entity in a table. </summary> /// <param name="table"> The name of the table. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="responsePreference"> Specifies whether the response should include the inserted entity in the payload. Possible values are return-no-content and return-content. </param> /// <param name="tableEntityProperties"> The properties for the table entity. </param> /// <param name="queryOptions"> Parameter group. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/> is null. </exception> public ResponseWithHeaders<IReadOnlyDictionary<string, object>, TableInsertEntityHeaders> InsertEntity(string table, int? timeout = null, string requestId = null, ResponseFormat? responsePreference = null, IDictionary<string, object> tableEntityProperties = null, QueryOptions queryOptions = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } using var message = CreateInsertEntityRequest(table, timeout, requestId, responsePreference, tableEntityProperties, queryOptions); _pipeline.Send(message, cancellationToken); var headers = new TableInsertEntityHeaders(message.Response); switch (message.Response.Status) { case 201: { IReadOnlyDictionary<string, object> value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); Dictionary<string, object> dictionary = new Dictionary<string, object>(); foreach (var property in document.RootElement.EnumerateObject()) { dictionary.Add(property.Name, property.Value.GetObject()); } value = dictionary; return ResponseWithHeaders.FromValue(value, headers, message.Response); } case 204: return ResponseWithHeaders.FromValue<IReadOnlyDictionary<string, object>, TableInsertEntityHeaders>(null, headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } internal HttpMessage CreateGetAccessPolicyRequest(string table, int? timeout, string requestId) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendPath("/", false); uri.AppendPath(table, true); if (timeout != null) { uri.AppendQuery("timeout", timeout.Value, true); } uri.AppendQuery("comp", "acl", true); request.Uri = uri; request.Headers.Add("x-ms-version", version); if (requestId != null) { request.Headers.Add("x-ms-client-request-id", requestId); } request.Headers.Add("Accept", "application/xml"); return message; } /// <summary> Retrieves details about any stored access policies specified on the table that may be used with Shared Access Signatures. </summary> /// <param name="table"> The name of the table. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/> is null. </exception> public async Task<ResponseWithHeaders<IReadOnlyList<SignedIdentifier>, TableGetAccessPolicyHeaders>> GetAccessPolicyAsync(string table, int? timeout = null, string requestId = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } using var message = CreateGetAccessPolicyRequest(table, timeout, requestId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new TableGetAccessPolicyHeaders(message.Response); switch (message.Response.Status) { case 200: { IReadOnlyList<SignedIdentifier> value = default; var document = XDocument.Load(message.Response.ContentStream, LoadOptions.PreserveWhitespace); if (document.Element("SignedIdentifiers") is XElement signedIdentifiersElement) { var array = new List<SignedIdentifier>(); foreach (var e in signedIdentifiersElement.Elements("SignedIdentifier")) { array.Add(SignedIdentifier.DeserializeSignedIdentifier(e)); } value = array; } return ResponseWithHeaders.FromValue(value, headers, message.Response); } default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Retrieves details about any stored access policies specified on the table that may be used with Shared Access Signatures. </summary> /// <param name="table"> The name of the table. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/> is null. </exception> public ResponseWithHeaders<IReadOnlyList<SignedIdentifier>, TableGetAccessPolicyHeaders> GetAccessPolicy(string table, int? timeout = null, string requestId = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } using var message = CreateGetAccessPolicyRequest(table, timeout, requestId); _pipeline.Send(message, cancellationToken); var headers = new TableGetAccessPolicyHeaders(message.Response); switch (message.Response.Status) { case 200: { IReadOnlyList<SignedIdentifier> value = default; var document = XDocument.Load(message.Response.ContentStream, LoadOptions.PreserveWhitespace); if (document.Element("SignedIdentifiers") is XElement signedIdentifiersElement) { var array = new List<SignedIdentifier>(); foreach (var e in signedIdentifiersElement.Elements("SignedIdentifier")) { array.Add(SignedIdentifier.DeserializeSignedIdentifier(e)); } value = array; } return ResponseWithHeaders.FromValue(value, headers, message.Response); } default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } internal HttpMessage CreateSetAccessPolicyRequest(string table, int? timeout, string requestId, IEnumerable<SignedIdentifier> tableAcl) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.AppendRaw(url, false); uri.AppendPath("/", false); uri.AppendPath(table, true); if (timeout != null) { uri.AppendQuery("timeout", timeout.Value, true); } uri.AppendQuery("comp", "acl", true); request.Uri = uri; request.Headers.Add("x-ms-version", version); if (requestId != null) { request.Headers.Add("x-ms-client-request-id", requestId); } request.Headers.Add("Accept", "application/xml"); request.Headers.Add("Content-Type", "application/xml"); if (tableAcl != null) { var content = new XmlWriterContent(); content.XmlWriter.WriteStartElement("SignedIdentifiers"); foreach (var item in tableAcl) { content.XmlWriter.WriteObjectValue(item, "SignedIdentifier"); } content.XmlWriter.WriteEndElement(); request.Content = content; } return message; } /// <summary> Sets stored access policies for the table that may be used with Shared Access Signatures. </summary> /// <param name="table"> The name of the table. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="tableAcl"> The acls for the table. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/> is null. </exception> public async Task<ResponseWithHeaders<TableSetAccessPolicyHeaders>> SetAccessPolicyAsync(string table, int? timeout = null, string requestId = null, IEnumerable<SignedIdentifier> tableAcl = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } using var message = CreateSetAccessPolicyRequest(table, timeout, requestId, tableAcl); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); var headers = new TableSetAccessPolicyHeaders(message.Response); switch (message.Response.Status) { case 204: return ResponseWithHeaders.FromValue(headers, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } } /// <summary> Sets stored access policies for the table that may be used with Shared Access Signatures. </summary> /// <param name="table"> The name of the table. </param> /// <param name="timeout"> The timeout parameter is expressed in seconds. </param> /// <param name="requestId"> Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when analytics logging is enabled. </param> /// <param name="tableAcl"> The acls for the table. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="ArgumentNullException"> <paramref name="table"/> is null. </exception> public ResponseWithHeaders<TableSetAccessPolicyHeaders> SetAccessPolicy(string table, int? timeout = null, string requestId = null, IEnumerable<SignedIdentifier> tableAcl = null, CancellationToken cancellationToken = default) { if (table == null) { throw new ArgumentNullException(nameof(table)); } using var message = CreateSetAccessPolicyRequest(table, timeout, requestId, tableAcl); _pipeline.Send(message, cancellationToken); var headers = new TableSetAccessPolicyHeaders(message.Response); switch (message.Response.Status) { case 204: return ResponseWithHeaders.FromValue(headers, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } } }
markcowl/azure-sdk-for-net
sdk/tables/Azure.Data.Tables/src/Generated/TableRestClient.cs
C#
apache-2.0
70,204
Jive SBS Plugin: Human Friendly URLs ==================================== Jive SBS plugin providing human friendly URLs for documents Installation steps ------------------ 1. Install the plugin via the administration console (System -> Plugins -> Add Plugin) 2. Restart the application 3. Go to the administration console -> System -> Management -> Human friendly URLs and find caption "Create new index of human friendly URLs for published documents:". Click the button labelled "Update index". 4. Optionally install human friendly urls links extension which generates HF URLs on pages. See https://github.com/jbossorg/sbs-human-friendly-urls-links 5. Add rule to the Apache rewrite module which redirects every /docs/DOC-1234 request to HF URL and then reload apache configuration: RewriteCond %{QUERY_STRING} !^.*uniqueTitle=false.*$ RewriteCond %{REQUEST_URI} !^.*/restore.*$ RewriteCond %{REQUEST_URI} !^.*/delete.*$ RewriteRule ^/docs/DOC-(.*) /hfurl/redirectToHFURL.jspa?url=/docs/DOC-$1&params=%{QUERY_STRING} [R=301,L]
jbossorg/sbs-human-friendly-urls
README.md
Markdown
apache-2.0
1,046
/* * Licensed to Apereo under one or more contributor license * agreements. See the NOTICE file distributed with this work * for additional information regarding copyright ownership. * Apereo licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a * copy of the License at the following location: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.jasig.cas.support.oauth.web; import org.apache.http.HttpStatus; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import org.jasig.cas.support.oauth.CentralOAuthService; import org.jasig.cas.support.oauth.OAuthConstants; import org.jasig.cas.support.oauth.token.AccessToken; import org.jasig.cas.support.oauth.token.InvalidTokenException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import org.junit.Test; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.web.servlet.ModelAndView; /** * This class tests the {@link OAuth20RevokeClientPrincipalTokensController} class. * * @author Fitz Elliott * @author Longze Chen * @since 4.1.5 */ public final class OAuth20RevokeClientPrincipalTokensControllerTests { private static final String CONTEXT = "/oauth2.0/"; private static final String CONTENT_TYPE = "application/json"; private static final String AT_ID = "AT-1"; private static final String CLIENT_ID = "client1"; @Test public void verifyNoTokenOrAuthHeader() throws Exception { final MockHttpServletRequest mockRequest = new MockHttpServletRequest("POST", CONTEXT + OAuthConstants.REVOKE_URL); mockRequest.setParameter(OAuthConstants.CLIENT_ID, CLIENT_ID); final MockHttpServletResponse mockResponse = new MockHttpServletResponse(); final OAuth20WrapperController oauth20WrapperController = new OAuth20WrapperController(); oauth20WrapperController.afterPropertiesSet(); final ModelAndView modelAndView = oauth20WrapperController.handleRequest(mockRequest, mockResponse); assertNull(modelAndView); assertEquals(HttpStatus.SC_BAD_REQUEST, mockResponse.getStatus()); assertEquals(CONTENT_TYPE, mockResponse.getContentType()); final String expected = "{\"error\":\"" + OAuthConstants.INVALID_REQUEST + "\",\"error_description\":\"" + "Invalid or missing parameter 'access_token'\"}"; final ObjectMapper mapper = new ObjectMapper(); final JsonNode expectedObj = mapper.readTree(expected); final JsonNode receivedObj = mapper.readTree(mockResponse.getContentAsString()); assertEquals(expectedObj.get("error").asText(), receivedObj.get("error").asText()); assertEquals(expectedObj.get("error_description").asText(), receivedObj.get("error_description").asText()); } @Test public void verifyNoTokenAndAuthHeaderIsBlank() throws Exception { final MockHttpServletRequest mockRequest = new MockHttpServletRequest("POST", CONTEXT + OAuthConstants.REVOKE_URL); mockRequest.addHeader("Authorization", ""); mockRequest.setParameter(OAuthConstants.CLIENT_ID, CLIENT_ID); final MockHttpServletResponse mockResponse = new MockHttpServletResponse(); final OAuth20WrapperController oauth20WrapperController = new OAuth20WrapperController(); oauth20WrapperController.afterPropertiesSet(); final ModelAndView modelAndView = oauth20WrapperController.handleRequest(mockRequest, mockResponse); assertNull(modelAndView); assertEquals(HttpStatus.SC_BAD_REQUEST, mockResponse.getStatus()); assertEquals(CONTENT_TYPE, mockResponse.getContentType()); final String expected = "{\"error\":\"" + OAuthConstants.INVALID_REQUEST + "\",\"error_description\":\"" + "Invalid or missing parameter 'access_token'\"}"; final ObjectMapper mapper = new ObjectMapper(); final JsonNode expectedObj = mapper.readTree(expected); final JsonNode receivedObj = mapper.readTree(mockResponse.getContentAsString()); assertEquals(expectedObj.get("error").asText(), receivedObj.get("error").asText()); assertEquals(expectedObj.get("error_description").asText(), receivedObj.get("error_description").asText()); } @Test public void verifyNoTokenAndAuthHeaderIsMalformed() throws Exception { final MockHttpServletRequest mockRequest = new MockHttpServletRequest("POST", CONTEXT + OAuthConstants.REVOKE_URL); mockRequest.addHeader("Authorization", "Let me in i am authorized"); mockRequest.setParameter(OAuthConstants.CLIENT_ID, CLIENT_ID); final MockHttpServletResponse mockResponse = new MockHttpServletResponse(); final OAuth20WrapperController oauth20WrapperController = new OAuth20WrapperController(); oauth20WrapperController.afterPropertiesSet(); final ModelAndView modelAndView = oauth20WrapperController.handleRequest(mockRequest, mockResponse); assertNull(modelAndView); assertEquals(HttpStatus.SC_BAD_REQUEST, mockResponse.getStatus()); assertEquals(CONTENT_TYPE, mockResponse.getContentType()); final String expected = "{\"error\":\"" + OAuthConstants.INVALID_REQUEST + "\",\"error_description\":\"" + "Invalid or missing parameter 'access_token'\"}"; final ObjectMapper mapper = new ObjectMapper(); final JsonNode expectedObj = mapper.readTree(expected); final JsonNode receivedObj = mapper.readTree(mockResponse.getContentAsString()); assertEquals(expectedObj.get("error").asText(), receivedObj.get("error").asText()); assertEquals(expectedObj.get("error_description").asText(), receivedObj.get("error_description").asText()); } @Test public void verifyInvalidAccessToken() throws Exception { final CentralOAuthService centralOAuthService = mock(CentralOAuthService.class); when(centralOAuthService.getToken(AT_ID, AccessToken.class)).thenThrow(new InvalidTokenException("error")); when(centralOAuthService.getPersonalAccessToken(AT_ID)).thenReturn(null); final MockHttpServletRequest mockRequest = new MockHttpServletRequest("GET", CONTEXT + OAuthConstants.PROFILE_URL); mockRequest.setParameter(OAuthConstants.ACCESS_TOKEN, AT_ID); mockRequest.setParameter(OAuthConstants.CLIENT_ID, CLIENT_ID); final MockHttpServletResponse mockResponse = new MockHttpServletResponse(); final OAuth20WrapperController oauth20WrapperController = new OAuth20WrapperController(); oauth20WrapperController.setCentralOAuthService(centralOAuthService); oauth20WrapperController.afterPropertiesSet(); final ModelAndView modelAndView = oauth20WrapperController.handleRequest(mockRequest, mockResponse); assertNull(modelAndView); assertEquals(HttpStatus.SC_UNAUTHORIZED, mockResponse.getStatus()); assertEquals(CONTENT_TYPE, mockResponse.getContentType()); final ObjectMapper mapper = new ObjectMapper(); final String expected = "{\"error\":\"" + OAuthConstants.UNAUTHORIZED_REQUEST + "\",\"error_description\":\"" + OAuthConstants.INVALID_ACCESS_TOKEN_DESCRIPTION + "\"}"; final JsonNode expectedObj = mapper.readTree(expected); final JsonNode receivedObj = mapper.readTree(mockResponse.getContentAsString()); assertEquals(expectedObj.get("error").asText(), receivedObj.get("error").asText()); assertEquals(expectedObj.get("error_description").asText(), receivedObj.get("error_description").asText()); } @Test public void verifyOKWithAccessToken() throws Exception { final AccessToken accessToken = mock(AccessToken.class); when(accessToken.getId()).thenReturn(AT_ID); final CentralOAuthService centralOAuthService = mock(CentralOAuthService.class); when(centralOAuthService.getToken(AT_ID, AccessToken.class)).thenReturn(accessToken); when(centralOAuthService.revokeClientPrincipalTokens(accessToken, CLIENT_ID)).thenReturn(true); final MockHttpServletRequest mockRequest = new MockHttpServletRequest("POST", CONTEXT + OAuthConstants.REVOKE_URL); mockRequest.setParameter(OAuthConstants.ACCESS_TOKEN, AT_ID); mockRequest.setParameter(OAuthConstants.CLIENT_ID, CLIENT_ID); final MockHttpServletResponse mockResponse = new MockHttpServletResponse(); final OAuth20WrapperController oauth20WrapperController = new OAuth20WrapperController(); oauth20WrapperController.setCentralOAuthService(centralOAuthService); oauth20WrapperController.afterPropertiesSet(); final ModelAndView modelAndView = oauth20WrapperController.handleRequest(mockRequest, mockResponse); assertNull(modelAndView); assertEquals(HttpStatus.SC_NO_CONTENT, mockResponse.getStatus()); assertNull(mockResponse.getContentType()); assertEquals("null", mockResponse.getContentAsString()); } @Test public void verifyOKWithAuthHeader() throws Exception { final AccessToken accessToken = mock(AccessToken.class); when(accessToken.getId()).thenReturn(AT_ID); final CentralOAuthService centralOAuthService = mock(CentralOAuthService.class); when(centralOAuthService.getToken(AT_ID, AccessToken.class)).thenReturn(accessToken); when(centralOAuthService.revokeClientPrincipalTokens(accessToken, CLIENT_ID)).thenReturn(true); final MockHttpServletRequest mockRequest = new MockHttpServletRequest("POST", CONTEXT + OAuthConstants.REVOKE_URL); mockRequest.addHeader("Authorization", OAuthConstants.BEARER_TOKEN + " " + AT_ID); mockRequest.setParameter(OAuthConstants.CLIENT_ID, CLIENT_ID); final MockHttpServletResponse mockResponse = new MockHttpServletResponse(); final OAuth20WrapperController oauth20WrapperController = new OAuth20WrapperController(); oauth20WrapperController.setCentralOAuthService(centralOAuthService); oauth20WrapperController.afterPropertiesSet(); final ModelAndView modelAndView = oauth20WrapperController.handleRequest(mockRequest, mockResponse); assertNull(modelAndView); assertEquals(HttpStatus.SC_NO_CONTENT, mockResponse.getStatus()); assertNull(mockResponse.getContentType()); assertEquals("null", mockResponse.getContentAsString()); } @Test public void verifyFailedToRevokeTokens() throws Exception { final AccessToken accessToken = mock(AccessToken.class); when(accessToken.getId()).thenReturn(AT_ID); final CentralOAuthService centralOAuthService = mock(CentralOAuthService.class); when(centralOAuthService.getToken(AT_ID, AccessToken.class)).thenReturn(accessToken); when(centralOAuthService.revokeClientPrincipalTokens(accessToken, CLIENT_ID)).thenReturn(false); final MockHttpServletRequest mockRequest = new MockHttpServletRequest("POST", CONTEXT + OAuthConstants.REVOKE_URL); mockRequest.setParameter(OAuthConstants.ACCESS_TOKEN, AT_ID); mockRequest.setParameter(OAuthConstants.CLIENT_ID, CLIENT_ID); final MockHttpServletResponse mockResponse = new MockHttpServletResponse(); final OAuth20WrapperController oauth20WrapperController = new OAuth20WrapperController(); oauth20WrapperController.setCentralOAuthService(centralOAuthService); oauth20WrapperController.afterPropertiesSet(); final ModelAndView modelAndView = oauth20WrapperController.handleRequest(mockRequest, mockResponse); assertNull(modelAndView); assertEquals(HttpStatus.SC_BAD_REQUEST, mockResponse.getStatus()); assertEquals(CONTENT_TYPE, mockResponse.getContentType()); final String expected = "{\"error\":\"" + OAuthConstants.INVALID_REQUEST + "\",\"error_description\":\"" + OAuthConstants.INVALID_ACCESS_TOKEN_DESCRIPTION + "\"}"; final ObjectMapper mapper = new ObjectMapper(); final JsonNode expectedObj = mapper.readTree(expected); final JsonNode receivedObj = mapper.readTree(mockResponse.getContentAsString()); assertEquals(expectedObj.get("error").asText(), receivedObj.get("error").asText()); assertEquals(expectedObj.get("error_description").asText(), receivedObj.get("error_description").asText()); } }
CenterForOpenScience/cas-overlay
cas-server-support-oauth/src/test/java/org/jasig/cas/support/oauth/web/OAuth20RevokeClientPrincipalTokensControllerTests.java
Java
apache-2.0
13,134
# frozen_string_literal: true module Aws module S3 # @api private class AccessPointARN < Aws::ARN def initialize(options) super(options) @type, @access_point_name, @extra = @resource.split(/[:,\/]/) end def support_dualstack? true end def support_fips? true end def validate_arn! unless @service == 's3' raise ArgumentError, 'Must provide a valid S3 Access Point ARN.' end if @region.empty? || @account_id.empty? raise ArgumentError, 'S3 Access Point ARNs must contain both a region '\ 'and an account ID.' end if @region.include?('-fips') || @region.include?('fips-') raise ArgumentError, 'S3 Access Point ARNs cannot contain a FIPS region.' end if @type != 'accesspoint' raise ArgumentError, 'Invalid ARN, resource format is not correct.' end if @access_point_name.nil? || @access_point_name.empty? raise ArgumentError, 'Missing ARN Access Point name.' end if @extra raise ArgumentError, 'ARN Access Point resource must be a single value.' end unless Seahorse::Util.host_label?( "#{@access_point_name}-#{@account_id}" ) raise ArgumentError, "#{@access_point_name}-#{@account_id} is not a valid "\ 'host label.' end end def host_url(region, fips = false, dualstack = false, custom_endpoint = nil) pfx = "#{@access_point_name}-#{@account_id}" if custom_endpoint "#{pfx}.#{custom_endpoint}" else sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region, 's3') "#{pfx}.s3-accesspoint#{'-fips' if fips}#{'.dualstack' if dualstack}.#{region}.#{sfx}" end end end end end
aws/aws-sdk-ruby
gems/aws-sdk-s3/lib/aws-sdk-s3/arn/access_point_arn.rb
Ruby
apache-2.0
1,948
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """## Functions for working with arbitrarily nested sequences of elements. This module can perform operations on nested structures. A nested structure is a Python sequence, tuple (including `namedtuple`), or dict that can contain further sequences, tuples, and dicts. The utilities here assume (and do not check) that the nested structures form a 'tree', i.e., no references in the structure of the input of these functions should be recursive. Example structures: `((3, 4), 5, (6, 7, (9, 10), 8))`, `(np.array(0), (np.array([3, 4]), tf.constant([3, 4])))` """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections as _collections import six as _six from tensorflow.python.platform import tf_logging as _tf_logging from tensorflow.python.util.all_util import remove_undocumented def _sequence_like(instance, args): """Converts the sequence `args` to the same type as `instance`. Args: instance: an instance of `tuple`, `list`, `namedtuple`, `dict`, or `collections.NamedDict`. args: elements to be converted to a sequence. Returns: `args` with the type of `instance`. """ if isinstance(instance, dict): # For dictionaries with their values extracted, we always order the values # by sorting the keys first (see note below). This code allows recreating # e.g., `OrderedDict`s with their original key ordering. result = dict(zip(sorted(_six.iterkeys(instance)), args)) return type(instance)((key, result[key]) for key in _six.iterkeys(instance)) elif (isinstance(instance, tuple) and hasattr(instance, "_fields") and isinstance(instance._fields, _collections.Sequence) and all(isinstance(f, _six.string_types) for f in instance._fields)): # This is a namedtuple return type(instance)(*args) else: # Not a namedtuple return type(instance)(args) def _yield_value(iterable): if isinstance(iterable, dict): # Iterate through dictionaries in a deterministic order. Note: we # intentionally ignore the order in an `OrderedDict` because of the # potential to introduce bugs if the user mixes ordered and plain dicts with # the same keys. (This is based on experience.) for key in sorted(_six.iterkeys(iterable)): yield iterable[key] else: for value in iterable: yield value def _yield_flat_nest(nest): for n in _yield_value(nest): if is_sequence(n): for ni in _yield_flat_nest(n): yield ni else: yield n # Used by `_warn_once` to remember which warning messages have been given. _ALREADY_WARNED = {} def _warn_once(message): """Logs a warning message, once per unique string.""" if message not in _ALREADY_WARNED: _ALREADY_WARNED[message] = True _tf_logging.warning(message) def is_sequence(seq): """Returns a true if its input is a collections.Sequence (except strings). Args: seq: an input sequence. Returns: True if the sequence is a not a string and is a collections.Sequence or a dict. """ if isinstance(seq, dict): return True if isinstance(seq, set): _warn_once("Sets are not currently considered sequences, but this may " "change in the future, so consider avoiding using them.") return (isinstance(seq, _collections.Sequence) and not isinstance(seq, _six.string_types)) def flatten(nest): """Returns a flat sequence from a given nested structure. If `nest` is not a sequence, tuple, or dict, then returns a single-element list: `[nest]`. Args: nest: an arbitrarily nested structure or a scalar object. Note, numpy arrays are considered scalars. Returns: A Python list, the flattened version of the input. """ if is_sequence(nest): return list(_yield_flat_nest(nest)) else: return [nest] def _recursive_assert_same_structure(nest1, nest2, check_types): """Helper function for `assert_same_structure`.""" is_sequence_nest1 = is_sequence(nest1) if is_sequence_nest1 != is_sequence(nest2): raise ValueError( "The two structures don't have the same nested structure.\n\n" "First structure: %s\n\nSecond structure: %s." % (nest1, nest2)) if not is_sequence_nest1: return # finished checking if check_types: type_nest1 = type(nest1) type_nest2 = type(nest2) if type_nest1 != type_nest2: raise TypeError( "The two structures don't have the same sequence type. First " "structure has type %s, while second structure has type %s." % (type_nest1, type_nest2)) if isinstance(nest1, dict): keys1 = set(_six.iterkeys(nest1)) keys2 = set(_six.iterkeys(nest2)) if keys1 != keys2: raise ValueError( "The two dictionaries don't have the same set of keys. First " "structure has keys {}, while second structure has keys {}." .format(keys1, keys2)) nest1_as_sequence = [n for n in _yield_value(nest1)] nest2_as_sequence = [n for n in _yield_value(nest2)] for n1, n2 in zip(nest1_as_sequence, nest2_as_sequence): _recursive_assert_same_structure(n1, n2, check_types) def assert_same_structure(nest1, nest2, check_types=True): """Asserts that two structures are nested in the same way. Args: nest1: an arbitrarily nested structure. nest2: an arbitrarily nested structure. check_types: if `True` (default) types of sequences are checked as well, including the keys of dictionaries. If set to `False`, for example a list and a tuple of objects will look the same if they have the same size. Raises: ValueError: If the two structures do not have the same number of elements or if the two structures are not nested in the same way. TypeError: If the two structures differ in the type of sequence in any of their substructures. Only possible if `check_types` is `True`. """ len_nest1 = len(flatten(nest1)) if is_sequence(nest1) else 1 len_nest2 = len(flatten(nest2)) if is_sequence(nest2) else 1 if len_nest1 != len_nest2: raise ValueError("The two structures don't have the same number of " "elements.\n\nFirst structure (%i elements): %s\n\n" "Second structure (%i elements): %s" % (len_nest1, nest1, len_nest2, nest2)) _recursive_assert_same_structure(nest1, nest2, check_types) def flatten_dict_items(dictionary): """Returns a dictionary with flattened keys and values. This function flattens the keys and values of a dictionary, which can be arbitrarily nested structures, and returns the flattened version of such structures: ```python example_dictionary = {(4, 5, (6, 8)): ("a", "b", ("c", "d"))} result = {4: "a", 5: "b", 6: "c", 8: "d"} flatten_dict_items(example_dictionary) == result ``` The input dictionary must satisfy two properties: 1. Its keys and values should have the same exact nested structure. 2. The set of all flattened keys of the dictionary must not contain repeated keys. Args: dictionary: the dictionary to zip Returns: The zipped dictionary. Raises: TypeError: If the input is not a dictionary. ValueError: If any key and value have not the same structure, or if keys are not unique. """ if not isinstance(dictionary, dict): raise TypeError("input must be a dictionary") flat_dictionary = {} for i, v in _six.iteritems(dictionary): if not is_sequence(i): if i in flat_dictionary: raise ValueError( "Could not flatten dictionary: key %s is not unique." % i) flat_dictionary[i] = v else: flat_i = flatten(i) flat_v = flatten(v) if len(flat_i) != len(flat_v): raise ValueError( "Could not flatten dictionary. Key had %d elements, but value had " "%d elements. Key: %s, value: %s." % (len(flat_i), len(flat_v), flat_i, flat_v)) for new_i, new_v in zip(flat_i, flat_v): if new_i in flat_dictionary: raise ValueError( "Could not flatten dictionary: key %s is not unique." % (new_i)) flat_dictionary[new_i] = new_v return flat_dictionary def _packed_nest_with_indices(structure, flat, index): """Helper function for pack_sequence_as. Args: structure: Substructure (list / tuple / dict) to mimic. flat: Flattened values to output substructure for. index: Index at which to start reading from flat. Returns: The tuple (new_index, child), where: * new_index - the updated index into `flat` having processed `structure`. * packed - the subset of `flat` corresponding to `structure`, having started at `index`, and packed into the same nested format. Raises: ValueError: if `structure` contains more elements than `flat` (assuming indexing starts from `index`). """ packed = [] for s in _yield_value(structure): if is_sequence(s): new_index, child = _packed_nest_with_indices(s, flat, index) packed.append(_sequence_like(s, child)) index = new_index else: packed.append(flat[index]) index += 1 return index, packed def pack_sequence_as(structure, flat_sequence): """Returns a given flattened sequence packed into a nest. If `structure` is a scalar, `flat_sequence` must be a single-element list; in this case the return value is `flat_sequence[0]`. Args: structure: Nested structure, whose structure is given by nested lists, tuples, and dicts. Note: numpy arrays and strings are considered scalars. flat_sequence: flat sequence to pack. Returns: packed: `flat_sequence` converted to have the same recursive structure as `structure`. Raises: ValueError: If nest and structure have different element counts. """ if not is_sequence(flat_sequence): raise TypeError("flat_sequence must be a sequence") if not is_sequence(structure): if len(flat_sequence) != 1: raise ValueError("Structure is a scalar but len(flat_sequence) == %d > 1" % len(flat_sequence)) return flat_sequence[0] flat_structure = flatten(structure) if len(flat_structure) != len(flat_sequence): raise ValueError( "Could not pack sequence. Structure had %d elements, but flat_sequence " "had %d elements. Structure: %s, flat_sequence: %s." % (len(flat_structure), len(flat_sequence), structure, flat_sequence)) _, packed = _packed_nest_with_indices(structure, flat_sequence, 0) return _sequence_like(structure, packed) def map_structure(func, *structure, **check_types_dict): """Applies `func` to each entry in `structure` and returns a new structure. Applies `func(x[0], x[1], ...)` where x[i] is an entry in `structure[i]`. All structures in `structure` must have the same arity, and the return value will contain the results in the same structure. Args: func: A callable that accepts as many arguments as there are structures. *structure: scalar, or tuple or list of constructed scalars and/or other tuples/lists, or scalars. Note: numpy arrays are considered as scalars. **check_types_dict: only valid keyword argument is `check_types`. If set to `True` (default) the types of iterables within the structures have to be same (e.g. `map_structure(func, [1], (1,))` raises a `TypeError` exception). To allow this set this argument to `False`. Returns: A new structure with the same arity as `structure`, whose values correspond to `func(x[0], x[1], ...)` where `x[i]` is a value in the corresponding location in `structure[i]`. If there are different sequence types and `check_types` is `False` the sequence types of the first structure will be used. Raises: TypeError: If `func` is not callable or if the structures do not match each other by depth tree. ValueError: If no structure is provided or if the structures do not match each other by type. ValueError: If wrong keyword arguments are provided. """ if not callable(func): raise TypeError("func must be callable, got: %s" % func) if not structure: raise ValueError("Must provide at least one structure") if check_types_dict: if "check_types" not in check_types_dict or len(check_types_dict) > 1: raise ValueError("Only valid keyword argument is check_types") check_types = check_types_dict["check_types"] else: check_types = True for other in structure[1:]: assert_same_structure(structure[0], other, check_types=check_types) flat_structure = [flatten(s) for s in structure] entries = zip(*flat_structure) return pack_sequence_as( structure[0], [func(*x) for x in entries]) def _yield_flat_up_to(shallow_tree, input_tree): """Yields elements `input_tree` partially flattened up to `shallow_tree`.""" if is_sequence(shallow_tree): for shallow_branch, input_branch in zip(_yield_value(shallow_tree), _yield_value(input_tree)): for input_leaf in _yield_flat_up_to(shallow_branch, input_branch): yield input_leaf else: yield input_tree def assert_shallow_structure(shallow_tree, input_tree, check_types=True): """Asserts that `shallow_tree` is a shallow structure of `input_tree`. That is, this function tests if the `input_tree` structure can be created from the `shallow_tree` structure by replacing its leaf nodes with deeper tree structures. Examples: The following code will raise an exception: ```python shallow_tree = ["a", "b"] input_tree = ["c", ["d", "e"], "f"] assert_shallow_structure(shallow_tree, input_tree) ``` The following code will not raise an exception: ```python shallow_tree = ["a", "b"] input_tree = ["c", ["d", "e"]] assert_shallow_structure(shallow_tree, input_tree) ``` Args: shallow_tree: an arbitrarily nested structure. input_tree: an arbitrarily nested structure. check_types: if `True` (default) the sequence types of `shallow_tree` and `input_tree` have to be the same. Raises: TypeError: If `shallow_tree` is a sequence but `input_tree` is not. TypeError: If the sequence types of `shallow_tree` are different from `input_tree`. Only raised if `check_types` is `True`. ValueError: If the sequence lengths of `shallow_tree` are different from `input_tree`. """ if is_sequence(shallow_tree): if not is_sequence(input_tree): raise TypeError( "If shallow structure is a sequence, input must also be a sequence. " "Input has type: %s." % type(input_tree)) if check_types and not isinstance(input_tree, type(shallow_tree)): raise TypeError( "The two structures don't have the same sequence type. Input " "structure has type %s, while shallow structure has type %s." % (type(input_tree), type(shallow_tree))) if len(input_tree) != len(shallow_tree): raise ValueError( "The two structures don't have the same sequence length. Input " "structure has length %s, while shallow structure has length %s." % (len(input_tree), len(shallow_tree))) for shallow_branch, input_branch in zip(shallow_tree, input_tree): assert_shallow_structure(shallow_branch, input_branch, check_types=check_types) def flatten_up_to(shallow_tree, input_tree): """Flattens `input_tree` up to `shallow_tree`. Any further depth in structure in `input_tree` is retained as elements in the partially flatten output. If `shallow_tree` and `input_tree` are not sequences, this returns a single-element list: `[input_tree]`. Use Case: Sometimes we may wish to partially flatten a nested sequence, retaining some of the nested structure. We achieve this by specifying a shallow structure, `shallow_tree`, we wish to flatten up to. The input, `input_tree`, can be thought of as having the same structure as `shallow_tree`, but with leaf nodes that are themselves tree structures. Examples: ```python input_tree = [[[2, 2], [3, 3]], [[4, 9], [5, 5]]] shallow_tree = [[True, True], [False, True]] flattened_input_tree = flatten_up_to(shallow_tree, input_tree) flattened_shallow_tree = flatten_up_to(shallow_tree, shallow_tree) # Output is: # [[2, 2], [3, 3], [4, 9], [5, 5]] # [True, True, False, True] ``` ```python input_tree = [[('a', 1), [('b', 2), [('c', 3), [('d', 4)]]]]] shallow_tree = [['level_1', ['level_2', ['level_3', ['level_4']]]]] input_tree_flattened_as_shallow_tree = flatten_up_to(shallow_tree, input_tree) input_tree_flattened = flatten(input_tree) # Output is: # [('a', 1), ('b', 2), ('c', 3), ('d', 4)] # ['a', 1, 'b', 2, 'c', 3, 'd', 4] ``` Non-Sequence Edge Cases: ```python flatten_up_to(0, 0) # Output: [0] flatten_up_to(0, [0, 1, 2]) # Output: [[0, 1, 2]] flatten_up_to([0, 1, 2], 0) # Output: TypeError flatten_up_to([0, 1, 2], [0, 1, 2]) # Output: [0, 1, 2] ``` Args: shallow_tree: a possibly pruned structure of input_tree. input_tree: an arbitrarily nested structure or a scalar object. Note, numpy arrays are considered scalars. Returns: A Python list, the partially flattened version of `input_tree` according to the structure of `shallow_tree`. Raises: TypeError: If `shallow_tree` is a sequence but `input_tree` is not. TypeError: If the sequence types of `shallow_tree` are different from `input_tree`. ValueError: If the sequence lengths of `shallow_tree` are different from `input_tree`. """ assert_shallow_structure(shallow_tree, input_tree) return list(_yield_flat_up_to(shallow_tree, input_tree)) def map_structure_up_to(shallow_tree, func, *inputs): """Applies a function or op to a number of partially flattened inputs. The `inputs` are flattened up to `shallow_tree` before being mapped. Use Case: Sometimes we wish to apply a function to a partially flattened sequence (for example when the function itself takes sequence inputs). We achieve this by specifying a shallow structure, `shallow_tree` we wish to flatten up to. The `inputs`, can be thought of as having the same structure as `shallow_tree`, but with leaf nodes that are themselves tree structures. This function therefore will return something with the same base structure as `shallow_tree`. Examples: ```python ab_tuple = collections.namedtuple("ab_tuple", "a, b") op_tuple = collections.namedtuple("op_tuple", "add, mul") inp_val = ab_tuple(a=2, b=3) inp_ops = ab_tuple(a=op_tuple(add=1, mul=2), b=op_tuple(add=2, mul=3)) out = map_structure_up_to(inp_val, lambda val, ops: (val + ops.add) * ops.mul, inp_val, inp_ops) # Output is: ab_tuple(a=6, b=15) ``` ```python data_list = [[2, 4, 6, 8], [[1, 3, 5, 7, 9], [3, 5, 7]]] name_list = ['evens', ['odds', 'primes']] out = map_structure_up_to( name_list, lambda name, sec: "first_{}_{}".format(len(sec), name), name_list, data_list) # Output is: ['first_4_evens', ['first_5_odds', 'first_3_primes']] ``` Args: shallow_tree: a shallow tree, common to all the inputs. func: callable which will be applied to each input individually. *inputs: arbitrarily nested combination of objects that are compatible with shallow_tree. The function `func` is applied to corresponding partially flattened elements of each input, so the function must support arity of `len(inputs)`. Raises: TypeError: If `shallow_tree` is a sequence but `input_tree` is not. TypeError: If the sequence types of `shallow_tree` are different from `input_tree`. ValueError: If the sequence lengths of `shallow_tree` are different from `input_tree`. Returns: result of repeatedly applying `func`, with same structure as `shallow_tree`. """ if not inputs: raise ValueError("Cannot map over no sequences") for input_tree in inputs: assert_shallow_structure(shallow_tree, input_tree) # Flatten each input separately, apply the function to corresponding elements, # then repack based on the structure of the first input. all_flattened_up_to = [flatten_up_to(shallow_tree, input_tree) for input_tree in inputs] results = [func(*tensors) for tensors in zip(*all_flattened_up_to)] return pack_sequence_as(structure=shallow_tree, flat_sequence=results) _allowed_symbols = [ "assert_same_structure", "is_sequence", "flatten", "flatten_dict_items", "pack_sequence_as", "map_structure", "assert_shallow_structure", "flatten_up_to", "map_structure_up_to", ] remove_undocumented(__name__, _allowed_symbols)
tiagofrepereira2012/tensorflow
tensorflow/python/util/nest.py
Python
apache-2.0
21,628
package images // import "github.com/tiborvass/docker/daemon/images" import ( "fmt" "github.com/pkg/errors" "github.com/docker/distribution/reference" "github.com/tiborvass/docker/errdefs" "github.com/tiborvass/docker/image" specs "github.com/opencontainers/image-spec/specs-go/v1" ) // ErrImageDoesNotExist is error returned when no image can be found for a reference. type ErrImageDoesNotExist struct { ref reference.Reference } func (e ErrImageDoesNotExist) Error() string { ref := e.ref if named, ok := ref.(reference.Named); ok { ref = reference.TagNameOnly(named) } return fmt.Sprintf("No such image: %s", reference.FamiliarString(ref)) } // NotFound implements the NotFound interface func (e ErrImageDoesNotExist) NotFound() {} // GetImage returns an image corresponding to the image referred to by refOrID. func (i *ImageService) GetImage(refOrID string, platform *specs.Platform) (retImg *image.Image, retErr error) { defer func() { if retErr != nil || retImg == nil || platform == nil { return } // This allows us to tell clients that we don't have the image they asked for // Where this gets hairy is the image store does not currently support multi-arch images, e.g.: // An image `foo` may have a multi-arch manifest, but the image store only fetches the image for a specific platform // The image store does not store the manifest list and image tags are assigned to architecture specific images. // So we can have a `foo` image that is amd64 but the user requested armv7. If the user looks at the list of images. // This may be confusing. // The alternative to this is to return a errdefs.Conflict error with a helpful message, but clients will not be // able to automatically tell what causes the conflict. if retImg.OS != platform.OS { retErr = errdefs.NotFound(errors.Errorf("image with reference %s was found but does not match the specified OS platform: wanted: %s, actual: %s", refOrID, platform.OS, retImg.OS)) retImg = nil return } if retImg.Architecture != platform.Architecture { retErr = errdefs.NotFound(errors.Errorf("image with reference %s was found but does not match the specified platform cpu architecture: wanted: %s, actual: %s", refOrID, platform.Architecture, retImg.Architecture)) retImg = nil return } // Only validate variant if retImg has a variant set. // The image variant may not be set since it's a newer field. if platform.Variant != "" && retImg.Variant != "" && retImg.Variant != platform.Variant { retErr = errdefs.NotFound(errors.Errorf("image with reference %s was found but does not match the specified platform cpu architecture variant: wanted: %s, actual: %s", refOrID, platform.Variant, retImg.Variant)) retImg = nil return } }() ref, err := reference.ParseAnyReference(refOrID) if err != nil { return nil, errdefs.InvalidParameter(err) } namedRef, ok := ref.(reference.Named) if !ok { digested, ok := ref.(reference.Digested) if !ok { return nil, ErrImageDoesNotExist{ref} } id := image.IDFromDigest(digested.Digest()) if img, err := i.imageStore.Get(id); err == nil { return img, nil } return nil, ErrImageDoesNotExist{ref} } if digest, err := i.referenceStore.Get(namedRef); err == nil { // Search the image stores to get the operating system, defaulting to host OS. id := image.IDFromDigest(digest) if img, err := i.imageStore.Get(id); err == nil { return img, nil } } // Search based on ID if id, err := i.imageStore.Search(refOrID); err == nil { img, err := i.imageStore.Get(id) if err != nil { return nil, ErrImageDoesNotExist{ref} } return img, nil } return nil, ErrImageDoesNotExist{ref} }
tiborvass/docker
daemon/images/image.go
GO
apache-2.0
3,714
/* * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.chimesdkidentity.model.transform; import java.math.*; import javax.annotation.Generated; import com.amazonaws.services.chimesdkidentity.model.*; import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import com.fasterxml.jackson.core.JsonToken; import static com.fasterxml.jackson.core.JsonToken.*; /** * DescribeAppInstanceResult JSON Unmarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DescribeAppInstanceResultJsonUnmarshaller implements Unmarshaller<DescribeAppInstanceResult, JsonUnmarshallerContext> { public DescribeAppInstanceResult unmarshall(JsonUnmarshallerContext context) throws Exception { DescribeAppInstanceResult describeAppInstanceResult = new DescribeAppInstanceResult(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return describeAppInstanceResult; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("AppInstance", targetDepth)) { context.nextToken(); describeAppInstanceResult.setAppInstance(AppInstanceJsonUnmarshaller.getInstance().unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return describeAppInstanceResult; } private static DescribeAppInstanceResultJsonUnmarshaller instance; public static DescribeAppInstanceResultJsonUnmarshaller getInstance() { if (instance == null) instance = new DescribeAppInstanceResultJsonUnmarshaller(); return instance; } }
aws/aws-sdk-java
aws-java-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/DescribeAppInstanceResultJsonUnmarshaller.java
Java
apache-2.0
2,905
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Tests for the Tensorboard debugger data plugin.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import json from tensorflow.python.platform import test from tensorflow.tensorboard.plugins.debugger import plugin as debugger_plugin class FakeRequest(object): """A fake shell of a werkzeug request. We fake instead of using a real request because the real request requires a WSGI environment. """ def __init__(self, method, post_data): """Constructs a fake request, a simple version of a werkzeug request. Args: method: The uppercase method of the request, ie POST. post_data: A dictionary of POST data. """ self.method = method self.form = post_data class DebuggerPluginTest(test.TestCase): def setUp(self): self.debugger_plugin = debugger_plugin.DebuggerPlugin() self.unused_run_paths = {} self.unused_logdir = '/logdir' def testHealthPillsRouteProvided(self): """Tests that the plugin offers the route for requesting health pills.""" apps = self.debugger_plugin.get_plugin_apps(self.unused_run_paths, self.unused_logdir) self.assertIn('/health_pills', apps) self.assertIsInstance(apps['/health_pills'], collections.Callable) def testGetRequestsUnsupported(self): """Tests that GET requests are unsupported.""" request = FakeRequest('GET', { 'node_names': json.dumps(['layers/Matmul', 'logits/Add']), }) self.assertEqual( 405, self.debugger_plugin._serve_health_pills_helper(request).status_code) def testRequestsWithoutProperPostKeyUnsupported(self): """Tests that requests lacking the node_names POST key are unsupported.""" request = FakeRequest('POST', {}) self.assertEqual( 400, self.debugger_plugin._serve_health_pills_helper(request).status_code) def testRequestsWithBadJsonUnsupported(self): """Tests that requests with undecodable JSON are unsupported.""" request = FakeRequest('POST', {'node_names': 'some obviously non JSON text',}) self.assertEqual( 400, self.debugger_plugin._serve_health_pills_helper(request).status_code) def testRequestsWithNonListPostDataUnsupported(self): """Tests that requests with loads lacking lists of ops are unsupported.""" request = FakeRequest('POST', { 'node_names': json.dumps({ 'this is a dict': 'and not a list.' }), }) self.assertEqual( 400, self.debugger_plugin._serve_health_pills_helper(request).status_code) if __name__ == '__main__': test.main()
manjunaths/tensorflow
tensorflow/tensorboard/plugins/debugger/plugin_test.py
Python
apache-2.0
3,406
OkHttp ====== See the [project website][okhttp] for documentation and APIs. HTTP is the way modern applications network. It’s how we exchange data & media. Doing HTTP efficiently makes your stuff load faster and saves bandwidth. OkHttp is an HTTP client that’s efficient by default: * HTTP/2 support allows all requests to the same host to share a socket. * Connection pooling reduces request latency (if HTTP/2 isn’t available). * Transparent GZIP shrinks download sizes. * Response caching avoids the network completely for repeat requests. OkHttp perseveres when the network is troublesome: it will silently recover from common connection problems. If your service has multiple IP addresses OkHttp will attempt alternate addresses if the first connect fails. This is necessary for IPv4+IPv6 and services hosted in redundant data centers. OkHttp supports modern TLS features (TLS 1.3, ALPN, certificate pinning). It can be configured to fall back for broad connectivity. Using OkHttp is easy. Its request/response API is designed with fluent builders and immutability. It supports both synchronous blocking calls and async calls with callbacks. Get a URL --------- This program downloads a URL and prints its contents as a string. [Full source][get_example]. ```java OkHttpClient client = new OkHttpClient(); String run(String url) throws IOException { Request request = new Request.Builder() .url(url) .build(); try (Response response = client.newCall(request).execute()) { return response.body().string(); } } ``` Post to a Server ---------------- This program posts data to a service. [Full source][post_example]. ```java public static final MediaType JSON = MediaType.get("application/json; charset=utf-8"); OkHttpClient client = new OkHttpClient(); String post(String url, String json) throws IOException { RequestBody body = RequestBody.create(json, JSON); Request request = new Request.Builder() .url(url) .post(body) .build(); try (Response response = client.newCall(request).execute()) { return response.body().string(); } } ``` Further examples are on the [OkHttp Recipes page][recipes]. Requirements ------------ OkHttp works on Android 5.0+ (API level 21+) and on Java 8+. OkHttp depends on [Okio][okio] for high-performance I/O and the [Kotlin standard library][kotlin]. Both are small libraries with strong backward-compatibility. We highly recommend you keep OkHttp up-to-date. As with auto-updating web browsers, staying current with HTTPS clients is an important defense against potential security problems. [We track][tls_history] the dynamic TLS ecosystem and adjust OkHttp to improve connectivity and security. OkHttp uses your platform's built-in TLS implementation. On Java platforms OkHttp also supports [Conscrypt][conscrypt], which integrates BoringSSL with Java. OkHttp will use Conscrypt if it is the first security provider: ```java Security.insertProviderAt(Conscrypt.newProvider(), 1); ``` The OkHttp 3.12.x branch supports Android 2.3+ (API level 9+) and Java 7+. These platforms lack support for TLS 1.2 and should not be used. But because upgrading is difficult we will backport critical fixes to the [3.12.x branch][okhttp_312x] through December 31, 2021. Releases -------- Our [change log][changelog] has release history. The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/okhttp/4.7.2/jar). ```kotlin implementation("com.squareup.okhttp3:okhttp:4.7.2") ``` Snapshot builds are [available][snap]. [R8 and ProGuard][r8_proguard] rules are available. MockWebServer ------------- OkHttp includes a library for testing HTTP, HTTPS, and HTTP/2 clients. The latest release is available on [Maven Central](https://search.maven.org/artifact/com.squareup.okhttp3/mockwebserver/4.7.2/jar). ```kotlin testImplementation("com.squareup.okhttp3:mockwebserver:4.7.2") ``` License ------- ``` Copyright 2019 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ``` [changelog]: http://square.github.io/okhttp/changelog/ [conscrypt]: https://github.com/google/conscrypt/ [get_example]: https://raw.github.com/square/okhttp/master/samples/guide/src/main/java/okhttp3/guide/GetExample.java [kotlin]: https://kotlinlang.org/ [okhttp3_pro]: https://github.com/square/okhttp/blob/master/okhttp/src/main/resources/META-INF/proguard/okhttp3.pro [okhttp_312x]: https://github.com/square/okhttp/tree/okhttp_3.12.x [okhttp]: https://square.github.io/okhttp/ [okio]: https://github.com/square/okio [post_example]: https://raw.github.com/square/okhttp/master/samples/guide/src/main/java/okhttp3/guide/PostExample.java [r8_proguard]: https://square.github.io/okhttp/r8_proguard/ [recipes]: http://square.github.io/okhttp/recipes/ [snap]: https://oss.sonatype.org/content/repositories/snapshots/ [tls_history]: https://square.github.io/okhttp/tls_configuration_history/
cketti/okhttp
README.md
Markdown
apache-2.0
5,435
namespace ChinaUnion_Agent.PolicyForm { partial class frmPolicyReadLog { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.grpAgentFee = new System.Windows.Forms.GroupBox(); this.dgPolicyReadLog = new System.Windows.Forms.DataGridView(); this.btnCancel = new System.Windows.Forms.Button(); this.panel1 = new BSE.Windows.Forms.Panel(); this.txtUserKeyword = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); this.txtSubjectKeyword = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.btnExport = new System.Windows.Forms.Button(); this.dtDay = new System.Windows.Forms.DateTimePicker(); this.label1 = new System.Windows.Forms.Label(); this.btnQuery = new System.Windows.Forms.Button(); this.grpAgentFee.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dgPolicyReadLog)).BeginInit(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // grpAgentFee // this.grpAgentFee.Controls.Add(this.dgPolicyReadLog); this.grpAgentFee.Dock = System.Windows.Forms.DockStyle.Fill; this.grpAgentFee.Location = new System.Drawing.Point(0, 58); this.grpAgentFee.Name = "grpAgentFee"; this.grpAgentFee.Size = new System.Drawing.Size(1016, 683); this.grpAgentFee.TabIndex = 7; this.grpAgentFee.TabStop = false; this.grpAgentFee.Text = "日志信息"; // // dgPolicyReadLog // this.dgPolicyReadLog.AllowUserToAddRows = false; this.dgPolicyReadLog.AllowUserToDeleteRows = false; this.dgPolicyReadLog.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(233)))), ((int)(((byte)(207))))); this.dgPolicyReadLog.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgPolicyReadLog.Dock = System.Windows.Forms.DockStyle.Fill; this.dgPolicyReadLog.Location = new System.Drawing.Point(3, 17); this.dgPolicyReadLog.Name = "dgPolicyReadLog"; this.dgPolicyReadLog.ReadOnly = true; this.dgPolicyReadLog.RowHeadersWidth = 10; this.dgPolicyReadLog.RowTemplate.Height = 23; this.dgPolicyReadLog.Size = new System.Drawing.Size(1010, 663); this.dgPolicyReadLog.TabIndex = 5; // // btnCancel // this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.Location = new System.Drawing.Point(838, 11); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(70, 35); this.btnCancel.TabIndex = 14; this.btnCancel.Text = "关闭"; this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // panel1 // this.panel1.AssociatedSplitter = null; this.panel1.BackColor = System.Drawing.Color.Transparent; this.panel1.CaptionFont = new System.Drawing.Font("SimSun", 11.75F, System.Drawing.FontStyle.Bold); this.panel1.CaptionHeight = 27; this.panel1.Controls.Add(this.txtUserKeyword); this.panel1.Controls.Add(this.label3); this.panel1.Controls.Add(this.txtSubjectKeyword); this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.btnExport); this.panel1.Controls.Add(this.btnCancel); this.panel1.Controls.Add(this.dtDay); this.panel1.Controls.Add(this.label1); this.panel1.Controls.Add(this.btnQuery); this.panel1.CustomColors.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(160)))), ((int)(((byte)(160)))), ((int)(((byte)(160))))); this.panel1.CustomColors.CaptionCloseIcon = System.Drawing.SystemColors.ControlText; this.panel1.CustomColors.CaptionExpandIcon = System.Drawing.SystemColors.ControlText; this.panel1.CustomColors.CaptionGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(244)))), ((int)(((byte)(242))))); this.panel1.CustomColors.CaptionGradientEnd = System.Drawing.SystemColors.ButtonFace; this.panel1.CustomColors.CaptionGradientMiddle = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(232)))), ((int)(((byte)(228))))); this.panel1.CustomColors.CaptionSelectedGradientBegin = System.Drawing.Color.FromArgb(((int)(((byte)(182)))), ((int)(((byte)(189)))), ((int)(((byte)(210))))); this.panel1.CustomColors.CaptionSelectedGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(182)))), ((int)(((byte)(189)))), ((int)(((byte)(210))))); this.panel1.CustomColors.CaptionText = System.Drawing.SystemColors.ControlText; this.panel1.CustomColors.CollapsedCaptionText = System.Drawing.SystemColors.ControlText; this.panel1.CustomColors.ContentGradientBegin = System.Drawing.SystemColors.ButtonFace; this.panel1.CustomColors.ContentGradientEnd = System.Drawing.Color.FromArgb(((int)(((byte)(246)))), ((int)(((byte)(245)))), ((int)(((byte)(244))))); this.panel1.CustomColors.InnerBorderColor = System.Drawing.SystemColors.Window; this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.ForeColor = System.Drawing.SystemColors.ControlText; this.panel1.Image = null; this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.MinimumSize = new System.Drawing.Size(27, 27); this.panel1.Name = "panel1"; this.panel1.ShowCaptionbar = false; this.panel1.Size = new System.Drawing.Size(1016, 58); this.panel1.TabIndex = 1; this.panel1.Text = "代理商导入"; this.panel1.ToolTipTextCloseIcon = null; this.panel1.ToolTipTextExpandIconPanelCollapsed = null; this.panel1.ToolTipTextExpandIconPanelExpanded = null; // // txtUserKeyword // this.txtUserKeyword.Location = new System.Drawing.Point(311, 17); this.txtUserKeyword.Name = "txtUserKeyword"; this.txtUserKeyword.Size = new System.Drawing.Size(128, 21); this.txtUserKeyword.TabIndex = 25; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(246, 14); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(59, 24); this.label3.TabIndex = 24; this.label3.Text = "用户/渠道\r\n/代理商:"; // // txtSubjectKeyword // this.txtSubjectKeyword.Location = new System.Drawing.Point(74, 17); this.txtSubjectKeyword.Name = "txtSubjectKeyword"; this.txtSubjectKeyword.Size = new System.Drawing.Size(152, 21); this.txtSubjectKeyword.TabIndex = 23; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(3, 22); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(77, 12); this.label2.TabIndex = 22; this.label2.Text = "信息关键字:"; // // btnExport // this.btnExport.Location = new System.Drawing.Point(749, 12); this.btnExport.Name = "btnExport"; this.btnExport.Size = new System.Drawing.Size(70, 35); this.btnExport.TabIndex = 21; this.btnExport.Text = "导出"; this.btnExport.UseVisualStyleBackColor = true; this.btnExport.Click += new System.EventHandler(this.btnExport_Click); // // dtDay // this.dtDay.CustomFormat = "yyyy-MM-dd"; this.dtDay.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.dtDay.Location = new System.Drawing.Point(510, 17); this.dtDay.Name = "dtDay"; this.dtDay.Size = new System.Drawing.Size(82, 21); this.dtDay.TabIndex = 13; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(445, 22); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(65, 12); this.label1.TabIndex = 12; this.label1.Text = "阅读日期:"; // // btnQuery // this.btnQuery.Font = new System.Drawing.Font("SimSun", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnQuery.Location = new System.Drawing.Point(653, 11); this.btnQuery.Name = "btnQuery"; this.btnQuery.Size = new System.Drawing.Size(70, 35); this.btnQuery.TabIndex = 9; this.btnQuery.Text = "查询"; this.btnQuery.UseVisualStyleBackColor = true; this.btnQuery.Click += new System.EventHandler(this.btnQuery_Click); // // frmPolicyReadLog // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.btnCancel; this.ClientSize = new System.Drawing.Size(1016, 741); this.Controls.Add(this.grpAgentFee); this.Controls.Add(this.panel1); this.Name = "frmPolicyReadLog"; this.ShowIcon = false; this.Text = "信息阅读日志"; this.WindowState = System.Windows.Forms.FormWindowState.Maximized; this.Load += new System.EventHandler(this.frmAgentQuery_Load); this.grpAgentFee.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dgPolicyReadLog)).EndInit(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); this.ResumeLayout(false); } #endregion private BSE.Windows.Forms.Panel panel1; private System.Windows.Forms.Button btnQuery; private System.Windows.Forms.GroupBox grpAgentFee; private System.Windows.Forms.DataGridView dgPolicyReadLog; private System.Windows.Forms.DateTimePicker dtDay; private System.Windows.Forms.Label label1; private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.Button btnExport; private System.Windows.Forms.Label label2; private System.Windows.Forms.TextBox txtUserKeyword; private System.Windows.Forms.Label label3; private System.Windows.Forms.TextBox txtSubjectKeyword; } }
ZhouAnPing/Mail
Mail/ChinaUnion_Agent/PolicyForm/frmPolicyReadLog.Designer.cs
C#
apache-2.0
12,141
package com.github.dannywe.csv.builder import com.google.common.base.Function import com.github.dannywe.csv.conversion.ConverterUtils._ import com.github.dannywe.csv.core.TypeAliases._ import scala.util.{Failure, Success} class StreamOperationBuilder[T] { def drop(x: Int): ProcessF[T] = { process => process.drop(x) } def take(x: Int): ProcessF[T] = { process => process.take(x) } def takeWhile(f: Function[T, Boolean]): ProcessF[T] = takeWhileF(f) def takeWhileF(f: T => Boolean): ProcessF[T] = { process => process.takeWhile(t => { t._1 match { case Success(w) => f(w) case Failure(_) => false } }) } }
DannyWE/CsvStreamUtils
src/main/scala/com/github/dannywe/csv/builder/StreamOperationBuilder.scala
Scala
apache-2.0
672
<?php // Copyright 2017 DAIMTO ([Linda Lawton](https://twitter.com/LindaLawtonDK)) : [www.daimto.com](http://www.daimto.com/) // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on // an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the // specific language governing permissions and limitations under the License. //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by DAIMTO-Google-apis-Sample-generator 1.0.0 // Template File Name: methodTemplate.tt // Build date: 2017-10-08 // PHP generator version: 1.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ // About // // Unofficial sample for the compute beta API for PHP. // This sample is designed to be used with the Google PHP client library. (https://github.com/google/google-api-php-client) // // API Description: Creates and runs virtual machines on Google Cloud Platform. // API Documentation Link https://developers.google.com/compute/docs/reference/latest/ // // Discovery Doc https://www.googleapis.com/discovery/v1/apis/compute/beta/rest // //------------------------------------------------------------------------------ // Installation // // The preferred method is via https://getcomposer.org. Follow the installation instructions https://getcomposer.org/doc/00-intro.md // if you do not already have composer installed. // // Once composer is installed, execute the following command in your project root to install this library: // // composer require google/apiclient:^2.0 // //------------------------------------------------------------------------------ // Load the Google API PHP Client Library. require_once __DIR__ . '/vendor/autoload.php'; session_start(); /*************************************************** * Include this line for service account authencation. Note: Not all APIs support service accounts. //require_once __DIR__ . '/ServiceAccount.php'; * Include the following four lines Oauth2 authencation. * require_once __DIR__ . '/Oauth2Authentication.php'; * $_SESSION['mainScript'] = basename($_SERVER['PHP_SELF']); // Oauth2callback.php will return here. * $client = getGoogleClient(); * $service = new Google_Service_Compute($client); ****************************************************/ // Option paramaters can be set as needed. $optParams = array( //'requestId' => '[YourValue]', // An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). 'fields' => '*' ); // Single Request. $results = projectsMoveInstanceExample($service, $project, $optParams); /** * Moves an instance and its attached persistent disks from one zone to another. * @service Authenticated Compute service. * @optParams Optional paramaters are not required by a request. * @project Project ID for this request. * @return Operation */ function projectsMoveInstanceExample($service, $project, $optParams) { try { // Parameter validation. if ($service == null) throw new Exception("service is required."); if ($optParams == null) throw new Exception("optParams is required."); if (project == null) throw new Exception("project is required."); // Make the request and return the results. return $service->projects->MoveInstanceProjects($project, $optParams); } catch (Exception $e) { print "An error occurred: " . $e->getMessage(); } } ?>
LindaLawton/Google-APIs-PHP-Samples
Samples/Compute Engine API/beta/ProjectsMoveInstanceSample.php
PHP
apache-2.0
4,502
#!/bin/sh # ---------------------------------------------------------------------------- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # ---------------------------------------------------------------------------- # Main Script for the Apache Stratos # # Environment Variable Prerequisites # # JAVA_HOME Must point at your Java Development Kit installation. # # JAVA_OPTS (Optional) Java runtime options used when the commands # is executed. # # NOTE: Borrowed generously from Apache Tomcat startup scripts. # ----------------------------------------------------------------------------- # OS specific support. $var _must_ be set to either true or false. cygwin=false; darwin=false; os400=false; mingw=false; case "`uname`" in CYGWIN*) cygwin=true;; MINGW*) mingw=true;; OS400*) os400=true;; Darwin*) darwin=true if [ -z "$JAVA_VERSION" ] ; then JAVA_VERSION="CurrentJDK" else echo "Using Java version: $JAVA_VERSION" fi if [ -z "$JAVA_HOME" ] ; then JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home fi ;; esac # resolve links - $0 may be a softlink PRG="$0" while [ -h "$PRG" ]; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '.*/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`/"$link" fi done # Get standard environment variables PRGDIR=`dirname "$PRG"` # Only set CARBON_HOME if not already set [ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd` # Set AXIS2_HOME. Needed for One Click JAR Download AXIS2_HOME=$CARBON_HOME # For Cygwin, ensure paths are in UNIX format before anything is touched if $cygwin; then [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` [ -n "$AXIS2_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"` fi # For OS400 if $os400; then # Set job priority to standard for interactive (interactive - 6) by using # the interactive priority - 6, the helper threads that respond to requests # will be running at the same priority as interactive jobs. COMMAND='chgjob job('$JOBNAME') runpty(6)' system $COMMAND # Enable multi threading QIBM_MULTI_THREADED=Y export QIBM_MULTI_THREADED fi # For Migwn, ensure paths are in UNIX format before anything is touched if $mingw ; then [ -n "$CARBON_HOME" ] && CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" [ -n "$JAVA_HOME" ] && JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" [ -n "$AXIS2_HOME" ] && CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`" # TODO classpath? fi if [ -z "$JAVACMD" ] ; then if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi else JAVACMD=java fi fi if [ ! -x "$JAVACMD" ] ; then echo "Error: JAVA_HOME is not defined correctly." echo " CARBON cannot execute $JAVACMD" exit 1 fi # if JAVA_HOME is not set we're not happy if [ -z "$JAVA_HOME" ]; then echo "You must set the JAVA_HOME variable before running CARBON." exit 1 fi # ----- Process the input command ---------------------------------------------- for c in $* do if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then CMD="--debug" continue elif [ "$CMD" = "--debug" ]; then if [ -z "$PORT" ]; then PORT=$c fi elif [ "$c" = "--n" ] || [ "$c" = "-n" ] || [ "$c" = "n" ]; then CMD="--n" continue elif [ "$CMD" = "--n" ]; then if [ -z "$INSTANCES" ]; then INSTANCES=$c fi elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then CMD="stop" elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then CMD="start" elif [ "$c" = "--console" ] || [ "$c" = "-console" ] || [ "$c" = "console" ]; then CMD="console" elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then CMD="version" elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then CMD="restart" elif [ "$c" = "--dump" ] || [ "$c" = "-dump" ] || [ "$c" = "dump" ]; then CMD="dump" elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then CMD="test" elif [ "$c" = "--status" ] || [ "$c" = "-status" ] || [ "$c" = "status" ]; then CMD="status" fi done if [ "$CMD" = "--debug" ]; then if [ "$PORT" = "" ]; then echo " Please specify the debug port after the --debug option" exit 1 fi if [ -n "$JAVA_OPTS" ]; then echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option." fi CMD="RUN" JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT" echo "Please start the remote debugging client to continue..." elif [ "$CMD" = "--n" ]; then if [ "$INSTANCES" = "" ] || [ ! -z `echo $INSTANCES | sed 's/[0-9]//g'` ]]; then echo " Please specify the number of instances to start after the --n option" exit 1 fi elif [ "$CMD" = "start" ]; then export CARBON_HOME=$CARBON_HOME nohup $CARBON_HOME/bin/stratos.sh & exit 0 elif [ "$CMD" = "stop" ]; then export CARBON_HOME=$CARBON_HOME kill -9 `cat $CARBON_HOME/wso2carbon.pid` exit 0 elif [ "$CMD" = "restart" ]; then export CARBON_HOME=$CARBON_HOME kill -9 `cat $CARBON_HOME/wso2carbon.pid` nohup $CARBON_HOME/bin/stratos.sh & exit 0 elif [ "$CMD" = "test" ]; then JAVACMD="exec "$JAVACMD"" elif [ "$CMD" = "version" ]; then cat $CARBON_HOME/bin/version.txt cat $CARBON_HOME/bin/wso2carbon-version.txt exit 0 fi # ---------- Handle the SSL Issue with proper JDK version -------------------- jdk_16=`$JAVA_HOME/bin/java -version 2>&1 | grep "1.[6|7]"` if [ "$jdk_16" = "" ]; then echo " Starting WSO2 Carbon (in unsupported JDK)" echo " [ERROR] CARBON is supported only on JDK 1.6 and 1.7" fi CARBON_XBOOTCLASSPATH="" for f in "$CARBON_HOME"/lib/xboot/*.jar do if [ "$f" != "$CARBON_HOME/lib/xboot/*.jar" ];then CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f fi done JAVA_ENDORSED_DIRS="$CARBON_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" CARBON_CLASSPATH="" if [ -e "$JAVA_HOME/lib/tools.jar" ]; then CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar" fi for f in "$CARBON_HOME"/bin/*.jar do if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then CARBON_CLASSPATH="$CARBON_CLASSPATH":$f fi done # For Cygwin, switch paths to Windows format before running java if $cygwin; then JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"` AXIS2_HOME=`cygpath --absolute --windows "$CARBON_HOME"` CLASSPATH=`cygpath --path --windows "$CLASSPATH"` JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"` CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"` fi # ----- Execute The Requested Command ----------------------------------------- echo JAVA_HOME environment variable is set to $JAVA_HOME echo CARBON_HOME environment variable is set to $CARBON_HOME cd "$CARBON_HOME" START_EXIT_STATUS=121 status=$START_EXIT_STATUS while [ "$status" = "$START_EXIT_STATUS" ] do $JAVACMD \ -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \ -d64 \ -server \ -Xms1500m -Xmx3000m \ -XX:PermSize=256m -XX:MaxPermSize=512m \ -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:-UseGCOverheadLimit \ -XX:+CMSClassUnloadingEnabled \ -XX:+OptimizeStringConcat \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:OnOutOfMemoryError="kill -9 `echo $$`;nohup ./stratos.sh &" \ -XX:HeapDumpPath=repository/logs/heap-dump.hprof \ -XX:ErrorFile=repository/logs/hs_err_pid.log \ -XX:OnError="nohup ./stratos.sh &" \ $JAVA_OPTS \ -DandesConfig=qpid-config.xml \ -Ddisable.cassandra.server.startup=true \ -Dcom.sun.management.jmxremote \ -classpath "$CARBON_CLASSPATH" \ -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \ -Djava.io.tmpdir="$CARBON_HOME/tmp" \ -Dcatalina.base="$CARBON_HOME/lib/tomcat" \ -Dwso2.server.standalone=true \ -Dcarbon.registry.root=/ \ -Djava.command="$JAVACMD" \ -Dcarbon.home="$CARBON_HOME" \ -Dwso2.transports.xml="$CARBON_HOME/repository/conf/mgt-transports.xml" \ -Djava.util.logging.config.file="$CARBON_HOME/repository/conf/log4j.properties" \ -Dcarbon.config.dir.path="$CARBON_HOME/repository/conf" \ -Djndi.properties.dir="$CARBON_HOME/repository/conf" \ -Dcomponents.repo="$CARBON_HOME/repository/components/plugins" \ -Dcom.atomikos.icatch.file="$CARBON_HOME/lib/transactions.properties" \ -Dcom.atomikos.icatch.hide_init_file_path=true \ -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true \ -Djndi.properties.dir="$CARBON_HOME/repository/conf" \ -Dcom.sun.jndi.ldap.connect.pool.authentication=simple \ -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 \ -Dorg.terracotta.quartz.skipUpdateCheck=true \ org.wso2.carbon.bootstrap.Bootstrap $* status=$? done
panelion/incubator-stratos
products/cloud-controller/modules/distribution/src/main/resources/stratos.sh
Shell
apache-2.0
10,216
#ifndef MISCELLANEOUS_H #define MISCELLANEOUS_H #if defined(_WIN32) #include <dirent.h> #else #include <sys/stat.h> #endif int createDirectory(string name) { #if defined(_WIN32) return mkdir(name.c_str()); #else return mkdir(name.c_str(), 0777); #endif } #endif // MISCELLANEOUS_H
ITman1/dvb-t-demultiplexer
src/miscellaneous.h
C
apache-2.0
300
'use strict'; require('./controllers/index'); require('./directives/index'); require('./services/analysis-tasks'); require('./services/co-occurrence-matches'); require('./services/match-counts');
NLPIE/NLP-TAB-webapp
js/type_system_analysis/index.js
JavaScript
apache-2.0
198
# Vicia crocea (Desf.) Fritsch SPECIES #### Status ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in V. L. Komarov, Fl. URSS 13:425. 1948 #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Fabales/Fabaceae/Vicia/Vicia crocea/README.md
Markdown
apache-2.0
218
# include<cstdio> # include<cmath> # include<algorithm> using namespace std; int main() { int t,n,m; double ans; scanf("%d",&t); while(t--) { ans=0; scanf("%d",&n); m=n; while(n) { ans += (1.0/n); n--; } ans*=m; printf("%.2lf\n",ans); } return 0; }
prateekk91/SpojSolutions
FAVDICE-8536456-src.cpp
C++
apache-2.0
277
using SimpleIdentityServer.Module; using System; using System.Collections.Generic; namespace SimpleIdentityServer.AccountFilter.Basic.EF.Postgre { public class AccountFilterPostgreModule : IModule { private IDictionary<string, string> _properties; public void Init(IDictionary<string, string> properties) { _properties = properties; AspPipelineContext.Instance().ConfigureServiceContext.MvcAdded += HandleMvcAdded; } private void HandleMvcAdded(object sender, EventArgs eventArgs) { string connectionString; if (!_properties.TryGetValue("ConnectionString", out connectionString)) { throw new ModuleException("configuration", "the property 'ConnectionString' is missing"); } AspPipelineContext.Instance().ConfigureServiceContext.Services.AddBasicAccountFilterPostgresqlEF(connectionString); } } }
thabart/SimpleIdentityServer
SimpleIdentityServer/src/Apis/SimpleIdServer/SimpleIdentityServer.AccountFilter.Basic.EF.Postgre/AccountFilterPostgreModule.cs
C#
apache-2.0
983
# Cytisus rigidus (Viv.) Cristof. & Troìa SPECIES #### Status ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name Spartium rigidum Viv. ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Fabales/Fabaceae/Cytisus/Cytisus rigidus/README.md
Markdown
apache-2.0
207
//// [/lib/initial-buildOutput.txt] /lib/tsc --b /src/with-references exitCode:: ExitStatus.Success //// [/src/core/index.d.ts] export declare function multiply(a: number, b: number): number; //# sourceMappingURL=index.d.ts.map //// [/src/core/index.d.ts.map] {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,UAAmB"} //// [/src/core/index.js] "use strict"; exports.__esModule = true; function multiply(a, b) { return a * b; } exports.multiply = multiply; //// [/src/core/tsconfig.tsbuildinfo] { "program": { "fileInfos": { "../../lib/lib.d.ts": { "version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", "signature": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };" }, "./index.ts": { "version": "5112841898-export function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "3361149553-export declare function multiply(a: number, b: number): number;\r\n//# sourceMappingURL=index.d.ts.map" } }, "options": { "composite": true, "declaration": true, "declarationMap": true, "skipDefaultLibCheck": true, "configFilePath": "./tsconfig.json" }, "referencedMap": {}, "exportedModulesMap": {}, "semanticDiagnosticsPerFile": [ "../../lib/lib.d.ts", "./index.ts" ] }, "version": "FakeTSVersion" }
minestarks/TypeScript
tests/baselines/reference/tsbuild/emptyFiles/initial-build/does-not-have-empty-files-diagnostic-when-files-is-empty-and-references-are-provided.js
JavaScript
apache-2.0
2,260
html { position: relative; min-height: 100%; } body { background: #fafafa; font-family: "Oxygen", sans-serif; color: #333; margin-bottom: 60px; } @media screen and (min-width: 1600px) { .container { width: 1570px; } } .flow { float: left; } .gray { color: gray; } .red { color: #bb0000; } .no-padding > tbody > tr > td { padding: 0; } .smaller-font { font-size: 13px; } .alert { padding-left: 10px; } .help-toggle { color: #39c; } /* ========================================================================== Hide ng-cloak on page load, https://docs.angularjs.org/api/ng/directive/ngCloak ========================================================================== */ [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; } /* ========================================================================== Development Ribbon ========================================================================== */ .ribbon { background-color: #a00; box-shadow: 0 0 10px #888; left: -3.5em; moz-box-shadow: 0 0 10px #888; moz-transform: rotate(-45deg); ms-transform: rotate(-45deg); o-transform: rotate(-45deg); overflow: hidden; position: absolute; /*top: 40px;*/ transform: rotate(-45deg); webkit-box-shadow: 0 0 10px #888; webkit-transform: rotate(-45deg); white-space: nowrap; /*width: 15em;*/ z-index: 9999; pointer-events: none; } .ribbon a { border: 1px solid #faa; color: #fff; display: block; font: bold 81.25% 'Helvetica Neue', Helvetica, Arial, sans-serif; margin: 1px 0; padding: 10px 50px; text-align: center; text-decoration: none; text-shadow: 0 0 5px #444; pointer-events: none; } /* ========================================================================== Version number in navbar ========================================================================== */ .navbar-version { font-size: 10px; color: #ccc } /* ========================================================================== Browser Upgrade Prompt ========================================================================== */ .browserupgrade { margin: 0.2em 0; background: #ccc; color: #000; padding: 0.2em 0; } /* ========================================================================== Logo styles ========================================================================== */ .navbar-brand.logo { padding: 5px 15px; } .logo .logo-img { height: 45px; display: inline-block; } /* ========================================================================== Main page styles ========================================================================== */ .hero-unit { margin: 50px auto 0 auto; width: 300px; font-size: 18px; font-weight: 200; line-height: 30px; background-color: #eee; border-radius: 6px; padding: 60px; } .hero-unit h1 { font-size: 60px; line-height: 1; letter-spacing: -1px; } /* ========================================================================== Generic styles ========================================================================== */ .error { color: white; background-color: red; } .pad { padding: 10px; } .break { white-space: normal; word-break:break-all; } .voffset { margin-top: 2px; } .voffset1 { margin-top: 5px; } .voffset2 { margin-top: 10px; } .voffset3 { margin-top: 15px; } .voffset4 { margin-top: 30px; } .voffset5 { margin-top: 40px; } .voffset6 { margin-top: 60px; } .voffset7 { margin-top: 80px; } .voffset8 { margin-top: 100px; } .voffset9 { margin-top: 150px; } .readonly { background-color: #eee; opacity: 1; } /* ========================================================================== make sure browsers use the pointer cursor for anchors, even with no href ========================================================================== */ a:hover { cursor: pointer; } .hand { cursor: pointer; } /* ========================================================================== Metrics and Health styles ========================================================================== */ #threadDump .popover, #healthCheck .popover { top: inherit; display: block; font-size: 10px; max-width: 1024px; } #healthCheck .popover { margin-left: -50px; } .health-details { min-width: 400px; } /* ========================================================================== start Password strength bar style ========================================================================== */ ul#strengthBar { display:inline; list-style:none; margin:0; margin-left:15px; padding:0; vertical-align:2px; } .point:last { margin:0 !important; } .point { background:#DDD; border-radius:2px; display:inline-block; height:5px; margin-right:1px; width:20px; } /* ========================================================================== Custom alerts for notification ========================================================================== */ .alerts .alert{ text-overflow: ellipsis; } .alert pre{ background: none; border: none; font: inherit; color: inherit; padding: 0; margin: 0; } .alert .popover pre { font-size: 10px; } .alerts .toast { position: fixed; width: 100%; } .alerts .toast.left { left: 5px; } .alerts .toast.right { right: 5px; } .alerts .toast.top { top: 55px; } .alerts .toast.bottom { bottom: 55px; } @media screen and (min-width: 480px) { .alerts .toast { width: 50%; } } /* ========================================================================== entity tables helpers ========================================================================== */ /* Remove Bootstrap padding from the element http://stackoverflow.com/questions/19562903/remove-padding-from-columns-in-bootstrap-3 */ .no-padding-left { padding-left: 0 !important; } .no-padding-right { padding-right: 0 !important; } .no-padding-top { padding-top: 0 !important; } .no-padding-bottom { padding-bottom: 0 !important; } .no-padding { padding: 0 !important; } /* bootstrap 3 input-group 100% width http://stackoverflow.com/questions/23436430/bootstrap-3-input-group-100-width */ .width-min { width: 1% !important; } /* Makes toolbar not wrap on smaller screens http://www.sketchingwithcss.com/samplechapter/cheatsheet.html#right */ .flex-btn-group-container { display: -webkit-flex; display: flex; -webkit-flex-direction: row; flex-direction: row; -webkit-justify-content: flex-end; justify-content: flex-end; } .jh-table > tbody > tr > td { /* Align text in td vertically (top aligned by Bootstrap) */ vertical-align: middle; } .jh-table > thead > tr > th > .glyphicon-sort, .jh-table > thead > tr > th > .glyphicon-sort-by-attributes, .jh-table > thead > tr > th > .glyphicon-sort-by-attributes-alt { /* less visible sorting icons */ opacity: 0.5; } .jh-table > thead > tr > th > .glyphicon-sort:hover, .jh-table > thead > tr > th > .glyphicon-sort-by-attributes:hover, .jh-table > thead > tr > th > .glyphicon-sort-by-attributes-alt:hover { /* full visible sorting icons and pointer when mouse is over them */ opacity: 1; cursor: pointer; } /* ========================================================================== entity detail page css ========================================================================== */ .dl-horizontal.jh-entity-details > dd { margin-bottom: 15px; } @media screen and (min-width: 768px) { .dl-horizontal.jh-entity-details > dt { margin-bottom: 15px; } .dl-horizontal.jh-entity-details > dd { border-bottom: 1px solid #eee; padding-left: 180px; margin-left: 0; } } /* ========================================================================== ui bootstrap tweaks ========================================================================== */ .nav, .pagination, .carousel, .panel-title a { cursor: pointer; } .datetime-picker-dropdown > li.date-picker-menu div > table .btn-default, .uib-datepicker-popup > li > div.uib-datepicker > table .btn-default { border: 0; } .datetime-picker-dropdown > li.date-picker-menu div > table:focus, .uib-datepicker-popup > li > div.uib-datepicker > table:focus { outline: none; } /* ========================================================================== Social Buttons ========================================================================== */ .jh-btn-social { margin-bottom: 5px; } .jh-btn-google { background-color: #dd4b39; border-color: rgba(0, 0, 0, 0.2); color: #fff; } .jh-btn-google:hover, .jh-btn-google:focus, .jh-btn-google:active, .jh-btn-google.active, .open > .dropdown-toggle.jh-btn-google { background-color: #c23321; border-color: rgba(0, 0, 0, 0.2); color: #fff; } .jh-btn-facebook { background-color: #3b5998; border-color: rgba(0, 0, 0, 0.2); color: #fff; } .jh-btn-facebook:hover, .jh-btn-facebook:focus, .jh-btn-facebook:active, .jh-btn-facebook.active, .open > .dropdown-toggle.jh-btn-facebook { background-color: #2d4373; border-color: rgba(0, 0, 0, 0.2); color: #fff; } .jh-btn-twitter { background-color: #55acee; border-color: rgba(0, 0, 0, 0.2); color: #fff; } .jh-btn-twitter:hover, .jh-btn-twitter:focus, .jh-btn-twitter:active, .jh-btn-twitter.active, .open > .dropdown-toggle.jh-btn-twitter { background-color: #2795e9; border-color: rgba(0, 0, 0, 0.2); color: #fff; } .jh-btn-discord { background-color: #7289da; border-color: rgba(0, 0, 0, 0.2); color: #fff; } .jh-btn-discord:hover, .jh-btn-discord:focus, .jh-btn-discord:active, .jh-btn-discord.active, .open > .dropdown-toggle.jh-btn-discord { background-color: #4a67cf; border-color: rgba(0, 0, 0, 0.2); color: #fff; } .btn-clean { padding: 0 6px 0 6px; border-top-width: 0; border-bottom-width: 0; } .btn-clean:hover { text-decoration: none; } .frm-clean { padding: 15px; } .profile-image { height: 20px; width: 20px; line-height: 20px; } .no-border { border-radius: 0; } .logo-anim { filter: brightness(1) hue-rotate(0deg); transition: 1s linear; } .logo-anim:hover { filter: brightness(1.5) hue-rotate(270deg); } .dashboard-discord-logo { width: 5em; margin-bottom: 0.2em; } .dashboard-circle { width: 100%; border: 2px #ccc solid; } .footer { position: absolute; bottom: 0; width: 100%; height: 40px; padding-top: 6px; background-color: #333; color: #fff; } .version { font-size: 10px; } .discord { color: white; } .discord:hover { color: #7289da; } .github { color: white; } .github:hover { color: black; } /* jhipster-needle-css-add-main JHipster will add new css style */
quanticc/sentry
src/main/webapp/content/css/main.css
CSS
apache-2.0
11,014
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>series-area - YUI 3</title> <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css"> <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css"> <link rel="stylesheet" href="../assets/css/main.css" id="site_styles"> <link rel="shortcut icon" type="image/png" href="../assets/favicon.png"> <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script> </head> <body class="yui3-skin-sam"> <div id="doc"> <div id="hd" class="yui3-g header"> <div class="yui3-u-3-4"> <h1><img src="../assets/css/logo.png" title="YUI 3"></h1> </div> <div class="yui3-u-1-4 version"> <em>API Docs for: 3.18.1</em> </div> </div> <div id="bd" class="yui3-g"> <div class="yui3-u-1-4"> <div id="docs-sidebar" class="sidebar apidocs"> <div id="api-list"> <h2 class="off-left">APIs</h2> <div id="api-tabview" class="tabview"> <ul class="tabs"> <li><a href="#api-classes">Classes</a></li> <li><a href="#api-modules">Modules</a></li> </ul> <div id="api-tabview-filter"> <input type="search" id="api-filter" placeholder="Type to filter APIs"> </div> <div id="api-tabview-panel"> <ul id="api-classes" class="apis classes"> <li><a href="../classes/Anim.html">Anim</a></li> <li><a href="../classes/App.html">App</a></li> <li><a href="../classes/App.Base.html">App.Base</a></li> <li><a href="../classes/App.Content.html">App.Content</a></li> <li><a href="../classes/App.Transitions.html">App.Transitions</a></li> <li><a href="../classes/App.TransitionsNative.html">App.TransitionsNative</a></li> <li><a href="../classes/AreaSeries.html">AreaSeries</a></li> <li><a href="../classes/AreaSplineSeries.html">AreaSplineSeries</a></li> <li><a href="../classes/Array.html">Array</a></li> <li><a href="../classes/ArrayList.html">ArrayList</a></li> <li><a href="../classes/ArraySort.html">ArraySort</a></li> <li><a href="../classes/AsyncQueue.html">AsyncQueue</a></li> <li><a href="../classes/Attribute.html">Attribute</a></li> <li><a href="../classes/AttributeCore.html">AttributeCore</a></li> <li><a href="../classes/AttributeEvents.html">AttributeEvents</a></li> <li><a href="../classes/AttributeExtras.html">AttributeExtras</a></li> <li><a href="../classes/AttributeLite.html">AttributeLite</a></li> <li><a href="../classes/AttributeObservable.html">AttributeObservable</a></li> <li><a href="../classes/AutoComplete.html">AutoComplete</a></li> <li><a href="../classes/AutoCompleteBase.html">AutoCompleteBase</a></li> <li><a href="../classes/AutoCompleteFilters.html">AutoCompleteFilters</a></li> <li><a href="../classes/AutoCompleteHighlighters.html">AutoCompleteHighlighters</a></li> <li><a href="../classes/AutoCompleteList.html">AutoCompleteList</a></li> <li><a href="../classes/Axis.html">Axis</a></li> <li><a href="../classes/AxisBase.html">AxisBase</a></li> <li><a href="../classes/BarSeries.html">BarSeries</a></li> <li><a href="../classes/Base.html">Base</a></li> <li><a href="../classes/BaseCore.html">BaseCore</a></li> <li><a href="../classes/BaseObservable.html">BaseObservable</a></li> <li><a href="../classes/BottomAxisLayout.html">BottomAxisLayout</a></li> <li><a href="../classes/Button.html">Button</a></li> <li><a href="../classes/ButtonCore.html">ButtonCore</a></li> <li><a href="../classes/ButtonGroup.html">ButtonGroup</a></li> <li><a href="../classes/Cache.html">Cache</a></li> <li><a href="../classes/CacheOffline.html">CacheOffline</a></li> <li><a href="../classes/Calendar.html">Calendar</a></li> <li><a href="../classes/CalendarBase.html">CalendarBase</a></li> <li><a href="../classes/CandlestickSeries.html">CandlestickSeries</a></li> <li><a href="../classes/CanvasCircle.html">CanvasCircle</a></li> <li><a href="../classes/CanvasDrawing.html">CanvasDrawing</a></li> <li><a href="../classes/CanvasEllipse.html">CanvasEllipse</a></li> <li><a href="../classes/CanvasGraphic.html">CanvasGraphic</a></li> <li><a href="../classes/CanvasPath.html">CanvasPath</a></li> <li><a href="../classes/CanvasPieSlice.html">CanvasPieSlice</a></li> <li><a href="../classes/CanvasRect.html">CanvasRect</a></li> <li><a href="../classes/CanvasShape.html">CanvasShape</a></li> <li><a href="../classes/CartesianChart.html">CartesianChart</a></li> <li><a href="../classes/CartesianSeries.html">CartesianSeries</a></li> <li><a href="../classes/CategoryAxis.html">CategoryAxis</a></li> <li><a href="../classes/CategoryAxisBase.html">CategoryAxisBase</a></li> <li><a href="../classes/CategoryImpl.html">CategoryImpl</a></li> <li><a href="../classes/Chart.html">Chart</a></li> <li><a href="../classes/ChartBase.html">ChartBase</a></li> <li><a href="../classes/ChartLegend.html">ChartLegend</a></li> <li><a href="../classes/Circle.html">Circle</a></li> <li><a href="../classes/CircleGroup.html">CircleGroup</a></li> <li><a href="../classes/ClassNameManager.html">ClassNameManager</a></li> <li><a href="../classes/ClickableRail.html">ClickableRail</a></li> <li><a href="../classes/Color.html">Color</a></li> <li><a href="../classes/Color.Harmony.html">Color.Harmony</a></li> <li><a href="../classes/Color.HSL.html">Color.HSL</a></li> <li><a href="../classes/Color.HSV.html">Color.HSV</a></li> <li><a href="../classes/ColumnSeries.html">ColumnSeries</a></li> <li><a href="../classes/ComboSeries.html">ComboSeries</a></li> <li><a href="../classes/ComboSplineSeries.html">ComboSplineSeries</a></li> <li><a href="../classes/config.html">config</a></li> <li><a href="../classes/Console.html">Console</a></li> <li><a href="../classes/ContentEditable.html">ContentEditable</a></li> <li><a href="../classes/Controller.html">Controller</a></li> <li><a href="../classes/Cookie.html">Cookie</a></li> <li><a href="../classes/CurveUtil.html">CurveUtil</a></li> <li><a href="../classes/CustomEvent.html">CustomEvent</a></li> <li><a href="../classes/DataSchema.Array.html">DataSchema.Array</a></li> <li><a href="../classes/DataSchema.Base.html">DataSchema.Base</a></li> <li><a href="../classes/DataSchema.JSON.html">DataSchema.JSON</a></li> <li><a href="../classes/DataSchema.Text.html">DataSchema.Text</a></li> <li><a href="../classes/DataSchema.XML.html">DataSchema.XML</a></li> <li><a href="../classes/DataSource.Function.html">DataSource.Function</a></li> <li><a href="../classes/DataSource.Get.html">DataSource.Get</a></li> <li><a href="../classes/DataSource.IO.html">DataSource.IO</a></li> <li><a href="../classes/DataSource.Local.html">DataSource.Local</a></li> <li><a href="../classes/DataSourceArraySchema.html">DataSourceArraySchema</a></li> <li><a href="../classes/DataSourceCache.html">DataSourceCache</a></li> <li><a href="../classes/DataSourceCacheExtension.html">DataSourceCacheExtension</a></li> <li><a href="../classes/DataSourceJSONSchema.html">DataSourceJSONSchema</a></li> <li><a href="../classes/DataSourceTextSchema.html">DataSourceTextSchema</a></li> <li><a href="../classes/DataSourceXMLSchema.html">DataSourceXMLSchema</a></li> <li><a href="../classes/DataTable.html">DataTable</a></li> <li><a href="../classes/DataTable.Base.html">DataTable.Base</a></li> <li><a href="../classes/DataTable.BodyView.html">DataTable.BodyView</a></li> <li><a href="../classes/DataTable.BodyView.Formatters.html">DataTable.BodyView.Formatters</a></li> <li><a href="../classes/DataTable.Column.html">DataTable.Column</a></li> <li><a href="../classes/DataTable.ColumnWidths.html">DataTable.ColumnWidths</a></li> <li><a href="../classes/DataTable.Core.html">DataTable.Core</a></li> <li><a href="../classes/DataTable.HeaderView.html">DataTable.HeaderView</a></li> <li><a href="../classes/DataTable.Highlight.html">DataTable.Highlight</a></li> <li><a href="../classes/DataTable.KeyNav.html">DataTable.KeyNav</a></li> <li><a href="../classes/DataTable.Message.html">DataTable.Message</a></li> <li><a href="../classes/DataTable.Mutable.html">DataTable.Mutable</a></li> <li><a href="../classes/DataTable.Paginator.html">DataTable.Paginator</a></li> <li><a href="../classes/DataTable.Paginator.Model.html">DataTable.Paginator.Model</a></li> <li><a href="../classes/DataTable.Paginator.View.html">DataTable.Paginator.View</a></li> <li><a href="../classes/DataTable.Scrollable.html">DataTable.Scrollable</a></li> <li><a href="../classes/DataTable.Sortable.html">DataTable.Sortable</a></li> <li><a href="../classes/DataTable.TableView.html">DataTable.TableView</a></li> <li><a href="../classes/Date.html">Date</a></li> <li><a href="../classes/DD.DDM.html">DD.DDM</a></li> <li><a href="../classes/DD.Delegate.html">DD.Delegate</a></li> <li><a href="../classes/DD.Drag.html">DD.Drag</a></li> <li><a href="../classes/DD.Drop.html">DD.Drop</a></li> <li><a href="../classes/DD.Scroll.html">DD.Scroll</a></li> <li><a href="../classes/Dial.html">Dial</a></li> <li><a href="../classes/Do.html">Do</a></li> <li><a href="../classes/Do.AlterArgs.html">Do.AlterArgs</a></li> <li><a href="../classes/Do.AlterReturn.html">Do.AlterReturn</a></li> <li><a href="../classes/Do.Error.html">Do.Error</a></li> <li><a href="../classes/Do.Halt.html">Do.Halt</a></li> <li><a href="../classes/Do.Method.html">Do.Method</a></li> <li><a href="../classes/Do.Prevent.html">Do.Prevent</a></li> <li><a href="../classes/DOM.html">DOM</a></li> <li><a href="../classes/DOMEventFacade.html">DOMEventFacade</a></li> <li><a href="../classes/Drawing.html">Drawing</a></li> <li><a href="../classes/Easing.html">Easing</a></li> <li><a href="../classes/EditorBase.html">EditorBase</a></li> <li><a href="../classes/EditorSelection.html">EditorSelection</a></li> <li><a href="../classes/Ellipse.html">Ellipse</a></li> <li><a href="../classes/EllipseGroup.html">EllipseGroup</a></li> <li><a href="../classes/Escape.html">Escape</a></li> <li><a href="../classes/Event.html">Event</a></li> <li><a href="../classes/EventFacade.html">EventFacade</a></li> <li><a href="../classes/EventHandle.html">EventHandle</a></li> <li><a href="../classes/EventTarget.html">EventTarget</a></li> <li><a href="../classes/Features.html">Features</a></li> <li><a href="../classes/File.html">File</a></li> <li><a href="../classes/FileFlash.html">FileFlash</a></li> <li><a href="../classes/FileHTML5.html">FileHTML5</a></li> <li><a href="../classes/Fills.html">Fills</a></li> <li><a href="../classes/Frame.html">Frame</a></li> <li><a href="../classes/Get.html">Get</a></li> <li><a href="../classes/Get.Transaction.html">Get.Transaction</a></li> <li><a href="../classes/GetNodeJS.html">GetNodeJS</a></li> <li><a href="../classes/Graph.html">Graph</a></li> <li><a href="../classes/Graphic.html">Graphic</a></li> <li><a href="../classes/GraphicBase.html">GraphicBase</a></li> <li><a href="../classes/Gridlines.html">Gridlines</a></li> <li><a href="../classes/GroupDiamond.html">GroupDiamond</a></li> <li><a href="../classes/GroupRect.html">GroupRect</a></li> <li><a href="../classes/Handlebars.html">Handlebars</a></li> <li><a href="../classes/Highlight.html">Highlight</a></li> <li><a href="../classes/Histogram.html">Histogram</a></li> <li><a href="../classes/HistoryBase.html">HistoryBase</a></li> <li><a href="../classes/HistoryHash.html">HistoryHash</a></li> <li><a href="../classes/HistoryHTML5.html">HistoryHTML5</a></li> <li><a href="../classes/HorizontalLegendLayout.html">HorizontalLegendLayout</a></li> <li><a href="../classes/ImgLoadGroup.html">ImgLoadGroup</a></li> <li><a href="../classes/ImgLoadImgObj.html">ImgLoadImgObj</a></li> <li><a href="../classes/InlineEditor.html">InlineEditor</a></li> <li><a href="../classes/Intl.html">Intl</a></li> <li><a href="../classes/IO.html">IO</a></li> <li><a href="../classes/JSON.html">JSON</a></li> <li><a href="../classes/JSONPRequest.html">JSONPRequest</a></li> <li><a href="../classes/Lang.html">Lang</a></li> <li><a href="../classes/LazyModelList.html">LazyModelList</a></li> <li><a href="../classes/LeftAxisLayout.html">LeftAxisLayout</a></li> <li><a href="../classes/Lines.html">Lines</a></li> <li><a href="../classes/LineSeries.html">LineSeries</a></li> <li><a href="../classes/Loader.html">Loader</a></li> <li><a href="../classes/MarkerSeries.html">MarkerSeries</a></li> <li><a href="../classes/Matrix.html">Matrix</a></li> <li><a href="../classes/MatrixUtil.html">MatrixUtil</a></li> <li><a href="../classes/Model.html">Model</a></li> <li><a href="../classes/ModelList.html">ModelList</a></li> <li><a href="../classes/ModelSync.Local.html">ModelSync.Local</a></li> <li><a href="../classes/ModelSync.REST.html">ModelSync.REST</a></li> <li><a href="../classes/Node.html">Node</a></li> <li><a href="../classes/NodeList.html">NodeList</a></li> <li><a href="../classes/Number.html">Number</a></li> <li><a href="../classes/NumericAxis.html">NumericAxis</a></li> <li><a href="../classes/NumericAxisBase.html">NumericAxisBase</a></li> <li><a href="../classes/NumericImpl.html">NumericImpl</a></li> <li><a href="../classes/Object.html">Object</a></li> <li><a href="../classes/OHLCSeries.html">OHLCSeries</a></li> <li><a href="../classes/Overlay.html">Overlay</a></li> <li><a href="../classes/Paginator.html">Paginator</a></li> <li><a href="../classes/Paginator.Core.html">Paginator.Core</a></li> <li><a href="../classes/Paginator.Url.html">Paginator.Url</a></li> <li><a href="../classes/Panel.html">Panel</a></li> <li><a href="../classes/Parallel.html">Parallel</a></li> <li><a href="../classes/Path.html">Path</a></li> <li><a href="../classes/PieChart.html">PieChart</a></li> <li><a href="../classes/PieSeries.html">PieSeries</a></li> <li><a href="../classes/Pjax.html">Pjax</a></li> <li><a href="../classes/PjaxBase.html">PjaxBase</a></li> <li><a href="../classes/PjaxContent.html">PjaxContent</a></li> <li><a href="../classes/Plots.html">Plots</a></li> <li><a href="../classes/Plugin.Align.html">Plugin.Align</a></li> <li><a href="../classes/Plugin.AutoComplete.html">Plugin.AutoComplete</a></li> <li><a href="../classes/Plugin.Base.html">Plugin.Base</a></li> <li><a href="../classes/Plugin.Button.html">Plugin.Button</a></li> <li><a href="../classes/Plugin.Cache.html">Plugin.Cache</a></li> <li><a href="../classes/Plugin.CalendarNavigator.html">Plugin.CalendarNavigator</a></li> <li><a href="../classes/Plugin.ConsoleFilters.html">Plugin.ConsoleFilters</a></li> <li><a href="../classes/Plugin.CreateLinkBase.html">Plugin.CreateLinkBase</a></li> <li><a href="../classes/Plugin.DataTableDataSource.html">Plugin.DataTableDataSource</a></li> <li><a href="../classes/Plugin.DDConstrained.html">Plugin.DDConstrained</a></li> <li><a href="../classes/Plugin.DDNodeScroll.html">Plugin.DDNodeScroll</a></li> <li><a href="../classes/Plugin.DDProxy.html">Plugin.DDProxy</a></li> <li><a href="../classes/Plugin.DDWindowScroll.html">Plugin.DDWindowScroll</a></li> <li><a href="../classes/Plugin.Drag.html">Plugin.Drag</a></li> <li><a href="../classes/Plugin.Drop.html">Plugin.Drop</a></li> <li><a href="../classes/Plugin.EditorBidi.html">Plugin.EditorBidi</a></li> <li><a href="../classes/Plugin.EditorBR.html">Plugin.EditorBR</a></li> <li><a href="../classes/Plugin.EditorLists.html">Plugin.EditorLists</a></li> <li><a href="../classes/Plugin.EditorPara.html">Plugin.EditorPara</a></li> <li><a href="../classes/Plugin.EditorParaBase.html">Plugin.EditorParaBase</a></li> <li><a href="../classes/Plugin.EditorParaIE.html">Plugin.EditorParaIE</a></li> <li><a href="../classes/Plugin.EditorTab.html">Plugin.EditorTab</a></li> <li><a href="../classes/Plugin.ExecCommand.html">Plugin.ExecCommand</a></li> <li><a href="../classes/Plugin.ExecCommand.COMMANDS.html">Plugin.ExecCommand.COMMANDS</a></li> <li><a href="../classes/Plugin.Flick.html">Plugin.Flick</a></li> <li><a href="../classes/Plugin.Host.html">Plugin.Host</a></li> <li><a href="../classes/plugin.NodeFocusManager.html">plugin.NodeFocusManager</a></li> <li><a href="../classes/Plugin.NodeFX.html">Plugin.NodeFX</a></li> <li><a href="../classes/plugin.NodeMenuNav.html">plugin.NodeMenuNav</a></li> <li><a href="../classes/Plugin.Pjax.html">Plugin.Pjax</a></li> <li><a href="../classes/Plugin.Resize.html">Plugin.Resize</a></li> <li><a href="../classes/Plugin.ResizeConstrained.html">Plugin.ResizeConstrained</a></li> <li><a href="../classes/Plugin.ResizeProxy.html">Plugin.ResizeProxy</a></li> <li><a href="../classes/Plugin.ScrollInfo.html">Plugin.ScrollInfo</a></li> <li><a href="../classes/Plugin.ScrollViewList.html">Plugin.ScrollViewList</a></li> <li><a href="../classes/Plugin.ScrollViewPaginator.html">Plugin.ScrollViewPaginator</a></li> <li><a href="../classes/Plugin.ScrollViewScrollbars.html">Plugin.ScrollViewScrollbars</a></li> <li><a href="../classes/Plugin.Shim.html">Plugin.Shim</a></li> <li><a href="../classes/Plugin.SortScroll.html">Plugin.SortScroll</a></li> <li><a href="../classes/Plugin.Tree.Lazy.html">Plugin.Tree.Lazy</a></li> <li><a href="../classes/Plugin.WidgetAnim.html">Plugin.WidgetAnim</a></li> <li><a href="../classes/Pollable.html">Pollable</a></li> <li><a href="../classes/Promise.html">Promise</a></li> <li><a href="../classes/Promise.Resolver.html">Promise.Resolver</a></li> <li><a href="../classes/QueryString.html">QueryString</a></li> <li><a href="../classes/Queue.html">Queue</a></li> <li><a href="../classes/RangeSeries.html">RangeSeries</a></li> <li><a href="../classes/Record.html">Record</a></li> <li><a href="../classes/Recordset.html">Recordset</a></li> <li><a href="../classes/RecordsetFilter.html">RecordsetFilter</a></li> <li><a href="../classes/RecordsetIndexer.html">RecordsetIndexer</a></li> <li><a href="../classes/RecordsetSort.html">RecordsetSort</a></li> <li><a href="../classes/Rect.html">Rect</a></li> <li><a href="../classes/Renderer.html">Renderer</a></li> <li><a href="../classes/Resize.html">Resize</a></li> <li><a href="../classes/RightAxisLayout.html">RightAxisLayout</a></li> <li><a href="../classes/Router.html">Router</a></li> <li><a href="../classes/ScrollView.html">ScrollView</a></li> <li><a href="../classes/Selector.html">Selector</a></li> <li><a href="../classes/SeriesBase.html">SeriesBase</a></li> <li><a href="../classes/Shape.html">Shape</a></li> <li><a href="../classes/ShapeGroup.html">ShapeGroup</a></li> <li><a href="../classes/Slider.html">Slider</a></li> <li><a href="../classes/SliderBase.html">SliderBase</a></li> <li><a href="../classes/SliderValueRange.html">SliderValueRange</a></li> <li><a href="../classes/Sortable.html">Sortable</a></li> <li><a href="../classes/SplineSeries.html">SplineSeries</a></li> <li><a href="../classes/StackedAreaSeries.html">StackedAreaSeries</a></li> <li><a href="../classes/StackedAreaSplineSeries.html">StackedAreaSplineSeries</a></li> <li><a href="../classes/StackedAxis.html">StackedAxis</a></li> <li><a href="../classes/StackedAxisBase.html">StackedAxisBase</a></li> <li><a href="../classes/StackedBarSeries.html">StackedBarSeries</a></li> <li><a href="../classes/StackedColumnSeries.html">StackedColumnSeries</a></li> <li><a href="../classes/StackedComboSeries.html">StackedComboSeries</a></li> <li><a href="../classes/StackedComboSplineSeries.html">StackedComboSplineSeries</a></li> <li><a href="../classes/StackedImpl.html">StackedImpl</a></li> <li><a href="../classes/StackedLineSeries.html">StackedLineSeries</a></li> <li><a href="../classes/StackedMarkerSeries.html">StackedMarkerSeries</a></li> <li><a href="../classes/StackedSplineSeries.html">StackedSplineSeries</a></li> <li><a href="../classes/StackingUtil.html">StackingUtil</a></li> <li><a href="../classes/State.html">State</a></li> <li><a href="../classes/StyleSheet.html">StyleSheet</a></li> <li><a href="../classes/Subscriber.html">Subscriber</a></li> <li><a href="../classes/SVGCircle.html">SVGCircle</a></li> <li><a href="../classes/SVGDrawing.html">SVGDrawing</a></li> <li><a href="../classes/SVGEllipse.html">SVGEllipse</a></li> <li><a href="../classes/SVGGraphic.html">SVGGraphic</a></li> <li><a href="../classes/SVGPath.html">SVGPath</a></li> <li><a href="../classes/SVGPieSlice.html">SVGPieSlice</a></li> <li><a href="../classes/SVGRect.html">SVGRect</a></li> <li><a href="../classes/SVGShape.html">SVGShape</a></li> <li><a href="../classes/SWF.html">SWF</a></li> <li><a href="../classes/SWFDetect.html">SWFDetect</a></li> <li><a href="../classes/SyntheticEvent.html">SyntheticEvent</a></li> <li><a href="../classes/SyntheticEvent.Notifier.html">SyntheticEvent.Notifier</a></li> <li><a href="../classes/SynthRegistry.html">SynthRegistry</a></li> <li><a href="../classes/Tab.html">Tab</a></li> <li><a href="../classes/TabView.html">TabView</a></li> <li><a href="../classes/Template.html">Template</a></li> <li><a href="../classes/Template.Micro.html">Template.Micro</a></li> <li><a href="../classes/Test.ArrayAssert.html">Test.ArrayAssert</a></li> <li><a href="../classes/Test.Assert.html">Test.Assert</a></li> <li><a href="../classes/Test.AssertionError.html">Test.AssertionError</a></li> <li><a href="../classes/Test.ComparisonFailure.html">Test.ComparisonFailure</a></li> <li><a href="../classes/Test.Console.html">Test.Console</a></li> <li><a href="../classes/Test.CoverageFormat.html">Test.CoverageFormat</a></li> <li><a href="../classes/Test.DateAssert.html">Test.DateAssert</a></li> <li><a href="../classes/Test.EventTarget.html">Test.EventTarget</a></li> <li><a href="../classes/Test.Mock.html">Test.Mock</a></li> <li><a href="../classes/Test.Mock.Value.html">Test.Mock.Value</a></li> <li><a href="../classes/Test.ObjectAssert.html">Test.ObjectAssert</a></li> <li><a href="../classes/Test.Reporter.html">Test.Reporter</a></li> <li><a href="../classes/Test.Results.html">Test.Results</a></li> <li><a href="../classes/Test.Runner.html">Test.Runner</a></li> <li><a href="../classes/Test.ShouldError.html">Test.ShouldError</a></li> <li><a href="../classes/Test.ShouldFail.html">Test.ShouldFail</a></li> <li><a href="../classes/Test.TestCase.html">Test.TestCase</a></li> <li><a href="../classes/Test.TestFormat.html">Test.TestFormat</a></li> <li><a href="../classes/Test.TestNode.html">Test.TestNode</a></li> <li><a href="../classes/Test.TestRunner.html">Test.TestRunner</a></li> <li><a href="../classes/Test.TestSuite.html">Test.TestSuite</a></li> <li><a href="../classes/Test.UnexpectedError.html">Test.UnexpectedError</a></li> <li><a href="../classes/Test.UnexpectedValue.html">Test.UnexpectedValue</a></li> <li><a href="../classes/Test.Wait.html">Test.Wait</a></li> <li><a href="../classes/Text.AccentFold.html">Text.AccentFold</a></li> <li><a href="../classes/Text.WordBreak.html">Text.WordBreak</a></li> <li><a href="../classes/TimeAxis.html">TimeAxis</a></li> <li><a href="../classes/TimeAxisBase.html">TimeAxisBase</a></li> <li><a href="../classes/TimeImpl.html">TimeImpl</a></li> <li><a href="../classes/ToggleButton.html">ToggleButton</a></li> <li><a href="../classes/TopAxisLayout.html">TopAxisLayout</a></li> <li><a href="../classes/Transition.html">Transition</a></li> <li><a href="../classes/Tree.html">Tree</a></li> <li><a href="../classes/Tree.Labelable.html">Tree.Labelable</a></li> <li><a href="../classes/Tree.Node.html">Tree.Node</a></li> <li><a href="../classes/Tree.Node.Labelable.html">Tree.Node.Labelable</a></li> <li><a href="../classes/Tree.Node.Openable.html">Tree.Node.Openable</a></li> <li><a href="../classes/Tree.Node.Selectable.html">Tree.Node.Selectable</a></li> <li><a href="../classes/Tree.Node.Sortable.html">Tree.Node.Sortable</a></li> <li><a href="../classes/Tree.Openable.html">Tree.Openable</a></li> <li><a href="../classes/Tree.Selectable.html">Tree.Selectable</a></li> <li><a href="../classes/Tree.Sortable.html">Tree.Sortable</a></li> <li><a href="../classes/UA.html">UA</a></li> <li><a href="../classes/Uploader.html">Uploader</a></li> <li><a href="../classes/Uploader.Queue.html">Uploader.Queue</a></li> <li><a href="../classes/UploaderFlash.html">UploaderFlash</a></li> <li><a href="../classes/UploaderHTML5.html">UploaderHTML5</a></li> <li><a href="../classes/ValueChange.html">ValueChange</a></li> <li><a href="../classes/VerticalLegendLayout.html">VerticalLegendLayout</a></li> <li><a href="../classes/View.html">View</a></li> <li><a href="../classes/View.NodeMap.html">View.NodeMap</a></li> <li><a href="../classes/VMLCircle.html">VMLCircle</a></li> <li><a href="../classes/VMLDrawing.html">VMLDrawing</a></li> <li><a href="../classes/VMLEllipse.html">VMLEllipse</a></li> <li><a href="../classes/VMLGraphic.html">VMLGraphic</a></li> <li><a href="../classes/VMLPath.html">VMLPath</a></li> <li><a href="../classes/VMLPieSlice.html">VMLPieSlice</a></li> <li><a href="../classes/VMLRect.html">VMLRect</a></li> <li><a href="../classes/VMLShape.html">VMLShape</a></li> <li><a href="../classes/Widget.html">Widget</a></li> <li><a href="../classes/WidgetAutohide.html">WidgetAutohide</a></li> <li><a href="../classes/WidgetButtons.html">WidgetButtons</a></li> <li><a href="../classes/WidgetChild.html">WidgetChild</a></li> <li><a href="../classes/WidgetModality.html">WidgetModality</a></li> <li><a href="../classes/WidgetParent.html">WidgetParent</a></li> <li><a href="../classes/WidgetPosition.html">WidgetPosition</a></li> <li><a href="../classes/WidgetPositionAlign.html">WidgetPositionAlign</a></li> <li><a href="../classes/WidgetPositionConstrain.html">WidgetPositionConstrain</a></li> <li><a href="../classes/WidgetStack.html">WidgetStack</a></li> <li><a href="../classes/WidgetStdMod.html">WidgetStdMod</a></li> <li><a href="../classes/XML.html">XML</a></li> <li><a href="../classes/YQL.html">YQL</a></li> <li><a href="../classes/YQLRequest.html">YQLRequest</a></li> <li><a href="../classes/YUI.html">YUI</a></li> <li><a href="../classes/YUI~substitute.html">YUI~substitute</a></li> </ul> <ul id="api-modules" class="apis modules"> <li><a href="../modules/align-plugin.html">align-plugin</a></li> <li><a href="../modules/anim.html">anim</a></li> <li><a href="../modules/anim-base.html">anim-base</a></li> <li><a href="../modules/anim-color.html">anim-color</a></li> <li><a href="../modules/anim-curve.html">anim-curve</a></li> <li><a href="../modules/anim-easing.html">anim-easing</a></li> <li><a href="../modules/anim-node-plugin.html">anim-node-plugin</a></li> <li><a href="../modules/anim-scroll.html">anim-scroll</a></li> <li><a href="../modules/anim-shape.html">anim-shape</a></li> <li><a href="../modules/anim-shape-transform.html">anim-shape-transform</a></li> <li><a href="../modules/anim-xy.html">anim-xy</a></li> <li><a href="../modules/app.html">app</a></li> <li><a href="../modules/app-base.html">app-base</a></li> <li><a href="../modules/app-content.html">app-content</a></li> <li><a href="../modules/app-transitions.html">app-transitions</a></li> <li><a href="../modules/app-transitions-native.html">app-transitions-native</a></li> <li><a href="../modules/array-extras.html">array-extras</a></li> <li><a href="../modules/array-invoke.html">array-invoke</a></li> <li><a href="../modules/arraylist.html">arraylist</a></li> <li><a href="../modules/arraylist-add.html">arraylist-add</a></li> <li><a href="../modules/arraylist-filter.html">arraylist-filter</a></li> <li><a href="../modules/arraysort.html">arraysort</a></li> <li><a href="../modules/async-queue.html">async-queue</a></li> <li><a href="../modules/attribute.html">attribute</a></li> <li><a href="../modules/attribute-base.html">attribute-base</a></li> <li><a href="../modules/attribute-complex.html">attribute-complex</a></li> <li><a href="../modules/attribute-core.html">attribute-core</a></li> <li><a href="../modules/attribute-extras.html">attribute-extras</a></li> <li><a href="../modules/attribute-observable.html">attribute-observable</a></li> <li><a href="../modules/autocomplete.html">autocomplete</a></li> <li><a href="../modules/autocomplete-base.html">autocomplete-base</a></li> <li><a href="../modules/autocomplete-filters.html">autocomplete-filters</a></li> <li><a href="../modules/autocomplete-filters-accentfold.html">autocomplete-filters-accentfold</a></li> <li><a href="../modules/autocomplete-highlighters.html">autocomplete-highlighters</a></li> <li><a href="../modules/autocomplete-highlighters-accentfold.html">autocomplete-highlighters-accentfold</a></li> <li><a href="../modules/autocomplete-list.html">autocomplete-list</a></li> <li><a href="../modules/autocomplete-list-keys.html">autocomplete-list-keys</a></li> <li><a href="../modules/autocomplete-plugin.html">autocomplete-plugin</a></li> <li><a href="../modules/autocomplete-sources.html">autocomplete-sources</a></li> <li><a href="../modules/axis.html">axis</a></li> <li><a href="../modules/axis-base.html">axis-base</a></li> <li><a href="../modules/axis-category.html">axis-category</a></li> <li><a href="../modules/axis-category-base.html">axis-category-base</a></li> <li><a href="../modules/axis-numeric.html">axis-numeric</a></li> <li><a href="../modules/axis-numeric-base.html">axis-numeric-base</a></li> <li><a href="../modules/axis-stacked.html">axis-stacked</a></li> <li><a href="../modules/axis-stacked-base.html">axis-stacked-base</a></li> <li><a href="../modules/axis-time.html">axis-time</a></li> <li><a href="../modules/axis-time-base.html">axis-time-base</a></li> <li><a href="../modules/base.html">base</a></li> <li><a href="../modules/base-base.html">base-base</a></li> <li><a href="../modules/base-build.html">base-build</a></li> <li><a href="../modules/base-core.html">base-core</a></li> <li><a href="../modules/base-observable.html">base-observable</a></li> <li><a href="../modules/base-pluginhost.html">base-pluginhost</a></li> <li><a href="../modules/button.html">button</a></li> <li><a href="../modules/button-core.html">button-core</a></li> <li><a href="../modules/button-group.html">button-group</a></li> <li><a href="../modules/button-plugin.html">button-plugin</a></li> <li><a href="../modules/cache.html">cache</a></li> <li><a href="../modules/cache-base.html">cache-base</a></li> <li><a href="../modules/cache-offline.html">cache-offline</a></li> <li><a href="../modules/cache-plugin.html">cache-plugin</a></li> <li><a href="../modules/calendar.html">calendar</a></li> <li><a href="../modules/calendar-base.html">calendar-base</a></li> <li><a href="../modules/calendarnavigator.html">calendarnavigator</a></li> <li><a href="../modules/charts.html">charts</a></li> <li><a href="../modules/charts-base.html">charts-base</a></li> <li><a href="../modules/charts-legend.html">charts-legend</a></li> <li><a href="../modules/classnamemanager.html">classnamemanager</a></li> <li><a href="../modules/clickable-rail.html">clickable-rail</a></li> <li><a href="../modules/collection.html">collection</a></li> <li><a href="../modules/color.html">color</a></li> <li><a href="../modules/color-base.html">color-base</a></li> <li><a href="../modules/color-harmony.html">color-harmony</a></li> <li><a href="../modules/color-hsl.html">color-hsl</a></li> <li><a href="../modules/color-hsv.html">color-hsv</a></li> <li><a href="../modules/console.html">console</a></li> <li><a href="../modules/console-filters.html">console-filters</a></li> <li><a href="../modules/content-editable.html">content-editable</a></li> <li><a href="../modules/cookie.html">cookie</a></li> <li><a href="../modules/createlink-base.html">createlink-base</a></li> <li><a href="../modules/dataschema.html">dataschema</a></li> <li><a href="../modules/dataschema-array.html">dataschema-array</a></li> <li><a href="../modules/dataschema-base.html">dataschema-base</a></li> <li><a href="../modules/dataschema-json.html">dataschema-json</a></li> <li><a href="../modules/dataschema-text.html">dataschema-text</a></li> <li><a href="../modules/dataschema-xml.html">dataschema-xml</a></li> <li><a href="../modules/datasource.html">datasource</a></li> <li><a href="../modules/datasource-arrayschema.html">datasource-arrayschema</a></li> <li><a href="../modules/datasource-cache.html">datasource-cache</a></li> <li><a href="../modules/datasource-function.html">datasource-function</a></li> <li><a href="../modules/datasource-get.html">datasource-get</a></li> <li><a href="../modules/datasource-io.html">datasource-io</a></li> <li><a href="../modules/datasource-jsonschema.html">datasource-jsonschema</a></li> <li><a href="../modules/datasource-local.html">datasource-local</a></li> <li><a href="../modules/datasource-polling.html">datasource-polling</a></li> <li><a href="../modules/datasource-textschema.html">datasource-textschema</a></li> <li><a href="../modules/datasource-xmlschema.html">datasource-xmlschema</a></li> <li><a href="../modules/datatable.html">datatable</a></li> <li><a href="../modules/datatable-base.html">datatable-base</a></li> <li><a href="../modules/datatable-body.html">datatable-body</a></li> <li><a href="../modules/datatable-column-widths.html">datatable-column-widths</a></li> <li><a href="../modules/datatable-core.html">datatable-core</a></li> <li><a href="../modules/datatable-datasource.html">datatable-datasource</a></li> <li><a href="../modules/datatable-foot.html">datatable-foot</a></li> <li><a href="../modules/datatable-formatters.html">datatable-formatters</a></li> <li><a href="../modules/datatable-head.html">datatable-head</a></li> <li><a href="../modules/datatable-highlight.html">datatable-highlight</a></li> <li><a href="../modules/datatable-keynav.html">datatable-keynav</a></li> <li><a href="../modules/datatable-message.html">datatable-message</a></li> <li><a href="../modules/datatable-mutable.html">datatable-mutable</a></li> <li><a href="../modules/datatable-paginator.html">datatable-paginator</a></li> <li><a href="../modules/datatable-scroll.html">datatable-scroll</a></li> <li><a href="../modules/datatable-sort.html">datatable-sort</a></li> <li><a href="../modules/datatable-table.html">datatable-table</a></li> <li><a href="../modules/datatype.html">datatype</a></li> <li><a href="../modules/datatype-date.html">datatype-date</a></li> <li><a href="../modules/datatype-date-format.html">datatype-date-format</a></li> <li><a href="../modules/datatype-date-math.html">datatype-date-math</a></li> <li><a href="../modules/datatype-date-parse.html">datatype-date-parse</a></li> <li><a href="../modules/datatype-number.html">datatype-number</a></li> <li><a href="../modules/datatype-number-format.html">datatype-number-format</a></li> <li><a href="../modules/datatype-number-parse.html">datatype-number-parse</a></li> <li><a href="../modules/datatype-xml.html">datatype-xml</a></li> <li><a href="../modules/datatype-xml-format.html">datatype-xml-format</a></li> <li><a href="../modules/datatype-xml-parse.html">datatype-xml-parse</a></li> <li><a href="../modules/dd.html">dd</a></li> <li><a href="../modules/dd-constrain.html">dd-constrain</a></li> <li><a href="../modules/dd-ddm.html">dd-ddm</a></li> <li><a href="../modules/dd-ddm-base.html">dd-ddm-base</a></li> <li><a href="../modules/dd-ddm-drop.html">dd-ddm-drop</a></li> <li><a href="../modules/dd-delegate.html">dd-delegate</a></li> <li><a href="../modules/dd-drag.html">dd-drag</a></li> <li><a href="../modules/dd-drop.html">dd-drop</a></li> <li><a href="../modules/dd-drop-plugin.html">dd-drop-plugin</a></li> <li><a href="../modules/dd-gestures.html">dd-gestures</a></li> <li><a href="../modules/dd-plugin.html">dd-plugin</a></li> <li><a href="../modules/dd-proxy.html">dd-proxy</a></li> <li><a href="../modules/dd-scroll.html">dd-scroll</a></li> <li><a href="../modules/dial.html">dial</a></li> <li><a href="../modules/dom.html">dom</a></li> <li><a href="../modules/dom-base.html">dom-base</a></li> <li><a href="../modules/dom-screen.html">dom-screen</a></li> <li><a href="../modules/dom-style.html">dom-style</a></li> <li><a href="../modules/dump.html">dump</a></li> <li><a href="../modules/editor.html">editor</a></li> <li><a href="../modules/editor-base.html">editor-base</a></li> <li><a href="../modules/editor-bidi.html">editor-bidi</a></li> <li><a href="../modules/editor-br.html">editor-br</a></li> <li><a href="../modules/editor-inline.html">editor-inline</a></li> <li><a href="../modules/editor-lists.html">editor-lists</a></li> <li><a href="../modules/editor-para.html">editor-para</a></li> <li><a href="../modules/editor-para-base.html">editor-para-base</a></li> <li><a href="../modules/editor-para-ie.html">editor-para-ie</a></li> <li><a href="../modules/editor-tab.html">editor-tab</a></li> <li><a href="../modules/escape.html">escape</a></li> <li><a href="../modules/event.html">event</a></li> <li><a href="../modules/event-base.html">event-base</a></li> <li><a href="../modules/event-contextmenu.html">event-contextmenu</a></li> <li><a href="../modules/event-custom.html">event-custom</a></li> <li><a href="../modules/event-custom-base.html">event-custom-base</a></li> <li><a href="../modules/event-custom-complex.html">event-custom-complex</a></li> <li><a href="../modules/event-delegate.html">event-delegate</a></li> <li><a href="../modules/event-flick.html">event-flick</a></li> <li><a href="../modules/event-focus.html">event-focus</a></li> <li><a href="../modules/event-gestures.html">event-gestures</a></li> <li><a href="../modules/event-hover.html">event-hover</a></li> <li><a href="../modules/event-key.html">event-key</a></li> <li><a href="../modules/event-mouseenter.html">event-mouseenter</a></li> <li><a href="../modules/event-mousewheel.html">event-mousewheel</a></li> <li><a href="../modules/event-move.html">event-move</a></li> <li><a href="../modules/event-outside.html">event-outside</a></li> <li><a href="../modules/event-resize.html">event-resize</a></li> <li><a href="../modules/event-simulate.html">event-simulate</a></li> <li><a href="../modules/event-synthetic.html">event-synthetic</a></li> <li><a href="../modules/event-tap.html">event-tap</a></li> <li><a href="../modules/event-touch.html">event-touch</a></li> <li><a href="../modules/event-valuechange.html">event-valuechange</a></li> <li><a href="../modules/exec-command.html">exec-command</a></li> <li><a href="../modules/features.html">features</a></li> <li><a href="../modules/file.html">file</a></li> <li><a href="../modules/file-flash.html">file-flash</a></li> <li><a href="../modules/file-html5.html">file-html5</a></li> <li><a href="../modules/frame.html">frame</a></li> <li><a href="../modules/gesture-simulate.html">gesture-simulate</a></li> <li><a href="../modules/get.html">get</a></li> <li><a href="../modules/get-nodejs.html">get-nodejs</a></li> <li><a href="../modules/graphics.html">graphics</a></li> <li><a href="../modules/graphics-group.html">graphics-group</a></li> <li><a href="../modules/handlebars.html">handlebars</a></li> <li><a href="../modules/handlebars-base.html">handlebars-base</a></li> <li><a href="../modules/handlebars-compiler.html">handlebars-compiler</a></li> <li><a href="../modules/highlight.html">highlight</a></li> <li><a href="../modules/highlight-accentfold.html">highlight-accentfold</a></li> <li><a href="../modules/highlight-base.html">highlight-base</a></li> <li><a href="../modules/history.html">history</a></li> <li><a href="../modules/history-base.html">history-base</a></li> <li><a href="../modules/history-hash.html">history-hash</a></li> <li><a href="../modules/history-hash-ie.html">history-hash-ie</a></li> <li><a href="../modules/history-html5.html">history-html5</a></li> <li><a href="../modules/imageloader.html">imageloader</a></li> <li><a href="../modules/intl.html">intl</a></li> <li><a href="../modules/io.html">io</a></li> <li><a href="../modules/io-base.html">io-base</a></li> <li><a href="../modules/io-form.html">io-form</a></li> <li><a href="../modules/io-nodejs.html">io-nodejs</a></li> <li><a href="../modules/io-queue.html">io-queue</a></li> <li><a href="../modules/io-upload-iframe.html">io-upload-iframe</a></li> <li><a href="../modules/io-xdr.html">io-xdr</a></li> <li><a href="../modules/json.html">json</a></li> <li><a href="../modules/json-parse.html">json-parse</a></li> <li><a href="../modules/json-stringify.html">json-stringify</a></li> <li><a href="../modules/jsonp.html">jsonp</a></li> <li><a href="../modules/jsonp-url.html">jsonp-url</a></li> <li><a href="../modules/lazy-model-list.html">lazy-model-list</a></li> <li><a href="../modules/loader.html">loader</a></li> <li><a href="../modules/loader-base.html">loader-base</a></li> <li><a href="../modules/loader-yui3.html">loader-yui3</a></li> <li><a href="../modules/matrix.html">matrix</a></li> <li><a href="../modules/model.html">model</a></li> <li><a href="../modules/model-list.html">model-list</a></li> <li><a href="../modules/model-sync-rest.html">model-sync-rest</a></li> <li><a href="../modules/node.html">node</a></li> <li><a href="../modules/node-base.html">node-base</a></li> <li><a href="../modules/node-core.html">node-core</a></li> <li><a href="../modules/node-data.html">node-data</a></li> <li><a href="../modules/node-event-delegate.html">node-event-delegate</a></li> <li><a href="../modules/node-event-html5.html">node-event-html5</a></li> <li><a href="../modules/node-event-simulate.html">node-event-simulate</a></li> <li><a href="../modules/node-flick.html">node-flick</a></li> <li><a href="../modules/node-focusmanager.html">node-focusmanager</a></li> <li><a href="../modules/node-load.html">node-load</a></li> <li><a href="../modules/node-menunav.html">node-menunav</a></li> <li><a href="../modules/node-pluginhost.html">node-pluginhost</a></li> <li><a href="../modules/node-screen.html">node-screen</a></li> <li><a href="../modules/node-scroll-info.html">node-scroll-info</a></li> <li><a href="../modules/node-style.html">node-style</a></li> <li><a href="../modules/oop.html">oop</a></li> <li><a href="../modules/overlay.html">overlay</a></li> <li><a href="../modules/paginator.html">paginator</a></li> <li><a href="../modules/paginator-core.html">paginator-core</a></li> <li><a href="../modules/paginator-url.html">paginator-url</a></li> <li><a href="../modules/panel.html">panel</a></li> <li><a href="../modules/parallel.html">parallel</a></li> <li><a href="../modules/pjax.html">pjax</a></li> <li><a href="../modules/pjax-base.html">pjax-base</a></li> <li><a href="../modules/pjax-content.html">pjax-content</a></li> <li><a href="../modules/pjax-plugin.html">pjax-plugin</a></li> <li><a href="../modules/plugin.html">plugin</a></li> <li><a href="../modules/pluginhost.html">pluginhost</a></li> <li><a href="../modules/pluginhost-base.html">pluginhost-base</a></li> <li><a href="../modules/pluginhost-config.html">pluginhost-config</a></li> <li><a href="../modules/promise.html">promise</a></li> <li><a href="../modules/querystring.html">querystring</a></li> <li><a href="../modules/querystring-parse.html">querystring-parse</a></li> <li><a href="../modules/querystring-parse-simple.html">querystring-parse-simple</a></li> <li><a href="../modules/querystring-stringify.html">querystring-stringify</a></li> <li><a href="../modules/querystring-stringify-simple.html">querystring-stringify-simple</a></li> <li><a href="../modules/queue-promote.html">queue-promote</a></li> <li><a href="../modules/range-slider.html">range-slider</a></li> <li><a href="../modules/recordset.html">recordset</a></li> <li><a href="../modules/recordset-base.html">recordset-base</a></li> <li><a href="../modules/recordset-filter.html">recordset-filter</a></li> <li><a href="../modules/recordset-indexer.html">recordset-indexer</a></li> <li><a href="../modules/recordset-sort.html">recordset-sort</a></li> <li><a href="../modules/resize.html">resize</a></li> <li><a href="../modules/resize-contrain.html">resize-contrain</a></li> <li><a href="../modules/resize-plugin.html">resize-plugin</a></li> <li><a href="../modules/resize-proxy.html">resize-proxy</a></li> <li><a href="../modules/rollup.html">rollup</a></li> <li><a href="../modules/router.html">router</a></li> <li><a href="../modules/scrollview.html">scrollview</a></li> <li><a href="../modules/scrollview-base.html">scrollview-base</a></li> <li><a href="../modules/scrollview-base-ie.html">scrollview-base-ie</a></li> <li><a href="../modules/scrollview-list.html">scrollview-list</a></li> <li><a href="../modules/scrollview-paginator.html">scrollview-paginator</a></li> <li><a href="../modules/scrollview-scrollbars.html">scrollview-scrollbars</a></li> <li><a href="../modules/selection.html">selection</a></li> <li><a href="../modules/selector-css2.html">selector-css2</a></li> <li><a href="../modules/selector-css3.html">selector-css3</a></li> <li><a href="../modules/selector-native.html">selector-native</a></li> <li><a href="../modules/series-area.html">series-area</a></li> <li><a href="../modules/series-area-stacked.html">series-area-stacked</a></li> <li><a href="../modules/series-areaspline.html">series-areaspline</a></li> <li><a href="../modules/series-areaspline-stacked.html">series-areaspline-stacked</a></li> <li><a href="../modules/series-bar.html">series-bar</a></li> <li><a href="../modules/series-bar-stacked.html">series-bar-stacked</a></li> <li><a href="../modules/series-base.html">series-base</a></li> <li><a href="../modules/series-candlestick.html">series-candlestick</a></li> <li><a href="../modules/series-cartesian.html">series-cartesian</a></li> <li><a href="../modules/series-column.html">series-column</a></li> <li><a href="../modules/series-column-stacked.html">series-column-stacked</a></li> <li><a href="../modules/series-combo.html">series-combo</a></li> <li><a href="../modules/series-combo-stacked.html">series-combo-stacked</a></li> <li><a href="../modules/series-combospline.html">series-combospline</a></li> <li><a href="../modules/series-combospline-stacked.html">series-combospline-stacked</a></li> <li><a href="../modules/series-curve-util.html">series-curve-util</a></li> <li><a href="../modules/series-fill-util.html">series-fill-util</a></li> <li><a href="../modules/series-histogram.html">series-histogram</a></li> <li><a href="../modules/series-line.html">series-line</a></li> <li><a href="../modules/series-line-stacked.html">series-line-stacked</a></li> <li><a href="../modules/series-line-util.html">series-line-util</a></li> <li><a href="../modules/series-marker.html">series-marker</a></li> <li><a href="../modules/series-marker-stacked.html">series-marker-stacked</a></li> <li><a href="../modules/series-ohlc.html">series-ohlc</a></li> <li><a href="../modules/series-pie.html">series-pie</a></li> <li><a href="../modules/series-plot-util.html">series-plot-util</a></li> <li><a href="../modules/series-range.html">series-range</a></li> <li><a href="../modules/series-spline.html">series-spline</a></li> <li><a href="../modules/series-spline-stacked.html">series-spline-stacked</a></li> <li><a href="../modules/series-stacked.html">series-stacked</a></li> <li><a href="../modules/shim-plugin.html">shim-plugin</a></li> <li><a href="../modules/slider.html">slider</a></li> <li><a href="../modules/slider-base.html">slider-base</a></li> <li><a href="../modules/slider-value-range.html">slider-value-range</a></li> <li><a href="../modules/sortable.html">sortable</a></li> <li><a href="../modules/sortable-scroll.html">sortable-scroll</a></li> <li><a href="../modules/stylesheet.html">stylesheet</a></li> <li><a href="../modules/substitute.html">substitute</a></li> <li><a href="../modules/swf.html">swf</a></li> <li><a href="../modules/swfdetect.html">swfdetect</a></li> <li><a href="../modules/tabview.html">tabview</a></li> <li><a href="../modules/template.html">template</a></li> <li><a href="../modules/template-base.html">template-base</a></li> <li><a href="../modules/template-micro.html">template-micro</a></li> <li><a href="../modules/test.html">test</a></li> <li><a href="../modules/test-console.html">test-console</a></li> <li><a href="../modules/text.html">text</a></li> <li><a href="../modules/text-accentfold.html">text-accentfold</a></li> <li><a href="../modules/text-wordbreak.html">text-wordbreak</a></li> <li><a href="../modules/timers.html">timers</a></li> <li><a href="../modules/transition.html">transition</a></li> <li><a href="../modules/transition-timer.html">transition-timer</a></li> <li><a href="../modules/tree.html">tree</a></li> <li><a href="../modules/tree-labelable.html">tree-labelable</a></li> <li><a href="../modules/tree-lazy.html">tree-lazy</a></li> <li><a href="../modules/tree-node.html">tree-node</a></li> <li><a href="../modules/tree-openable.html">tree-openable</a></li> <li><a href="../modules/tree-selectable.html">tree-selectable</a></li> <li><a href="../modules/tree-sortable.html">tree-sortable</a></li> <li><a href="../modules/uploader.html">uploader</a></li> <li><a href="../modules/uploader-flash.html">uploader-flash</a></li> <li><a href="../modules/uploader-html5.html">uploader-html5</a></li> <li><a href="../modules/uploader-queue.html">uploader-queue</a></li> <li><a href="../modules/view.html">view</a></li> <li><a href="../modules/view-node-map.html">view-node-map</a></li> <li><a href="../modules/widget.html">widget</a></li> <li><a href="../modules/widget-anim.html">widget-anim</a></li> <li><a href="../modules/widget-autohide.html">widget-autohide</a></li> <li><a href="../modules/widget-base.html">widget-base</a></li> <li><a href="../modules/widget-base-ie.html">widget-base-ie</a></li> <li><a href="../modules/widget-buttons.html">widget-buttons</a></li> <li><a href="../modules/widget-child.html">widget-child</a></li> <li><a href="../modules/widget-htmlparser.html">widget-htmlparser</a></li> <li><a href="../modules/widget-modality.html">widget-modality</a></li> <li><a href="../modules/widget-parent.html">widget-parent</a></li> <li><a href="../modules/widget-position.html">widget-position</a></li> <li><a href="../modules/widget-position-align.html">widget-position-align</a></li> <li><a href="../modules/widget-position-constrain.html">widget-position-constrain</a></li> <li><a href="../modules/widget-skin.html">widget-skin</a></li> <li><a href="../modules/widget-stack.html">widget-stack</a></li> <li><a href="../modules/widget-stdmod.html">widget-stdmod</a></li> <li><a href="../modules/widget-uievents.html">widget-uievents</a></li> <li><a href="../modules/yql.html">yql</a></li> <li><a href="../modules/yql-jsonp.html">yql-jsonp</a></li> <li><a href="../modules/yql-nodejs.html">yql-nodejs</a></li> <li><a href="../modules/yql-winjs.html">yql-winjs</a></li> <li><a href="../modules/yui.html">yui</a></li> <li><a href="../modules/yui-base.html">yui-base</a></li> <li><a href="../modules/yui-later.html">yui-later</a></li> <li><a href="../modules/yui-log.html">yui-log</a></li> <li><a href="../modules/yui-throttle.html">yui-throttle</a></li> </ul> </div> </div> </div> </div> </div> <div class="yui3-u-3-4"> <div id="api-options"> Show: <label for="api-show-inherited"> <input type="checkbox" id="api-show-inherited" checked> Inherited </label> <label for="api-show-protected"> <input type="checkbox" id="api-show-protected"> Protected </label> <label for="api-show-private"> <input type="checkbox" id="api-show-private"> Private </label> <label for="api-show-deprecated"> <input type="checkbox" id="api-show-deprecated"> Deprecated </label> </div> <div class="apidocs"> <div id="docs-main"> <div class="content"> <h1>series-area Module</h1> <div class="box clearfix meta"> <a class="button link-docs" href="/yui/docs/charts">User Guide &amp; Examples</a> <div class="foundat"> Defined in: <a href="../files/charts_js_AreaSeries.js.html#l7"><code>charts&#x2F;js&#x2F;AreaSeries.js:7</code></a> </div> </div> <div class="box intro"> <p>Provides functionality for creating a area series.</p> </div> <div class="yui3-g"> <div class="yui3-u-1-2"> <p>This module provides the following classes:</p> <ul class="module-classes"> <li class="module-class"> <a href="../classes/AreaSeries.html"> AreaSeries </a> </li> </ul> </div> <div class="yui3-u-1-2"> </div> </div> </div> </div> </div> </div> </div> </div> <script src="../assets/vendor/prettify/prettify-min.js"></script> <script>prettyPrint();</script> <script src="../assets/js/yui-prettify.js"></script> <script src="../assets/../api.js"></script> <script src="../assets/js/api-filter.js"></script> <script src="../assets/js/api-list.js"></script> <script src="../assets/js/api-search.js"></script> <script src="../assets/js/apidocs.js"></script> </body> </html>
mabetle/mps
_libs/yui-3.18.1/api/modules/series-area.html
HTML
apache-2.0
74,354
package org.reclipse.tracer.ui.launching; import java.util.Collection; import java.util.HashMap; import java.util.Map; /** * @author Lothar * @author Last editor: $Author: mcp $ * @version $Revision: 4624 $ $Date: 2011-01-18 10:58:31 +0100 (Di, 18 Jan 2011) $ */ class MonitoredEventsListenerClass { private String className; public String getClassName() { return this.className; } public void setClassName(String value) { this.className = value; } private String name; public void setName(String name) { this.name = name; } public String getName() { return this.name; } private boolean enabled = false; public void setEnabled(boolean enabled) { this.enabled = enabled; } public boolean isEnabled() { return this.enabled; } private Map<String, MonitoredEventsListenerProperty> properties = new HashMap<String, MonitoredEventsListenerProperty>(); public void addProperty(MonitoredEventsListenerProperty property) { this.properties.put(property.getKey(), property); } public Collection<MonitoredEventsListenerProperty> getProperties() { return this.properties.values(); } public MonitoredEventsListenerProperty getProperty(String key) { return this.properties.get(key); } }
CloudScale-Project/StaticSpotter
plugins/org.reclipse.tracer.ui/src/org/reclipse/tracer/ui/launching/MonitoredEventsListenerClass.java
Java
apache-2.0
1,435
/*globals $ document PUI*/ /** * PrimeUI Tree widget */ $(function() { "use strict"; // Added for AngularPrime $.widget("primeui.puitree", { options: { nodes: null, lazy: false, animate: false, selectionMode: null, icons: null }, _create: function() { this.element.uniqueId().addClass('pui-tree ui-widget ui-widget-content ui-corner-all') .append('<ul class="pui-tree-container"></ul>'); this.rootContainer = this.element.children('.pui-tree-container'); if(this.options.selectionMode) { this.selection = []; } this._bindEvents(); if($.type(this.options.nodes) === 'array') { this._renderNodes(this.options.nodes, this.rootContainer); } else if($.type(this.options.nodes) === 'function') { this.options.nodes.call(this, {}, this._initData); } else { throw 'Unsupported type. nodes option can be either an array or a function'; } }, _renderNodes: function(nodes, container) { for(var i = 0; i < nodes.length; i++) { this._renderNode(nodes[i], container); } }, _renderNode: function(node, container) { var leaf = this.options.lazy ? node.leaf : !(node.children && node.children.length), iconType = node.iconType||'def', expanded = node.expanded, selectable = this.options.selectionMode ? (node.selectable === false ? false : true) : false, toggleIcon = leaf ? 'pui-treenode-leaf-icon' : (node.expanded ? 'pui-tree-toggler ui-icon ui-icon-triangle-1-s' : 'pui-tree-toggler ui-icon ui-icon-triangle-1-e'), styleClass = leaf ? 'pui-treenode pui-treenode-leaf' : 'pui-treenode pui-treenode-parent', nodeElement = $('<li class="' + styleClass + '"></li>'), contentElement = $('<span class="pui-treenode-content"></span>'); nodeElement.data('puidata', node.data).appendTo(container); if(selectable) { contentElement.addClass('pui-treenode-selectable'); } contentElement.append('<span class="' + toggleIcon + '"></span>') .append('<span class="pui-treenode-icon"></span>') .append('<span class="pui-treenode-label ui-corner-all">' + node.label + '</span>') .appendTo(nodeElement); var iconConfig = this.options.icons && this.options.icons[iconType]; if(iconConfig) { var iconContainer = contentElement.children('.pui-treenode-icon'), icon = ($.type(iconConfig) === 'string') ? iconConfig : (expanded ? iconConfig.expanded : iconConfig.collapsed); iconContainer.addClass('ui-icon ' + icon); } if(!leaf) { var childrenContainer = $('<ul class="pui-treenode-children"></ul>'); if(!node.expanded) { childrenContainer.hide(); } childrenContainer.appendTo(nodeElement); if(node.children) { for(var i = 0; i < node.children.length; i++) { this._renderNode(node.children[i], childrenContainer); } } } }, _initData: function(data) { this._renderNodes(data, this.rootContainer); }, _handleNodeData: function(data, node) { this._renderNodes(data, node.children('.pui-treenode-children')); this._showNodeChildren(node); node.data('puiloaded', true); }, _bindEvents: function() { var $this = this, elementId = this.element.attr('id'), togglerSelector = '#' + elementId + ' .pui-tree-toggler'; $(document).off('click.puitree-' + elementId, togglerSelector) .on('click.puitree-' + elementId, togglerSelector, null, function(e) { var toggleIcon = $(this), node = toggleIcon.closest('li'); if(node.hasClass('pui-treenode-expanded')) $this.collapseNode(node); else $this.expandNode(node); }); if(this.options.selectionMode) { var nodeLabelSelector = '#' + elementId + ' .pui-treenode-selectable .pui-treenode-label', nodeContentSelector = '#' + elementId + ' .pui-treenode-selectable.pui-treenode-content'; $(document).off('mouseout.puitree-' + elementId + ' mouseover.puitree-' + elementId, nodeLabelSelector) .on('mouseout.puitree-' + elementId, nodeLabelSelector, null, function() { $(this).removeClass('ui-state-hover'); }) .on('mouseover.puitree-' + elementId, nodeLabelSelector, null, function() { $(this).addClass('ui-state-hover'); }) .off('click.puitree-' + elementId, nodeContentSelector) .on('click.puitree-' + elementId, nodeContentSelector, null, function(e) { $this._nodeClick(e, $(this)); }); } }, expandNode: function(node) { this._trigger('beforeExpand', null, {'node': node, 'data': node.data('puidata')}); if(this.options.lazy && !node.data('puiloaded')) { this.options.nodes.call(this, { 'node': node, 'data': node.data('puidata') }, this._handleNodeData); } else { this._showNodeChildren(node); } }, collapseNode: function(node) { this._trigger('beforeCollapse', null, {'node': node, 'data': node.data('puidata')}); node.removeClass('pui-treenode-expanded'); var iconType = node.iconType||'def', iconConfig = this.options.icons && this.options.icons[iconType]; if(iconConfig && $.type(iconConfig) !== 'string') { node.find('> .pui-treenode-content > .pui-treenode-icon').removeClass(iconConfig.expanded).addClass(iconConfig.collapsed); } var toggleIcon = node.find('> .pui-treenode-content > .pui-tree-toggler'), childrenContainer = node.children('.pui-treenode-children'); toggleIcon.addClass('ui-icon-triangle-1-e').removeClass('ui-icon-triangle-1-s'); if(this.options.animate) childrenContainer.slideUp('fast'); else childrenContainer.hide(); this._trigger('afterCollapse', null, {'node': node, 'data': node.data('puidata')}); }, _showNodeChildren: function(node) { node.addClass('pui-treenode-expanded').attr('aria-expanded', true); var iconType = node.iconType||'def', iconConfig = this.options.icons && this.options.icons[iconType]; if(iconConfig && $.type(iconConfig) !== 'string') { node.find('> .pui-treenode-content > .pui-treenode-icon').removeClass(iconConfig.collapsed).addClass(iconConfig.expanded); } var toggleIcon = node.find('> .pui-treenode-content > .pui-tree-toggler'); toggleIcon.addClass('ui-icon-triangle-1-s').removeClass('ui-icon-triangle-1-e'); if(this.options.animate) node.children('.pui-treenode-children').slideDown('fast'); else node.children('.pui-treenode-children').show(); this._trigger('afterExpand', null, {'node': node, 'data': node.data('puidata')}); }, _nodeClick: function(event, nodeContent) { PUI.clearSelection(); if($(event.target).is(':not(.pui-tree-toggler)')) { var node = nodeContent.parent(); var selected = this._isNodeSelected(node.data('puidata')), metaKey = event.metaKey||event.ctrlKey; if(selected && metaKey) { this.unselectNode(node); } else { if(this._isSingleSelection()||(this._isMultipleSelection() && !metaKey)) { this.unselectAllNodes(); } this.selectNode(node); } } }, selectNode: function(node) { node.attr('aria-selected', true).find('> .pui-treenode-content > .pui-treenode-label').removeClass('ui-state-hover').addClass('ui-state-highlight'); this._addToSelection(node.data('puidata')); this._trigger('nodeSelect', null, {'node': node, 'data': node.data('puidata')}); }, unselectNode: function(node) { node.attr('aria-selected', false).find('> .pui-treenode-content > .pui-treenode-label').removeClass('ui-state-highlight ui-state-hover'); this._removeFromSelection(node.data('puidata')); this._trigger('nodeUnselect', null, {'node': node, 'data': node.data('puidata')}); }, unselectAllNodes: function() { this.selection = []; this.element.find('.pui-treenode-label.ui-state-highlight').each(function() { $(this).removeClass('ui-state-highlight').closest('.ui-treenode').attr('aria-selected', false); }); }, _addToSelection: function(nodedata) { if(nodedata) { var selected = this._isNodeSelected(nodedata); if(!selected) { this.selection.push(nodedata); } } }, _removeFromSelection: function(nodedata) { if(nodedata) { var index = -1; for(var i = 0; i < this.selection.length; i++) { var data = this.selection[i]; if(data && (JSON.stringify(data) === JSON.stringify(nodedata))) { index = i; break; } } if(index >= 0) { this.selection.splice(index, 1); } } }, _isNodeSelected: function(nodedata) { var selected = false; if(nodedata) { for(var i = 0; i < this.selection.length; i++) { var data = this.selection[i]; if(data && (JSON.stringify(data) === JSON.stringify(nodedata))) { selected = true; break; } } } return selected; }, _isSingleSelection: function() { return this.options.selectionMode && this.options.selectionMode === 'single'; }, _isMultipleSelection: function() { return this.options.selectionMode && this.options.selectionMode === 'multiple'; } }); });
primeui-extensions/angularPrime
core/src/main/resources/js/puiTree/tree.js
JavaScript
apache-2.0
11,357
package org.sculptor.example.ejb.helloworld.milkyway.serviceimpl; import javax.ejb.Stateless; import javax.interceptor.Interceptors; import org.sculptor.example.ejb.helloworld.milkyway.serviceapi.InternalPlanetServiceLocal; import org.sculptor.example.ejb.helloworld.milkyway.serviceimpl.InternalPlanetServiceBeanBase; import org.sculptor.framework.context.ServiceContext; import org.sculptor.framework.context.ServiceContextStoreInterceptor; import org.sculptor.framework.errorhandling.ErrorHandlingInterceptor; import org.sculptor.framework.persistence.JpaFlushEagerInterceptor; /** * Implementation of InternalPlanetService. */ @Stateless(name = "internalPlanetService") @Interceptors({ ServiceContextStoreInterceptor.class, ErrorHandlingInterceptor.class }) public class InternalPlanetServiceBean extends InternalPlanetServiceBeanBase implements InternalPlanetServiceLocal { @SuppressWarnings("unused") private static final long serialVersionUID = 1L; public InternalPlanetServiceBean() { } @Interceptors({ JpaFlushEagerInterceptor.class }) public String sayHello(ServiceContext ctx) { return "Hello"; } }
sculptor/sculptor
sculptor-examples/ejb-example/helloworld/src/main/java/org/sculptor/example/ejb/helloworld/milkyway/serviceimpl/InternalPlanetServiceBean.java
Java
apache-2.0
1,127
# Cerasus rufa Wall., nom. nud. SPECIES #### Status SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Rosales/Rosaceae/Prunus/Prunus rufa/ Syn. Cerasus rufa/README.md
Markdown
apache-2.0
186
# Bombax emarginata (A. Rich.) C. Wright SPECIES #### Status SYNONYM #### According to GRIN Taxonomy for Plants #### Published in F. A. Sauvalle, Anales Acad. Ci. Méd. Habana 5:241. 1868 (Fl. cub. 14) (Decaisne, Ann. Gén. Hort. 23:189. 1882) #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Malvales/Malvaceae/Pachira/Pachira emarginata/ Syn. Bombax emarginata/README.md
Markdown
apache-2.0
289
# Hyalangium minutum SPECIES #### Status ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Bacteria/Proteobacteria/Deltaproteobacteria/Myxococcales/Cystobacteraceae/Hyalangium/Hyalangium minutum/README.md
Markdown
apache-2.0
176
# Asteridiella adinandricola H. Hu SPECIES #### Status ACCEPTED #### According to Index Fungorum #### Published in Acta Mycol. Sin. 9(4): 269 (1990) #### Original name Asteridiella adinandricola H. Hu ### Remarks null
mdoering/backbone
life/Fungi/Ascomycota/Dothideomycetes/Meliolales/Meliolaceae/Asteridiella/Asteridiella adinandricola/README.md
Markdown
apache-2.0
222
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="de"> <head> <!-- Generated by javadoc (version 1.7.0_13) on Sat Mar 08 11:10:02 CET 2014 --> <title>Uses of Class org.javajumper.cartok.Sword</title> <meta name="date" content="2014-03-08"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.javajumper.cartok.Sword"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../org/javajumper/cartok/package-summary.html">Package</a></li> <li><a href="../../../../org/javajumper/cartok/Sword.html" title="class in org.javajumper.cartok">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/javajumper/cartok/class-use/Sword.html" target="_top">Frames</a></li> <li><a href="Sword.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.javajumper.cartok.Sword" class="title">Uses of Class<br>org.javajumper.cartok.Sword</h2> </div> <div class="classUseContainer">No usage of org.javajumper.cartok.Sword</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../org/javajumper/cartok/package-summary.html">Package</a></li> <li><a href="../../../../org/javajumper/cartok/Sword.html" title="class in org.javajumper.cartok">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/javajumper/cartok/class-use/Sword.html" target="_top">Frames</a></li> <li><a href="Sword.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
JavaJumperStudios/Cartok
Cartok/doc/org/javajumper/cartok/class-use/Sword.html
HTML
apache-2.0
4,040
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <title>PHPXRef 0.7.1 : Unnamed Project : Function Reference: imagecreatetruecolor()</title> <link rel="stylesheet" href="../sample.css" type="text/css"> <link rel="stylesheet" href="../sample-print.css" type="text/css" media="print"> <style id="hilight" type="text/css"></style> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> </head> <body bgcolor="#ffffff" text="#000000" link="#801800" vlink="#300540" alink="#ffffff"> <table class="pagetitle" width="100%"> <tr> <td valign="top" class="pagetitle"> [ <a href="../index.html">Index</a> ] </td> <td align="right" class="pagetitle"> <h2 style="margin-bottom: 0px">PHP Cross Reference of Unnamed Project</h2> </td> </tr> </table> <!-- Generated by PHPXref 0.7.1 at Thu Oct 23 19:15:14 2014 --> <!-- PHPXref (c) 2000-2010 Gareth Watts - gareth@omnipotent.net --> <!-- http://phpxref.sourceforge.net/ --> <script src="../phpxref.js" type="text/javascript"></script> <script language="JavaScript" type="text/javascript"> <!-- ext='.html'; relbase='../'; subdir='_functions'; filename='index.html'; cookiekey='phpxref'; handleNavFrame(relbase, subdir, filename); logFunction('imagecreatetruecolor'); // --> </script> <script language="JavaScript" type="text/javascript"> if (gwGetCookie('xrefnav')=='off') document.write('<p class="navlinks">[ <a href="javascript:navOn()">Show Explorer<\/a> ]<\/p>'); else document.write('<p class="navlinks">[ <a href="javascript:navOff()">Hide Explorer<\/a> ]<\/p>'); </script> <noscript> <p class="navlinks"> [ <a href="../nav.html" target="_top">Show Explorer</a> ] [ <a href="index.html" target="_top">Hide Navbar</a> ] </p> </noscript> [<a href="../index.html">Top level directory</a>]<br> <script language="JavaScript" type="text/javascript"> <!-- document.writeln('<table align="right" class="searchbox-link"><tr><td><a class="searchbox-link" href="javascript:void(0)" onMouseOver="showSearchBox()">Search</a><br>'); document.writeln('<table border="0" cellspacing="0" cellpadding="0" class="searchbox" id="searchbox">'); document.writeln('<tr><td class="searchbox-title">'); document.writeln('<a class="searchbox-title" href="javascript:showSearchPopup()">Search History +</a>'); document.writeln('<\/td><\/tr>'); document.writeln('<tr><td class="searchbox-body" id="searchbox-body">'); document.writeln('<form name="search" style="margin:0px; padding:0px" onSubmit=\'return jump()\'>'); document.writeln('<a class="searchbox-body" href="../_classes/index.html">Class<\/a>: '); document.writeln('<input type="text" size=10 value="" name="classname"><br>'); document.writeln('<a id="funcsearchlink" class="searchbox-body" href="../_functions/index.html">Function<\/a>: '); document.writeln('<input type="text" size=10 value="" name="funcname"><br>'); document.writeln('<a class="searchbox-body" href="../_variables/index.html">Variable<\/a>: '); document.writeln('<input type="text" size=10 value="" name="varname"><br>'); document.writeln('<a class="searchbox-body" href="../_constants/index.html">Constant<\/a>: '); document.writeln('<input type="text" size=10 value="" name="constname"><br>'); document.writeln('<a class="searchbox-body" href="../_tables/index.html">Table<\/a>: '); document.writeln('<input type="text" size=10 value="" name="tablename"><br>'); document.writeln('<input type="submit" class="searchbox-button" value="Search">'); document.writeln('<\/form>'); document.writeln('<\/td><\/tr><\/table>'); document.writeln('<\/td><\/tr><\/table>'); // --> </script> <div id="search-popup" class="searchpopup"><p id="searchpopup-title" class="searchpopup-title">title</p><div id="searchpopup-body" class="searchpopup-body">Body</div><p class="searchpopup-close"><a href="javascript:gwCloseActive()">[close]</a></p></div> <h3>Function and Method Cross Reference</h3> <h2><a href="index.html#imagecreatetruecolor">imagecreatetruecolor()</a></h2> <p><b>This function is provided by PHP directly.</b><br> You can lookup the documentation for it here: <br>&nbsp;&nbsp;[<A HREF="http://php.net/manual-lookup.php?function=imagecreatetruecolor">php.net</A>] [<A HREF="http://us2.php.net/manual-lookup.php?function=imagecreatetruecolor">us2.php.net</A>] [<A HREF="http://uk.php.net/manual-lookup.php?function=imagecreatetruecolor">uk.php.net</A>] [<A HREF="http://au.php.net/manual-lookup.php?function=imagecreatetruecolor">au.php.net</A>] [<A HREF="http://de.php.net/manual-lookup.php?function=imagecreatetruecolor">de.php.net</A>] </p> <b>Referenced 1 times:</b><ul> <li><a href="../bonfire/codeigniter/helpers/captcha_helper.php.html">/bonfire/codeigniter/helpers/captcha_helper.php</a> -> <a href="../bonfire/codeigniter/helpers/captcha_helper.php.source.html#l138"> line 138</a></li> </ul> <!-- A link to the phpxref site in your customized footer file is appreciated ;-) --> <br><hr> <table width="100%"> <tr><td>Generated: Thu Oct 23 19:15:14 2014</td> <td align="right"><i>Cross-referenced by <a href="http://phpxref.sourceforge.net/">PHPXref 0.7.1</a></i></td> </tr> </table> </body></html>
inputx/code-ref-doc
rebbit/_functions/imagecreatetruecolor.html
HTML
apache-2.0
5,223
var EnemyStep = [ { id:0, stepAttack: 1, stepDefense: .13, stepHP:1.30, stepRange:2.4, stepAttackSpeed:1, stepVelocity:0.14, coinValueStep: 1, scoreValueStep: 1.2 }, { id:1, stepAttack: 1, stepDefense: .14, stepHP:1.6, stepRange:2.4, stepAttackSpeed:1, stepVelocity:0.11, coinValueStep: 1, scoreValueStep: 1.2 }, { id:2, stepAttack: 1, stepDefense: .163, stepHP:1.75, stepRange:2.4, stepAttackSpeed:1, stepVelocity:0.11, coinValueStep: 1, scoreValueStep: 1.2 } ]; var EnemyType = [ { type:0, enemyStep: EnemyStep[0], textureName:"images/soldiers.png", widthImg: 25, heightImg: 20, bulletType:"B0.png", scoreValue: 15, coinValue: 4, HP:1.25, attack:.5, attackSpeed:1, defense: 0.12, velocity: 0.9, range:10, dieSound: "", getSprites: function(){ return new SpriteSheet({ height: 20, width: 25, sprites: [ { name: 'walk0', x: 0, y: 0 }, { name: 'walk1', x: 0, y: 0 }, //{ name: 'walk2', x: 0, y: 0 } ] }); }, animateSpr:function( sprites, timeP ){ return new Animation([ { sprite: 'walk0', time: timeP }, { sprite: 'walk1', time: timeP }, //{ sprite: 'walk2', time: timeP } ], sprites ); } },{ type:1, enemyStep: EnemyStep[1], textureName:"images/tanks.png", widthImg: 30, heightImg: 30, bulletType:"B0.png", scoreValue:15, coinValue:6, HP:4.0, attack:.5, attackSpeed:1, defense:.012, velocity: 0.4, range:10, dieSound: "die1", getSprites: function(){ return new SpriteSheet({ width: 30, height: 30, sprites: [ { name: 'walk0', x: 0, y: 0 } ] }); }, animateSpr:function( sprites, timeP ){ return new Animation([ { sprite: 'walk0', time: timeP } ], sprites ); } },{ type:2, enemyStep: EnemyStep[2], textureName:"images/tanks.png", widthImg: 30, heightImg: 30, bulletType:"B0.png", scoreValue:15, coinValue:7, HP:5, attack:.5, attackSpeed:2, defense:.015, velocity: 0.35, range:15, dieSound: "die1", getSprites: function(){ return new SpriteSheet({ width: 30, height: 30, sprites: [ { name: 'walk0', x: 30, y: 0 } ] }); }, animateSpr:function( sprites, timeP ){ return new Animation([ { sprite: 'walk0', time: timeP } ], sprites ); } } ];
augustogava/tower-defense-game
js/Settings/EnemySettings.js
JavaScript
apache-2.0
2,902
/* * Copyright 2016-2018 Testify Project. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.testifyproject.junit5.system; import static org.assertj.core.api.Assertions.assertThat; import org.junit.jupiter.api.Test; import org.testifyproject.TestContext; import org.testifyproject.annotation.Application; import org.testifyproject.annotation.Real; import org.testifyproject.junit5.SystemTest; import org.testifyproject.junit5.fixture.GenericApplication; /** * TODO. * * @author saden */ @Application(value = GenericApplication.class, start = "start", stop = "stop") @SystemTest public class GenericInstanceSystemTest { @Real TestContext testContext; @Test public void verify() { assertThat(testContext).isNotNull(); } }
testify-project/testify
modules/junit5/junit5-core/src/test/java/org/testifyproject/junit5/system/GenericInstanceSystemTest.java
Java
apache-2.0
1,282
// Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #pragma once #include <map> #include <vector> #include "paddle/fluid/framework/op_kernel_type.h" #include "paddle/fluid/framework/tensor.h" #include "paddle/fluid/framework/variable.h" namespace paddle { namespace framework { #ifdef PADDLE_WITH_MKLDNN using MKLDNNFormat = mkldnn::memory::format; using MKLDNNDataType = mkldnn::memory::data_type; inline MKLDNNFormat ToMKLDNNFormat(const DataLayout& layout) { switch (layout) { case DataLayout::kNHWC: return MKLDNNFormat::nhwc; case DataLayout::kNCHW: return MKLDNNFormat::nchw; default: PADDLE_THROW("Fail to convert layout %s to MKLDNN format", DataLayoutToString(layout)); } } inline DataLayout ToPaddleLayout(const MKLDNNFormat& format) { switch (format) { case MKLDNNFormat::nhwc: return DataLayout::kNHWC; case MKLDNNFormat::nchw: return DataLayout::kNCHW; default: PADDLE_THROW("Fail to convert MKLDNN format to paddle layout"); } } inline MKLDNNDataType ToMKLDNNDataType(const std::type_index type) { static const std::map<std::type_index, MKLDNNDataType> dict{ {std::type_index(typeid(float)), MKLDNNDataType::f32}, // NOLINT {std::type_index(typeid(char)), MKLDNNDataType::s8}, // NOLINT {std::type_index(typeid(unsigned char)), MKLDNNDataType::u8}, {std::type_index(typeid(int16_t)), MKLDNNDataType::s16}, {std::type_index(typeid(int32_t)), MKLDNNDataType::s32}}; auto iter = dict.find(type); if (iter != dict.end()) return iter->second; return MKLDNNDataType::data_undef; } #endif void TransDataLayoutFromMKLDNN(const OpKernelType& kernel_type_for_var, const OpKernelType& expected_kernel_type, const Tensor& in, Tensor* out); std::vector<int> GetAxis(const DataLayout& from, const DataLayout& to); void TransDataLayout(const OpKernelType& kernel_type_for_var, const OpKernelType& expected_kernel_type, const Tensor& in, Tensor* out); } // namespace framework } // namespace paddle
Canpio/Paddle
paddle/fluid/framework/data_layout_transform.h
C
apache-2.0
2,716
--- layout: post title: "Man must explore, and this is exploration at its greatest" subtitle: "Problems look mighty small from 150 miles up" date: "2014-09-24 12:00:00" author: "Start Bootstrap" header_img: url: "assets/img/post-bg-06.jpg" author: author_url: categories: - Science tags: - universe --- <p>Never in all their history have men been able truly to conceive of the world as one: a single sphere, a globe, having the qualities of a globe, a round earth in which all the directions eventually meet, in which there is no center because every point, or none, is center — an equal earth which all men occupy as equals. The airman's earth, if free men make it, will be truly round: a globe in practice, not in theory.</p> <p>Science cuts two ways, of course; its products can be used for both good and evil. But there's no turning back from science. The early warnings about technological dangers also come from science.</p> <p>What was most significant about the lunar voyage was not that man set foot on the Moon but that they set eye on the earth.</p> <p>A Chinese tale tells of some men sent to harm a young girl who, upon seeing her beauty, become her protectors rather than her violators. That's how I felt seeing the Earth for the first time. I could not help but love and cherish her.</p> <p>For those who have seen the Earth from space, and for the hundreds and perhaps thousands more who will, the experience most certainly changes your perspective. The things that we share in our world are far more valuable than those which divide us.</p> <h2 class="section-heading">The Final Frontier</h2> <p>There can be no thought of finishing for ‘aiming for the stars.’ Both figuratively and literally, it is a task to occupy the generations. And no matter how much progress one makes, there is always the thrill of just beginning.</p> <p>There can be no thought of finishing for ‘aiming for the stars.’ Both figuratively and literally, it is a task to occupy the generations. And no matter how much progress one makes, there is always the thrill of just beginning.</p> <blockquote>The dreams of yesterday are the hopes of today and the reality of tomorrow. Science has not yet mastered prophecy. We predict too much for the next year and yet far too little for the next ten.</blockquote> <p>Spaceflights cannot be stopped. This is not the work of any one man or even a group of men. It is a historical process which mankind is carrying out in accordance with the natural laws of human development.</p> <h2 class="section-heading">Reaching for the Stars</h2> <p>As we got further and further away, it [the Earth] diminished in size. Finally it shrank to the size of a marble, the most beautiful you can imagine. That beautiful, warm, living object looked so fragile, so delicate, that if you touched it with a finger it would crumble and fall apart. Seeing this has to change a man.</p> <a href="#"> <img src="{{ site.url }}/assets/img/post-sample-image.jpg" alt="Post Sample Image"> </a> <span class="caption text-muted">To go places and do things that have never been done before – that’s what living is all about.</span> <p>Space, the final frontier. These are the voyages of the Starship Enterprise. Its five-year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before.</p> <p>As I stand out here in the wonders of the unknown at Hadley, I sort of realize there’s a fundamental truth to our nature, Man must explore, and this is exploration at its greatest.</p> <p>Placeholder text by <a href="http://spaceipsum.com/">Space Ipsum</a>. Photographs by <a href="https://www.flickr.com/photos/nasacommons/">NASA on The Commons</a>.</p>
spress-add-ons/Clean-blog-theme
src/content/posts/2014-09-24-man-must-explore.markdown
Markdown
apache-2.0
3,782
package com.flipper83.protohipster.feed.domain.module; import com.flipper83.protohipster.feed.domain.mappers.HipsterMapper; import com.flipper83.protohipster.feed.domain.mappers.HipsterMapperManual; import com.flipper83.protohipster.feed.domain.interactors.GetFeed; import com.flipper83.protohipster.feed.domain.interactors.GetMyLikers; import com.flipper83.protohipster.feed.domain.interactors.LikeHipster; import com.flipper83.protohipster.globalutils.rating.RatingCalculator; import com.flipper83.protohipster.globalutils.rating.RatingCalculatorFiveStars; import dagger.Module; import dagger.Provides; @Module(complete = false, library = true) public class DomainModule { @Provides GetFeed provideFeed(GetFeedImpl feedImp) { return feedImp; } @Provides GetMyLikers provideGetMyLikers(GetMyLikersImpl getMyLikersImp){ return getMyLikersImp; } @Provides LikeHipster provideLikeHipster(LikeHipsterImp likeHipsterImp){ return likeHipsterImp; } @Provides RatingCalculator provideRatingFiveStars(RatingCalculatorFiveStars ratingCalculatorFiveStars) { return ratingCalculatorFiveStars; } @Provides HipsterMapper provideHipsterMapperManual(HipsterMapperManual hipsterMapperAuto) { return hipsterMapperAuto; } }
flipper83/protohipster
protohipster/src/main/java/com/flipper83/protohipster/feed/domain/module/DomainModule.java
Java
apache-2.0
1,323
angular.module('hybridapp.controllers') .controller('LocationCtrl', ['$rootScope', '$scope', '$http', '$ionicScrollDelegate', 'appConfig', function ($rootScope, $scope, $http, $ionicScrollDelegate, appConfig) { var locationData = []; var sortedLocationData = []; $scope.showMap = false; $scope.origin = null; $scope.locations = null; $scope.scrollTop = function() { $ionicScrollDelegate.scrollTop(); }; $scope.scrollBottom = function() { $ionicScrollDelegate.scrollBottom(); }; $scope.toggleMap = function(active) { $scope.showMap = active; $scope.scrollTop(); }; $scope.showDetails = function (location) { $rootScope.currentLocation = location; window.location.href = "#/app/location/details/" + location.detailsUrl; }; getCurrentPosition(); function getCurrentPosition() { if (navigator.geolocation) { console.log("Attempting to get current position"); var posOptions = {maximumAge: 60000, timeout: 5000, enableHighAccuracy: true}; navigator.geolocation.getCurrentPosition(onFoundPosition, positionError, posOptions); } else { alert("GeoLocation is not supported in this mode"); } } function positionError(error) { console.log("Failed to get current position. Error code: " + error.code + " Message: " + error.message); //Use GOOGLE HQ as default if failed to get current position... var defaultPosition = {coords: {latitude: 37.422858, longitude: -122.085065}}; onFoundPosition(defaultPosition); } function onFoundPosition(position) { $scope.origin = { lat: position.coords.latitude, lng: position.coords.longitude }; console.log("current position found at: " + $scope.origin.lat + " " + $scope.origin.lng); if (sortedLocationData.length == 0) { loadLocations(); } } function loadLocations() { $http.get(appConfig.basePath + '/en/welcome/locations.locationdata.json') .then(renderLocations, locationError); } function locationError(error) { alert("Unable to load location data: " + error.message); } function renderLocations(response) { locationData = response.data; sortLocations($scope.origin); $scope.locations = sortedLocationData; } function sortLocations(origin) { applyDistance(origin); if (angular.isArray(locationData)) { sortedLocationData = locationData.sort(compareDistance); } } /** Converts numeric degrees to radians */ if (typeof Number.prototype.toRad == 'undefined') { Number.prototype.toRad = function() { return this * Math.PI / 180; } } function compareDistance(a,b) { if (a.distance == undefined || b.distance == undefined) return 0; if (a.distance < b.distance) return -1; if (a.distance > b.distance) return 1; return 0; } function calculateDistance(start, end) { var d = 0; if (start && end) { var R = 6371; var lat1 = start.lat.toRad(), lon1 = start.lng.toRad(); var lat2 = end.lat.toRad(), lon2 = end.lng.toRad(); var dLat = lat2 - lat1; var dLon = lon2 - lon1; var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(lat1) * Math.cos(lat2) * Math.sin(dLon/2) * Math.sin(dLon/2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); d = R * c; } return d; } function applyDistance(origin) { if (origin.lat && origin.lng) { for (var i=0; i < locationData.length; i++) { var loc = locationData[i]; loc["distance"] = calculateDistance(origin, {lat:loc.latitude,lng:loc.longitude}); } } } function showError(error) { alert("Getting the error" + error.code + "\nerror mesg :" + error.message); } }]) .filter('masterLocation', function() { return function(items) { var filtered = []; if (!items) { return filtered; } for (var i = 0; i < items.length; i++) { var item = items[i]; if (item.master) { filtered.push(item); } } return filtered; } }) .filter('secondaryLocation', function() { return function(items) { var filtered = []; if (!items) { return filtered; } for (var i = 0; i < items.length; i++) { var item = items[i]; if (!item.master) { filtered.push(item); } } return filtered; } }) .filter('distance', function() { function formatDistance(d) { d = d || 0; if (d > 1) { return Math.round(d) + " km"; } else { d = d * 1000; return Math.round(d) + " m"; } } return function(input) { return formatDistance(input); } }) ;
Adobe-Marketing-Cloud-Apps/aem-mobile-hybrid-reference
hybrid-app/www/js/LocationController.js
JavaScript
apache-2.0
5,809
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. from neutron import context as n_ctx from sqlalchemy.orm import exc as orm_exc from gbpservice.neutron.db.grouppolicy.extensions import group_proxy_db from gbpservice.neutron.tests.unit.services.grouppolicy import ( test_extension_driver_api as test_ext_base) class ExtensionDriverTestCaseMixin(object): def test_proxy_group_extension(self): l3p = self.create_l3_policy()['l3_policy'] self.assertEqual('192.168.0.0/16', l3p['proxy_ip_pool']) self.assertEqual(28, l3p['proxy_subnet_prefix_length']) l2p = self.create_l2_policy(l3_policy_id=l3p['id'])['l2_policy'] ptg = self.create_policy_target_group( l2_policy_id=l2p['id'])['policy_target_group'] self.assertIsNone(ptg['proxy_group_id']) self.assertIsNone(ptg['proxied_group_id']) self.assertIsNone(ptg['proxy_type']) # Verify Default L3P pool mapping on show l3p = self.show_l3_policy(l3p['id'])['l3_policy'] self.assertEqual('192.168.0.0/16', l3p['proxy_ip_pool']) self.assertEqual(28, l3p['proxy_subnet_prefix_length']) ptg_proxy = self.create_policy_target_group( proxied_group_id=ptg['id'])['policy_target_group'] self.assertIsNone(ptg_proxy['proxy_group_id']) self.assertEqual(ptg['id'], ptg_proxy['proxied_group_id']) self.assertEqual('l3', ptg_proxy['proxy_type']) # Verify relationship added ptg = self.show_policy_target_group(ptg['id'])['policy_target_group'] self.assertEqual(ptg_proxy['id'], ptg['proxy_group_id']) self.assertIsNone(ptg['proxied_group_id']) pt = self.create_policy_target( policy_target_group_id=ptg_proxy['id'])['policy_target'] self.assertFalse(pt['proxy_gateway']) self.assertFalse(pt['group_default_gateway']) pt = self.create_policy_target( policy_target_group_id=ptg_proxy['id'], proxy_gateway=True, group_default_gateway=True)['policy_target'] self.assertTrue(pt['proxy_gateway']) self.assertTrue(pt['group_default_gateway']) pt = self.show_policy_target(pt['id'])['policy_target'] self.assertTrue(pt['proxy_gateway']) self.assertTrue(pt['group_default_gateway']) def test_preexisting_pt(self): ptg = self.create_policy_target_group()['policy_target_group'] pt = self.create_policy_target( policy_target_group_id=ptg['id'])['policy_target'] self.assertTrue('proxy_gateway' in pt) self.assertTrue('group_default_gateway' in pt) # Forcefully delete the entry in the proxy table, and verify that it's # fixed by the subsequent GET admin_context = n_ctx.get_admin_context() mapping = admin_context.session.query( group_proxy_db.ProxyGatewayMapping).filter_by( policy_target_id=pt['id']).one() admin_context.session.delete(mapping) query = admin_context.session.query( group_proxy_db.ProxyGatewayMapping).filter_by( policy_target_id=pt['id']) self.assertRaises(orm_exc.NoResultFound, query.one) # Showing the object just ignores the extension pt = self.show_policy_target(pt['id'], expected_res_status=200)['policy_target'] self.assertFalse('proxy_gateway' in pt) self.assertFalse('group_default_gateway' in pt) # Updating the object just ignores the extension pt = self.update_policy_target( pt['id'], name='somenewname', expected_res_status=200)['policy_target'] self.assertEqual('somenewname', pt['name']) self.assertFalse('proxy_gateway' in pt) self.assertFalse('group_default_gateway' in pt) def test_proxy_group_multiple_proxies(self): # same PTG proxied multiple times will fail ptg = self.create_policy_target_group()['policy_target_group'] self.create_policy_target_group(proxied_group_id=ptg['id']) # Second proxy will fail res = self.create_policy_target_group(proxied_group_id=ptg['id'], expected_res_status=400) self.assertEqual('InvalidProxiedGroup', res['NeutronError']['type']) def test_proxy_group_chain_proxy(self): # Verify no error is raised when chaining multiple proxy PTGs ptg0 = self.create_policy_target_group()['policy_target_group'] ptg1 = self.create_policy_target_group( proxied_group_id=ptg0['id'], expected_res_status=201)['policy_target_group'] self.create_policy_target_group(proxied_group_id=ptg1['id'], expected_res_status=201) def test_proxy_group_no_update(self): ptg0 = self.create_policy_target_group()['policy_target_group'] ptg1 = self.create_policy_target_group()['policy_target_group'] ptg_proxy = self.create_policy_target_group( proxied_group_id=ptg0['id'])['policy_target_group'] self.update_policy_target_group( ptg_proxy['id'], proxied_group_id=ptg1['id'], expected_res_status=400) def test_different_proxy_type(self): ptg = self.create_policy_target_group()['policy_target_group'] ptg_proxy = self.create_policy_target_group( proxied_group_id=ptg['id'], proxy_type='l2')['policy_target_group'] self.assertEqual('l2', ptg_proxy['proxy_type']) ptg_proxy = self.show_policy_target_group( ptg_proxy['id'])['policy_target_group'] self.assertEqual('l2', ptg_proxy['proxy_type']) def test_proxy_type_fails(self): ptg = self.create_policy_target_group()['policy_target_group'] res = self.create_policy_target_group(proxy_type='l2', expected_res_status=400) self.assertEqual('ProxyTypeSetWithoutProxiedPTG', res['NeutronError']['type']) self.create_policy_target_group(proxied_group_id=ptg['id'], proxy_type='notvalid', expected_res_status=400) def test_proxy_gateway_no_proxy(self): ptg = self.create_policy_target_group()['policy_target_group'] res = self.create_policy_target( policy_target_group_id=ptg['id'], proxy_gateway=True, expected_res_status=400) self.assertEqual('InvalidProxyGatewayGroup', res['NeutronError']['type']) def test_proxy_pool_invalid_prefix_length(self): l3p = self.create_l3_policy(proxy_subnet_prefix_length=29)['l3_policy'] res = self.update_l3_policy(l3p['id'], proxy_subnet_prefix_length=32, expected_res_status=400) self.assertEqual('InvalidDefaultSubnetPrefixLength', res['NeutronError']['type']) # Verify change didn't persist l3p = self.show_l3_policy(l3p['id'])['l3_policy'] self.assertEqual(29, l3p['proxy_subnet_prefix_length']) # Verify it fails in creation res = self.create_l3_policy( proxy_subnet_prefix_length=32, expected_res_status=400) self.assertEqual('InvalidDefaultSubnetPrefixLength', res['NeutronError']['type']) def test_proxy_pool_invalid_version(self): # proxy_ip_pool is of a different version res = self.create_l3_policy(ip_version=6, ip_pool='1::1/16', proxy_ip_pool='192.168.0.0/16', expected_res_status=400) self.assertEqual('InvalidIpPoolVersion', res['NeutronError']['type']) class ExtensionDriverTestCase(test_ext_base.ExtensionDriverTestBase, ExtensionDriverTestCaseMixin): _extension_drivers = ['proxy_group'] _extension_path = None
jiahaoliang/group-based-policy
gbpservice/neutron/tests/unit/services/grouppolicy/test_group_proxy_extension.py
Python
apache-2.0
8,529
# Copyright 2019 Canonical Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Pull in helpers that 'charms_openstack.plugins' will export from charms_openstack.plugins.adapters import ( CephRelationAdapter, ) from charms_openstack.plugins.classes import ( BaseOpenStackCephCharm, CephCharm, PolicydOverridePlugin, ) from charms_openstack.plugins.trilio import ( TrilioVaultCharm, TrilioVaultSubordinateCharm, TrilioVaultCharmGhostAction, ) __all__ = ( "BaseOpenStackCephCharm", "CephCharm", "CephRelationAdapter", "PolicydOverridePlugin", "TrilioVaultCharm", "TrilioVaultSubordinateCharm", "TrilioVaultCharmGhostAction", )
coreycb/charms.openstack
charms_openstack/plugins/__init__.py
Python
apache-2.0
1,179
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_13) on Sun Jun 29 16:46:49 MSD 2008 --> <TITLE> HSSFChart.HSSFSeries (POI API Documentation) </TITLE> <META NAME="keywords" CONTENT="org.apache.poi.hssf.usermodel.HSSFChart.HSSFSeries class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="HSSFChart.HSSFSeries (POI API Documentation)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/HSSFChart.HSSFSeries.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../org/apache/poi/hssf/usermodel/HSSFChart.html" title="class in org.apache.poi.hssf.usermodel"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../org/apache/poi/hssf/usermodel/HSSFChildAnchor.html" title="class in org.apache.poi.hssf.usermodel"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/poi/hssf/usermodel/HSSFChart.HSSFSeries.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="HSSFChart.HSSFSeries.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> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.apache.poi.hssf.usermodel</FONT> <BR> Class HSSFChart.HSSFSeries</H2> <PRE> java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.poi.hssf.usermodel.HSSFChart.HSSFSeries</B> </PRE> <DL> <DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/apache/poi/hssf/usermodel/HSSFChart.html" title="class in org.apache.poi.hssf.usermodel">HSSFChart</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>HSSFChart.HSSFSeries</B><DT>extends java.lang.Object</DL> </PRE> <P> A series in a chart <P> <P> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;short</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/poi/hssf/usermodel/HSSFChart.HSSFSeries.html#getNumValues()">getNumValues</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/poi/hssf/usermodel/HSSFChart.HSSFSeries.html#getSeriesTitle()">getSeriesTitle</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the series' title, if there is one, or null if not</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;short</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/poi/hssf/usermodel/HSSFChart.HSSFSeries.html#getValueType()">getValueType</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;See <A HREF="../../../../../org/apache/poi/hssf/record/SeriesRecord.html" title="class in org.apache.poi.hssf.record"><CODE>SeriesRecord</CODE></A></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/apache/poi/hssf/usermodel/HSSFChart.HSSFSeries.html#setSeriesTitle(java.lang.String)">setSeriesTitle</A></B>(java.lang.String&nbsp;title)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changes the series' title, but only if there was one already.</TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getNumValues()"><!-- --></A><H3> getNumValues</H3> <PRE> public short <B>getNumValues</B>()</PRE> <DL> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getValueType()"><!-- --></A><H3> getValueType</H3> <PRE> public short <B>getValueType</B>()</PRE> <DL> <DD>See <A HREF="../../../../../org/apache/poi/hssf/record/SeriesRecord.html" title="class in org.apache.poi.hssf.record"><CODE>SeriesRecord</CODE></A> <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="getSeriesTitle()"><!-- --></A><H3> getSeriesTitle</H3> <PRE> public java.lang.String <B>getSeriesTitle</B>()</PRE> <DL> <DD>Returns the series' title, if there is one, or null if not <P> <DD><DL> </DL> </DD> </DL> <HR> <A NAME="setSeriesTitle(java.lang.String)"><!-- --></A><H3> setSeriesTitle</H3> <PRE> public void <B>setSeriesTitle</B>(java.lang.String&nbsp;title)</PRE> <DL> <DD>Changes the series' title, but only if there was one already. TODO - add in the records if not <P> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/HSSFChart.HSSFSeries.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../org/apache/poi/hssf/usermodel/HSSFChart.html" title="class in org.apache.poi.hssf.usermodel"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../org/apache/poi/hssf/usermodel/HSSFChildAnchor.html" title="class in org.apache.poi.hssf.usermodel"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?org/apache/poi/hssf/usermodel/HSSFChart.HSSFSeries.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="HSSFChart.HSSFSeries.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> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <i>Copyright 2008 The Apache Software Foundation or its licensors, as applicable.</i> </BODY> </HTML>
stumoodie/MetabolicNotationSubsystem
lib/poi-3.1-FINAL/docs/apidocs/org/apache/poi/hssf/usermodel/HSSFChart.HSSFSeries.html
HTML
apache-2.0
11,690
/******************************************************************************* * Copyright 2015-2016 - CNRS (Centre National de Recherche Scientifique) * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * *******************************************************************************/ package fr.univnantes.termsuite.model; import java.util.List; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import fr.univnantes.termsuite.utils.StringUtils; public class Word { private CompoundType compoundType; private String stem; private String lemma; private List<Component> components; private static final String MSG_NOT_COMPOUND = "Word <%s> is not a compound"; private static final String MSG_NOT_NEOCLASSICAL = "Word <%s> is not a neoclassical compound."; private static final String MSG_NO_NEOCLASSICAL_COMPOUND = "No neoclassical compound found for word <%s>"; public Word(String lemma, String stem) { this.lemma = lemma; this.stem = stem; resetComposition(); } public void resetComposition() { components = ImmutableList.of(); compoundType = CompoundType.UNSET; } public boolean isCompound() { return compoundType != CompoundType.UNSET && this.components.size() > 1; } public String getStem() { return stem; } public void setStem(String stem) { this.stem = stem; } public void setComponents(List<Component> components) { this.components = components; } public List<Component> getComponents() { return components; } @Override public String toString() { return MoreObjects.toStringHelper(this) .add("lemma", this.lemma) .add("isCompound", this.isCompound()) .toString(); } public CompoundType getCompoundType() { return compoundType; } public void setCompoundType(CompoundType compoundType) { this.compoundType = compoundType; } @Override public boolean equals(Object obj) { if (obj instanceof Word) { Word o = (Word) obj; return this.lemma.equals(o.lemma); } else return false; } @Override public int hashCode() { return this.lemma.hashCode(); } private String normalizedStem; public String getNormalizedStem() { if(normalizedStem == null) this.normalizedStem = StringUtils.replaceAccents(stem).toLowerCase(); return this.normalizedStem; } private String normalizedLemma; public String getNormalizedLemma() { if(normalizedLemma == null) this.normalizedLemma = StringUtils.replaceAccents(this.lemma).toLowerCase(); return this.normalizedLemma; } /** * Returns the {@link Component} object if * * @return * The neoclassical component affix * * @throws IllegalStateException when this word is not a neoclassical compound */ public Component getNeoclassicalAffix() { Preconditions.checkState(isCompound(), MSG_NOT_COMPOUND, this); Preconditions.checkState(getCompoundType() == CompoundType.NEOCLASSICAL, MSG_NOT_NEOCLASSICAL, this); for(Component c:components) if(c.isNeoclassicalAffix()) return c; throw new IllegalArgumentException(String.format(MSG_NO_NEOCLASSICAL_COMPOUND, this)); } public String getLemma() { return lemma; } }
termsuite/termsuite-core
src/main/java/fr/univnantes/termsuite/model/Word.java
Java
apache-2.0
3,955
<# ---------------------------------------------------- Title: Add Computer to Group Author: Michael Mayer Description: Used to add a single computer a Security Group Created: 11-08-2013 ---------------------------------------------------- #> import-module ActiveDirectory #imports modules depending on directory $path1 = get-location if($path1.path -match "admin-scripts"){Import-Module ..\modules\mmodules.psm1 -force} else{Import-Module .\modules\mmodules.psm1 -force} $compName = computer_select "Computer Name" $groupName = group-select "Group Name" #confirmation from user do{ Write-host "Confirm addition of $($compName.Name) to $($groupName.Name)" $verify = read-host "Enter Confirmation (Y/N)" if ($verify -eq "N"){exit} #exit if n is pressed } while ("y" -ne $verify) #keeps in loop until c is pressed or confirmed #adds computer to the security group Add-ADGroupMember -identity $groupName.Name -Members "$($compName.DistinguishedName)" $AddConfirm = Get-ADGroupMember -Identity $groupName.Name | Select-String -Pattern "$compName" #parses group membership looking for the computer that was just added. if($AddConfirm -ne $null){ Write-Host "$($compName.Name) is a member of $($groupname.Name)" }
mjmayer/fuzzy-robot
admin-scripts/add_computer_to_group.ps1
PowerShell
apache-2.0
1,238
Devlog ------ ``` $ cat /etc/default/docker | grep bip DOCKER_OPTS="--bip=172.17.42.1/24 --dns 172.17.42.1 --dns 8.8.8.8 --dns 8.8.4.4" $ sudo service docker restart docker stop/waiting docker start/running, process 5503 $ source alias.sh $ dcup r$ dc ps Name Command State Ports ------------------------------------------------------------------------- registrator_regi /bin/registrator Up strator_1 -internal ... registrator_test nosetests -v /ap Exit 0 _1 p/test_http.py registrator_web1 python -m Up 0.0.0.0:8000->80 _1 SimpleHTTPServer 00/tcp registrator_web2 python -m Up 0.0.0.0:8001->80 _1 SimpleHTTPServer 00/tcp registrator_xcon /bin/start Up 0.0.0.0:8600->53 sul_1 -bootstrap-expe /udp, 8300/tcp, ... 8301/tcp, 8301/udp, 8302/tcp, 8302/udp, 0.0.0. 0:8400->8400/tcp , 0.0.0.0:8500-> 8500/tcp ``` consul api test --------------- ``` $ curl -s http://localhost:8500/v1/catalog/service/web1 | python -m json.tool [ { "Address": "172.17.0.69", "Node": "consul", "ServiceAddress": "172.17.0.68", "ServiceID": "a8fb8e3d6d03:registrator_web1_1:8000", "ServiceName": "web1", "ServicePort": 8000, "ServiceTags": [ "web", "test" ] } ] $ curl -s http://localhost:8500/v1/catalog/service/web2 | python -m json.tool [ { "Address": "172.17.0.69", "Node": "consul", "ServiceAddress": "172.17.0.66", "ServiceID": "a8fb8e3d6d03:registrator_web2_1:8000", "ServiceName": "web2", "ServicePort": 8000, "ServiceTags": [ "web", "test" ] } ] $ curl -s http://localhost:8500/v1/catalog/service/consul | python -m json.tool [ { "Address": "172.17.0.69", "Node": "consul", "ServiceAddress": "", "ServiceID": "consul", "ServiceName": "consul", "ServicePort": 8300, "ServiceTags": [] } ] $ curl -s http://localhost:8500/v1/catalog/services | python -m json.tool { "consul": [], "consul-53": [ "udp" ], "consul-8300": [], "consul-8301": [ "udp" ], "consul-8302": [ "udp" ], "consul-8400": [], "consul-8500": [], "web1": [ "web", "test" ], "web2": [ "web", "test" ] } $ web2sh bash-4.3# ping web1.service.consul PING web1.service.consul (172.17.0.68): 56 data bytes 64 bytes from 172.17.0.68: seq=0 ttl=64 time=0.185 ms bash-4.3# ping web2.service.consul PING web2.service.consul (172.17.0.66): 56 data bytes 64 bytes from 172.17.0.66: seq=0 ttl=64 time=0.068 ms bash-4.3# ping consul.service.consul PING consul.service.consul (172.17.0.69): 56 data bytes 64 bytes from 172.17.0.69: seq=0 ttl=64 time=0.116 ms $ dc stop web1 Stopping registrator_web1_1... $ curl -s http://localhost:8500/v1/catalog/services | python -m json.tool { "consul": [], "consul-53": [ "udp" ], "consul-8300": [], "consul-8301": [ "udp" ], "consul-8302": [ "udp" ], "consul-8400": [], "consul-8500": [], "web2": [ "web", "test" ] } $ dc start web1 Starting registrator_web1_1... $ curl -s http://localhost:8500/v1/catalog/service/web1 | python -m json.tool [ { "Address": "172.17.0.69", "Node": "consul", "ServiceAddress": "172.17.0.72", "ServiceID": "a8fb8e3d6d03:registrator_web1_1:8000", "ServiceName": "web1", "ServicePort": 8000, "ServiceTags": [ "web", "test" ] } ] $ web2sh bash-4.3# drill web1.service.consul @172.17.42.1 ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 22969 ;; flags: qr aa rd ra ; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; web1.service.consul. IN A ;; ANSWER SECTION: web1.service.consul. 0 IN A 172.17.0.72 ;; AUTHORITY SECTION: ;; ADDITIONAL SECTION: ;; Query time: 1 msec ;; SERVER: 172.17.42.1 ;; WHEN: Wed May 6 05:31:20 2015 ;; MSG SIZE rcvd: 72 ```
y12studio/y12docker
registrator/README.md
Markdown
apache-2.0
4,920
<!DOCTYPE html> <html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}"> <head> {{ partial "head.html" . }} </head> <body id="page-top" class="index"> {{ partial "nav.html" . }} {{ partial "header.html" . }} {{ partial "portfolio-grid.html" . }} {{ partial "about.html" . }} {{ partial "contact.html" . }} {{ partial "jobs.html" . }} {{ partial "footer.html" . }} {{ partial "modals.html" . }} {{ partial "js.html" . }} </body> </html>
bear-code/hugo-freelancer-theme
layouts/index.html
HTML
apache-2.0
562
/* * Copyright 2016 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kie.workbench.common.screens.server.management.client.container.status; import javax.enterprise.context.Dependent; import javax.inject.Inject; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.IsWidget; import org.jboss.errai.ui.shared.api.annotations.DataField; import org.jboss.errai.ui.shared.api.annotations.Templated; import org.kie.workbench.common.screens.server.management.client.widget.Div; import static org.uberfire.commons.validation.PortablePreconditions.*; @Dependent @Templated public class ContainerRemoteStatusView extends Composite implements ContainerRemoteStatusPresenter.View { @Inject @DataField("card-container") Div cardContainer; @Override public void addCard( final IsWidget widget ) { cardContainer.add( checkNotNull( "widget", widget ) ); } @Override public void clear() { cardContainer.clear(); } }
dgutierr/kie-wb-common
kie-wb-common-screens/kie-wb-common-server-ui/kie-wb-common-server-ui-client/src/main/java/org/kie/workbench/common/screens/server/management/client/container/status/ContainerRemoteStatusView.java
Java
apache-2.0
1,566
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_151) on Thu Dec 05 05:02:11 MST 2019 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Interface org.wildfly.swarm.config.datasources.XADataSourceSupplier (BOM: * : All 2.6.0.Final API)</title> <meta name="date" content="2019-12-05"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Interface org.wildfly.swarm.config.datasources.XADataSourceSupplier (BOM: * : All 2.6.0.Final API)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/wildfly/swarm/config/datasources/XADataSourceSupplier.html" title="interface in org.wildfly.swarm.config.datasources">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">Thorntail API, 2.6.0.Final</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/wildfly/swarm/config/datasources/class-use/XADataSourceSupplier.html" target="_top">Frames</a></li> <li><a href="XADataSourceSupplier.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Interface org.wildfly.swarm.config.datasources.XADataSourceSupplier" class="title">Uses of Interface<br>org.wildfly.swarm.config.datasources.XADataSourceSupplier</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../org/wildfly/swarm/config/datasources/XADataSourceSupplier.html" title="interface in org.wildfly.swarm.config.datasources">XADataSourceSupplier</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.wildfly.swarm.config">org.wildfly.swarm.config</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.wildfly.swarm.config"> <!-- --> </a> <h3>Uses of <a href="../../../../../../org/wildfly/swarm/config/datasources/XADataSourceSupplier.html" title="interface in org.wildfly.swarm.config.datasources">XADataSourceSupplier</a> in <a href="../../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a> with parameters of type <a href="../../../../../../org/wildfly/swarm/config/datasources/XADataSourceSupplier.html" title="interface in org.wildfly.swarm.config.datasources">XADataSourceSupplier</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/config/Datasources.html" title="type parameter in Datasources">T</a></code></td> <td class="colLast"><span class="typeNameLabel">Datasources.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/Datasources.html#xaDataSource-org.wildfly.swarm.config.datasources.XADataSourceSupplier-">xaDataSource</a></span>(<a href="../../../../../../org/wildfly/swarm/config/datasources/XADataSourceSupplier.html" title="interface in org.wildfly.swarm.config.datasources">XADataSourceSupplier</a>&nbsp;supplier)</code> <div class="block">Install a supplied XADataSource object to the list of subresources</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/wildfly/swarm/config/datasources/XADataSourceSupplier.html" title="interface in org.wildfly.swarm.config.datasources">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">Thorntail API, 2.6.0.Final</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/wildfly/swarm/config/datasources/class-use/XADataSourceSupplier.html" target="_top">Frames</a></li> <li><a href="XADataSourceSupplier.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2019 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p> </body> </html>
wildfly-swarm/wildfly-swarm-javadocs
2.6.0.Final/apidocs/org/wildfly/swarm/config/datasources/class-use/XADataSourceSupplier.html
HTML
apache-2.0
7,575
# Piptatherum blancheanum É.Desv. SPECIES #### Status SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Liliopsida/Poales/Poaceae/Oryzopsis/Oryzopsis blancheana/ Syn. Piptatherum blancheanum/README.md
Markdown
apache-2.0
189
<b>hejsan</b>
danka74/task2_5
public/partials/comments.html
HTML
apache-2.0
13
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> <head th:replace="fragments/head"></head> <body> <header th:replace="fragments/nav"></header> <main role="main"> <div class="container-fluid"> <h1>Timeclicker</h1> <h2>Sum per tag</h2> <div>Some entries might contribute their duration to multiple tags.</div> <div id="chart" style="width:100%; height:400px;"></div> <table class="table table-striped table-hover"> <thead class="thead-dark"> <tr> <th scope="col">Tag</th> <th scope="col">Sum</th> </tr> </thead> <tbody> <tr th:each="summary : ${tagSummary}"> <td th:text="${summary.tag}">start</td> <td th:text="${{summary.readableDuration}}">stop</td> </tr> </tbody> </table> </div> </main> <footer th:replace="fragments/foot"></footer> <script th:src="@{/webjars/highcharts/6.1.1/highcharts.js}"></script> <script th:src="@{/lib.js}"></script> <script th:inline="javascript"> $(function () { /*<![CDATA[*/ var data = []; [[${tagSummary}]].forEach(function (e) { var tag = e.tag || "no tag"; data.push([tag, parseDuration(e.readableDuration)]); }); /*]]>*/ $(function () { var myChart = Highcharts.chart('chart', { chart: { type: 'pie', plotBackgroundColor: null }, title: { text: 'Sum per tag' }, tooltip: { formatter: function () { return formatDuration(this.y); } }, series: [{ name: 'Sums', data: data }] }); }); }); </script> </body> </html>
MoriTanosuke/timeclicker
src/main/resources/templates/charts/tag.html
HTML
apache-2.0
2,094
# Populus acuminata var. rehderi Sarg. VARIETY #### Status SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Malpighiales/Salicaceae/Populus/Populus hinckleyana/ Syn. Populus acuminata rehderi/README.md
Markdown
apache-2.0
193
<?php /** * PHPUnit * * Copyright (c) 2002-2008, Sebastian Bergmann <sb@sebastian-bergmann.de>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * * Neither the name of Sebastian Bergmann nor the names of his * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * @category Testing * @package PHPUnit * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2008 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.opensource.org/licenses/bsd-license.php BSD License * @version SVN: $Id: TestSetup.php 2154 2008-01-17 11:19:53Z sb $ * @link http://www.phpunit.de/ * @since File available since Release 2.0.0 */ require_once 'PHPUnit/Framework.php'; require_once 'PHPUnit/Extensions/TestDecorator.php'; require_once 'PHPUnit/Util/Filter.php'; PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT'); trigger_error( "Class PHPUnit_Extensions_TestSetup is deprecated. ". "It will be removed in PHPUnit 3.3. ". "Please use the new functionality in PHPUnit_Framework_TestSuite instead." ); /** * A Decorator to set up and tear down additional fixture state. * Subclass TestSetup and insert it into your tests when you want * to set up additional state once before the tests are run. * * @category Testing * @package PHPUnit * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2008 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.opensource.org/licenses/bsd-license.php BSD License * @version Release: 3.2.9 * @link http://www.phpunit.de/ * @since Class available since Release 2.0.0 */ class PHPUnit_Extensions_TestSetup extends PHPUnit_Extensions_TestDecorator { /** * Runs the decorated test and collects the * result in a TestResult. * * @param PHPUnit_Framework_TestResult $result * @return PHPUnit_Framework_TestResult * @throws InvalidArgumentException * @access public */ public function run(PHPUnit_Framework_TestResult $result = NULL) { if ($result === NULL) { $result = $this->createResult(); } $this->setUp(); $this->copyFixtureToTest(); $this->basicRun($result); $this->tearDown(); return $result; } /** * Copies the fixture set up by setUp() to the test. * * @access private * @since Method available since Release 2.3.0 */ private function copyFixtureToTest() { $object = new ReflectionClass($this); foreach ($object->getProperties() as $attribute) { $name = $attribute->getName(); if ($name != 'test') { $this->doCopyFixtureToTest($this->test, $name, $this->$name); } } } /** * @access private * @since Method available since Release 2.3.0 */ private function doCopyFixtureToTest($object, $name, &$value) { if ($object instanceof PHPUnit_Framework_TestSuite) { foreach ($object->tests() as $test) { $this->doCopyFixtureToTest($test, $name, $value); } } else { $object->$name =& $value; } } /** * Sets up the fixture. Override to set up additional fixture * state. * * @access protected */ protected function setUp() { } /** * Tears down the fixture. Override to tear down the additional * fixture state. * * @access protected */ protected function tearDown() { } } ?>
nevali/shindig
php/external/PHPUnit/Extensions/TestSetup.php
PHP
apache-2.0
4,983
# AUTOGENERATED FILE FROM balenalib/beaglebone-black-debian:bullseye-run ENV NODE_VERSION 12.22.9 ENV YARN_VERSION 1.22.4 RUN buildDeps='curl libatomic1' \ && set -x \ && for key in \ 6A010C5166006599AA17F08146C2130DFD2497F5 \ ; do \ gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \ gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \ done \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ && curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-armv7l.tar.gz" \ && echo "43b175e6b06c9be3e4c2343de0bc434dae16991a747dae5a4ddc0ebb7644e433 node-v$NODE_VERSION-linux-armv7l.tar.gz" | sha256sum -c - \ && tar -xzf "node-v$NODE_VERSION-linux-armv7l.tar.gz" -C /usr/local --strip-components=1 \ && rm "node-v$NODE_VERSION-linux-armv7l.tar.gz" \ && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && mkdir -p /opt/yarn \ && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \ && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \ && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && npm config set unsafe-perm true -g --unsafe-perm \ && rm -rf /tmp/* CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"] RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@node.sh" \ && echo "Running test-stack@node" \ && chmod +x test-stack@node.sh \ && bash test-stack@node.sh \ && rm -rf test-stack@node.sh RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Debian Bullseye \nVariant: run variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nNode.js v12.22.9, Yarn v1.22.4 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \ && chmod +x /bin/sh-shim \ && cp /bin/sh /bin/sh.real \ && mv /bin/sh-shim /bin/sh
resin-io-library/base-images
balena-base-images/node/beaglebone-black/debian/bullseye/12.22.9/run/Dockerfile
Dockerfile
apache-2.0
2,946
/** * */ package alokawi.ehcache.test; import java.util.UUID; import org.junit.Test; import alokawi.ehcache.core.EhCacheManager; import junit.framework.TestCase; /** * @author alokkumar * */ public class EhCacheManagerTest extends TestCase { @Test public void testEhCachePutAndGet() { EhCacheManager cacheManager = new EhCacheManager(); for (int i = 0; i < 100000; i++) { String key = UUID.randomUUID().toString(); String value = UUID.randomUUID().toString(); cacheManager.putCacheEntry(key, value); assertEquals(value, cacheManager.getCacheEntry(key)); } } }
alokawi/working-with-ehcache
src/test/java/alokawi/ehcache/test/EhCacheManagerTest.java
Java
apache-2.0
595