package com.fangzhou.manatee.domain;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * A Team.
 */
@Entity
@Table(name = "team")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Team implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @Column(name = "organization")
    private String organization;

    @Column(name = "name")
    private String name;

    @Column(name = "specialty")
    private String specialty;

    @Column(name = "max_patients")
    private Long maxPatients;

    @Column(name = "monday")
    private Long monday;

    @Column(name = "tuesday")
    private Long tuesday;

    @Column(name = "wednesday")
    private Long wednesday;

    @Column(name = "thursday")
    private Long thursday;

    @Column(name = "friday")
    private Long friday;

    @Column(name = "saturday")
    private Long saturday;

    @Column(name = "sunday")
    private Long sunday;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrganization() {
        return organization;
    }

    public void setOrganization(String organization) {
        this.organization = organization;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSpecialty() {
        return specialty;
    }

    public void setSpecialty(String specialty) {
        this.specialty = specialty;
    }

    public Long getMaxPatients() {
        return maxPatients;
    }

    public void setMaxPatients(Long maxPatients) {
        this.maxPatients = maxPatients;
    }

    public Long getMonday() {
        return monday;
    }

    public void setMonday(Long monday) {
        this.monday = monday;
    }

    public Long getTuesday() {
        return tuesday;
    }

    public void setTuesday(Long tuesday) {
        this.tuesday = tuesday;
    }

    public Long getWednesday() {
        return wednesday;
    }

    public void setWednesday(Long wednesday) {
        this.wednesday = wednesday;
    }

    public Long getThursday() {
        return thursday;
    }

    public void setThursday(Long thursday) {
        this.thursday = thursday;
    }

    public Long getFriday() {
        return friday;
    }

    public void setFriday(Long friday) {
        this.friday = friday;
    }

    public Long getSaturday() {
        return saturday;
    }

    public void setSaturday(Long saturday) {
        this.saturday = saturday;
    }

    public Long getSunday() {
        return sunday;
    }

    public void setSunday(Long sunday) {
        this.sunday = sunday;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Team team = (Team) o;
        if(team.id == null || id == null) {
            return false;
        }
        return Objects.equals(id, team.id);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

    @Override
    public String toString() {
        return "Team{" +
            "id=" + id +
            ", organization='" + organization + "'" +
            ", name='" + name + "'" +
            ", specialty='" + specialty + "'" +
            ", maxPatients='" + maxPatients + "'" +
            ", monday='" + monday + "'" +
            ", tuesday='" + tuesday + "'" +
            ", wednesday='" + wednesday + "'" +
            ", thursday='" + thursday + "'" +
            ", friday='" + friday + "'" +
            ", saturday='" + saturday + "'" +
            ", sunday='" + sunday + "'" +
            '}';
    }
}


{% extends "base_site.html" %}

{% block title %}Meetings{% endblock %}

{% block extrahead %}{{ block.super }}
  <link rel="stylesheet" type="text/css" href="{{ SECR_STATIC_URL }}css/jquery-ui-1.8.1.custom.css" />
  <link rel="stylesheet" type="text/css" href="{{ SECR_STATIC_URL }}css/jquery.ui.autocomplete.css" />

{% endblock %}

{% block breadcrumbs %}{{ block.super }}
  » Meetings
  » {{ meeting.number }}
  » Rooms and Times
{% endblock %}

{% block content %}

Rooms

Times

Non-Session

{% block subsection %}{% endblock %}

{% endblock %}


module Projects
  class ForkService < BaseService
    def execute(fork_to_project = nil)
      if fork_to_project
        link_existing_project(fork_to_project)
      else
        fork_new_project
      end
    end

    private

    def allowed_fork?
      current_user.can?(:fork_project, @project)
    end

    def link_existing_project(fork_to_project)
      return if fork_to_project.forked?

      build_fork_network_member(fork_to_project)

      if link_fork_network(fork_to_project)
        # A forked project stores its LFS objects in the `forked_from_project`.
        # So the LFS objects become inaccessible, and therefore delete them from
        # the database so they'll get cleaned up.
        #
        # TODO: refactor this to get the correct lfs objects when implementing
        #       https://gitlab.com/gitlab-org/gitlab-ce/issues/39769
        fork_to_project.lfs_objects_projects.delete_all

        fork_to_project
      end
    end

    def fork_new_project
      new_params = {
        visibility_level:       allowed_visibility_level,
        description:            @project.description,
        name:                   @project.name,
        path:                   @project.path,
        shared_runners_enabled: @project.shared_runners_enabled,
        namespace_id:           target_namespace.id,
        fork_network:           fork_network,
        # We need to assign the fork network membership after the project has
        # been instantiated to avoid ActiveRecord trying to create it when
        # initializing the project, as that would cause a foreign key constraint
        # exception.
        relations_block:        -> (project) { build_fork_network_member(project) }
      }

      if @project.avatar.present? && @project.avatar.image?
        new_params[:avatar] = @project.avatar
      end

      new_params.merge!(@project.object_pool_params)

      new_project = CreateService.new(current_user, new_params).execute
      return new_project unless new_project.persisted?

      # Set the forked_from_project relation after saving to avoid having to
      # reload the project to reset the association information and cause an
      # extra query.
      new_project.forked_from_project = @project

      builds_access_level = @project.project_feature.builds_access_level
      new_project.project_feature.update(builds_access_level: builds_access_level)

      new_project
    end

    def fork_network
      @fork_network ||= @project.fork_network || @project.build_root_of_fork_network
    end

    def build_fork_network_member(fork_to_project)
      if allowed_fork?
        fork_to_project.build_fork_network_member(forked_from_project: @project,
                                                  fork_network: fork_network)
      else
        fork_to_project.errors.add(:forked_from_project_id, 'is forbidden')
      end
    end

    def link_fork_network(fork_to_project)
      return if fork_to_project.errors.any?

      fork_to_project.fork_network_member.save &&
        refresh_forks_count
    end

    def refresh_forks_count
      Projects::ForksCountService.new(@project).refresh_cache
    end

    def target_namespace
      @target_namespace ||= @params[:namespace] || current_user.namespace
    end

    def allowed_visibility_level
      target_level = [@project.visibility_level, target_namespace.visibility_level].min

      Gitlab::VisibilityLevel.closest_allowed_level(target_level)
    end
  end
end


class CreateAliquotSampleFormats < SharedMigration
	def self.up
		create_table :aliquot_sample_formats do |t|
			t.integer :position
			t.string  :key, :null => false
			t.string  :description
			t.timestamps
		end
		add_index :aliquot_sample_formats, :key, :unique => true
		add_index :aliquot_sample_formats, :description, :unique => true
	end

	def self.down
		drop_table :aliquot_sample_formats
	end
end


	<title>Leaflet</title>
	<link rel="stylesheet" href="/leaflet/leaflet.css" />


<md-content ng-controller="AddCtrl" layout="column" flex layout-padding>

Depositar na sua conta

	<md-input-container class="md-block">
		Valor
		<input type="text" ng-model="valor" ui-number-mask="2">
	</md-input-container>

		<md-button class="md-raised md-primary" aria-label="confirmar" ng-click="confirmar()" ng-disabled="!valor">
			Confirmar
		</md-button>

</md-content>


namespace syncer {

class SyncPrefs;

// This class is used by ProfileSyncService to manage all logic and state
// pertaining to initialization of the SyncEngine.
class StartupController {
 public:
  StartupController(const SyncPrefs* sync_prefs,
                    base::Callback<bool()> can_start,
                    base::Closure start_engine);
  ~StartupController();

  // Starts up sync if it is requested by the user and preconditions are met.
  // Returns true if these preconditions are met, although does not imply
  // the engine was started.
  bool TryStart();

  // Same as TryStart() above, but bypasses deferred startup and the first setup
  // complete check.
  bool TryStartImmediately();

  // Called when a datatype (SyncableService) has a need for sync to start
  // ASAP, presumably because a local change event has occurred but we're
  // still in deferred start mode, meaning the SyncableService hasn't been
  // told to MergeDataAndStartSyncing yet.
  // It is expected that |type| is a currently active datatype.
  void OnDataTypeRequestsSyncStartup(ModelType type);

  // Prepares this object for a new attempt to start sync, forgetting
  // whether or not preconditions were previously met.
  // NOTE: This resets internal state managed by this class, but does not
  // touch values that are explicitly set and reset by higher layers to
  // tell this class whether a setup UI dialog is being shown to the user.
  // See setup_in_progress_.
  void Reset(const ModelTypeSet registered_types);

  // Sets the setup in progress flag and tries to start sync if it's true.
  void SetSetupInProgress(bool setup_in_progress);

  bool IsSetupInProgress() const { return setup_in_progress_; }
  base::Time start_engine_time() const { return start_engine_time_; }
  std::string GetEngineInitializationStateString() const;

  void OverrideFallbackTimeoutForTest(const base::TimeDelta& timeout);

 private:
  enum StartUpDeferredOption { STARTUP_DEFERRED, STARTUP_IMMEDIATE };
  // Returns true if all conditions to start the engine are met.
  bool StartUp(StartUpDeferredOption deferred_option);
  void OnFallbackStartupTimerExpired();

  // Records time spent in deferred state with UMA histograms.
  void RecordTimeDeferred();

  // If true, will bypass the FirstSetupComplete check when triggering sync
  // startup.
  bool bypass_setup_complete_;

  // True if we should start sync ASAP because either a SyncableService has
  // requested it, or we're done waiting for a sign and decided to go ahead.
  bool received_start_request_;

  // The time that StartUp() is called. This is used to calculate time spent
  // in the deferred state; that is, after StartUp and before invoking the
  // start_engine_ callback.
  base::Time start_up_time_;

  // If |true|, there is setup UI visible so we should not start downloading
  // data types.
  // Note: this is explicitly controlled by higher layers (UI) and is meant to
  // reflect what the UI claims the setup state to be. Therefore, only set this
  // due to explicit requests to do so via SetSetupInProgress.
  bool setup_in_progress_;

  const SyncPrefs* sync_prefs_;

  // A function that can be invoked repeatedly to determine whether sync can be
  // started. |start_engine_| should not be invoked unless this returns true.
  base::Callback<bool()> can_start_;

  // The callback we invoke when it's time to call expensive
  // startup routines for the sync engine.
  base::Closure start_engine_;

  // The time at which we invoked the start_engine_ callback.
  base::Time start_engine_time_;

  base::TimeDelta fallback_timeout_;

  // Used to compute preferred_types from SyncPrefs as-needed.
  ModelTypeSet registered_types_;

  base::WeakPtrFactory<StartupController> weak_factory_;
};

}  // namespace syncer

#endif  // COMPONENTS_SYNC_DRIVER_STARTUP_CONTROLLER_H_


namespace uut
{
	class String : public ValueType
	{
		UUT_VALUETYPE(uut, String, ValueType)
	public:
		typedef std::string DataType;
		typedef DataType::iterator Iterator;
		typedef DataType::const_iterator CIterator;

		String();
		String(const char* str);
		String(const String& str);
		String(String&& str);
		String(const std::string& str);
		String(std::string&& str);

		bool EndsWith(const String& ends) const;
		bool EndsWith(const String& ends, StringComparison comparisonType) const;

		int IndexOf(char value) const;
		int IndexOf(char value, StringComparison comparisonType) const;

		int IndexOf(const String& value) const;
		int IndexOf(const String& value, StringComparison comparisonType) const;
		int IndexOf(const String& value, int startIndex, StringComparison comparisonType) const;

		void Insert(int index, const String& value);

		int LastIndexOf(char value) const;
		int LastIndexOf(char value, StringComparison comparisonType) const;

		int LastIndexOf(const String& value) const;
		int LastIndexOf(const String& value, StringComparison comparisonType) const;

		void Remove(int startIndex);
		void Remove(int startIndex, int length);

		int Replace(char oldChar, char newChar);
		int Replace(const String& oldValue, const String& newValue);

		void TrimStart();
		void TrimStart(const List<char>& trimChars);

		void TrimEnd();
		void TrimEnd(const List<char>& trimChars);

		void Trim();
		void Trim(const List<char>& trimChars);

		int Split(char c, List<String>& out) const;
		List<String> Split(char c) const;

		String Substring(int startIndex) const;
		String Substring(int startIndex, int length) const;

		bool Equals(const String& str) const;
		bool Equals(const String& str, StringComparison comparisonType) const;

		uint Count() const { return _data.size(); }
		bool IsEmpty() const { return _data.empty(); }
		void Clear() { _data.clear(); }

		operator const char*() const { return _data.c_str(); }
		const char* GetData() const { return _data.c_str(); }

		bool operator == (const char* str) const { return Equals(str); }
		bool operator != (const char* str) const { return !Equals(str); }

		bool operator == (const String& str) const { return Equals(str); }
		bool operator != (const String& str) const { return !Equals(str); }

		String& operator = (const char* str);
		String& operator = (const String& str);
		String& operator = (String&& str);

		String& operator += (char c);
		String& operator += (const char* str);
		String& operator += (const String& str);

		String operator + (const char* str) const;
		String operator + (const String& str) const;

		static String Join(const List<String>& list, const String& str);
		static String Format(const char* format, ...);

		Iterator Begin() { return _data.begin(); }
		Iterator End() { return _data.begin(); }

		CIterator Begin() const { return _data.begin(); }
		CIterator End() const { return _data.begin(); }

		static const String Empty;

		static int Compare(const String& a, const String& b, StringComparison comparisonType = StringComparison::Ordinal);

	protected:
		std::string _data;
	};

	template<class T> String::Iterator begin(String& str) { return str.Begin(); }
	template<class T> String::Iterator end(String& str) { return str.End(); }

	template<class T> String::CIterator begin(const String& str) { return str.Begin(); }
	template<class T> String::CIterator end(const String& str) { return str.End(); }

	namespace detail
	{
		template<typename T> struct StringConvert {
			static String ToString(const T& value) { return String(value); }
		};

		//template<typename T, class = std::enable_if_t<std::is_fundamental<T>::value>> struct StringConvert {
		//	static String ToString(const T& value) { return String::Empty; }
		//};

		template<> struct StringConvert<String> {
			static String ToString(const String& value) { return value; }
		};

		template<> struct StringConvert<const Type*> {
			static String ToString(const Type* value) { return value->ToString(); }
		};
	}

	template<typename T>
	static String ToString(T value) { return detail::StringConvert<T>::ToString(value); }

	UUT_DEFAULT_VALUE(String, String::Empty)
}


require 'spec_helper'
describe Spree::PageLayout do
  let (:page_layout) { Spree::PageLayout.first }

  it "build html css js" do
    html, css = page_layout.build_content
    html.present?.should be_true
    css.present?.should be_true
  end

  it "create new page_layout tree" do
  #  objects = Spree::Section.roots
  #  section_hash= objects.inject({}){|h,sp| h[sp.slug] = sp; h}
    # center area
  #  center_area = Spree::PageLayout.create_layout(section_hash['center_area'], "center_area")
  #  center_area.add_section(section_hash['center_part'],:title=>"center_part")
  #  center_area.add_section(section_hash['left_part'],:title=>"left_part")
  #  center_area.add_section(section_hash['right_part'],:title=>"right_part")

  #  center_area.children.count.should eq(3)
  #  center_area.param_values.count.should eq(0)

  end

  it "valid section context" do

    product_detail = Spree::PageLayout.find_by_section_context( Spree::PageLayout::ContextEnum.detail)
    product_detail.context_detail?.should be_true
    product_list = Spree::PageLayout.find_by_section_context( Spree::PageLayout::ContextEnum.list)
    product_list.context_list?.should be_true
  end

  it "could update context" do
    list_section = Spree::PageLayout.find_by_section_context('list')
    detail_section = Spree::PageLayout.find_by_section_context('detail')
    #contexts = [Spree::PageLayout::ContextEnum.account, Spree::PageLayout::ContextEnum.thanks,Spree::PageLayout::ContextEnum.cart, Spree::PageLayout::ContextEnum.checkout]
    contexts = [Spree::PageLayout::ContextEnum.list, Spree::PageLayout::ContextEnum.detail]
    page_layout.update_section_context contexts

    for node in page_layout.self_and_descendants
      if node.is_or_is_descendant_of? list_section
        node.current_contexts.should eq(list_section.current_contexts)
      elsif   node.is_or_is_descendant_of? detail_section
        node.current_contexts.should eq(detail_section.current_contexts)
      else
        node.current_contexts.should eq(contexts)
      end

    end
  end

  it "could verify contexts" do
    Spree::PageLayout.verify_contexts( Spree::PageLayout::ContextEnum.cart, [:cart, :checkout, :thankyou ] ).should be_true

    Spree::PageLayout.verify_contexts( [Spree::PageLayout::ContextEnum.cart], [:cart, :checkout, :thankyou ] ).should be_true

    Spree::PageLayout.verify_contexts( Spree::PageLayout::ContextEnum.either, [:cart, :checkout, :thankyou ] ).should be_false
  end

  it "could replace section" do
    original_page_layout = page_layout.dup
    root2 = Spree::Section.find('root2')
    page_layout.replace_with(root2)
    original_page_layout.param_values.empty?.should be_true
    page_layout.section.should eq root2
    page_layout.param_values.present?.should be_true

  end

end


base::LazyInstance<base::TestDiscardableMemoryAllocator>
    g_discardable_memory_allocator = LAZY_INSTANCE_INITIALIZER;

int main(int argc, char** argv) {
#if defined(OS_WIN)
  ui::ScopedOleInitializer ole_initializer_;
#endif

  base::CommandLine::Init(argc, argv);

  base::AtExitManager at_exit;

#if defined(USE_X11)
  // This demo uses InProcessContextFactory which uses X on a separate Gpu
  // thread.
  gfx::InitializeThreadedX11();
#endif

  gl::init::InitializeGLOneOff();

  // The ContextFactory must exist before any Compositors are created.
  bool context_factory_for_test = false;
  cc::SurfaceManager surface_manager;
  std::unique_ptr<ui::InProcessContextFactory> context_factory(
      new ui::InProcessContextFactory(context_factory_for_test,
                                      &surface_manager));
  context_factory->set_use_test_surface(false);

  base::MessageLoopForUI message_loop;

  base::i18n::InitializeICU();

  ui::RegisterPathProvider();

  base::FilePath ui_test_pak_path;
  CHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
  ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);

  base::DiscardableMemoryAllocator::SetInstance(
      g_discardable_memory_allocator.Pointer());

  base::PowerMonitor power_monitor(
      base::WrapUnique(new base::PowerMonitorDeviceSource));

#if defined(OS_WIN)
  gfx::win::MaybeInitializeDirectWrite();
#endif

#if defined(USE_AURA)
  std::unique_ptr<aura::Env> env = aura::Env::CreateInstance();
  aura::Env::GetInstance()->set_context_factory(context_factory.get());
#endif
  ui::InitializeInputMethodForTesting();
  ui::MaterialDesignController::Initialize();

  {
    views::DesktopTestViewsDelegate views_delegate;
#if defined(USE_AURA)
    wm::WMState wm_state;
#endif
#if !defined(OS_CHROMEOS) && defined(USE_AURA)
    std::unique_ptr<display::Screen> desktop_screen(
        views::CreateDesktopScreen());
    display::Screen::SetScreenInstance(desktop_screen.get());
#endif

    views::examples::ShowExamplesWindow(views::examples::QUIT_ON_CLOSE);

    base::RunLoop().Run();

    ui::ResourceBundle::CleanupSharedInstance();
  }

  ui::ShutdownInputMethod();

#if defined(USE_AURA)
  env.reset();
#endif

  return 0;
}


