text:
module Bosh::AzureCloud
  class VMManager
    include Helpers

    def initialize(azure_properties, registry_endpoint, disk_manager, disk_manager2, azure_client2, storage_account_manager)
      @azure_properties = azure_properties
      @registry_endpoint = registry_endpoint
      @disk_manager = disk_manager
      @disk_manager2 = disk_manager2
      @azure_client2 = azure_client2
      @storage_account_manager = storage_account_manager
      @use_managed_disks = @azure_properties['use_managed_disks']
      @logger = Bosh::Clouds::Config.logger
    end

    def create(instance_id, location, stemcell_info, resource_pool, network_configurator, env)
      # network_configurator contains service principal in azure_properties so we must not log it.
      @logger.info("create(#{instance_id}, #{location}, #{stemcell_info.inspect}, #{resource_pool}, ..., ...)")
      resource_group_name = instance_id.resource_group_name()
      vm_name = instance_id.vm_name()
      vm_size = resource_pool.fetch('instance_type', nil)
      cloud_error("missing required cloud property `instance_type'.") if vm_size.nil?

      check_resource_group(resource_group_name, location)

      @disk_manager.resource_pool = resource_pool
      @disk_manager2.resource_pool = resource_pool

      # Raise errors if the properties are not valid before doing others.
      if @use_managed_disks
        os_disk = @disk_manager2.os_disk(vm_name, stemcell_info)
        ephemeral_disk = @disk_manager2.ephemeral_disk(vm_name)
      else
        storage_account_name = instance_id.storage_account_name()
        os_disk = @disk_manager.os_disk(storage_account_name, vm_name, stemcell_info)
        ephemeral_disk = @disk_manager.ephemeral_disk(storage_account_name, vm_name)
      end

      vm_params = {
        :name                => vm_name,
        :location            => location,
        :tags                => AZURE_TAGS,
        :vm_size             => vm_size,
        :os_disk             => os_disk,
        :ephemeral_disk      => ephemeral_disk,
        :os_type             => stemcell_info.os_type,
        :managed             => @use_managed_disks
      }
      if stemcell_info.is_light_stemcell?
        vm_params[:image_reference] = stemcell_info.image_reference
      else
        if @use_managed_disks
          vm_params[:image_id] = stemcell_info.uri
        else
          vm_params[:image_uri] = stemcell_info.uri
        end
      end

      case stemcell_info.os_type
      when 'linux'
        vm_params[:ssh_username]  = @azure_properties['ssh_user']
        vm_params[:ssh_cert_data] = @azure_properties['ssh_public_key']
        vm_params[:custom_data]   = get_user_data(instance_id.to_s, network_configurator.default_dns)
      when 'windows'
        # Generate secure random strings as username and password for Windows VMs
        # Users do not use this credential to logon to Windows VMs
        # If users want to logon to Windows VMs, they need to add a new user via the job `user_add'
        # https://github.com/cloudfoundry/bosh-deployment/blob/master/jumpbox-user.yml
        #
        # https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-create-or-update
        # adminUsername:
        #   Max-length (Windows): 20 characters
        vm_params[:windows_username] = SecureRandom.uuid.delete('-')[0,20]
        # adminPassword:
        #   Minimum-length (Windows): 8 characters
        #   Max-length (Windows): 123 characters
        #   Complexity requirements: 3 out of 4 conditions below need to be fulfilled
        #     Has lower characters
        #     Has upper characters
        #     Has a digit
        #     Has a special character (Regex match [\W_])
        vm_params[:windows_password] = "#{SecureRandom.uuid}#{SecureRandom.uuid.upcase}".split('').shuffle.join
        computer_name = generate_windows_computer_name()
        vm_params[:computer_name] = computer_name
        vm_params[:custom_data]   = get_user_data(instance_id.to_s, network_configurator.default_dns, computer_name)
      end

      if is_debug_mode(@azure_properties)
        default_storage_account = @storage_account_manager.default_storage_account
        if default_storage_account[:location] == location
          vm_params[:diag_storage_uri] = default_storage_account[:storage_blob_host]
        else
          @logger.warn("Default storage account `#{default_storage_account[:name]}' is in different region `#{default_storage_account[:location]}', ignore boot diagnostics.")
        end
      end

      primary_nic_tags = AZURE_TAGS.clone
      # Store the availability set name in the tags of the NIC
      availability_set_name = get_availability_set_name(resource_pool, env)
      primary_nic_tags.merge!({'availability_set' => availability_set_name}) unless availability_set_name.nil?
      # Store the application gateway name in the tags of the NIC
      application_gateway_name = resource_pool['application_gateway']
      primary_nic_tags.merge!({'application_gateway' => application_gateway_name}) unless application_gateway_name.nil?

      network_interfaces = create_network_interfaces(resource_group_name, vm_name, location, resource_pool, network_configurator, primary_nic_tags)
      availability_set_params = {
        :name                         => availability_set_name,
        :location                     => location,
        :tags                         => AZURE_TAGS,
        :platform_update_domain_count => resource_pool['platform_update_domain_count'] || 5,
        :platform_fault_domain_count  => resource_pool['platform_fault_domain_count'] || (@use_managed_disks ? 2 : 3),
        :managed                      => @use_managed_disks
      }

      unless application_gateway_name.nil?
        if network_interfaces[0][:private_ip].nil?
          raise "You need to use static IP for the VM which will be bound to the application gateway"
        end
        set_backend_address_of_application_gateway("add", application_gateway_name, network_interfaces[0][:private_ip])
      end

      create_virtual_machine(instance_id, vm_params, network_interfaces, availability_set_params)

      vm_params
    rescue => e
      error_message = ''
      if @keep_failed_vm
        # Including undeleted resources in error message to ask users to delete them manually later
        error_message = 'This VM fails in provisioning after multiple retries.\n'
        error_message += 'You need to delete below resource manually after finishing investigation.\n'
        error_message += "\t Resource Group: #{resource_group_name}\n"
        error_message += "\t Virtual Machine: #{vm_name}\n"
        if @use_managed_disks
          os_disk_name = @disk_manager2.generate_os_disk_name(vm_name)
          error_message += "\t Managed OS Disk: #{os_disk_name}\n"

          unless vm_params[:ephemeral_disk].nil?
            ephemeral_disk_name = @disk_manager2.generate_ephemeral_disk_name(vm_name)
            error_message += "\t Managed Ephemeral Disk: #{ephemeral_disk_name}\n"
          end
        else
          storage_account_name = instance_id.storage_account_name()
          os_disk_name = @disk_manager.generate_os_disk_name(vm_name)
          error_message += "\t OS disk blob: #{os_disk_name}.vhd in the container #{DISK_CONTAINER} in the storage account #{storage_account_name} in default resource group\n"

          unless vm_params[:ephemeral_disk].nil?
            ephemeral_disk_name = @disk_manager.generate_ephemeral_disk_name(vm_name)
            error_message += "\t Ephemeral disk blob: #{ephemeral_disk_name}.vhd in the container #{DISK_CONTAINER} in the storage account #{storage_account_name} in default resource group\n"
          end

          error_message += "\t VM status blobs: All blobs which matches the pattern /^#{vm_name}.*status$/ in the container #{DISK_CONTAINER} in the storage account #{storage_account_name} in default resource group\n"
        end
      else
        begin
          # Delete NICs
          if network_interfaces
            network_interfaces.each do |network_interface|
              if network_interface[:tags] && !network_interface[:tags]['application_gateway'].nil? && !network_interface[:private_ip].nil?
                set_backend_address_of_application_gateway("delete", network_interface[:tags]['application_gateway'], network_interface[:private_ip])
              end
              @azure_client2.delete_network_interface(resource_group_name, network_interface[:name])
            end
          else
            # If create_network_interfaces fails for some reason, some of the NICs are created and some are not.
            # CPI need to cleanup these NICs.
            delete_possible_network_interfaces(resource_group_name, vm_name)
          end

          # Delete the dynamic public IP
          dynamic_public_ip = @azure_client2.get_public_ip_by_name(resource_group_name, vm_name)
          @azure_client2.delete_public_ip(resource_group_name, vm_name) unless dynamic_public_ip.nil?
        rescue => error
          error_message = 'The VM fails in creating but an error is thrown in cleanuping network interfaces or dynamic public IP.\n'
          error_message += "#{error.inspect}\n#{error.backtrace.join("\n")}"
        end
      end

      error_message += e.inspect

      # Replace vmSize with instance_type because only instance_type exists in the manifest
      error_message = error_message.gsub!('vmSize', 'instance_type') if error_message.include?('vmSize')
      raise Bosh::Clouds::VMCreationFailed.new(false), "#{error_message}\n#{e.backtrace.join("\n")}"
    end

    def find(instance_id)
      @azure_client2.get_virtual_machine_by_name(instance_id.resource_group_name(), instance_id.vm_name())
    end

    def delete(instance_id)
      @logger.info("delete(#{instance_id})")

      resource_group_name = instance_id.resource_group_name()
      vm_name = instance_id.vm_name()
      vm = @azure_client2.get_virtual_machine_by_name(resource_group_name, vm_name)

      if vm
        # Delete the VM
        @azure_client2.delete_virtual_machine(resource_group_name, vm_name)

        # Delete the empty availability set
        delete_empty_availability_set(resource_group_name, vm[:availability_set][:name]) if vm[:availability_set]

        # Delete NICs
        vm[:network_interfaces].each do |network_interface|
          if network_interface[:tags] && !network_interface[:tags]['application_gateway'].nil?
            set_backend_address_of_application_gateway("delete", network_interface[:tags]['application_gateway'], network_interface[:private_ip])
          end
          @azure_client2.delete_network_interface(resource_group_name, network_interface[:name])
        end
      else
        # If the VM is deleted but the availability sets are not deleted due to some reason, BOSH will retry and vm will be nil.
        # CPI need to get the availability set name from NIC's tags, and delete it.
        network_interface = @azure_client2.list_network_interfaces_by_keyword(resource_group_name, vm_name)[0]
        unless network_interface.nil?
          availability_set_name = network_interface[:tags]['availability_set']
          delete_empty_availability_set(resource_group_name, availability_set_name) unless availability_set_name.nil?
        end

        # If the VM is deleted but the NICs are not deleted due to some reason, BOSH will retry and vm will be nil.
        # CPI need to delete the possible NICs.
        delete_possible_network_interfaces(resource_group_name, vm_name)
      end

      # Delete the dynamic public IP
      dynamic_public_ip = @azure_client2.get_public_ip_by_name(resource_group_name, vm_name)
      @azure_client2.delete_public_ip(resource_group_name, vm_name) unless dynamic_public_ip.nil?

      # Delete OS & ephemeral disks
      if instance_id.use_managed_disks?()
        os_disk_name = @disk_manager2.generate_os_disk_name(vm_name)
        @disk_manager2.delete_disk(resource_group_name, os_disk_name)

        ephemeral_disk_name = @disk_manager2.generate_ephemeral_disk_name(vm_name)
        @disk_manager2.delete_disk(resource_group_name, ephemeral_disk_name)
      else
        storage_account_name = instance_id.storage_account_name()
        os_disk_name = @disk_manager.generate_os_disk_name(vm_name)
        @disk_manager.delete_disk(storage_account_name, os_disk_name)

        ephemeral_disk_name = @disk_manager.generate_ephemeral_disk_name(vm_name)
        @disk_manager.delete_disk(storage_account_name, ephemeral_disk_name)

        # Cleanup invalid VM status file
        @disk_manager.delete_vm_status_files(storage_account_name, vm_name)
      end
    end

    def reboot(instance_id)
      @logger.info("reboot(#{instance_id})")
      @azure_client2.restart_virtual_machine(
        instance_id.resource_group_name(),
        instance_id.vm_name()
      )
    end

    def set_metadata(instance_id, metadata)
      @logger.info("set_metadata(#{instance_id}, #{metadata})")
      @azure_client2.update_tags_of_virtual_machine(
        instance_id.resource_group_name(),
        instance_id.vm_name(),
        metadata.merge(AZURE_TAGS)
      )
    end

    ##
    # Attach a disk to the Vm
    #
    # @param [InstanceId] instance_id Instance id
    # @param [DiskId] disk_id disk id
    # @return [String] lun
    def attach_disk(instance_id, disk_id)
      @logger.info("attach_disk(#{instance_id}, #{disk_id})")
      disk_name = disk_id.disk_name()
      disk_id_tag = {"#{DISK_ID_TAG_PREFIX}-#{disk_name}" => disk_id}
      if instance_id.use_managed_disks?()
        disk_params = {
          :disk_name     => disk_name,
          :caching       => disk_id.caching(),
          :disk_bosh_id  => disk_id.to_s,
          :disk_id       => @azure_client2.get_managed_disk_by_name(disk_id.resource_group_name(), disk_name)[:id],
          :managed       => true
        }
      else
        disk_params = {
          :disk_name     => disk_name,
          :caching       => disk_id.caching(),
          :disk_bosh_id  => disk_id.to_s,
          :disk_uri      => @disk_manager.get_data_disk_uri(disk_id),
          :disk_size     => @disk_manager.get_disk_size_in_gb(disk_id),
          :managed       => false
        }
      end
      lun = @azure_client2.attach_disk_to_virtual_machine(
        instance_id.resource_group_name(),
        instance_id.vm_name(),
        disk_params
      )
      "#{lun}"
    end

    def detach_disk(instance_id, disk_id)
      @logger.info("detach_disk(#{instance_id}, #{disk_id})")
      @azure_client2.detach_disk_from_virtual_machine(
        instance_id.resource_group_name(),
        instance_id.vm_name(),
        disk_id.disk_name()
      )
    end

    private

    # Example -
    # For Linux:     {"registry":{"endpoint":"http://registry:ba42b9e9-fe2c-4d7d-47fb-3eeb78ff49b1@127.0.0.1:6901"},"server":{"name":"<instance-id>"},"dns":{"nameserver":["168.63.129.16","8.8.8.8"]}}
    # For Windows:   {"registry":{"endpoint":"http://registry:ba42b9e9-fe2c-4d7d-47fb-3eeb78ff49b1@127.0.0.1:6901"},"instance-id":"<instance-id>","server":{"name":"<randomgeneratedname>"},"dns":{"nameserver":["168.63.129.16","8.8.8.8"]}}
    def get_user_data(instance_id, dns, computer_name = nil)
      user_data = {registry: {endpoint: @registry_endpoint}}
      if computer_name
        user_data[:'instance-id'] = instance_id
        user_data[:server] = {name: computer_name}
      else
        user_data[:server] = {name: instance_id}
      end
      user_data[:dns] = {nameserver: dns} if dns
      Base64.strict_encode64(JSON.dump(user_data))
    end

    def get_network_subnet(network)
      subnet = @azure_client2.get_network_subnet_by_name(network.resource_group_name, network.virtual_network_name, network.subnet_name)
      cloud_error("Cannot find the subnet `#{network.virtual_network_name}/#{network.subnet_name}' in the resource group `#{network.resource_group_name}'") if subnet.nil?
      subnet
    end

    def get_network_security_group(resource_pool, network)
      network_security_group = nil
      resource_group_name = network.resource_group_name
      security_group_name = @azure_properties["default_security_group"]
      if !resource_pool["security_group"].nil?
        security_group_name = resource_pool["security_group"]
      elsif !network.security_group.nil?
        security_group_name = network.security_group
      end
      network_security_group = @azure_client2.get_network_security_group_by_name(resource_group_name, security_group_name)
      if network_security_group.nil?
        default_resource_group_name = @azure_properties['resource_group_name']
        if resource_group_name != default_resource_group_name
          @logger.info("Cannot find the network security group `#{security_group_name}' in the resource group `#{resource_group_name}', trying to search it in the resource group `#{default_resource_group_name}'")
          network_security_group = @azure_client2.get_network_security_group_by_name(default_resource_group_name, security_group_name)
        end
      end
      cloud_error("Cannot find the network security group `#{security_group_name}'") if network_security_group.nil?
      network_security_group
    end

    def get_public_ip(vip_network)
      public_ip = nil
      unless vip_network.nil?
        resource_group_name = vip_network.resource_group_name
        public_ip = @azure_client2.list_public_ips(resource_group_name).find { |ip| ip[:ip_address] == vip_network.public_ip }
        cloud_error("Cannot find the public IP address `#{vip_network.public_ip}' in the resource group `#{resource_group_name}'") if public_ip.nil?
      end
      public_ip
    end

    def get_load_balancer(resource_pool)
      load_balancer = nil
      unless resource_pool['load_balancer'].nil?
        load_balancer_name = resource_pool['load_balancer']
        load_balancer = @azure_client2.get_load_balancer_by_name(load_balancer_name)
        cloud_error("Cannot find the load balancer `#{load_balancer_name}'") if load_balancer.nil?
      end
      load_balancer
    end

    def create_network_interfaces(resource_group_name, vm_name, location, resource_pool, network_configurator, primary_nic_tags = AZURE_TAGS)
      network_interfaces = []
      load_balancer = get_load_balancer(resource_pool)
      public_ip = get_public_ip(network_configurator.vip_network)
      if public_ip.nil? && resource_pool['assign_dynamic_public_ip'] == true
        # create dynamic public ip
        idle_timeout_in_minutes = @azure_properties.fetch('pip_idle_timeout_in_minutes', 4)
        validate_idle_timeout(idle_timeout_in_minutes)
        @azure_client2.create_public_ip(resource_group_name, vm_name, location, false, idle_timeout_in_minutes)
        public_ip = @azure_client2.get_public_ip_by_name(resource_group_name, vm_name)
      end
      networks = network_configurator.networks
      networks.each_with_index do |network, index|
        security_group = get_network_security_group(resource_pool, network)
        nic_name = "#{vm_name}-#{index}"
        nic_params = {
          :name                => nic_name,
          :location            => location,
          :private_ip          => (network.is_a? ManualNetwork) ? network.private_ip : nil,
          :public_ip           => index == 0 ? public_ip : nil,
          :security_group      => security_group,
          :ipconfig_name       => "ipconfig#{index}"
        }
        subnet = get_network_subnet(network)
        tags = index == 0 ? primary_nic_tags : AZURE_TAGS
        @azure_client2.create_network_interface(resource_group_name, nic_params, subnet, tags, load_balancer)
        network_interfaces.push(@azure_client2.get_network_interface_by_name(resource_group_name, nic_name))
      end
      network_interfaces
    end

    def delete_possible_network_interfaces(resource_group_name, vm_name)
      network_interfaces = @azure_client2.list_network_interfaces_by_keyword(resource_group_name, vm_name)
      network_interfaces.each do |network_interface|
        @azure_client2.delete_network_interface(resource_group_name, network_interface[:name])
      end
    end

    def get_availability_set_name(resource_pool, env)
      availability_set_name = resource_pool.fetch('availability_set', nil)
      if availability_set_name.nil?
        unless env.nil? || env['bosh'].nil? || env['bosh']['group'].nil?
          availability_set_name = env['bosh']['group']

          # https://github.com/cloudfoundry-incubator/bosh-azure-cpi-release/issues/209
          # On Azure the length of the availability set name must be between 1 and 80 characters.
          # The group name which is generated by BOSH director may be too long.
          # CPI will truncate the name to below format if the length is greater than 80.
          # az-MD5-[LAST-40-CHARACTERS-OF-GROUP]
          if availability_set_name.size > 80
            md = Digest::MD5.hexdigest(availability_set_name)
            availability_set_name = "az-#{md}-#{availability_set_name[-40..-1]}"
          end
        end
      end

      availability_set_name
    end

    def create_availability_set(resource_group_name, availability_set_params)
      availability_set_name = availability_set_params[:name]
      availability_set = @azure_client2.get_availability_set_by_name(resource_group_name, availability_set_name)

      if availability_set.nil?
        @logger.info("create_availability_set - the availability set `#{availability_set_name}' doesn't exist. Will create a new one.")
      else
        # In some regions, the location of availability set is case-sensitive, e.g. CanadaCentral instead of canadacentral.
        if availability_set[:location].downcase != availability_set_params[:location].downcase
          cloud_error("create_availability_set - the availability set `#{availability_set_name}' already exists, but in a different location `#{availability_set[:location].downcase}' instead of `#{availability_set_params[:location].downcase}'. Please delete the availability set or choose another location.")
        else
          if !@use_managed_disks && availability_set[:managed]
            cloud_error("create_availability_set - the availability set `#{availability_set_name}' already exists. It's not allowed to update it from managed to unmanaged.")
          elsif @use_managed_disks && !availability_set[:managed]
            @logger.info("create_availability_set - the availability set `#{availability_set_name}' exists, but it needs to be updated from unmanaged to managed.")
            availability_set_params.merge!({
              :platform_update_domain_count => availability_set[:platform_update_domain_count],
              :platform_fault_domain_count  => availability_set[:platform_fault_domain_count],
              :managed                      => true
            })
          else
            @logger.info("create_availability_set - the availability set `#{availability_set_name}' exists. No need to update.")
            return availability_set
          end
        end
      end

      mutex = FileMutex.new("#{CPI_LOCK_PREFIX_AVAILABILITY_SET}-create-#{availability_set_name}", @logger)
      begin
        if mutex.lock
          @azure_client2.create_availability_set(resource_group_name, availability_set_params)
          mutex.unlock
        else
          mutex.wait
        end
      rescue => e
        mark_deleting_locks
        cloud_error("Failed to create the availability set `#{availability_set_name}' in the resource group `#{resource_group_name}': #{e.inspect}\n#{e.backtrace.join("\n")}")
      end

      @azure_client2.get_availability_set_by_name(resource_group_name, availability_set_name)
    end

    def delete_empty_availability_set(resource_group_name, name)
      availability_set_rw_lock = ReadersWriterLock.new("#{CPI_LOCK_PREFIX_AVAILABILITY_SET}-#{name}", @logger)
      if availability_set_rw_lock.acquire_write_lock
        begin
          availability_set = @azure_client2.get_availability_set_by_name(resource_group_name, name)
          @azure_client2.delete_availability_set(resource_group_name, name) if availability_set && availability_set[:virtual_machines].empty?
          # CPI will release the write lock only when the availability set is deleted successfully.
          # If any error is raised above, the lock should NOT be released so that other tasks can't acquire the read lock.
          availability_set_rw_lock.release_write_lock
        rescue => e
          mark_deleting_locks
          cloud_error("Failed to delete of the availability set `#{name}' in the resource group `#{resource_group_name}': #{e.inspect}\n#{e.backtrace.join("\n")}")
        end
      end
    end

    def create_virtual_machine(instance_id, vm_params, network_interfaces, availability_set_params)
      resource_group_name = instance_id.resource_group_name()
      vm_name = instance_id.vm_name()
      provisioning_fail_retries = 2
      retry_count = 0
      begin
        @keep_failed_vm = false
        is_vm_created = false
        availability_set = nil
        availability_set_name = availability_set_params[:name]
        if !availability_set_name.nil?
          # The RW lock allows concurrent access for creating VMs in the availability set, while deleting the availability set requires exclusive access.
          # This means that multiple tasks can create VMs in the availability set in parallel but an exclusive lock is needed for deleting the availability set.
          # When a task is deleting the availability set, all other tasks will be blocked until the task is finished deleting.
          # If a task acquires the readers lock, it can:
          #   1. create/update the availability set if needed. When multiple tasks acquire the readers lock, an additional file mutex is needed to make sure
          #      that only one task is creating/updating the availability set.
          #   2. create the VM in the availability set. Before releasing the lock, CPI needs to make sure the VM is added into the availability set.
          # If a task acquires the writer lock, it can delete the availability set if no VMs are in it.
          availability_set_rw_lock = ReadersWriterLock.new("#{CPI_LOCK_PREFIX_AVAILABILITY_SET}-#{availability_set_name}", @logger)
          availability_set_rw_lock.acquire_read_lock
          begin
            availability_set = create_availability_set(resource_group_name, availability_set_params)
            @azure_client2.create_virtual_machine(resource_group_name, vm_params, network_interfaces, availability_set)
            is_vm_created = true
          ensure
            availability_set_rw_lock.release_read_lock
          end
        else
          @azure_client2.create_virtual_machine(resource_group_name, vm_params, network_interfaces, nil)
        end
      rescue => e
        if e.is_a?(LockError)
          mark_deleting_locks
          cloud_error("create_virtual_machine - Lock error: #{e.inspect}\n#{e.backtrace.join("\n")}") unless is_vm_created
        end

        retry_create = false
        if e.instance_of?(AzureAsynchronousError) && e.status == PROVISIONING_STATE_FAILED
          if (retry_count += 1) <= provisioning_fail_retries
            @logger.info("create_virtual_machine - Retry #{retry_count}: will retry to create the virtual machine #{vm_name} which failed in provisioning")
            retry_create = true
          else
            # Keep failed VM for advanced investigation only if the VM fails in provisioning after multiple retries
            @keep_failed_vm = true
          end
        end

        unless @keep_failed_vm
          begin
            @logger.info("create_virtual_machine - cleanup resources of the failed virtual machine #{vm_name} from resource group #{resource_group_name}")
            @azure_client2.delete_virtual_machine(resource_group_name, vm_name)

            # Delete the empty availability set
            delete_empty_availability_set(resource_group_name, availability_set[:name]) if availability_set

            if @use_managed_disks
              os_disk_name = @disk_manager2.generate_os_disk_name(vm_name)
              @disk_manager2.delete_disk(resource_group_name, os_disk_name)
            else
              storage_account_name = instance_id.storage_account_name()
              os_disk_name = @disk_manager.generate_os_disk_name(vm_name)
              @disk_manager.delete_disk(storage_account_name, os_disk_name)

              # Cleanup invalid VM status file
              @disk_manager.delete_vm_status_files(storage_account_name, vm_name)
            end

            unless vm_params[:ephemeral_disk].nil?
              if @use_managed_disks
                ephemeral_disk_name = @disk_manager2.generate_ephemeral_disk_name(vm_name)
                @disk_manager2.delete_disk(resource_group_name, ephemeral_disk_name)
              else
                ephemeral_disk_name = @disk_manager.generate_ephemeral_disk_name(vm_name)
                @disk_manager.delete_disk(storage_account_name, ephemeral_disk_name)
              end
            end
          rescue => error
            @keep_failed_vm = true
            error_message = 'The VM fails in provisioning but an error is thrown in cleanuping VM, os disk or ephemeral disk before retry.\n'
            error_message += "#{error.inspect}\n#{error.backtrace.join("\n")}"
            raise e, error_message
          end
        end

        retry if retry_create

        raise e
      end
    end

    def check_resource_group(resource_group_name, location)
      resource_group = @azure_client2.get_resource_group(resource_group_name)
      return true unless resource_group.nil?
      # If resource group does not exist, create it
      @azure_client2.create_resource_group(resource_group_name, location)
    end

    def set_backend_address_of_application_gateway(method, name, ip_address)
      begin
        mutex = FileMutex.new("#{CPI_LOCK_APPLICATION_GATEWAY}-#{name}", @logger, CPI_LOCK_APPLICATION_GATEWAY_TIMEOUT)
        while !mutex.lock
          mutex.wait
        end
        if method == "add"
          @azure_client2.add_backend_address_of_application_gateway(name, ip_address)
        else
          @azure_client2.delete_backend_address_of_application_gateway(name, ip_address)
        end
        mutex.unlock
      rescue => e
        mark_deleting_locks
        raise e
      end
    end

  end