My wedding's homepage using [Creative](http://startbootstrap.com/template-overviews/creative/).


local types = require "base.types"
local common = types.common

-- Forwarding constructor based on type name.
function common.__call(parent, ...)
    local obj = parent.new(...)
    setmetatable(obj, parent)
    return obj
end

-- Getter lookup.
function common.__index(table, key)
    local mt = getmetatable(table)
    local func = mt.getters[key]
    if func == nil then
        error("no member named '" .. key .. "'", 2)
    end
    return func(table)
end

-- Setter lookup.
function common.__newindex(table, key, value)
    local mt = getmetatable(table)
    local func = mt.setters[key]
    if func == nil then
        error("no member named '" .. key .. "'", 2)
    end
    func(table, value)
end

-- Module exports.
return nil


from thrift.Thrift import *
import fb303.ttypes
import hive_metastore.ttypes
import queryplan.ttypes

from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
  from thrift.protocol import fastbinary
except:
  fastbinary = None

class JobTrackerState:
  INITIALIZING = 1
  RUNNING = 2

  _VALUES_TO_NAMES = {
    1: "INITIALIZING",
    2: "RUNNING",
  }

  _NAMES_TO_VALUES = {
    "INITIALIZING": 1,
    "RUNNING": 2,
  }

class HiveClusterStatus:
  """
  Attributes:
   - taskTrackers
   - mapTasks
   - reduceTasks
   - maxMapTasks
   - maxReduceTasks
   - state
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'taskTrackers', None, None, ), # 1
    (2, TType.I32, 'mapTasks', None, None, ), # 2
    (3, TType.I32, 'reduceTasks', None, None, ), # 3
    (4, TType.I32, 'maxMapTasks', None, None, ), # 4
    (5, TType.I32, 'maxReduceTasks', None, None, ), # 5
    (6, TType.I32, 'state', None, None, ), # 6
  )

  def __init__(self, taskTrackers=None, mapTasks=None, reduceTasks=None, maxMapTasks=None, maxReduceTasks=None, state=None,):
    self.taskTrackers = taskTrackers
    self.mapTasks = mapTasks
    self.reduceTasks = reduceTasks
    self.maxMapTasks = maxMapTasks
    self.maxReduceTasks = maxReduceTasks
    self.state = state

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I32:
          self.taskTrackers = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.mapTasks = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.reduceTasks = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I32:
          self.maxMapTasks = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I32:
          self.maxReduceTasks = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.state = iprot.readI32();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('HiveClusterStatus')
    if self.taskTrackers is not None:
      oprot.writeFieldBegin('taskTrackers', TType.I32, 1)
      oprot.writeI32(self.taskTrackers)
      oprot.writeFieldEnd()
    if self.mapTasks is not None:
      oprot.writeFieldBegin('mapTasks', TType.I32, 2)
      oprot.writeI32(self.mapTasks)
      oprot.writeFieldEnd()
    if self.reduceTasks is not None:
      oprot.writeFieldBegin('reduceTasks', TType.I32, 3)
      oprot.writeI32(self.reduceTasks)
      oprot.writeFieldEnd()
    if self.maxMapTasks is not None:
      oprot.writeFieldBegin('maxMapTasks', TType.I32, 4)
      oprot.writeI32(self.maxMapTasks)
      oprot.writeFieldEnd()
    if self.maxReduceTasks is not None:
      oprot.writeFieldBegin('maxReduceTasks', TType.I32, 5)
      oprot.writeI32(self.maxReduceTasks)
      oprot.writeFieldEnd()
    if self.state is not None:
      oprot.writeFieldBegin('state', TType.I32, 6)
      oprot.writeI32(self.state)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class HiveServerException(Exception):
  """
  Attributes:
   - message
   - errorCode
   - SQLState
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'message', None, None, ), # 1
    (2, TType.I32, 'errorCode', None, None, ), # 2
    (3, TType.STRING, 'SQLState', None, None, ), # 3
  )

  def __init__(self, message=None, errorCode=None, SQLState=None,):
    self.message = message
    self.errorCode = errorCode
    self.SQLState = SQLState

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.STRING:
          self.message = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.errorCode = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.SQLState = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('HiveServerException')
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 1)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    if self.errorCode is not None:
      oprot.writeFieldBegin('errorCode', TType.I32, 2)
      oprot.writeI32(self.errorCode)
      oprot.writeFieldEnd()
    if self.SQLState is not None:
      oprot.writeFieldBegin('SQLState', TType.STRING, 3)
      oprot.writeString(self.SQLState)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return

  def __str__(self):
    return repr(self)

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)


ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
null

### Remarks
null


Social

 eduardszoecs@gmail.com

 @EduardSzoecs

 szocs.eduard

 EDiLD

 EDi

Links

 Researchgate

 Google Scholar

 ORCID

 University

 Subscribe


#include <stdio.h>
#include <stdint.h>

#include <sel4/sel4.h>
#include <sel4utils/util.h>

#include <VchanProxy.h>

#include "vmm/vmm.h"
#include "vmm/vchan_copy.h"
#include "vmm/vchan_sharemem.h"

#define DPRINTF(num, ...) printf(__VA_ARGS__);

int32_t rpc_in_new_connection(vchan_connect_t con) {
//  DPRINTF(DBG_SERVER, "Proxy: new connection \n");
   return (int32_t)vchan_com_out_new_connection(con);
}

int32_t rpc_in_rem_connection(vchan_connect_t con) {
//  DPRINTF(DBG_SERVER, "Proxy: rem connection \n");
   return (int32_t)vchan_com_out_rem_connection(con);
}

int32_t rpc_in_get_buf(vchan_ctrl_t con, int32_t cmd) {
//  DPRINTF(DBG_SERVER, "Proxy: get buff \n");
   return (int32_t)vchan_com_out_get_buf(con, (int)cmd);
}

int32_t rpc_in_status(vchan_ctrl_t con) {
//  DPRINTF(DBG_SERVER, "Proxy: in status \n");
  return (int32_t)vchan_com_out_status(con);
}

int32_t rpc_in_alert_status(vchan_ctrl_t con) {
//  DPRINTF(DBG_SERVER, "Proxy: alert status \n");
  return (int32_t)vchan_com_out_alert_status(con);
}

void rpc_in_ping() {
//  DPRINTF(DBG_SERVER, "Proxy: ping \n");
  vchan_com_out_ping();
}

void vevent_out_callback(void *arg) {
//  DPRINTF(DBG_SERVER, "Proxy: vevent out callback \n");
 vevent_in_write_void();
//  DPRINTF(DBG_SERVER, "Proxy: vevent out sent with result %d \n", result);
  vevent_out_reg_callback(vevent_out_callback, arg);
}

int run(void) {
//  DPRINTF(DBG_SERVER, "Proxy: started \n");
  vevent_out_reg_callback(vevent_out_callback, NULL);
  return 0;
}


/**
 * Authored by  AlmogBaku
 *              almog.baku@gmail.com
 *              http://www.almogbaku.com/
 *
 * 9/8/13 9:33 PM
 */

angular.element(document).ready(function() {
    angular.bootstrap(document, ['app']);
});

/**
 * DEBUG!!!!!! @TODO remove it!
 */
function getApp(service) {
    return angular.element(document).injector().get(service);
}


<!DOCTYPE HTML>