end

redpajama_set_name: RedPajamaGithub


text:
Cupaniopsis é um género botânico pertencente à família  Sapindaceae.

Espécies seleccionadas
Cupaniopsis acuticarpa
Cupaniopsis amoena
Cupaniopsis anacardioides
Cupaniopsis angustifolia
Cupaniopsis bullata
Cupaniopsis celebica
Cupaniopsis concolor
Cupaniopsis dunnii
Cupaniopsis globosa
Cupaniopsis papuana
Cupaniopsis rosea
Cupaniopsis serrata
Cupaniopsis trigonocarpa
Cupaniopsis vitiensis

Sapindaceae
Géneros de plantas

redpajama_set_name: RedPajamaWikipedia


text:
Q: User-Defined Aggregate Functions in Oracle SQL developer I don't know how to create User-Defined Aggregate Functions which should do exactly the same job such as my stored procedure. My function should contain two input attributes, there are price and timer. (Sorry for my bad english)
My procedure is:
  CREATE OR REPLACE PROCEDURE "PRICE"
  (key IN NUMBER) AS
   pricer ARTICLE.PRICE%type;
   BEGIN
   SELECT price INTO pricer
    FROM HistoryPrice
   WHERE Key_article =key  AND TIMER=(select max(TIMER) FROM
   HistoryPrice WHERE Key_article=key AND TIMER<=SYSDATE);