<title>org.apache.sysds.hops.rewrite (Apache SystemDS 2.3.0-SNAPSHOT API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

SEARCH:
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">

JavaScript is disabled on your browser.

Package org.apache.sysds.hops.rewrite

Class Summary

Class
Description

HopDagValidator

This class allows to check hop dags for validity, e.g., parent-child linking.

HopRewriteRule

Base class for all hop rewrites in order to enable generic
 application of all rules.

HopRewriteUtils

MarkForLineageReuse

ProgramRewriter

This program rewriter applies a variety of rule-based rewrites
 on all hop dags of the given program in one pass over the entire
 program.

ProgramRewriteStatus

RewriteAlgebraicSimplificationDynamic

Rule: Algebraic Simplifications.

RewriteAlgebraicSimplificationStatic

Rule: Algebraic Simplifications.

RewriteBlockSizeAndReblock

Rule: BlockSizeAndReblock.

RewriteCommonSubexpressionElimination

Rule: CommonSubexpressionElimination.

RewriteCompressedReblock

Rule: Compressed Re block if config compressed.linalg is enabled, we inject compression directions after read of
 matrices if number of rows is above 1000 and cols at least 1.

RewriteConstantFolding

Rule: Constant Folding.

RewriteElementwiseMultChainOptimization

Prerequisite: RewriteCommonSubexpressionElimination must run before this rule.

RewriteFederatedExecution

RewriteFederatedExecution.PrivacyConstraintRetriever

FederatedUDF for retrieving privacy constraint of data stored in file name.

RewriteForLoopVectorization

Rule: Simplify program structure by pulling if or else statement body out
 (removing the if statement block ifself) in order to allow intra-procedure
 analysis to propagate exact statistics.

RewriteGPUSpecificOps

RewriteHoistLoopInvariantOperations

Rule: Simplify program structure by hoisting loop-invariant operations
 out of while, for, or parfor loops.

RewriteIndexingVectorization

Rule: Indexing vectorization.

RewriteInjectSparkLoopCheckpointing

Rule: Insert checkpointing operations for caching purposes.

RewriteInjectSparkPReadCheckpointing

Rule: BlockSizeAndReblock.

RewriteMarkLoopVariablesUpdateInPlace

Rule: Mark loop variables that are only read/updated through cp left indexing
 for update in-place.

RewriteMatrixMultChainOptimization

Rule: Determine the optimal order of execution for a chain of
 matrix multiplications

 Solution: Classic Dynamic Programming
 Approach: Currently, the approach based only on matrix dimensions
 Goal: To reduce the number of computations in the run-time
 (map-reduce) layer

RewriteMatrixMultChainOptimizationSparse

Rule: Determine the optimal order of execution for a chain of
 matrix multiplications

 Solution: Classic Dynamic Programming
 Approach: Currently, the approach based only on matrix dimensions
 and sparsity estimates using the MNC sketch
 Goal: To reduce the number of computations in the run-time
 (map-reduce) layer

RewriteMergeBlockSequence

Rule: Simplify program structure by merging sequences of last-level
 statement blocks in order to create optimization opportunities.

RewriteRemoveDanglingParentReferences

This rewrite is a general-purpose cleanup pass that removes any
 dangling parent references in one pass through the hop DAG.

RewriteRemoveEmptyBasicBlocks

Rule: Simplify program structure by removing empty last-level blocks,
 which may originate from the original program or due to a sequence of
 rewrites (e.g., checkpoint injection and subsequent IPA).

RewriteRemoveForLoopEmptySequence

Rule: Simplify program structure by removing (par)for statements iterating over
 an empty sequence, i.e., (par)for-loops without a single iteration.

RewriteRemovePersistentReadWrite

This rewrite is a custom rewrite for JMLC in order to replace all persistent reads
 and writes with transient reads and writes from the symbol table.

RewriteRemoveReadAfterWrite

Rule: RemoveReadAfterWrite.

RewriteRemoveUnnecessaryBranches

Rule: Simplify program structure by pulling if or else statement body out
 (removing the if statement block ifself) in order to allow intra-procedure
 analysis to propagate exact statistics.

RewriteRemoveUnnecessaryCasts

Rule: RemoveUnnecessaryCasts.

RewriteSplitDagDataDependentOperators

Rule: Split Hop DAG after specific data-dependent operators.

RewriteSplitDagUnknownCSVRead

Rule: Split Hop DAG after CSV reads with unknown size.

RewriteTransientWriteParentHandling

Rule: Eliminate for Transient Write DataHops to have no parents
 Solution: Move parent edges of Transient Write Hop to parent of
 its child
 Reason: Transient Write not being a root messes up
 analysis for Lop's to Instruction translation (according to Amol)

StatementBlockRewriteRule

Base class for all hop rewrites in order to enable generic
 application of all rules.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

All Classes

JavaScript is disabled on your browser.

Copyright © 2021 The Apache Software Foundation. All rights reserved.


[![npm version](https://badge.fury.io/js/snowscape.svg)](https://badge.fury.io/js/snowscape)

install

```
$ npm i -g snowscape
```

execute

```
$ snowscape
```


import React from 'react';

class Home extends React.Component {
  render() {
    return (

Events at Hacker Dojo

    );
  }
}

export default Home;


<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
        android:id="@+id/textAbout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:scrollbars="vertical"
        android:textAppearance="?android:attr/textAppearanceSmall"
        android:textSize="10sp" />

</FrameLayout>


require 'spec_helper'
require 'whois/parsers/whois.domain-registry.nl.rb'

describe Whois::Parsers::WhoisDomainRegistryNl, "property_nameservers_with_ip.expected" do

  subject do
    file = fixture("responses", "whois.domain-registry.nl/nl/property_nameservers_with_ip.txt")
    part = Whois::Record::Part.new(body: File.read(file))
    described_class.new(part)
  end

  describe "#nameservers" do
    it do
      expect(subject.nameservers).to be_a(Array)
      expect(subject.nameservers.size).to eq(2)
      expect(subject.nameservers[0]).to be_a(Whois::Parser::Nameserver)
      expect(subject.nameservers[0].name).to eq("ns1.tntpost.nl")
      expect(subject.nameservers[0].ipv4).to eq("145.78.21.10")
      expect(subject.nameservers[1]).to be_a(Whois::Parser::Nameserver)
      expect(subject.nameservers[1].name).to eq("ns2.tntpost.nl")
      expect(subject.nameservers[1].ipv4).to eq("80.69.76.10")
    end
  end
end


/* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */

#define VTK_WRAPPING_CXX
#define VTK_STREAMS_FWD_ONLY
#include <nan.h>

#include "vtkInteractorStyleWrap.h"
#include "vtkInteractorStyleSwitchBaseWrap.h"
#include "vtkObjectBaseWrap.h"
#include "vtkRenderWindowInteractorWrap.h"
#include "../../plus/plus.h"

using namespace v8;

extern Nan::Persistent<v8::Object> vtkNodeJsNoWrap;
Nan::Persistent<v8::FunctionTemplate> VtkInteractorStyleSwitchBaseWrap::ptpl;

VtkInteractorStyleSwitchBaseWrap::VtkInteractorStyleSwitchBaseWrap()
{ }

VtkInteractorStyleSwitchBaseWrap::VtkInteractorStyleSwitchBaseWrap(vtkSmartPointer<vtkInteractorStyleSwitchBase> _native)
{ native = _native; }

VtkInteractorStyleSwitchBaseWrap::~VtkInteractorStyleSwitchBaseWrap()
{ }

void VtkInteractorStyleSwitchBaseWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkInteractorStyleSwitchBase").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("InteractorStyleSwitchBase").ToLocalChecked(), ConstructorGetter);
}

void VtkInteractorStyleSwitchBaseWrap::ConstructorGetter(
	v8::Local<v8::String> property,
	const Nan::PropertyCallbackInfo<v8::Value>& info)
{
	InitPtpl();
	info.GetReturnValue().Set(Nan::New(ptpl)->GetFunction());
}

void VtkInteractorStyleSwitchBaseWrap::InitPtpl()
{
	if (!ptpl.IsEmpty()) return;
	v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
	VtkInteractorStyleWrap::InitPtpl( );
	tpl->Inherit(Nan::New<FunctionTemplate>(VtkInteractorStyleWrap::ptpl));
	tpl->SetClassName(Nan::New("VtkInteractorStyleSwitchBaseWrap").ToLocalChecked());
	tpl->InstanceTemplate()->SetInternalFieldCount(1);

	Nan::SetPrototypeMethod(tpl, "GetInteractor", GetInteractor);
	Nan::SetPrototypeMethod(tpl, "getInteractor", GetInteractor);

	Nan::SetPrototypeMethod(tpl, "NewInstance", NewInstance);
	Nan::SetPrototypeMethod(tpl, "newInstance", NewInstance);

	Nan::SetPrototypeMethod(tpl, "SafeDownCast", SafeDownCast);
	Nan::SetPrototypeMethod(tpl, "safeDownCast", SafeDownCast);

#ifdef VTK_NODE_PLUS_VTKINTERACTORSTYLESWITCHBASEWRAP_INITPTPL
	VTK_NODE_PLUS_VTKINTERACTORSTYLESWITCHBASEWRAP_INITPTPL
#endif
	ptpl.Reset( tpl );
}

void VtkInteractorStyleSwitchBaseWrap::New(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	if(!info.IsConstructCall())
	{
		Nan::ThrowError("Constructor not called in a construct call.");
		return;
	}

	if(info.Length() == 0)
	{
		vtkSmartPointer<vtkInteractorStyleSwitchBase> native = vtkSmartPointer<vtkInteractorStyleSwitchBase>::New();
		VtkInteractorStyleSwitchBaseWrap* obj = new VtkInteractorStyleSwitchBaseWrap(native);
		obj->Wrap(info.This());
	}
	else
	{
		if(info[0]->ToObject() != vtkNodeJsNoWrap )
		{
			Nan::ThrowError("Parameter Error");
			return;
		}
	}

	info.GetReturnValue().Set(info.This());
}

void VtkInteractorStyleSwitchBaseWrap::GetInteractor(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkInteractorStyleSwitchBaseWrap *wrapper = ObjectWrap::Unwrap<VtkInteractorStyleSwitchBaseWrap>(info.Holder());
	vtkInteractorStyleSwitchBase *native = (vtkInteractorStyleSwitchBase *)wrapper->native.GetPointer();
	vtkRenderWindowInteractor * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetInteractor();
	VtkRenderWindowInteractorWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkRenderWindowInteractorWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkRenderWindowInteractorWrap *w = new VtkRenderWindowInteractorWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkInteractorStyleSwitchBaseWrap::NewInstance(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkInteractorStyleSwitchBaseWrap *wrapper = ObjectWrap::Unwrap<VtkInteractorStyleSwitchBaseWrap>(info.Holder());
	vtkInteractorStyleSwitchBase *native = (vtkInteractorStyleSwitchBase *)wrapper->native.GetPointer();
	vtkInteractorStyleSwitchBase * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->NewInstance();
	VtkInteractorStyleSwitchBaseWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkInteractorStyleSwitchBaseWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkInteractorStyleSwitchBaseWrap *w = new VtkInteractorStyleSwitchBaseWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkInteractorStyleSwitchBaseWrap::SafeDownCast(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkInteractorStyleSwitchBaseWrap *wrapper = ObjectWrap::Unwrap<VtkInteractorStyleSwitchBaseWrap>(info.Holder());
	vtkInteractorStyleSwitchBase *native = (vtkInteractorStyleSwitchBase *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkObjectBaseWrap::ptpl))->HasInstance(info[0]))
	{
		VtkObjectBaseWrap *a0 = ObjectWrap::Unwrap<VtkObjectBaseWrap>(info[0]->ToObject());
		vtkInteractorStyleSwitchBase * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->SafeDownCast(
			(vtkObjectBase *) a0->native.GetPointer()
		);
		VtkInteractorStyleSwitchBaseWrap::InitPtpl();
		v8::Local<v8::Value> argv[1] =
			{ Nan::New(vtkNodeJsNoWrap) };
		v8::Local<v8::Function> cons =
			Nan::New<v8::FunctionTemplate>(VtkInteractorStyleSwitchBaseWrap::ptpl)->GetFunction();
		v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
		VtkInteractorStyleSwitchBaseWrap *w = new VtkInteractorStyleSwitchBaseWrap();
		w->native = r;
		w->Wrap(wo);
		info.GetReturnValue().Set(wo);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}


package org.hisp.dhis.mock.batchhandler;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;

import org.amplecode.quick.BatchHandler;
import org.amplecode.quick.JdbcConfiguration;

/**
 * @author Lars Helge Overland
 */
public class MockBatchHandler<T>
    implements BatchHandler<T>
{
    private List<T> inserts = new ArrayList<>();
    private List<T> updates = new ArrayList<>();
    private List<T> deletes = new ArrayList<>();

    @Override
    public BatchHandler<T> init()
    {
        return this;
    }

    @Override
    public JdbcConfiguration getConfiguration()
    {
        return null;
    }

    @Override
    public BatchHandler<T> setTableName( String name )
    {
        return this;
    }

    @Override
    public boolean addObject( T object )
    {
        return inserts.add( object );
    }

    @Override
    public int insertObject( T object, boolean returnGeneratedIdentifier )
    {
        inserts.add( object );
        return 0;
    }

    @Override
    public void updateObject( T object )
    {
        updates.add( object );
    }

    @Override
    public void deleteObject( T object )
    {
        deletes.add( object );
    }

    @Override
    public boolean objectExists( T object )
    {
        return false;
    }

    @Override
    public int getObjectIdentifier( Object object )
    {
        return 0;
    }

    @Override
    public Collection<Integer> flush()
    {
        return new HashSet<>();
    }

    public List<T> getInserts()
    {
        return inserts;
    }

    public List<T> getUpdates()
    {
        return updates;
    }

    public List<T> getDeletes()
    {
        return deletes;
    }
}


<?xml version="1.0" encoding="UTF-8"?>
<sem:triples xmlns:sem="http://marklogic.com/semantics">
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/cpg/faith-in-the-lord-jesus-christ</sem:subject>
    <sem:predicate>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</sem:predicate>
    <sem:object datatype="sem:iri">http://www.w3.org/2004/02/skos/core#Concept</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/cpg/faith-in-the-lord-jesus-christ</sem:subject>
    <sem:predicate>http://www.w3.org/2004/02/skos/core#inScheme</sem:predicate>
    <sem:object datatype="sem:iri">http://www.lds.org/concept-scheme/curriculum-planning-guide</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/cpg/faith-in-the-lord-jesus-christ</sem:subject>
    <sem:predicate>http://www.w3.org/2004/02/skos/core#prefLabel</sem:predicate>
    <sem:object xml:lang="eng" datatype="xsd:string">Faith in the Lord Jesus Christ</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/cpg/faith-in-the-lord-jesus-christ</sem:subject>
    <sem:predicate>http://www.w3.org/2004/02/skos/core#narrower</sem:predicate>
    <sem:object datatype="sem:iri">http://www.lds.org/concept/cpg/principles-ordinances-and-covenants-of-the-gospel</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/concept/cpg/faith-in-the-lord-jesus-christ</sem:subject>
    <sem:predicate>http://www.lds.org/core#relCount</sem:predicate>
    <sem:object datatype="xsd:integer">1</sem:object>
  </sem:triple>
</sem:triples>


package com.f2prateek.couchpotato.ui.debug;

import android.app.Activity;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.ViewDebug;
import com.f2prateek.couchpotato.ui.ActivityHierarchyServer;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.lang.reflect.Method;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.HashMap;
import java.util.List;
import java.util.Map.Entry;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.locks.ReentrantReadWriteLock;

/**
 *
This class can be used to enable the use of HierarchyViewer inside an
 * application. HierarchyViewer is an Android SDK tool that can be used
 * to inspect and debug the user interface of running applications. For
 * security reasons, HierarchyViewer does not work on production builds
 * (for instance phones bought in store.) By using this class, you can
 * make HierarchyViewer work on any device. You must be very careful
 * however to only enable HierarchyViewer when debugging your
 * application.

 *
 *
To use this view server, your application must require the INTERNET
 * permission.

 */
public class SocketActivityHierarchyServer implements Runnable, ActivityHierarchyServer {
  /**
   * The default port used to start view servers.
   */
  private static final int VIEW_SERVER_DEFAULT_PORT = 4939;
  private static final int VIEW_SERVER_MAX_CONNECTIONS = 10;

  private static final String LOG_TAG = "SocketActivityHierarchyServer";

  private static final String VALUE_PROTOCOL_VERSION = "4";
  private static final String VALUE_SERVER_VERSION = "4";

  // Protocol commands
  // Returns the protocol version
  private static final String COMMAND_PROTOCOL_VERSION = "PROTOCOL";
  // Returns the server version
  private static final String COMMAND_SERVER_VERSION = "SERVER";
  // Lists all of the available windows in the system
  private static final String COMMAND_WINDOW_MANAGER_LIST = "LIST";
  // Keeps a connection open and notifies when the list of windows changes
  private static final String COMMAND_WINDOW_MANAGER_AUTOLIST = "AUTOLIST";
  // Returns the focused window
  private static final String COMMAND_WINDOW_MANAGER_GET_FOCUS = "GET_FOCUS";

  private ServerSocket mServer;
  private final int mPort;

  private Thread mThread;
  private ExecutorService mThreadPool;

  private final List<WindowListener> mListeners = new CopyOnWriteArrayList<>();

  private final HashMap<View, String> mWindows = new HashMap<>();
  private final ReentrantReadWriteLock mWindowsLock = new ReentrantReadWriteLock();

  private View mFocusedWindow;
  private final ReentrantReadWriteLock mFocusLock = new ReentrantReadWriteLock();

  /**
   * Creates a new ActivityHierarchyServer associated with the specified window manager on the
   * default local port. The server is not started by default.
   *
   * @see #start()
   */
  public SocketActivityHierarchyServer() {
    mPort = SocketActivityHierarchyServer.VIEW_SERVER_DEFAULT_PORT;
  }

  /**
   * Starts the server.
   *
   * @return True if the server was successfully created, or false if it already exists.
   * @throws java.io.IOException If the server cannot be created.
   */
  public boolean start() throws IOException {
    if (mThread != null) {
      return false;
    }

    mThread = new Thread(this, "Local View Server [port=" + mPort + "]");
    mThreadPool = Executors.newFixedThreadPool(VIEW_SERVER_MAX_CONNECTIONS);
    mThread.start();

    return true;
  }

  @Override public void onActivityCreated(Activity activity, Bundle bundle) {
    String name = activity.getTitle().toString();
    if (TextUtils.isEmpty(name)) {
      name = activity.getClass().getCanonicalName() //
          + "/0x" + System.identityHashCode(activity);
    } else {
      name += " (" + activity.getClass().getCanonicalName() + ")";
    }
    mWindowsLock.writeLock().lock();
    try {
      mWindows.put(activity.getWindow().getDecorView().getRootView(), name);
    } finally {
      mWindowsLock.writeLock().unlock();
    }
    fireWindowsChangedEvent();
  }

  @Override public void onActivityStarted(Activity activity) {
  }

  @Override public void onActivityResumed(Activity activity) {
    View view = activity.getWindow().getDecorView();
    mFocusLock.writeLock().lock();
    try {
      mFocusedWindow = view == null ? null : view.getRootView();
    } finally {
      mFocusLock.writeLock().unlock();
    }
    fireFocusChangedEvent();
  }

  @Override public void onActivityPaused(Activity activity) {
  }

  @Override public void onActivityStopped(Activity activity) {
  }

  @Override public void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
  }

  @Override public void onActivityDestroyed(Activity activity) {
    mWindowsLock.writeLock().lock();
    try {
      mWindows.remove(activity.getWindow().getDecorView().getRootView());
    } finally {
      mWindowsLock.writeLock().unlock();
    }
    fireWindowsChangedEvent();
  }

  public void run() {
    try {
      mServer = new ServerSocket(mPort, VIEW_SERVER_MAX_CONNECTIONS, InetAddress.getLocalHost());
    } catch (Exception e) {
      Log.w(LOG_TAG, "Starting ServerSocket error: ", e);
    }

    while (mServer != null && Thread.currentThread() == mThread) {
      // Any uncaught exception will crash the system process
      try {
        Socket client = mServer.accept();
        if (mThreadPool != null) {
          mThreadPool.submit(new ViewServerWorker(client));
        } else {
          try {
            client.close();
          } catch (IOException e) {
            e.printStackTrace();
          }
        }
      } catch (Exception e) {
        Log.w(LOG_TAG, "Connection error: ", e);
      }
    }
  }

  private static boolean writeValue(Socket client, String value) {
    boolean result;
    BufferedWriter out = null;
    try {
      OutputStream clientStream = client.getOutputStream();
      out = new BufferedWriter(new OutputStreamWriter(clientStream), 8 * 1024);
      out.write(value);
      out.write("\n");
      out.flush();
      result = true;
    } catch (Exception e) {
      result = false;
    } finally {
      if (out != null) {
        try {
          out.close();
        } catch (IOException e) {
          result = false;
        }
      }
    }
    return result;
  }

  private void fireWindowsChangedEvent() {
    for (WindowListener listener : mListeners) {
      listener.windowsChanged();
    }
  }

  private void fireFocusChangedEvent() {
    for (WindowListener listener : mListeners) {
      listener.focusChanged();
    }
  }

  private void addWindowListener(WindowListener listener) {
    if (!mListeners.contains(listener)) {
      mListeners.add(listener);
    }
  }

  private void removeWindowListener(WindowListener listener) {
    mListeners.remove(listener);
  }

  private interface WindowListener {
    void windowsChanged();

    void focusChanged();
  }

  private static class UncloseableOutputStream extends OutputStream {
    private final OutputStream mStream;

    UncloseableOutputStream(OutputStream stream) {
      mStream = stream;
    }

    public void close() throws IOException {
      // Don't close the stream
    }

    public boolean equals(Object o) {
      return mStream.equals(o);
    }

    public void flush() throws IOException {
      mStream.flush();
    }

    public int hashCode() {
      return mStream.hashCode();
    }

    public String toString() {
      return mStream.toString();
    }

    public void write(byte[] buffer, int offset, int count) throws IOException {
      mStream.write(buffer, offset, count);
    }

    public void write(byte[] buffer) throws IOException {
      mStream.write(buffer);
    }

    public void write(int oneByte) throws IOException {
      mStream.write(oneByte);
    }
  }

  private class ViewServerWorker implements Runnable, WindowListener {
    private Socket mClient;
    private boolean mNeedWindowListUpdate;
    private boolean mNeedFocusedWindowUpdate;

    private final Object[] mLock = new Object[0];

    public ViewServerWorker(Socket client) {
      mClient = client;
      mNeedWindowListUpdate = false;
      mNeedFocusedWindowUpdate = false;
    }

    public void run() {
      BufferedReader in = null;
      try {
        in = new BufferedReader(new InputStreamReader(mClient.getInputStream()), 1024);

        final String request = in.readLine();

        String command;
        String parameters;

        int index = request.indexOf(' ');
        if (index == -1) {
          command = request;
          parameters = "";
        } else {
          command = request.substring(0, index);
          parameters = request.substring(index + 1);
        }

        boolean result;
        if (COMMAND_PROTOCOL_VERSION.equalsIgnoreCase(command)) {
          result = writeValue(mClient, VALUE_PROTOCOL_VERSION);
        } else if (COMMAND_SERVER_VERSION.equalsIgnoreCase(command)) {
          result = writeValue(mClient, VALUE_SERVER_VERSION);
        } else if (COMMAND_WINDOW_MANAGER_LIST.equalsIgnoreCase(command)) {
          result = listWindows(mClient);
        } else if (COMMAND_WINDOW_MANAGER_GET_FOCUS.equalsIgnoreCase(command)) {
          result = getFocusedWindow(mClient);
        } else if (COMMAND_WINDOW_MANAGER_AUTOLIST.equalsIgnoreCase(command)) {
          result = windowManagerAutolistLoop();
        } else {
          result = windowCommand(mClient, command, parameters);
        }

        if (!result) {
          Log.w(LOG_TAG, "An error occurred with the command: " + command);
        }
      } catch (IOException e) {
        Log.w(LOG_TAG, "Connection error: ", e);
      } finally {
        if (in != null) {
          try {
            in.close();
          } catch (IOException e) {
            e.printStackTrace();
          }
        }
        if (mClient != null) {
          try {
            mClient.close();
          } catch (IOException e) {
            e.printStackTrace();
          }
        }
      }
    }

    private boolean windowCommand(Socket client, String command, String parameters) {
      boolean success = true;
      BufferedWriter out = null;

      try {
        // Find the hash code of the window
        int index = parameters.indexOf(' ');
        if (index == -1) {
          index = parameters.length();
        }
        final String code = parameters.substring(0, index);
        int hashCode = (int) Long.parseLong(code, 16);

        // Extract the command's parameter after the window description
        if (index < parameters.length()) {
          parameters = parameters.substring(index + 1);
        } else {
          parameters = "";
        }

        final View window = findWindow(hashCode);
        if (window == null) {
          return false;
        }

        // call stuff
        final Method dispatch =
            ViewDebug.class.getDeclaredMethod("dispatchCommand", View.class, String.class,
                String.class, OutputStream.class);
        dispatch.setAccessible(true);
        dispatch.invoke(null, window, command, parameters,
            new UncloseableOutputStream(client.getOutputStream()));

        if (!client.isOutputShutdown()) {
          out = new BufferedWriter(new OutputStreamWriter(client.getOutputStream()));
          out.write("DONE\n");
          out.flush();
        }
      } catch (Exception e) {
        Log.w(LOG_TAG, "Could not send command " + command //
            + " with parameters " + parameters, e);
        success = false;
      } finally {
        if (out != null) {
          try {
            out.close();
          } catch (IOException e) {
            success = false;
          }
        }
      }

      return success;
    }

    private View findWindow(int hashCode) {
      if (hashCode == -1) {
        View window = null;
        mWindowsLock.readLock().lock();
        try {
          window = mFocusedWindow;
        } finally {
          mWindowsLock.readLock().unlock();
        }
        return window;
      }

      mWindowsLock.readLock().lock();
      try {
        for (Entry<View, String> entry : mWindows.entrySet()) {
          if (System.identityHashCode(entry.getKey()) == hashCode) {
            return entry.getKey();
          }
        }
      } finally {
        mWindowsLock.readLock().unlock();
      }

      return null;
    }

    private boolean listWindows(Socket client) {
      boolean result = true;
      BufferedWriter out = null;

      try {
        mWindowsLock.readLock().lock();

        OutputStream clientStream = client.getOutputStream();
        out = new BufferedWriter(new OutputStreamWriter(clientStream), 8 * 1024);

        for (Entry<View, String> entry : mWindows.entrySet()) {
          out.write(Integer.toHexString(System.identityHashCode(entry.getKey())));
          out.write(' ');
          out.append(entry.getValue());
          out.write('\n');
        }

        out.write("DONE.\n");
        out.flush();
      } catch (Exception e) {
        result = false;
      } finally {
        mWindowsLock.readLock().unlock();

        if (out != null) {
          try {
            out.close();
          } catch (IOException e) {
            result = false;
          }
        }
      }

      return result;
    }

    private boolean getFocusedWindow(Socket client) {
      boolean result = true;
      String focusName = null;

      BufferedWriter out = null;
      try {
        OutputStream clientStream = client.getOutputStream();
        out = new BufferedWriter(new OutputStreamWriter(clientStream), 8 * 1024);

        View focusedWindow = null;

        mFocusLock.readLock().lock();
        try {
          focusedWindow = mFocusedWindow;
        } finally {
          mFocusLock.readLock().unlock();
        }

        if (focusedWindow != null) {
          mWindowsLock.readLock().lock();
          try {
            focusName = mWindows.get(mFocusedWindow);
          } finally {
            mWindowsLock.readLock().unlock();
          }

          out.write(Integer.toHexString(System.identityHashCode(focusedWindow)));
          out.write(' ');
          out.append(focusName);
        }
        out.write('\n');
        out.flush();
      } catch (Exception e) {
        result = false;
      } finally {
        if (out != null) {
          try {
            out.close();
          } catch (IOException e) {
            result = false;
          }
        }
      }

      return result;
    }

    public void windowsChanged() {
      synchronized (mLock) {
        mNeedWindowListUpdate = true;
        mLock.notifyAll();
      }
    }

    public void focusChanged() {
      synchronized (mLock) {
        mNeedFocusedWindowUpdate = true;
        mLock.notifyAll();
      }
    }

    private boolean windowManagerAutolistLoop() {
      addWindowListener(this);
      BufferedWriter out = null;
      try {
        out = new BufferedWriter(new OutputStreamWriter(mClient.getOutputStream()));
        while (!Thread.interrupted()) {
          boolean needWindowListUpdate = false;
          boolean needFocusedWindowUpdate = false;
          synchronized (mLock) {
            while (!mNeedWindowListUpdate && !mNeedFocusedWindowUpdate) {
              mLock.wait();
            }
            if (mNeedWindowListUpdate) {
              mNeedWindowListUpdate = false;
              needWindowListUpdate = true;
            }
            if (mNeedFocusedWindowUpdate) {
              mNeedFocusedWindowUpdate = false;
              needFocusedWindowUpdate = true;
            }
          }
          if (needWindowListUpdate) {
            out.write("LIST UPDATE\n");
            out.flush();
          }
          if (needFocusedWindowUpdate) {
            out.write("FOCUS UPDATE\n");
            out.flush();
          }
        }
      } catch (Exception e) {
        Log.w(LOG_TAG, "Connection error: ", e);
      } finally {
        if (out != null) {
          try {
            out.close();
          } catch (IOException e) {
            // Ignore
          }
        }
        removeWindowListener(this);
      }
      return true;
    }
  }
}


<!DOCTYPE html>

  <meta charset="UTF-8">
  <title>Bullseye</title>

  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.0/css/materialize.min.css" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
  <link href="style.css" rel="stylesheet">


use inventory_vector::InventoryVector;
use {Encode, VarInt};

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn it_implements_types_required_for_protocol() {
        let m =  InvMessage::default();
        assert_eq!(m.name(), "inv");
        assert_eq!(m.len(), 8);
    }
}
#[derive(Debug, Default, Encode, PartialEq)]
pub struct InvMessage {
    #[count]
    pub inventory: Vec<InventoryVector>,
}

impl InvMessage {
    #[inline]
    pub fn len(&self) -> usize {
        8 + (36 * self.inventory.len())
    }

    #[inline]
    pub fn name(&self) -> &'static str {
        "inv"
    }
}


/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class mil_navy_nrl_norm_NormStream */

#ifndef _Included_mil_navy_nrl_norm_NormStream
#define _Included_mil_navy_nrl_norm_NormStream
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class:     mil_navy_nrl_norm_NormStream
 * Method:    close
 * Signature: (Z)V
 */
JNIEXPORT void JNICALL Java_mil_navy_nrl_norm_NormStream_close
  (JNIEnv *, jobject, jboolean);

/*
 * Class:     mil_navy_nrl_norm_NormStream
 * Method:    write
 * Signature: ([BII)I
 */
JNIEXPORT jint JNICALL Java_mil_navy_nrl_norm_NormStream_write
  (JNIEnv *, jobject, jbyteArray, jint, jint);

/*
 * Class:     mil_navy_nrl_norm_NormStream
 * Method:    flush
 * Signature: (ZLmil/navy/nrl/norm/enums/NormFlushMode;)V
 */
JNIEXPORT void JNICALL Java_mil_navy_nrl_norm_NormStream_flush
  (JNIEnv *, jobject, jboolean, jobject);

/*
 * Class:     mil_navy_nrl_norm_NormStream
 * Method:    setAutoFlush
 * Signature: (Lmil/navy/nrl/norm/enums/NormFlushMode;)V
 */
JNIEXPORT void JNICALL Java_mil_navy_nrl_norm_NormStream_setAutoFlush
  (JNIEnv *, jobject, jobject);