A: Format will be like below. You need to change logic of select statement.
 CREATE OR REPLACE function f_price
  (p_price IN NUMBER,
  p_timer in number
  ) return number as
   pricer ARTICLE.PRICE%type;
   BEGIN

   SELECT price INTO pricer
    FROM HistoryPrice
   WHERE Key_article =key  AND TIMER=(select max(TIMER) FROM
   HistoryPrice WHERE Key_article=key AND TIMER<=SYSDATE);

   return pricer;

   end;

redpajama_set_name: RedPajamaStackExchange


text:
Q: modal indeterminate progress bars I have a Windows app that basically calls other classes and within thise stored procedures and ultimately creates a csv file of a lot of info. I need a progress bar that just runs until its done so the user can see something is happening. I have scoured the internet and cant seem to get this to work. I just want the bar to start running on a button click. Why does this seem so difficult? The closest I got is just starting the bar in marquee but it wont "start" until after the object has been filled which does me no good, I need it to start while the object is being filled. This is being done in C#. Any ideas?

A: You need to run the long running task in a separate thread so that the UI can update while the task runs.
See Windows Forms ProgressBar: Easiest way to start/stop marquee? for an example of setting this up.


Plan the perfect wedding with help from celebrity wedding planners Barbara Esses and Ruthie Hecht in this Howcast video series.
Barbara Esses has been New York's top wedding planner for over 30 years. Barbara is known for her elegant, high-class affairs; she always seeks to create events that fit her clients' vision. Her clients are primarily in New York and the tri-state area.
How to Know Who Pays for What Parts of a Wedding?