/*
 * Class:     mil_navy_nrl_norm_NormStream
 * Method:    setPushEnable
 * Signature: (Z)V
 */
JNIEXPORT void JNICALL Java_mil_navy_nrl_norm_NormStream_setPushEnable
  (JNIEnv *, jobject, jboolean);

/*
 * Class:     mil_navy_nrl_norm_NormStream
 * Method:    hasVacancy
 * Signature: ()Z
 */
JNIEXPORT jboolean JNICALL Java_mil_navy_nrl_norm_NormStream_hasVacancy
  (JNIEnv *, jobject);

/*
 * Class:     mil_navy_nrl_norm_NormStream
 * Method:    markEom
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_mil_navy_nrl_norm_NormStream_markEom
  (JNIEnv *, jobject);

/*
 * Class:     mil_navy_nrl_norm_NormStream
 * Method:    read
 * Signature: ([BII)I
 */
JNIEXPORT jint JNICALL Java_mil_navy_nrl_norm_NormStream_read
  (JNIEnv *, jobject, jbyteArray, jint, jint);

/*
 * Class:     mil_navy_nrl_norm_NormStream
 * Method:    seekMsgStart
 * Signature: ()Z
 */
JNIEXPORT jboolean JNICALL Java_mil_navy_nrl_norm_NormStream_seekMsgStart
  (JNIEnv *, jobject);

/*
 * Class:     mil_navy_nrl_norm_NormStream
 * Method:    getReadOffset
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_mil_navy_nrl_norm_NormStream_getReadOffset
  (JNIEnv *, jobject);

#ifdef __cplusplus
}
#endif
#endif


<!DOCTYPE html>

    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="Date-Revision-yyyymmdd" content="20160727" />
    <meta http-equiv="Content-Language" content="en" />
    <title>PMD JavaScript – Surefire Report</title>
    <link rel="stylesheet" href="./css/apache-maven-fluido-1.4.min.css" />
    <link rel="stylesheet" href="./css/site.css" />
    <link rel="stylesheet" href="./css/print.css" media="print" />

        Parent Project

      PMD

        Rule Sets

                                      ecmascript

      Basic Ecmascript

      Braces

      Controversial Ecmascript

      Unnecessary

        Project Documentation

                                      Project Information

      Project Summary

      Dependencies

      Dependency Convergence

      Dependency Information

      Dependency Management

      Plugin Management

      Project Plugins

      Project Team

      Mailing Lists

      Continuous Integration

      Issue Tracking

      Project License

      Source Repository

                                      Project Reports

      Source Xref

      Test Source Xref

      JavaDocs

      Test JavaDocs

      CPD

      Checkstyle

      Surefire Report

      JaCoCo Test

      Dependency Updates Report

      Plugin Updates Report

      Property Updates Report

                External Links

      SourceForge.net Project Page

      Hosted by SourceForge

Last Published: 2016-07-27
                      |

Version: 5.5.1
                          |

        SourceForge
                    /

        PMD
                    /

        PMD JavaScript
                    /

Surefire Report

Parent Project

        PMD

Rule Sets

        ecmascript

        Basic Ecmascript

        Braces

        Controversial Ecmascript

        Unnecessary

Project Documentation

        Project Information

        Project Reports

        Source Xref

        Test Source Xref

        JavaDocs

        Test JavaDocs

        CPD

        Checkstyle

            Surefire Report

        JaCoCo Test

        Dependency Updates Report

        Plugin Updates Report

        Property Updates Report

Surefire Report

Summary

[Summary] [Package List] [Test Cases]

Tests
Errors
Failures
Skipped
Success Rate
Time

135
0
0
0
100%
3.283

Note: failures are anticipated and checked for with assertions while errors are unanticipated.

Package List

[Summary] [Package List] [Test Cases]

Package
Tests
Errors
Failures
Skipped
Success Rate
Time

net.sourceforge.pmd.lang.ecmascript.rule.braces
21
0
0
0
100%
0.045

net.sourceforge.pmd.lang.ecmascript.rule.basic
54
0
0
0
100%
0.486

net.sourceforge.pmd.lang.ecmascript.ast
14
0
0
0
100%
0.076

net.sourceforge.pmd.ant
1
0
0
0
100%
1.142

net.sourceforge.pmd.cpd
7
0
0
0
100%
0.146

net.sourceforge.pmd
8
0
0
0
100%
1.035

net.sourceforge.pmd.lang.ecmascript.rule.unnecessary
24
0
0
0
100%
0.156

net.sourceforge.pmd.lang.ecmascript.rule.controversial
1
0
0
0
100%
0.002

net.sourceforge.pmd.lang.ecmascript
4
0
0
0
100%
0.002

net.sourceforge.pmd.cli
1
0
0
0
100%
0.193

Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.

net.sourceforge.pmd.lang.ecmascript.rule.braces

Class
Tests
Errors
Failures
Skipped
Success Rate
Time

BracesRulesTest
21
0
0
0
100%
0.045

net.sourceforge.pmd.lang.ecmascript.rule.basic

Class
Tests
Errors
Failures
Skipped
Success Rate
Time

BasicRulesTest
54
0
0
0
100%
0.486

net.sourceforge.pmd.lang.ecmascript.ast

Class
Tests
Errors
Failures
Skipped
Success Rate
Time

EcmascriptParserTest
8
0
0
0
100%
0.044

ASTFunctionNodeTest
2
0
0
0
100%
0.019

ASTTryStatementTest
4
0
0
0
100%
0.013

net.sourceforge.pmd.ant

Class
Tests
Errors
Failures
Skipped
Success Rate
Time

PMDTaskTest
1
0
0
0
100%
1.142

net.sourceforge.pmd.cpd

Class
Tests
Errors
Failures
Skipped
Success Rate
Time

EcmascriptTokenizerTest
5
0
0
0
100%
0.053

CPDCommandLineInterfaceTest
2
0
0
0
100%
0.093

net.sourceforge.pmd

Class
Tests
Errors
Failures
Skipped
Success Rate
Time

ReportTest
1
0
0
0
100%
0.418

LanguageVersionTest
3
0
0
0
100%
0.012

RuleSetFactoryTest
4
0
0
0
100%
0.605

net.sourceforge.pmd.lang.ecmascript.rule.unnecessary

Class
Tests
Errors
Failures
Skipped
Success Rate
Time

UnnecessaryRulesTest
24
0
0
0
100%
0.156

net.sourceforge.pmd.lang.ecmascript.rule.controversial

Class
Tests
Errors
Failures
Skipped
Success Rate
Time

ControversialRulesTest
1
0
0
0
100%
0.002

net.sourceforge.pmd.lang.ecmascript

Class
Tests
Errors
Failures
Skipped
Success Rate
Time

EcmascriptParserOptionsTest
4
0
0
0
100%
0.002

net.sourceforge.pmd.cli

Class
Tests
Errors
Failures
Skipped
Success Rate
Time

CLITest
1
0
0
0
100%
0.193

Test Cases

[Summary] [Package List] [Test Cases]

EcmascriptParserTest

testCaseAsIdentifier
0.001

testXorAssignment
0.024

testSuppresionComment
0.003

testArrayAccess
0.004

testArrayMethod
0.004

testVoidKeyword
0.001

testLineNumbers
0

testLineNumbersWithinEcmascriptRules
0.007

ASTFunctionNodeTest

testGetBodyFunctionClosureExpression
0.019

testGetBody
0

ReportTest

testExclusionsInReportWithNOPMDEcmascript
0.418

ASTTryStatementTest

testMultipleCatchAndFinallyBlock
0.006

testFinallyBlockOnly
0

testCatchAndFinallyBlock
0.005

testCatchBlockOnly
0.002

ControversialRulesTest

AvoidWithStatement::0 Basic case
0.002

PMDTaskTest

testEcmascript
1.142

CLITest

useEcmaScript
0.193

EcmascriptTokenizerTest

testIgnoreMultiLineComments
0.047

testIgnoreSingleLineComments
0.001

test1
0.002

test2
0.002

parseStringNotAsMultiline
0.001

BracesRulesTest

ForLoopsMustUseBraces::0 Ok
0.003

ForLoopsMustUseBraces::1 Ok, for in
0.004

ForLoopsMustUseBraces::2 Bad
0.003

ForLoopsMustUseBraces::3 Bad, no increment
0.002

ForLoopsMustUseBraces::4 Bad, no condition/increment
0.003

ForLoopsMustUseBraces::5 Bad, no initializer/condition/increment
0.002

ForLoopsMustUseBraces::6 Bad, for in
0.003

IfElseStmtsMustUseBraces::0 Ok, if/else
0.003

IfElseStmtsMustUseBraces::1 Ok, if/else if/else
0

IfElseStmtsMustUseBraces::2 Ok, if without braces
0

IfElseStmtsMustUseBraces::3 Ok, nest if without braces
0

IfElseStmtsMustUseBraces::4 Bad, if/else with else missing braces
0

IfElseStmtsMustUseBraces::5 Bad, if/else with if and else missing braces
0

IfElseStmtsMustUseBraces::6 Bad, if/else if/else, with else missing braces
0.001

IfElseStmtsMustUseBraces::7 Bad, if/else if/else, with else if and else missing braces
0.004

IfElseStmtsMustUseBraces::8 Bad, if/else if/else, with if and else if and else missing braces
0.003

IfStmtsMustUseBraces::0 Ok
0.003

IfStmtsMustUseBraces::1 Bad
0.003

IfStmtsMustUseBraces::2 Bad, nested
0.003

WhileLoopsMustUseBraces::0 Ok, with braces
0.003

WhileLoopsMustUseBraces::1 no braces
0.002

LanguageVersionTest

testRegisteredRulesets[0]
0.011

testFindVersionsForLanguageNameAndVersion[0]
0.001

testGetLanguageVersionForTerseName[0]
0

EcmascriptParserOptionsTest

testEqualsHashcode
0.002

testDefaults
0

testSetters
0

testConstructor
0

UnnecessaryRulesTest

NoElseReturn::0 Simple violation
0.018

NoElseReturn::1 Simple fix
0.006

NoElseReturn::2 No return in if
0.003

UnnecessaryBlock::0 Ok, function
0.003

UnnecessaryBlock::1 Ok, if
0.005

UnnecessaryBlock::2 Ok, for
0.009

UnnecessaryBlock::3 Ok, for in
0.01

UnnecessaryBlock::4 Ok, while
0.004

UnnecessaryBlock::5 Ok, do while
0.003

UnnecessaryBlock::6 Ok, switch
0.003

UnnecessaryBlock::7 Ok, try
0.003

UnnecessaryBlock::8 Bad, global
0.002

UnnecessaryBlock::9 Bad, function
0.003

UnnecessaryBlock::10 Bad, if
0.003

UnnecessaryBlock::11 Bad, for
0.005

UnnecessaryBlock::12 Bad, for in
0.003

UnnecessaryBlock::13 Bad, while
0.008

UnnecessaryBlock::14 Bad, do while
0.017

UnnecessaryBlock::15 Bad, switch
0.008

UnnecessaryBlock::16 Bad, try
0.01

UnnecessaryParentheses::0 Ok, simple
0.002

UnnecessaryParentheses::1 Bad, simple
0.004

UnnecessaryParentheses::2 Ok, complex
0.002

UnnecessaryParentheses::3 Bad, complex
0.022

RuleSetFactoryTest

testDtd
0.055

testXmlSchema
0.04

testReadWriteRoundTrip
0.501

testAllPMDBuiltInRulesMeetConventions
0.009

BasicRulesTest

AssignmentInOperand::0 Ok, all cases
0.037

AssignmentInOperand::1 Bad, assignment, all cases
0.016

AssignmentInOperand::2 Ok, allow assignment, if
0.029

AssignmentInOperand::3 Ok, allow assignment, while
0.019

AssignmentInOperand::4 Ok, allow assignment, do
0.032

AssignmentInOperand::5 Ok, allow assignment, for
0

AssignmentInOperand::6 Ok, allow assignment, ternary
0.013

AssignmentInOperand::7 Ok, allow assignment, ternary results
0.03

AssignmentInOperand::8 Bad, increment/decrement, all cases
0

AssignmentInOperand::9 Ok, allow increment/decrement, all cases
0.017

AvoidTrailingComma::0 Ok, object literals
0.008

AvoidTrailingComma::1 Bad, object literals
0.016

AvoidTrailingComma::2 Bad, object literals, multi-line nested
0

AvoidTrailingComma::3 Bad, object literals, compressed nested
0.009

AvoidTrailingComma::4 Ok, allow object literals
0.006

AvoidTrailingComma::5 Ok, array literals
0.007

AvoidTrailingComma::6 Bad, array literals
0.006

AvoidTrailingComma::7 Bad, array literals, multi-line nested
0.006

AvoidTrailingComma::8 Bad, array literals, compressed nested
0.009

AvoidTrailingComma::9 Ok, allow array literals
0.007

ConsistentReturn::0 Ok, no return
0.005

ConsistentReturn::1 Ok, 1 return w/ result
0.013

ConsistentReturn::2 Ok, 1 return w/o result
0.005

ConsistentReturn::3 Ok, nested function with different return result
0.004

ConsistentReturn::4 Bad, mixed result
0.004

ConsistentReturn::5 Bad, mixed result with nested function
0.005

EqualComparison::0 Ok, all cases
0.005

EqualComparison::1 Bad, all cases
0.007

GlobalVariable::0 Ok, all cases
0.005

GlobalVariable::1 Bad, all cases
0.005

InnaccurateNumericLiteral::0 Ok integer
0.007

InnaccurateNumericLiteral::1 Bad integer
0.005

InnaccurateNumericLiteral::2 Ok float
0.006

InnaccurateNumericLiteral::3 Bad float
0.006

InnaccurateNumericLiteral::4 Ok float w/ exponent
0.005

InnaccurateNumericLiteral::5 Bad float w/ exponent
0.006

ScopeForInVariable::0 Ok, global scope
0.006

ScopeForInVariable::1 Ok, function scope
0.006

ScopeForInVariable::2 Ok, nested function
0.005

ScopeForInVariable::3 Bad, global scope
0.005

ScopeForInVariable::4 Bad, function scope
0.029

ScopeForInVariable::5 Bad, nested function
0.004

UnreachableCode::0 Ok, return
0.006

UnreachableCode::1 Ok, loop continue
0.009

UnreachableCode::2 Ok, loop break;
0.004

UnreachableCode::3 Ok, switch break
0.004

UnreachableCode::4 Ok, throw
0.014

UnreachableCode::5 Bad, return
0.008

UnreachableCode::6 Bad, loop continue
0.004

UnreachableCode::7 Bad, loop break;
0.003

UnreachableCode::8 Bad, switch break
0.006

UnreachableCode::9 Bad, throw
0.004

UseBaseWithParseInt::0 KO, missing the base argument
0.005

UseBaseWithParseInt::1 OK, have the appropriate 'base' parameter
0.004

CPDCommandLineInterfaceTest

shouldFindNoDuplicatesWithDifferentFileExtensions
0.057

shouldFindDuplicatesWithDifferentFileExtensions
0.036

Copyright ©                    2002–2016
                        InfoEther.
            All rights reserved.


package com.metamolecular.pubcouch.record;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Iterator;

/**
 *
 * @author Richard L. Apodaca <rapodaca at metamolecular.com>
 */