text:
Strength in Numbers: Top 10 MyAnimeList Scores
September 20, 2017 - Editorial, Feature, Lists, WeebClicker - Tagged: MyAnimeList
Besides the sheer euphoria of meticulously tracking every episode of every anime you have ever watched, the pinnacle of the MyAnimeList experience is giving completed shows a score. This unique experience of rating an anime out of 10 points based on a wholly subjective and nebulous personal preferences is what sets MyAnimeList apart from any other social cataloging application. But what scores are the best? Today we will go over the 10 best anime scores on MyAnimeList.
#10: 4
We start off with 4 out of 10, which is just a little less than half of 10. Mathematically, you might assume this means you didn't like the show, and maybe lean a little towards disliking the show. Maybe you feel that that you would put it in the 40th percentile of anime you enjoy. Both of these assumptions are wrong.
See, in the world of anime, everything must be black and white. Shows must be the best, most epic thing ever, or be the worst shit ever made that makes you lose faith in humanity. There is no room for ridiculous things like nuance or middle ground. In modern times, there is no use for the rating of 4 out of 10.
#9: 8
While some may be surprised at how low 8 is on this list, I personally find it a bit overrated. Or should I say… over-eighted? Haha.
While I do agree that 8 is definitely one of the top 10 numbers less than or equal to 10, I think its role as a score is a bit unclear. When you slap an 8 on a show, you're telling the world you have some problems with it. Otherwise, you'd just give it a 9 or a 10. But 8 is *still* a pretty high score. 8 out of 10 is still a concession that an anime is quite enjoyable and has merits that significantly outweigh its shortcomings. You're not going to start any fights on Reddit by saying that about Bakemonogatari.
Don't get me wrong, I love 3. It's definitely better than 4 in terms of distilling a complex and subjective opinion about an anime into a mathematical constant. But 3 is in a funny place because while it expresses a negative opinion about a show, it's hard to say how negative. How mad are you exactly? Obviously not mad enough have some backbone and slap a 2 down.
#7: 10
We all know that outside of Eromanga Sensei, the perfect anime does not exist. But for shows that come close enough, a full 10 out of 10 will do. You really can't have an anime list without a single 10; what's the point of being an anime fan if you don't have a show you're willing to come to bat for?
Unfortunately, there are many a MyAnimeList account where more than a third of the completed shows are scored a 10. Don't even get me started on rating shows a 10 while watching them. Which begs the question: don't all anime start at 10? I wonder what John Locke's MAL account looks like.
5 might seem like a pretty low score. An anime that's pretty dull, and not even worth the condemnation of a truly low score. But think about this: 5 is exactly half of 10. So that must mean watching Kokoro Connect twice is equal to the perfect anime.
Now we're getting into arcane territory. A 1 is both a condemnation of a truly and historically terrible show as well as a badge of honor. You've endured horrors that others have only heard legends of. You have climbed the Everest of bad, and lived to tell about it.
I am no mathematician, but I believe 1 is one of the lowest whole numbers out there. And we all know how cool and edgy it is to hate things, so naturally it should be the go-to rating to slap on anime you truly hate, right? Wrong.
There is some sick and broken bone in the minds of some that derive pleasure from watching truly bad anime. As things such as The Room or Sword Art Online show us, at a certain point so many things go bad that the experience itself is entertaining.
For the truly terrible shows, that's when 2 comes into play. A score for anime that can't even succeed at being terrible. Sometimes, a weak expression of pity is the deepest act of cruelty.
According to thousands of MyAnimeList accounts and IGN, 6 is literally the lowest number that exists. Shows with a rating of 6 out of 10 are a scar upon that medium that might never be washed away. Perhaps these people have recognized that the truly worst anime to exist are not shows that are aggressively bad, but passively mediocre.
9 out of 10 is one of the most popular ratings on MyAnimeList, and it's for a good reason.
Have you ever watched something that's super popular that has near-universal praise and ended up loving it as well? You start the anime skeptical; nothing that masses like could ever excite your refined palate, but you're pleasantly surprised to see that it is indeed a masterpiece. We are now at a crossroad. A perfect 10 is out of the question — your deep and jaded insight has found shortcomings with the work that less knowledgeable anime fans could not even begin to comprehend. Yet the show genuinely deserves praise, even from atop your ivory spire. It is here where 9, the integer reserved for nostalgic classics and Miyazaki films, truly shines.
Eh, I guess it was alright.
Picture selections based on kevo's MyAnimeList
Editor-in-Chief, CEO, and Fearless Leader of Anime Maru. Expert in Japanese media and pop culture because I run Japanese tabloids blogs through Google Translate. Twitter: @kevo31415
9 thoughts on "Strength in Numbers: Top 10 MyAnimeList Scores"
Moe F. Ag September 20, 2017 at 7:48 pm
Man, fuck you guys. Kampfer was a masterpiece. Solid 8/10 material.
8.8 September 21, 2017 at 10:35 am
Perfect score, 5/7.
Nathaniel Conrad September 20, 2017 at 11:11 pm
K-On! over Macross Frontier?
Sure, I'll be mad about that.
Mr. Flawfinder September 22, 2017 at 8:35 am
What is this MyAnimeList you mention? Is it the anime version of IMDB?
Anknown September 22, 2017 at 11:02 am
Yeah. It also includes manga and functions as a forum for discussion.
Max September 22, 2017 at 9:35 pm
Guide to MAL ratings:
What the hell, the comment system ate my post.
Pepper Koi September 28, 2017 at 1:51 pm
Mods decided it was a 4/10 and deleted it
Bread September 30, 2017 at 6:34 pm
That better be K-On season 1
Archives Select Month January 2020 (6) December 2019 (12) November 2019 (11) October 2019 (12) September 2019 (10) August 2019 (12) July 2019 (13) June 2019 (16) May 2019 (13) April 2019 (14) March 2019 (14) February 2019 (12) January 2019 (12) December 2018 (12) November 2018 (11) October 2018 (13) September 2018 (12) August 2018 (14) July 2018 (13) June 2018 (15) May 2018 (14) April 2018 (13) March 2018 (14) February 2018 (12) January 2018 (14) December 2017 (16) November 2017 (14) October 2017 (12) September 2017 (11) August 2017 (13) July 2017 (13) June 2017 (13) May 2017 (13) April 2017 (14) March 2017 (14) February 2017 (12) January 2017 (16) December 2016 (15) November 2016 (13) October 2016 (14) September 2016 (12) August 2016 (14) July 2016 (13) June 2016 (14) May 2016 (15) April 2016 (17) March 2016 (20) February 2016 (18) January 2016 (21) December 2015 (21) November 2015 (23) October 2015 (23) September 2015 (22) August 2015 (28) July 2015 (19) June 2015 (15) May 2015 (14) April 2015 (12) March 2015 (14) February 2015 (13) January 2015 (15) December 2014 (17) November 2014 (13) October 2014 (15) September 2014 (17) August 2014 (21) July 2014 (27) June 2014 (30) May 2014 (30) April 2014 (29) March 2014 (30) February 2014 (10) July 2010 (1)
Ugly Bastard Ruins Potentially Good Hentai
'My Hero Academia' Shirt Deemed Acceptable for Social Event
Scott Morrison to Feature in Australian Release of 'Promare'
This Anime Season Brought to You by 'RAID: Shadow Legends'
'Fate' Franchise Out of Ways to Turn Historical Figures into Women
Enter your email address to subscribe and our team of Nigerian princes will deliver the freshest anime news straight to your inbox!
Support Anime Maru on Patreon!
Ahogamer Reviews
Anime Maru Guides
Anime Maru Travels
Deep Analysis
Dr. Otaku's Corner
Fanfic Corner
Otaku Discharge
Staff Infection
WeebClicker
Mass Debating
sailormoon1997 on Ugly Bastard Ruins Potentially Good Hentai
Kill me on 'My Hero Academia' Shirt Deemed Acceptable for Social Event
Chris m on 'My Hero Academia' Shirt Deemed Acceptable for Social Event
alan oppel on 'My Hero Academia' Shirt Deemed Acceptable for Social Event
Luna Midoriya on 'My Hero Academia' Shirt Deemed Acceptable for Social Event
Anime Maru Powered by WordPress