public class DefaultRecordStreamer implements RecordStreamer
{
  private BufferedReader reader;
  private InputStream stream;

  public DefaultRecordStreamer(InputStream stream)
  {
    this.stream = stream;
    this.reader = new BufferedReader(new InputStreamReader(stream));
  }

  public Iterator<Record> iterator()
  {
    return new RecordIterator();
  }

  private class RecordIterator implements Iterator
  {
    public boolean hasNext()
    {
      try
      {
        reader.mark(1);
        if (reader.read() != -1)
        {
          reader.reset();
          return true;
        }
      }
      catch (IOException e)
      {
        throw new RuntimeException("Error accessing the underlying datastream.", e);
      }

      return false;
    }

    public Object next()
    {
      Record result = null;

      try
      {
        result = new Record(reader);
      }
      catch(IOException e)
      {
        throw new RuntimeException(e);
      }

      return result;
    }

    public void remove()
    {
      throw new UnsupportedOperationException("Not supported yet.");
    }
  }
}


package org.leguan.testproject.language.java;

import java.util.Date;

public class ClassWithoutConstructor {

  public void hello () {

  }

}


var os = require('os'),
    fs = require('fs'),
    sys = require('util'),
    exec = require('child_process').exec;

function linux(brightness,callback){
	// Enumerate the backlight devices...
	fs.readdir('/sys/class/backlight', function(err, brightnessDevices){
		if(err) {
			console.error('Error while listing brightness devices. Maybe you need superuser privileges to run this script?');
			throw err;
		}

		var devicePath = '/sys/class/backlight/' + brightnessDevices[0];
		//Read the maximum for the first device
		fs.readFile(devicePath + '/max_brightness', function(err, maxBrightness){
			maxBrightness = parseInt(maxBrightness, 10)
			if(err) {
				console.error('Error while reading maximum brightness. Maybe you need superuser privileges to run this script?');
				throw err;
			}

			// Turn percent into the actual value we need
			var brightnessValue = Math.floor(brightness / 100 * maxBrightness);

			// Write out new value
			fs.createWriteStream(devicePath + '/brightness')
				.on('end', callback)
				.write(new Buffer(brightnessValue.toString()));
		});
	})
}

function windows(brightness,callback){

//These are the identifiers for the current power scheme

	var GUID;
	var subgroup;
	var powerSetting;

	// powercfg -q gives information about power settings, but can only give accurate brightness info for laptops or other portable windows devices

	exec('powercfg -q', function(error,stdout,stderr){
		if(!error){
			var regExp =  /([a-z\-0-9]+)\s\D+$/
			var splitOutput = stdout.split('\r\n');
			GUID = regExp.exec(splitOutput[0])[1];

			for(var i = 0;i<splitOutput.length;i++){
				if(splitOutput[i].match(/\(Display\)$/)){

					//The subgroup is derived from the output named display

					subgroup = regExp.exec(splitOutput[i])[1];
				}
				else if(splitOutput[i].match(/\(Display\sbrightness\)$/)){

					//The powerSetting is derived from the output named Display

					powerSetting = regExp.exec(splitOutput[i])[1];
				}
			}

			//console.log(GUID,subgroup,powerSetting);

			//Set the the brightness for AC power plan settings

			exec('powercfg -SetAcValueIndex' + ' ' + GUID + ' ' + subgroup + ' ' + powerSetting + ' ' + brightness,function(err,out,stderror){
				if(err) throw err;

				//Set the brightness when on DC power plan settings

				exec('powercfg -SetDcValueIndex' + ' ' + GUID + ' ' + subgroup + ' ' + powerSetting + ' ' + brightness,function(err,out,stderror){
					if(err) throw err;

					//Set the modified power plan as the current system plan

					exec('powercfg -S' + ' ' + GUID,function(err,out,stderror){
						if(err) throw err;
						if(callback) callback();
						return true;
					});
				});
			});

		}
		else{
			throw error;
		}
	});
}

function changeBrightness(brightness,callback){

//Brightness is in percent
	switch(os.platform()){

	case 'win32':
	windows(brightness,callback);
	break;

	case 'linux':
	linux(brightness, callback);
	break;

	default:
	throw new Error('OS is not recognized or is unsupported');
	break;
	}

}

module.exports = changeBrightness;


<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
	<meta name="google-site-verification" content="IqC9E_aWJtA4gqC0Bv4gL9MV70PJZ0W7mdU8nLkvLoQ" />

    <title>Thinking Mind Healing Heart</title>
	<link rel="shortcut icon" href="../favicon.ico" />

    <link href="../css/bootstrap.min.css" rel="stylesheet">

    <link href="../css/style-es.css" rel="stylesheet">

    <link href="../css/font-awesome.min.css" rel="stylesheet" type="text/css">

                         Instagram

                         Youtube

                         Twitter


package gaia3d.controller.view;

import gaia3d.domain.terrain.Terrain;
import gaia3d.service.TerrainService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Slf4j
@Controller
@RequestMapping("/terrain")
public class TerrainController {

	@Autowired
	private TerrainService terrainService;

	/**
	 * Terrain 목록
	 * @param model
	 * @return
	 */
	@GetMapping(value = "/list")
	public String list(HttpServletRequest request, Model model) {
		List<Terrain> terrainList = terrainService.getListTerrain();

		model.addAttribute("terrainList", terrainList);

		return "/terrain/list";
	}

	/**
	 * Terrain 등록 화면
	 * @param model
	 * @return
	 */
	@GetMapping(value = "/input")
	public String input(Model model) {
		model.addAttribute("terrain", new Terrain());
		return "/terrain/input";
	}

	/**
	 * Terrain 수정 화면
	 * @param reuqet
	 * @param terrainId
	 * @param model
	 * @return
	 */
	@GetMapping(value = "/modify")
	public String modify(HttpServletRequest reuqet, @RequestParam Integer terrainId,  Model model) {
		Terrain terrain = terrainService.getTerrain(terrainId);

		model.addAttribute(terrain);

		return "/terrain/modify";
	}

	/**
	 * Terrain 삭제
	 * @param terrainId
	 * @param model
	 * @return
	 */
	@GetMapping(value = "/delete")
	public String delete(@RequestParam("terrainId") Integer terrainId, Model model) {
		terrainService.deleteTerrain(terrainId);

		return "redirect:/terrain/list";
	}
}


@interface ViewController : UIViewController

@end


var angular = require('angular');

var Interstellar = angular.module('Interstellar', []);
Interstellar.provider('interstellarSet', function() {

	var data = [];
	var focusIndex = 0;
	var name = '';

	return {
		init: function(argData) {
				data = argData;
		},
		$get: function($rootScope) {

			return {
				getAll: function() {
					return data;
				},
				get: function(index) {
					return data[index];
				},
				add: function(argData) {
					// 更新焦点
					focusIndex = data.length;
					data.push(argData);
					$rootScope.$broadcast('$focusChange');
				},
				// addR 使用 Replace 的方式添加数据
				addR: function(index, argData) {
					focusIndex = index;
					data.splice(index, 0 , argData);
					$rootScope.$broadcast('$focusChange');
				},
				replace: function(index, behavior) {
					data.splice(index, 1 , behavior);
					$rootScope.$broadcast('$focusChange');
				},
				update: function(index, value) {
					data[index] = value;
				},
				remove: function(index) {
					focusIndex = index - 1;
					data[focusIndex].other = !data[focusIndex].other;
					data.splice(index, 1);
					$rootScope.$broadcast('$focusChange');
				},
				getName: function(){
					return name;
				},
				setName: function(argName) {
					name = argName;

					$rootScope.$broadcast('$nameChange');
				},
				getFocus: function() {
					return focusIndex;
				},
				setFocus: function(index) {
					focusIndex = index;
					$rootScope.$broadcast('$focusChange');
				}
			};
		}
	};
});


var micka = {

    confirmURL: function(msg, url){
        if(window.confirm(msg)){
            window.location = url;
        }
    },

    showSubsets: function(){
        var target = $('#micka-subsets').get(0);
        var fid = $('#file-identifier').get(0).textContent;
        this._showSubsets(target, fid);
    },

    _showSubsets(target, fid){
        var that = this;
        $.get('../../csw/?REQUEST=GetRecords&FORMAT=application/json&query=ParentIdentifier%3D'+fid)
        .done(function(data){
            $(target).html('');
            for(var i=0;i<data.records.length;i++){
                $(target).append('
'+data.records[i].title+'
');
                $(target).append('
loading....
');
                that._showSubsets($("#sub-"+data.records[i].id), data.records[i].id);
            }
        })
    }
}