redpajama_set_name: RedPajamaCommonCrawl


Next message: Lee Daniel Crocker: "Re: thank you"
Previous message: Eugene Leitl: "Re: FYI:$$$:PtPtPt:EVLN(automotive fuel cell development raises platinum dema..."
Next in thread: Pat Fallon: "Re: thank you"
Maybe reply: Pat Fallon: "Re: thank you"
Maybe reply: CurtAdams@aol.com: "Re: thank you"
Maybe reply: Max More: "Re: thank you"
Maybe reply: Patrick Wilken: "Re: thank you"
Maybe reply: Kathryn Aegis: "Re: thank you"
of the Washington Press Corp.
I can not teach, all I can do it learn.
has been available in Europe but not here in USA.
arteries, but was not experiencing ill health.
That was on Monday, Tuesday I was in the ER.
lipid count, try lipitor, it works better than Bran muffins.


Environmental Protection programs protect agriculture and the public from unfavorable economic or environmental impacts.
This program provides the first line of defense for California agriculture. Inspections provide protection from the introduction or spread of harmful insects, plant diseases, weeds, and other pests into the county through the movement of plants and plant products as well as other items through normal channels of trade.
The establishment of these new pests may adversely effect our natural environment as well as negatively impact the State's economy. This program also involves the inspection and certification of agricultural export shipments to other states and countries and the issuance of certificates documenting compliance with their entry requirements. For example, we are there to inspect incoming plant shipments to ensure that non-native plant diseases such as Sudden Oak Death and insects such as Glassy-Winged Sharpshooter are not introduced into the county.
This program provides the second line of defense against exotic pests through the early detection of new introductions before they become widely established. Insect traps are placed throughout the county to detect such insect pests as Mediterranean Fruit Fly, Gypsy Moth, Japanese Beetle, European Pine Shoot Moth, Glassy-winged Sharpshooter, Khapra Beetle, Light Brown Apple Moth, and a host of other targeted pest species. Through early detection the likelihood of these pests becoming established in the county is lessened and the cost and environmental impact of eradication is minimized. By placing insect traps, we are there to monitor for any insects that may have been illegally or unknowingly introduced into the county. We are also there to cooperate with state, federal, and international agricultural agencies when these pests are found in our county.
Pest eradication programs are often conducted following the discovery of an introduced pest species in order to eliminate infestations of new pests before they become widespread. Primarily we want to prevent their introduction, but if they are found in the county, we want to eradicate the population or control it if the infestation has gotten too large. Often these projects are partially or completely under the jurisdiction of the California Department of Food and Agriculture. However, we are often involved as the liaison to local government.
We are charged with the responsibility of managing nuisance pests of agriculture and human health. Many of these pests are recently introduced species that have become established despite the best efforts to keep them out. These include common pests such as ground squirrels, voles, gophers, and noxious invasive weeds that can be serious pests of agriculture and urban areas alike.
We also conduct programs to establish and distribute biological controls for troublesome pests. There have been successful efforts to distribute tiny wasps to control Ash White Fly, and continuing efforts to control Yellow Starthistle, puncture vine, and Lerp Psyllid through the distribution of bio-control agents.
We also assist in controlling the population of those pests already present by: (1) providing expertise and materials to producers and homeowners for the control of certain vertebrate pests which are causing damage; and (2) identifying common pests for producers and homeowners.
This is a complex program that covers far more than its name implies. This program was developed to provide for the proper, safe, and efficient use of pesticides essential for the production of food and fiber and for the protection of public health and safety. It also protects the environment from potentially harmful pesticides by prohibiting, regulating, or ensuring proper stewardship of pesticides.
An important component of the program focuses on agricultural and pest control workers, ensuring safe working conditions, use of proper protective equipment, and training for employees who work with or around pesticides.


Shanghai Metals Market reported that despite the tradition high season in China, poor consumption in the downstream auto sector negatively affected the operating rates across Chinese secondary aluminium plants in September YoY. Auto sale in China has been on a downtrend for last few months.
Operating rates across secondary aluminium producers averaged 58.25% in September, down 5.05 percentage points from a year ago but up 5.13 percentage points from August.
Working days picked up in September from August across downstream die-casting plants after the summer breaks. This has driven the month-on-month increase in operating rates. However, very few downstream plants did restocking before the National Day holiday and the Mid-Autumn festival bringing down the actual demand year on year.
SMM expects the low operating rate to continue in October and extend further to around 58%. Post-holiday purchases continue to remain thin across downstream sectors. Low operating rates were further encouraged by longer holiday breaks by die-casting plants during the National Day holiday. As reported, some secondary aluminium producers would conduct maintenance in October conforming to strict environmental rules. This will also weigh on the operating rates of secondary smelters.
Data from China Association of Automobile Manufacturers shows that sales and production of cars extended their weak performance in September. Production of cars dropped 11.7% from a year ago to 2.356 million units, but up 17.8% from August. Lacklustre demand from auto sector had a negative effect on secondary production.


I just came back a couple of weeks in America where we stayed with some very good friends who took us to the four corners of Colorado and also well into Utah and down into New Mexico. We had many memorable days among the beautiful aspen trees and red rocks, and had close encounters with rutting elk (once rather too close when we found ourselves between two rival bulls!). Perhaps the most amazing day started with sunrise in Arches National Park and ended at sunset in Monument Valley, after a private jeep tour with an amusingly wry Navajo guide. I'm a keen photographer and took many photos along the way.
During our stay, we noticed many cultural differences, from eating patterns to driving (which seemed somewhat more relaxed than on Britain's narrower, busier roads). Perhaps the most notable yet subtle difference was in the language (19th/20th century playwright George Bernard Shaw said that "England and America are two countries divided by a common language."). We noticed this first when our friends seemed flattered when we talking about the brilliant time they were giving us. 'Brilliant', it seems, means 'very intelligent'. This is true here in the UK, but it also is used as a generic superlative.
It's a bit worrying as I know that the largest group of readers of this site is in the USA and I deliberately try to use American spelling and terminology to align with my main customer segment. Our friends quickly pointed out some phrases I've used which they found confusing, so if you're also confused by my unconscious Britishisms, I do apologize.
In the UK we've fretted for years about how the language has been 'polluted' by American terms that get adopted from TV shows and movies, even to the point where we don't realize the words are of American origin. Yet now, apparently, the flow is going the other way. A recent BBC article highlighted some of the issues. And for a deeper view, you could do much worse than keep an eye on Professor Ben Yagoda's brilliant (!) blog on Britishisms.
Perhaps the bottom line is that, in the world of hyper-communication, languages are slowly merging. This has been happening for a while as English 'pollutes' many other languages, even French, where 'le weekend' has been standard for a long time. Give it a century or two and, if we're not all speaking Mandarin, I'd suspect that everyone, everywhere will be speaking a blended version of English.


The Strand in Hudson Falls presents Dakota Dave Hull on Thursday, April 4, from 7 to 9 p.m.
Dakota Dave Hull spans a wide musical geography to create an infectious, uniquely personal blend of jazz, ragtime, folk, blues, Western swing, and vintage pop. A gifted composer as well as a strikingly original interpreter of older tunes, Dave calls what he does "classic American guitar." Folk legend Van Ronk calls Dave "one of the best guitarists in the world." Tickets: $15. Information: 518-832-3484; www.mystrandtheater.org. The Strand Theatre, 210 Main St., Hudson Falls, N.Y.


text:
By clicking the link(s) above, you will be taken to an external website that is independently operated and not managed by GSK. GSK assumes no responsibility for the content on the website. If you do not wish to leave this website, do not click on the links above.
Select location & Language:
About Nexium 24HR
Is Nexium 24hr for me?
Compare treatments
Understanding Heartburn
What Does Heartburn Feel Like?
What is Heartburn
What Causes Heartburn
How to Relieve Heartburn
WHAT IS NEXIUM 24HR?
WHAT CAUSES HEARTBURN?
HOW TO RELIEVE HEARTBURN?
HOW DOES NEXIUM 24HR WORK?
TAKING NEXIUM 24HR
BUYING NEXIUM 24HR
Nexium 24HR is the #1 brand recommended by doctors and pharmacists for frequent heartburn.∆ See for yourself why Nexium 24HR is the best-selling non-prescription brand for frequent heartburn worldwide.†
ANTACIDS (Like Rolaids)
Antacids, like Rolaids, neutralize the acid in your stomach, but they don't block production of acid before it starts, like Nexium 24HR. Antacids work quickly, but effects last for only 1-3 hours after use.3
Nexium 24HR
Frequent heartburn can be treated with a proton pump inhibitor (PPI) like Nexium 24HR. Nexium 24HR stops the production of acid before it starts. By turning off many of the pumps that produce acid, one pill a day is all you need to control frequent heartburn.4 This treatment may take 1-4 days for full effect. Learn more.
H2s (Like Zantac)
Histamine blockers (H2s), like Zantac, block just one of the signals that tell your body to produce acid. They begin working within 30 minutes, for up to 12 hours.5-9 But unlike Nexium 24HR, H2s can become less effective if used repeatedly.7-9
PPIS VS. ANTACIDS (Like Rolaids)
What is the difference between PPIs and Antacids? Antacids neutralize stomach acid and work quickly, but effects last for only 1-3 hours after use.3 PPIs, like Nexium 24HR, work differently by blocking the source of acid production.4 PPIs may take 1-4 days for full effect.10
PPIS VS. H2 BLOCKERS (Like Zantac)
What's the difference between PPIs and H2s? Histamine blockers ("H2RAs" or Histamine-2 Receptor Antagonists) only block one of the signals that tell your body to make acid. They start working within 30 minutes, last for up to 12 hours, but become less effective if used repeatedly.5-9
PPIs, like Nexium 24HR, work differently by blocking the source of acid production with just 1 pill every 24 hours.11 PPIs may take 1-4 days for full effect.
GET NEXIUM-LEVEL PROTECTION
GET OFFERS AT
∆ 2018 IQVIA Provoice Survey for OTC PPIs
† 2017 IMS Global OTC Analysis
3. Robinson, M., Rodriguez‐Stanley, S., Miner, P. B., McGuire, A. J., Fung, K., & Ciociola, A. A. (2002). Effects of antacid formulation on postprandial oesophageal acidity in patients with a history of episodic heartburn. Alimentary Pharmacology & Therapeutics, 16(3), 435-44
4. How Nexium Works. (2018). Retrieved from https://www.purplepill.com/heartburn-relief/how-nexium-works.html
5. H2 Blockers. (2016). International Foundation for Gastrointestinal Disorders. Retrieved from https://www.aboutgerd.org/medications/h2-blockers.html
6. H2-blockers: Onset time. (n.d.). OpenAnesthesia. Retrieved from https://www.openanesthesia.org/h2-blockers_onset_time/
7. McRorie, J. W., Kirby, J. A., & Miner, P. B. (2014). Histamine2-receptor antagonists: rapid development of tachyphylaxis with repeat dosing. World Journal of Gastrointestinal Pharmacology and Therapeutics, 5(2), 57
8. Miner Jr., P. B., Allgood, L. D., & Grender, J. M. (2007). Comparison of gastric pH with omeprazole magnesium 20.6 mg (Prilosec OTC) om famotidine 10 mg (Pepcid AC) bd and famotidine 20 mg bd over 14 days of treatment. Alimentary Pharmacology & Therapeutics, 25(1), 103-109
9. Hurlimann, S., Abbühl, B., Inauen, W., & Halter, F. (1994). Comparison of acid inhibition by either oral high‐dose ranitidine or omeprazole. Alimentary Pharmacology & Therapeutics, 8(2), 193-201
10. Shin, J.M., Sachs G. (2008). Pharmacology of proton pump inhibitors. Current Gastroenterology Reports, Dec; 10(6), 528–534. Retrieved from https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2855237
11. Dosage and administration for Nexium. (2018). Retrieved from https://www.nexiumtouchpoints.com/nexium-information/dosage-administration.html
© 2020 GlaxoSmithKline Consumer Healthcare ULC or its licensor. All rights reserved. The content of this site is intended For Canada audiences only.
Trade marks are owned by or licensed to the GSK group of companies.
This product is not for immediate relief of heartburn and may take 1-4 days for full effect. Use as directed for 14 consecutive days. To be sure this product is right for you, always read and follow the label.


text:
payday loan marketing announcements
StepChange Debt Charity welcomes government announcements on payday loan marketing
Thursday 27th November, 2014
Following yesterday's announcement that the government has asked the Broadcast Committee of Advertising Practice (BCAP) to broaden the remit of its review of payday loan advertising to include the appropriateness of scheduling as well as content, and that the Financial Conduct Authority (FCA) will consult on unsolicited marketing calls for payday loans, Mike O'Connor, chief executive of StepChange Debt Charity, said:
"We are extremely pleased that the government has recognised the potential harm caused to millions of people through payday loan marketing. We know that many people are drawn into a cycle of unaffordable borrowing through tempting offers that are clearly unaffordable and prevention is a welcome step forward."
Children and advertising
"Today's families are increasingly vulnerable to falling into a cycle of damaging problem debt. Our Debt Trap report, produced in conjunction with the Children's Society, demonstrated the devastating impact this can have on children, and showed that they are consistently being exposed at an early age to the advertising of high-risk credit. This kind of dangerous borrowing should never be allowed to be viewed as 'the norm' by such a young and impressionable audience.
Unsolicited marketing of payday loans
"We know that financially vulnerable people are often bombarded by offers for payday loans. There is no excuse for these firms targeting those already in difficulty who may suffer serious financial harm through taking out further loans. Protecting people from these aggressive marketing practices cannot happen soon enough and we will continue to press the FCA to ban the unsolicited real time promotion of high-risk credit products.
"The government has made a major step in recognising these issues, and we now urge the regulators to take the necessary action to ensure that consumers are protected from any further detriment caused by the inappropriate promotion of payday loans."
Contact the StepChange news team on:
Email: press@stepchange.org
Follow our press team on Twitter: @StepChange


JUST IN: ISRAEL CUTS TIES!
After the Obama administration decided to kick its feet up and watch the United Nations pass anti-Israel settlements, Netanyahu began to take action.
His first step? Severing ties with countries that backed the U.N.'s settlement that the United States abstained from voting in.
Israel's Foreign Ministry has reportedly suspended all working ties with 12 of the UN Security Council countries that voted to pass a resolution urging Israel to halt building settlements on occupied Palestinian land.
The move came at Prime Minister Benjamin Netanyahu's request, one day after he summoned 10 of the nations' ambassadors to Jerusalem to personally reprimand them for the vote.
Foreign ministers and ambassadors from Britain, France, Russia, China, Japan, Ukraine, Angola, Egypt, Uruguay, Spain, Senegal and New Zealand will not be received at Israel's Foreign Ministry amid the suspension, the Times of Israel reported . They will also not be granted an audience with Netanyahu.
The Most Honest Political Warrior In History Is About To Change History Forever!


text:
package org.zstack.header.network.service;

import org.zstack.header.message.APIListMessage;

import java.util.List;

public class APIListNetworkServiceProviderMsg extends APIListMessage {
    public APIListNetworkServiceProviderMsg(List<String> uuids) {
        super(uuids);
    }

    public APIListNetworkServiceProviderMsg() {
        super(null);
    }

    public static APIListNetworkServiceProviderMsg __example__() {
        APIListNetworkServiceProviderMsg msg = new APIListNetworkServiceProviderMsg();

        return msg;
    }

}


Sometimes I see a recipe and immediately know it's something I have to try. Only, most of the time when I get around to making it, I wind up deciding to change a few things here and there or swap out one item for another based on what I have on hand or what's in season or which child is currently rejecting which food (not that I'll build a meal around one kid, per se, but if I can make the dish more palatable for them and thus a more pleasant meal for all, great). So you can feel free to change the soy butter (which I used here to test a nut-free recipe but almond butter works or good old fashioned peanut butter) or add other crunchy things or use a different mix of chocolates (probably a bit of dark mixed in would be nice). This recipe uses feuilletine flakes that you can buy here or make here or decide you can't be bothered and try using some granola you have on hand or other flaky crunchy item such as leftover cereal.
The kid response to this recipe: What if a Kit-Kat and a Reeses's had a baby?
The adult response: Quiet, happy silence.
Line an 8x8 or 9x9 dish with parchment paper. Melt 6 oz of the chocolate in a double boiler or in the microwave (glass bowl, bit by bit, stirring). Add 2 cups of flakes and mix to combine. Spray your fingers with cooking spray or use waxed paper to press mixture into dish for the crust. Put in fridge for at least 30 minutes. Place remaining chocolate in a bowl. Heat the cream until simmering and pour over the chocolate pieces. Let sit a minute until it is soft and you can whisk. Add butter and keep mixing until smooth. Add the rest of the flakes and mix. Pour over crust and put back into fridge for 3 hours until solid. Cut into slim bars and serve with coffee or tea or milk…a dollop of unsweetend fresh whipped cream with a sprig of mint would be nice if you want to dress it up.
YUM. I love me a Kit-Kat bar. But where do you get feuilletine flakes–a specialty baking shop?
Hi Deb. You can click the links in the post and find them!
This looks fantastic! I just looked through the fall chapter of your book, thinking we need some autumnal chicken around here 🙂 Happy Fall!


A city manager must be experienced and have core competencies such as a good grasp of municipal responsibilities under the MGA, ability to understand municipal finances, ability to assume command quickly, ability to gain the respect of employees and the public in a short period of time. The recruitment process will be transparent in that a nation wide search would be conducted using a professional company skilled in recruiting senior executives. The process would be communicated to the public and community organizations.
City Council policy CC8 "Ethical Guidelines of Conduct for Members of Coumcil" currently exists. It requires updating. Pecuniary interest whereby elected councillors, or their close family members, could benefit financially from decisions of council should be included. Also access to confidential or releasing confidential information must be included for the same reasons. It should be noted that violations could include forced resignation and a ban from future eligibility are the penalties under the provincial regulation.
Accountability means being responsible to the electors. It includes being prepared to make decisions at public meetings and to defend the collective decision of city council, regardless of ones personal views, once city council, as a whole, has made a decision. The individual must be a leader who is innovative and creative, knowledgeable of government grant opportunities and one who is open to considering new ideas and methods. The successful candidate will be goal oriented with a strong background in strategic planning. They should have a proven ability to attract support for their ideas and solutions.
The role of an elected official is governance, oversight, and accountability.
1. Performing Arts Centre in the downtown 2. Continued support for public art 3. Support for arts existing organizations ( SAAG, Allied Arts Council , Lethbridge Symphony, etc ) Funding would be a blend of tax support and community support.
The role of the city of Lethbridge is to promote and support art and arts activities in our community to enrich the cultural aspects of living in our city. to have well rounded citizens, the arts must be visible and easily accessible. Fee for service agreements, funding the arts in the capital budget and continued investment in public art are examples of the city's investment in the arts.
The role of the public library is to promote literacy and continuous learning. It is a community resource for the public of all ages. It serves to stimulate thinking and ideas.
Yes. They are what set our city apart from other most mid sized cities in Alberta.
Yes. I am prepared to work with the Arts community to develop the plan, advocate for external funding and look for ways to complete this project.
1. Continued redevelopment of the downtown by adding to existing residential opportunities. 2. Restoration of historical buildings 3. Continued supply for downtown activities and festivals to bring people downtown These activities should be funded through capital incentives such as HOCHIP and Heart of the City funding grants to organizations.
1. Attracting new businesses to locate in Lethbridge 2. Encouraging existing businesses to expand 3. Providing supports for new business ideas and startups These activities are best supported by providing funding to Economic Development Lethbridge who leverage core funding to obtain additional funding from external sources to maximize the impact of the dollars provided.
Having a vibrant downtown with low vacancy rates would be desirable. Careful planning for the location of new industries is important to maintain quality of life.
I will continue to promote and support opportunities for business investment in Lethbridge. Lethbridge will remain a business friendly communiity with a business friendly mayor.
The city has to ensure land and servicing is available in a cost effective manner. We need to keep up with growth. The city needs to provide a high level of service and clear direction to encourage and sustain an environment for continued growth and investment. Our neighbourhoods need to be well designed to sustain quality of life. The city needs to be solution oriented in supporting commercial development activity.
Our role is one of advocacy for the interests of our citizens and our community. We need to have access and effective ways to communicate with decision makers at the provincial and federal level. I work tirelessly to ensure that Lethbridge is on their radar and that they are aware of our issues.
The greatest opportunities are our steadily increasing population, our diversified economy and our growing reputation as a great city for investment. Our challenges are that we are underperforming in some key areas like tourism, sustaining high quality restaurants and attraction of a 5 star hotel.
1. Implementation of an environmental management plan at the city of Lethbridge - to be funded from existing operations as a strategic priority. The city must be a leader. 2. Implementation of city wide residential curb side recycling as outlined in the approved Waste Diversion Plan with a blue bin program in 2019 and green bin in 2021 to be funded from service fees. 3. Continued support for implementation of the non-resitial waste diversion plan, as approved by Lethbridge city council in 2015 to be funded from tipping fees at the landfill and fees to be charged by existing and future private operators.
I would continue to encourage the city of Lethbridge to implement an environmental management plan based on continuous improvement whereby goals are opportunities are identified. This would continue to be a priority within our strategic plan. Opportunities for greater waste diversion, conservation and community education should be available in all public spaces and at all public events.
I would oppose the plan, as I did in 2014 taking action to meet with the provincial government. I proposed a motion, supported by Lethbridge city council and subsequently approved by the Alberta Urban Municipalities Association that the Municipal Government Act be changed to give municipalities greater say over drilling activities proposed to take place within their boundaries.
A community education program for water conservation. Working with the business and industrial sectors to promote great water conservation.
A supervised injection site is currently not available. Non-judgemental supports. Inadequate supply of social housing and associated wrap around services to ensure individuals can be successful living independently.
The city's role is to be a visible leader in opposing racism. We need to continue to fund and support the activities of CMARD. The city's approval of the response to the Truth and Reconciliation Commission needs to acted on. The city needs to encourage community wide support.
Yes. I support and attend LGBTQ+ events. My visible participation as mayor is important as a role model for inclusiveness in our city.
I will continue to build positive relations based on mutual respect. I am committed to including our city's response to the Truth and Reconciliation Commission in our revised Strategic Plan following the election of the new council. Our response was developed by representatives from our urban indigenous population. That consultation will continue. This council was the first to meet with the Kainai Chief and Council. Those meetings will continue.
I will continue to build and sustain positive relationships with Indigenous people within the City of Lethbridge and with neighbouring nations. Under my leadership we had a first ever council to council meeting with the Kainai council. I supported the city committee to develop a response to the Truth and Reconciliation Commission and attended the committee's meetings. I have encouraged support and participation by all people, organizations and entities in the city of Lethbridge. I will work together with Indigenous organizations like Sik- Ooh-Kotoki Friendship Society and others to identify opportunities to work together.


text:
in a COVID world.
Explore 2020 Annual Report
Partners for positive global impact
Global Communities brings together local ingenuity and global insights to save lives, advance equity and secure strong futures. As leaders in sustainable development, humanitarian assistance and financial inclusion, we work as partners for good to advance positive, long-term change in places impacted by poverty, disasters and conflict.
In 2020, Global Communities and Project Concern International merged to increase the scale and positive impact of programs catalyzed by a wide range of public and private sector partners, including local governments and communities in which we work.
As a unified organization, we have deep roots in more than 35 countries and a shared vision for a more just, prosperous and equitable global community. We work across the nexus of humanitarian response and sustainable development and integrate cutting-edge expertise in financial inclusion to deliver essential solutions to complex development challenges.
We bring together local ingenuity and global insights to save lives, advance equity and secure strong futures.
A more just, prosperous and equitable global community.
We envision a world of expanded opportunity, where crises give way to resilience and all people thrive. We work to build this better world with a spirit of constant innovation and a commitment to confront historic barriers to dignity, equity and inclusion.
We respect the dignity and humanity of every individual and are committed to equity, inclusion and justice in everything we do.
We are transparent when we make mistakes, trust the wisdom of the communities we serve and seek to preserve the natural environment.
We are curious, seek to innovate and embrace a spirit of experimentation.
We consistently hold ourselves and each other to delivering excellence and to the highest professional and ethical standards.
We actively collaborate with all our stakeholders to improve understanding of complex issues and catalyze lasting change.
Letters from our leadership
2020 is a year all of us will long remember. Our world, our sector and our organization underwent fundamental change, with overlapping shifts that will have a long-term impact on Global Communities' work around the world.
The COVID-19 pandemic could have ground operations to a halt, but thanks to the remarkable work of the entire global staff, the opposite was true. Not only did every program pivot to keep staff and partners safe and slow the spread of the coronavirus, but Global Communities also doubled down on core programs that were more important than ever. These efforts to increase economic opportunity, deliver innovations in water, sanitation and hygiene and use digital tools to share accurate health information saved lives and reduced the impact of COVID-19 in communities around the world.
The pandemic was not the only crisis the world faced this year, and Global Communities continued to provide humanitarian assistance in conflict zones and global hotspots. This year marked a tragic milestone of 10 years of conflict in Syria, where Global Communities has been working hand-in-hand with displaced families as they seek shelter and safety in a time of war.
Also in 2020, communities in the United States and around the world confronted long-overdue discussions of race, equality and justice, speaking to the core principles Global Communities has long operated under. For each of us, and for our organization, there is more work to do: we have a serious responsibility to continue learning, advancing and championing diversity, equity and inclusion in all its forms.
Amidst all this change, Global Communities reached a historic milestone on April 6, 2020, merging with global development organization Project Concern International (PCI). The merger brought together two complementary organizations with shared values in order to deliver greater impact and expand the reach of proven programs to tens of millions of people in more than 35 countries. Global Communities has already been enriched as it integrates PCI's legacy, history and expertise into our organization and programming.
As a unified organization, Global Communities shares an ambitious vision and inspirational mission. Together, we have shaped and launched a fresh strategic plan that expresses the heart of who we are, setting forth ambitious goals to make even greater positive and lasting impact in communities around the world.
Thank you to everyone who contributed to Global Communities' extraordinary successes in 2020 - that most challenging, unexpected and memorable year.
Governor Richard F. Celeste
Chairman, Board of Trustees, Global Communities
When we look back at 2020, most of us will remember the way the COVID-19 pandemic disrupted our daily lives and threatened the health of our loved ones and the economic security of our communities. These same effects were felt all over the world, and even as the most virulent stage of the pandemic began to wane, it was clear that the impact would be deep and lasting. Global Communities stood together, supporting each other, mourning colleagues lost to the coronavirus, and constantly innovating and adapting to keep our essential programs running amid unprecedented challenges. I am deeply proud of our entire global team, and the contributions that were made to deliver meaningful, lifesaving support under the most difficult conditions.
We added new strength to our team in 2020, bringing the sustainable development experts and programs at Project Concern International (PCI) into the Global Communities family. We announced a merger as two strong, healthy organizations with the opportunity to do more for those we serve by delivering proven programs based on a shared approach to community-led change. The merger significantly broadened our geographic footprint and enhanced our technical expertise and program areas. Throughout the year, we worked to come together, learning about each other and sharing lessons learned, best practices and approaches. It was an opportunity to reexamine the way we do business and apply new strategies and tactics to constantly improve our business and our performance and, above all, to increase our impact.
As we look ahead, it is clear that so many of the big global challenges of 2020 remain unfinished. Climate change will reshape our world and our work in ways we might not even be able to predict. The steps we have taken toward equity, racial justice and real inclusion are only the beginning of the changes that must be made in ourselves, our organization and our sector. I believe the years ahead will be critical opportunities to advance equity and antiracism with sustained, ongoing and meaningful commitments to the work that still - and must - be done. In everything we do, from humanitarian assistance to sustainable development to financial inclusion, we are deeply committed to equitable development and inclusive growth.
We are fortunate to face the future as a unified organization, with PCI's legacy and expertise as part of our Global Communities family. Together, we are better positioned to meet our ambitious and vital mission and bold vision of a more just, equitable and prosperous global community.
David Weiss
CEO, Global Communities
Project Concern International (PCI) has a rich history and powerful legacy of transformational change, from the U.S.-Mexico border to dozens of countries in the Americas, Asia and Africa. In 2020, we took a historic step, merging with sustainable development and humanitarian assistance organization Global Communities in order to expand the scale and impact of our vital work.
We didn't know it when we started down that path, but 2020 would be a year of monumental change not just for us, but for nearly everyone in the world. The global pandemic disrupted lives, economies and routines for families everywhere.
The solutions Global Communities and PCI, now a Global Communities Partner, were already applying and our deep roots in communities around the world meant we were perfectly positioned to support communities to save lives. From installing hand-washing stations to using mobile phones to dispel misinformation about COVID-19, our committed teams around the world made deeply meaningful contributions to controlling the spread of the coronavirus.
We were all also truly touched by growing conversations around racial justice and how the legacy of racism and colonialism that pervades our sector can be dismantled with purposeful, dedicated, consistent action. The journey to becoming an anti-racist organization is one we began in 2020, but one that we are committed to continuing on for years to come.
Our entire global team made enormous contributions in 2020, as PCI's history, experience and programs merged to become a part of one unified Global Communities.
As we look forward to all we can accomplish as a combined organization, we also honor the incredible difference PCI has made since it was first founded in San Diego in 1961. Southern California was our original home, but the reach of PCI is truly global, stretching across tens of millions of people in thousands of communities around the world.
The legacy of PCI is core to our new, shared identity, and the lessons learned, friendships made and transformative difference of our work together will stay at the very heart of the unified Global Communities.
Carrie Hessler-Radelet
President & CEO, Project Concern International
President, Global Communities
Where we worked in 2020
West Bank/Gaza
Europe & Asia
Program Areas & Technical Expertise
Financial Inclusion & Vitas Group
Governance & Urban Management
Our Work Together
Joint efforts to address key global issues
Global Communities and PCI Respond to COVID-19
Drawing from decades of experience combating epidemics and communicable diseases, our global program teams pivoted to respond to COVID-19 and meet critical community needs with skill and compassion.
Advancing Sustainability during the Pandemic
Global Communities and PCI, a Global Communities Partner, came together with a shared commitment to stand with communities currently facing the dramatic effects of a changing climate.
Diversity, Equity and Inclusion Goals Come into Focus
In 2020, the United States, the world and the international development community continued a vital conversation with fresh urgency, addressing the continued impact of systemic racism, discrimination and colonialism on the daily lives of Black and Brown colleagues, partners and peers.
Fiscal Year 2020 At A Glance
Year End Operating Results*
Change in Net Assets
Less Change in With Donor Restrictions
Without Donor Restrictions
With Donor Restrictions*
Liquidity/Current Ratio
Program Services & Program Support*
Capital Assistance
For the periods ending: Sept. 30, 2020 & Sept. 30, 2019.
Revenue, Expenses, Year End Operating Results and Net Assets are presented in Millions.
Non-Federal Grants
Interest & Investment
Contributions, In-Kind
Total: $175,288,425
Program & Program Support
Board of Directors and Executives
We are grateful to all the distinguished board members who supported Global Communities and PCI before, during and after our 2020 merger.
October 2019 - April 2020
April 2020 - Present
David A. Weiss
CEO; ex officio member
William C. Lane
William Stacy Rhodes
Nancy E. Roman
John Holdsclaw IV
Peter L. Woicke
Leocadia I. Zak
Dr. Hillary Thomas-Lake
Rudy Cline-Thomas
Ambassador Wendy J. Chamberlin
John H.N. Potter, II
Norm Hapke
Judith A. Ettinger
Nancy Plaxico
Peter Huffman
James A. Merritt
Robert S. Sullivan
Chair Emeritus
Gerardo De La Concha
Haida M. Mojdehi, Esq.
Joseph Abbate
Akruti Desai
Karen Paterson
Lawrence A. Weitzen
Erin Barringer
Claudine Emeott
Michael Williams, DPhil
Ruth M. Covell, M.D.
ex officio member
(through Dec. 2020)
(Jan. 2021 to present)
Joe Abbate
Global Communities Executive Officers and Senior Management
Sheila Crowley
Billy Blake
Elissa McCarter-LaBorde
Vice President, Development Finance
Pia Wanek
Vice President, Humanitarian Assistance
Mario Jabbour
Vice President & Chief Financial Officer
Eric O'Neill
General Counsel & Chief Ethics Officer
Jared M. Hoffman
Vice President, Resource Mobilization & Global Operations
Project Concern International
Mark O'Donnell
Melinda Coil
Acting Chief Financial Officer
Janine Schooley
Senior Vice President, Programs
Peg Ross
Vice President, People & Culture
Judith Robb-McCord
Vice President, Technical Leadership & Support
Chris Bessenecker
Vice President, Strategic Initiatives
Melissa Silverman
Vice President, Marketing & Communications
John McWeeney
Director, New Business Development
2020: Our Year in Review
This report was compiled by Global Communities and PCI's Office of Communications with the support of global program teams. Design and layout by Briteweb. Authors and contributors include Jackie Frank, Amy Levey, Bonnie Maratea, Annie Mueller, Melissa Silverman and Maureen Simpson.
Sign up to receive updates from
Global Communities.
Once you submit this form, you will receive an email to confirm this process. (Please be sure to check your spam folder and add us to your safe sender list.) Simply click on the link to subscribe to our list!
By signing up, you agree to Global Communities' Privacy Policy. This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Briefs & Case Studies
Capacity Materials
Toolkits & Manuals
© 2022 Global Communities. All rights reserved.


text:
held by trees
Held By Trees: In the Trees
Held By Trees is a new instrumental post rock project which bases its concept and draws its influence from one of the genre's cornerstones, paying tribute to one of the greats, and spreading the word further.
Talk Talk's Spirit of Eden from 1988 and its follow up, Laughing Stock, shaped what later became known as post rock, and expanded alternative music's boundaries by retaining a profoundly experimental musical approach and being miles ahead of their time. The genius of the late Mark Hollis later concluded his career with a brilliant solo album which used many of the same musicians and engineers, and had similar artistic value.
The new project is helmed by David Joseph, and it brings together a total of seven of the great musicians involved in those acclaimed records. Artists like Martin Ditcham on drums, Andy Panayi on flute, Robbie McIntosh on dobro guitar, Laurence Pendrous on harmonium and Chris Mears on double bass comprise a post rock act of expert proportions which comes with a fresh view on Hollis' legacy, and as his friends and collaborators, they seem competent to recreate part of the spirit of the aforementioned groundbreaking works.
Held By Trees also cite influence from the psychedelic rock of Pink Floyd, Ryuichi Sakamoto's experimentalism, and the natural world.
It already has the air of a strong early achievement for David Joseph through the couple of first single releases, while the band has also an album in the works on which we're promised hints from the abstract avantgardism of Morton Feldman and Steve Reich.
Held By Trees Facebook | Instagram
held by trees music post rock zr


One scheduled shuttle is offered on a complimentary basis, first-come, first-served, up to 50 registered attendees, for transportation from/to Albany International Airport (ALB) and Stratton Mountain Resort.
The shuttle schedule is listed below and is reserved on a first come, first served basis during the online symposium registration process.
The complimentary shuttle accommodates a maximum of 50 passengers. A confirmation email with logistical details, including the pick-up location at ALB, will be sent to passengers on August 13th.
Arrival shuttle schedule: 3:30 PM on Thursday, September 13, departs from Albany International Airport to Stratton Mountain Resort.
Departure shuttle schedule: 12:00 PM on Sunday, September 16, departs from Stratton Mountain Resort to Albany International Airport. Attendees with flights departing at 3:30 PM or later may consider using the complimentary shuttle.
Attendees staying on-property will be issued free parking permits at check-in.
Commuter attendees are welcome to park at the Black Bear Lodge, 30 Middle Ridge Rd., Stratton Mountain, VT 05155.
The scheduled airport shuttle (above), renting a car from the airport, or driving (for those within driving distance) are the most convenient options for travel to/from Stratton Mt. Resort.
Manchester All Hour Airport Car Service, 802.362.0062, provides door to door transportation between Albany International Airport and Stratton Mt. Resort for $175.00 USD/each direction, plus 18% tax. Pricing is a quoted estimate and subject to change.


In Law360's "Weekly Verdict: Legal Lions & Lambs," the Potter Anderson team members for pharmaceutical company Fresenius Kabi AG were named Legal Lions.
Serving as Delaware counsel to Paul Weiss Rifkind & Garrison LLP, we represented Fresenius in its effort to terminate its merger agreement with Akorn Inc. The Delaware Court of Chancery made an unprecedented finding that a merger target, Akorn, had experienced a material adverse effect within the meaning of its merger agreement with Fresenius and further held that Akorn's breaches of a regulatory representation and ordinary course covenant permitted Fresenius to terminate the $4.8 billion merger agreement.
The Potter Anderson lawyers hailed by Law360 were partners Don Wolfe, Mike Pittenger, Brad Davey and Matthew Davis and associate Jake Kirkham.