text:
"""
PXE Boot Interface
"""

import os

from ironic_lib import metrics_utils
from ironic_lib import utils as ironic_utils
from oslo_log import log as logging
from oslo_utils import fileutils

from ironic.common import boot_devices
from ironic.common import dhcp_factory
from ironic.common import exception
from ironic.common.glance_service import service_utils
from ironic.common.i18n import _
from ironic.common import image_service as service
from ironic.common import images
from ironic.common import pxe_utils
from ironic.common import states
from ironic.common import utils
from ironic.conductor import utils as manager_utils
from ironic.conf import CONF
from ironic.drivers import base
from ironic.drivers.modules import deploy_utils
from ironic.drivers.modules import image_cache
from ironic.drivers import utils as driver_utils
from ironic import objects
LOG = logging.getLogger(__name__)

METRICS = metrics_utils.get_metrics_logger(__name__)

REQUIRED_PROPERTIES = {
    'deploy_kernel': _("UUID (from Glance) of the deployment kernel. "
                       "Required."),
    'deploy_ramdisk': _("UUID (from Glance) of the ramdisk that is "
                        "mounted at boot time. Required."),
}
COMMON_PROPERTIES = REQUIRED_PROPERTIES

def _parse_driver_info(node):
    """Gets the driver specific Node deployment info.

    This method validates whether the 'driver_info' property of the
    supplied node contains the required information for this driver to
    deploy images to the node.

    :param node: a single Node.
    :returns: A dict with the driver_info values.
    :raises: MissingParameterValue
    """
    info = node.driver_info
    d_info = {k: info.get(k) for k in ('deploy_kernel', 'deploy_ramdisk')}
    error_msg = _("Cannot validate PXE bootloader. Some parameters were"
                  " missing in node's driver_info")
    deploy_utils.check_for_missing_params(d_info, error_msg)
    return d_info

def _get_instance_image_info(node, ctx):
    """Generate the paths for TFTP files for instance related images.

    This method generates the paths for instance kernel and
    instance ramdisk. This method also updates the node, so caller should
    already have a non-shared lock on the node.

    :param node: a node object
    :param ctx: context
    :returns: a dictionary whose keys are the names of the images (kernel,
        ramdisk) and values are the absolute paths of them. If it's a whole
        disk image or node is configured for localboot,
        it returns an empty dictionary.
    """
    image_info = {}
    # NOTE(pas-ha) do not report image kernel and ramdisk for
    # local boot or whole disk images so that they are not cached
    if (node.driver_internal_info.get('is_whole_disk_image') or
        deploy_utils.get_boot_option(node) == 'local'):
            return image_info

    root_dir = pxe_utils.get_root_dir()
    i_info = node.instance_info
    labels = ('kernel', 'ramdisk')
    d_info = deploy_utils.get_image_instance_info(node)
    if not (i_info.get('kernel') and i_info.get('ramdisk')):
        glance_service = service.GlanceImageService(
            version=CONF.glance.glance_api_version, context=ctx)
        iproperties = glance_service.show(d_info['image_source'])['properties']
        for label in labels:
            i_info[label] = str(iproperties[label + '_id'])
        node.instance_info = i_info
        node.save()

    for label in labels:
        image_info[label] = (
            i_info[label],
            os.path.join(root_dir, node.uuid, label)
        )

    return image_info

def _get_deploy_image_info(node):
    """Generate the paths for TFTP files for deploy images.

    This method generates the paths for the deploy kernel and
    deploy ramdisk.

    :param node: a node object
    :returns: a dictionary whose keys are the names of the images (
        deploy_kernel, deploy_ramdisk) and values are the absolute
        paths of them.
    :raises: MissingParameterValue, if deploy_kernel/deploy_ramdisk is
        missing in node's driver_info.
    """
    d_info = _parse_driver_info(node)
    return pxe_utils.get_deploy_kr_info(node.uuid, d_info)

def _build_deploy_pxe_options(task, pxe_info):
    pxe_opts = {}
    node = task.node

    for label, option in (('deploy_kernel', 'deployment_aki_path'),
                          ('deploy_ramdisk', 'deployment_ari_path')):
        if CONF.pxe.ipxe_enabled:
            image_href = pxe_info[label][0]
            if (CONF.pxe.ipxe_use_swift and
                service_utils.is_glance_image(image_href)):
                    pxe_opts[option] = images.get_temp_url_for_glance_image(
                        task.context, image_href)
            else:
                pxe_opts[option] = '/'.join([CONF.deploy.http_url, node.uuid,
                                            label])
        else:
            pxe_opts[option] = pxe_utils.get_path_relative_to_tftp_root(
                pxe_info[label][1])
    return pxe_opts

def _build_instance_pxe_options(task, pxe_info):
    pxe_opts = {}
    node = task.node

    for label, option in (('kernel', 'aki_path'),
                          ('ramdisk', 'ari_path')):
        if label in pxe_info:
            if CONF.pxe.ipxe_enabled:
                # NOTE(pas-ha) do not use Swift TempURLs for kernel and
                # ramdisk of user image when boot_option is not local,
                # as this breaks instance reboot later when temp urls
                # have timed out.
                pxe_opts[option] = '/'.join(
                    [CONF.deploy.http_url, node.uuid, label])
            else:
                # It is possible that we don't have kernel/ramdisk or even
                # image_source to determine if it's a whole disk image or not.
                # For example, when transitioning to 'available' state
                # for first time from 'manage' state.
                pxe_opts[option] = pxe_utils.get_path_relative_to_tftp_root(
                    pxe_info[label][1])

    # These are dummy values to satisfy elilo.
    # image and initrd fields in elilo config cannot be blank.
    pxe_opts.setdefault('aki_path', 'no_kernel')
    pxe_opts.setdefault('ari_path', 'no_ramdisk')

    return pxe_opts

def _build_extra_pxe_options():
    # Enable debug in IPA according to CONF.debug if it was not
    # specified yet
    pxe_append_params = CONF.pxe.pxe_append_params
    if CONF.debug and 'ipa-debug' not in pxe_append_params:
        pxe_append_params += ' ipa-debug=1'

    return {'pxe_append_params': pxe_append_params,
            'tftp_server': CONF.pxe.tftp_server,
            'ipxe_timeout': CONF.pxe.ipxe_timeout * 1000}

def _build_pxe_config_options(task, pxe_info, service=False):
    """Build the PXE config options for a node

    This method builds the PXE boot options for a node,
    given all the required parameters.

    The options should then be passed to pxe_utils.create_pxe_config to
    create the actual config files.

    :param task: A TaskManager object
    :param pxe_info: a dict of values to set on the configuration file
    :param service: if True, build "service mode" pxe config for netboot-ed
        user image and skip adding deployment image kernel and ramdisk info
        to PXE options.
    :returns: A dictionary of pxe options to be used in the pxe bootfile
        template.
    """
    if service:
        pxe_options = {}
    elif (task.node.driver_internal_info.get('boot_from_volume') and
            CONF.pxe.ipxe_enabled):
        pxe_options = _get_volume_pxe_options(task)
    else:
        pxe_options = _build_deploy_pxe_options(task, pxe_info)

    # NOTE(pas-ha) we still must always add user image kernel and ramdisk info
    # as later during switching PXE config to service mode the template
    # will not be regenerated anew, but instead edited as-is.
    # This can be changed later if/when switching PXE config will also use
    # proper templating instead of editing existing files on disk.
    pxe_options.update(_build_instance_pxe_options(task, pxe_info))
    pxe_options.update(_build_extra_pxe_options())

    return pxe_options

def _build_service_pxe_config(task, instance_image_info,
                              root_uuid_or_disk_id):
    node = task.node
    pxe_config_path = pxe_utils.get_pxe_config_file_path(node.uuid)
    # NOTE(pas-ha) if it is takeover of ACTIVE node,
    # first ensure that basic PXE configs and links
    # are in place before switching pxe config
    if (node.provision_state == states.ACTIVE and
            not os.path.isfile(pxe_config_path)):
        pxe_options = _build_pxe_config_options(task, instance_image_info,
                                                service=True)
        pxe_config_template = deploy_utils.get_pxe_config_template(node)
        pxe_utils.create_pxe_config(task, pxe_options, pxe_config_template)
    iwdi = node.driver_internal_info.get('is_whole_disk_image')
    deploy_utils.switch_pxe_config(
        pxe_config_path, root_uuid_or_disk_id,
        deploy_utils.get_boot_mode_for_deploy(node),
        iwdi, deploy_utils.is_trusted_boot_requested(node),
        deploy_utils.is_iscsi_boot(task))

def _get_volume_pxe_options(task):
    """Identify volume information for iPXE template generation."""
    def __return_item_or_first_if_list(item):
        if isinstance(item, list):
            return item[0]
        else:
            return item

    def __get_property(properties, key):
        prop = __return_item_or_first_if_list(properties.get(key, ''))
        if prop is not '':
            return prop
        return __return_item_or_first_if_list(properties.get(key + 's', ''))

    def __generate_iscsi_url(properties):
        """Returns iscsi url."""
        portal = __get_property(properties, 'target_portal')
        iqn = __get_property(properties, 'target_iqn')
        lun = __get_property(properties, 'target_lun')

        if ':' in portal:
            host, port = portal.split(':')
        else:
            host = portal
            port = ''
        return ("iscsi:%(host)s::%(port)s:%(lun)s:%(iqn)s" %
                {'host': host, 'port': port, 'lun': lun, 'iqn': iqn})

    pxe_options = {}
    node = task.node
    boot_volume = node.driver_internal_info.get('boot_from_volume')
    volume = objects.VolumeTarget.get_by_uuid(task.context,
                                              boot_volume)
    properties = volume.properties
    if 'iscsi' in volume['volume_type']:
        if 'auth_username' in properties:
            pxe_options['username'] = properties['auth_username']
        if 'auth_password' in properties:
            pxe_options['password'] = properties['auth_password']
        pxe_options.update(
            {'iscsi_boot_url': __generate_iscsi_url(volume.properties),
             'iscsi_initiator_iqn': (__get_property(properties,
                                                    'target_iqn') or None)})
        # NOTE(TheJulia): This may be the route to multi-path, define
        # volumes via sanhook in the ipxe template and let the OS sort it out.
        additional_targets = []
        for target in task.volume_targets:
            if target.boot_index != 0 and 'iscsi' in target.volume_type:
                additional_targets.append(
                    __generate_iscsi_url(target.properties))
        pxe_options.update({'iscsi_volumes': additional_targets,
                            'boot_from_volume': True})
    # TODO(TheJulia): FibreChannel boot, i.e. wwpn in volume_type
    # for FCoE, should go here.
    return pxe_options

@METRICS.timer('validate_boot_option_for_trusted_boot')
def validate_boot_parameters_for_trusted_boot(node):
    """Check if boot parameters are valid for trusted boot."""
    boot_mode = deploy_utils.get_boot_mode_for_deploy(node)
    boot_option = deploy_utils.get_boot_option(node)
    is_whole_disk_image = node.driver_internal_info.get('is_whole_disk_image')
    # 'is_whole_disk_image' is not supported by trusted boot, because there is
    # no Kernel/Ramdisk to measure at all.
    if (boot_mode != 'bios' or
        is_whole_disk_image or
        boot_option != 'netboot'):
        msg = (_("Trusted boot is only supported in BIOS boot mode with "
                 "netboot and without whole_disk_image, but Node "
                 "%(node_uuid)s was configured with boot_mode: %(boot_mode)s, "
                 "boot_option: %(boot_option)s, is_whole_disk_image: "
                 "%(is_whole_disk_image)s: at least one of them is wrong, and "
                 "this can be caused by enable secure boot.") %
               {'node_uuid': node.uuid, 'boot_mode': boot_mode,
                'boot_option': boot_option,
                'is_whole_disk_image': is_whole_disk_image})
        LOG.error(msg)
        raise exception.InvalidParameterValue(msg)

@image_cache.cleanup(priority=25)
class TFTPImageCache(image_cache.ImageCache):
    def __init__(self):
        super(TFTPImageCache, self).__init__(
            CONF.pxe.tftp_master_path,
            # MiB -> B
            cache_size=CONF.pxe.image_cache_size * 1024 * 1024,
            # min -> sec
            cache_ttl=CONF.pxe.image_cache_ttl * 60)

def _cache_ramdisk_kernel(ctx, node, pxe_info):
    """Fetch the necessary kernels and ramdisks for the instance."""
    fileutils.ensure_tree(
        os.path.join(pxe_utils.get_root_dir(), node.uuid))
    LOG.debug("Fetching necessary kernel and ramdisk for node %s",
              node.uuid)
    deploy_utils.fetch_images(ctx, TFTPImageCache(), list(pxe_info.values()),
                              CONF.force_raw_images)

def _clean_up_pxe_env(task, images_info):
    """Cleanup PXE environment of all the images in images_info.

    Cleans up the PXE environment for the mentioned images in
    images_info.

    :param task: a TaskManager object
    :param images_info: A dictionary of images whose keys are the image names
        to be cleaned up (kernel, ramdisk, etc) and values are a tuple of
        identifier and absolute path.
    """
    for label in images_info:
        path = images_info[label][1]
        ironic_utils.unlink_without_raise(path)

    pxe_utils.clean_up_pxe_config(task)
    TFTPImageCache().clean_up()

class PXEBoot(base.BootInterface):

    def __init__(self):
        self.capabilities = ['iscsi_volume_boot']

    def get_properties(self):
        """Return the properties of the interface.

        :returns: dictionary of <property name>:<property description> entries.
        """
        return COMMON_PROPERTIES

    @METRICS.timer('PXEBoot.validate')
    def validate(self, task):
        """Validate the PXE-specific info for booting deploy/instance images.

        This method validates the PXE-specific info for booting the
        ramdisk and instance on the node.  If invalid, raises an
        exception; otherwise returns None.

        :param task: a task from TaskManager.
        :returns: None
        :raises: InvalidParameterValue, if some parameters are invalid.
        :raises: MissingParameterValue, if some required parameters are
            missing.
        """
        node = task.node

        if not driver_utils.get_node_mac_addresses(task):
            raise exception.MissingParameterValue(
                _("Node %s does not have any port associated with it.")
                % node.uuid)

        if CONF.pxe.ipxe_enabled:
            if (not CONF.deploy.http_url or
                not CONF.deploy.http_root):
                raise exception.MissingParameterValue(_(
                    "iPXE boot is enabled but no HTTP URL or HTTP "
                    "root was specified."))

        # Check the trusted_boot capabilities value.
        deploy_utils.validate_capabilities(node)
        if deploy_utils.is_trusted_boot_requested(node):
            # Check if 'boot_option' and boot mode is compatible with
            # trusted boot.
            validate_boot_parameters_for_trusted_boot(node)

        _parse_driver_info(node)
        # NOTE(TheJulia): If we're not writing an image, we can skip
        # the remainder of this method.
        if not task.driver.storage.should_write_image(task):
            return

        d_info = deploy_utils.get_image_instance_info(node)
        if (node.driver_internal_info.get('is_whole_disk_image') or
                deploy_utils.get_boot_option(node) == 'local'):
            props = []
        elif service_utils.is_glance_image(d_info['image_source']):
            props = ['kernel_id', 'ramdisk_id']
        else:
            props = ['kernel', 'ramdisk']
        deploy_utils.validate_image_properties(task.context, d_info, props)

    @METRICS.timer('PXEBoot.prepare_ramdisk')
    def prepare_ramdisk(self, task, ramdisk_params):
        """Prepares the boot of Ironic ramdisk using PXE.

        This method prepares the boot of the deploy kernel/ramdisk after
        reading relevant information from the node's driver_info and
        instance_info.

        :param task: a task from TaskManager.
        :param ramdisk_params: the parameters to be passed to the ramdisk.
            pxe driver passes these parameters as kernel command-line
            arguments.
        :returns: None
        :raises: MissingParameterValue, if some information is missing in
            node's driver_info or instance_info.
        :raises: InvalidParameterValue, if some information provided is
            invalid.
        :raises: IronicException, if some power or set boot boot device
            operation failed on the node.
        """
        node = task.node

        if CONF.pxe.ipxe_enabled:
            # Render the iPXE boot script template and save it
            # to HTTP root directory
            boot_script = utils.render_template(
                CONF.pxe.ipxe_boot_script,
                {'ipxe_for_mac_uri': pxe_utils.PXE_CFG_DIR_NAME + '/'})
            bootfile_path = os.path.join(
                CONF.deploy.http_root,
                os.path.basename(CONF.pxe.ipxe_boot_script))
            # NOTE(pas-ha) to prevent unneeded writes,
            # only write to file if its content is different from required,
            # which should be rather rare
            if (not os.path.isfile(bootfile_path) or
                not utils.file_has_content(bootfile_path, boot_script)):
                    utils.write_to_file(bootfile_path, boot_script)
            if not task.driver.storage.should_write_image(task):
                return

        dhcp_opts = pxe_utils.dhcp_options_for_instance(task)
        provider = dhcp_factory.DHCPFactory()
        provider.update_dhcp(task, dhcp_opts)

        pxe_info = _get_deploy_image_info(node)

        # NODE: Try to validate and fetch instance images only
        # if we are in DEPLOYING state.
        if node.provision_state == states.DEPLOYING:
            pxe_info.update(_get_instance_image_info(node, task.context))

        pxe_options = _build_pxe_config_options(task, pxe_info)
        pxe_options.update(ramdisk_params)

        pxe_config_template = deploy_utils.get_pxe_config_template(node)

        pxe_utils.create_pxe_config(task, pxe_options,
                                    pxe_config_template)
        manager_utils.node_set_boot_device(task, boot_devices.PXE,
                                           persistent=False)

        if CONF.pxe.ipxe_enabled and CONF.pxe.ipxe_use_swift:
            pxe_info.pop('deploy_kernel', None)
            pxe_info.pop('deploy_ramdisk', None)
        if pxe_info:
            _cache_ramdisk_kernel(task.context, node, pxe_info)

    @METRICS.timer('PXEBoot.clean_up_ramdisk')
    def clean_up_ramdisk(self, task):
        """Cleans up the boot of ironic ramdisk.

        This method cleans up the PXE environment that was setup for booting
        the deploy ramdisk. It unlinks the deploy kernel/ramdisk in the node's
        directory in tftproot and removes it's PXE config.

        :param task: a task from TaskManager.
        :returns: None
        """
        node = task.node
        try:
            images_info = _get_deploy_image_info(node)
        except exception.MissingParameterValue as e:
            LOG.warning('Could not get deploy image info '
                        'to clean up images for node %(node)s: %(err)s',
                        {'node': node.uuid, 'err': e})
        else:
            _clean_up_pxe_env(task, images_info)

    @METRICS.timer('PXEBoot.prepare_instance')
    def prepare_instance(self, task):
        """Prepares the boot of instance.

        This method prepares the boot of the instance after reading
        relevant information from the node's instance_info. In case of netboot,
        it updates the dhcp entries and switches the PXE config. In case of
        localboot, it cleans up the PXE config.

        :param task: a task from TaskManager.
        :returns: None
        """
        node = task.node
        boot_option = deploy_utils.get_boot_option(node)
        boot_device = None

        if deploy_utils.is_iscsi_boot(task):
            dhcp_opts = pxe_utils.dhcp_options_for_instance(task)
            provider = dhcp_factory.DHCPFactory()
            provider.update_dhcp(task, dhcp_opts)

            # configure iPXE for iscsi boot
            pxe_config_path = pxe_utils.get_pxe_config_file_path(
                task.node.uuid)
            if not os.path.isfile(pxe_config_path):
                pxe_options = _build_pxe_config_options(task, {})
                pxe_config_template = (
                    deploy_utils.get_pxe_config_template(node))
                pxe_utils.create_pxe_config(
                    task, pxe_options, pxe_config_template)
            deploy_utils.switch_pxe_config(
                pxe_config_path, None,
                deploy_utils.get_boot_mode_for_deploy(node), False,
                iscsi_boot=True)
            boot_device = boot_devices.PXE

        elif boot_option != "local":
            if task.driver.storage.should_write_image(task):
                # Make sure that the instance kernel/ramdisk is cached.
                # This is for the takeover scenario for active nodes.
                instance_image_info = _get_instance_image_info(
                    task.node, task.context)
                _cache_ramdisk_kernel(task.context, task.node,
                                      instance_image_info)

            # If it's going to PXE boot we need to update the DHCP server
            dhcp_opts = pxe_utils.dhcp_options_for_instance(task)
            provider = dhcp_factory.DHCPFactory()
            provider.update_dhcp(task, dhcp_opts)

            iwdi = task.node.driver_internal_info.get('is_whole_disk_image')
            try:
                root_uuid_or_disk_id = task.node.driver_internal_info[
                    'root_uuid_or_disk_id'
                ]
            except KeyError:
                if not task.driver.storage.should_write_image(task):
                    pass
                elif not iwdi:
                    LOG.warning("The UUID for the root partition can't be "
                                "found, unable to switch the pxe config from "
                                "deployment mode to service (boot) mode for "
                                "node %(node)s", {"node": task.node.uuid})
                else:
                    LOG.warning("The disk id for the whole disk image can't "
                                "be found, unable to switch the pxe config "
                                "from deployment mode to service (boot) mode "
                                "for node %(node)s", {"node": task.node.uuid})
            else:
                _build_service_pxe_config(task, instance_image_info,
                                          root_uuid_or_disk_id)
                boot_device = boot_devices.PXE
        else:
            # If it's going to boot from the local disk, we don't need
            # PXE config files. They still need to be generated as part
            # of the prepare() because the deployment does PXE boot the
            # deploy ramdisk
            pxe_utils.clean_up_pxe_config(task)
            boot_device = boot_devices.DISK

        # NOTE(pas-ha) do not re-set boot device on ACTIVE nodes
        # during takeover
        if boot_device and task.node.provision_state != states.ACTIVE:
            manager_utils.node_set_boot_device(task, boot_device,
                                               persistent=True)

    @METRICS.timer('PXEBoot.clean_up_instance')
    def clean_up_instance(self, task):
        """Cleans up the boot of instance.

        This method cleans up the environment that was setup for booting
        the instance. It unlinks the instance kernel/ramdisk in node's
        directory in tftproot and removes the PXE config.

        :param task: a task from TaskManager.
        :returns: None
        """
        node = task.node
        try:
            images_info = _get_instance_image_info(node, task.context)
        except exception.MissingParameterValue as e:
            LOG.warning('Could not get instance image info '
                        'to clean up images for node %(node)s: %(err)s',
                        {'node': node.uuid, 'err': e})
        else:
            _clean_up_pxe_env(task, images_info)


text:
Home Something Special Live results: Mississippi Measure 3 on the state flag
Live results: Mississippi Measure 3 on the state flag
By: TEAM BEPINKU.COM | In: Something Special | Last updated: November 4, 2020 0
UPDATE: Mississippi voted to adopt a new state flag and say goodbye to its Confederate emblem
Voters in Mississippi have been given the opportunity to settle a longstanding debate over the flag it's used for 126 years.
That flag contains the emblem of the Confederacy, and has been criticized as a symbol of oppression and a celebration of the state's racist past.
An attempt to replace that flag through a statewide referendum failed 19 years ago. Since then, local and national pressure from sports groups and advocacy organizations to change the flag has only intensified.
That pressure grew as social justice protests following the police killing of George Floyd and others forced the country to reckon with the impact of systemic racism and injustice on Black communities. Confederate statues were under siege, and so too was the flag.
The Mississippi legislature responded with a historic vote to remove the flag, which was adopted during the Reconstruction era. The measure passed, and shortly after, Republican Gov. Tate Reeves signed it into law. By early July, the banner was no longer being flown from state buildings.
Now, voters have a chance to embrace a new flag, which features a magnolia blossom, and 21 stars — one for each state that joined the US before Mississippi, and one to acknowledge the Choctaw origins of the state.
Mississippi Measure 3
A yes vote would mean the state will adopt the new flag. A no vote would mean the new flag will not be adopted.
Will you help keep Vox free for all?
The United States is in the middle of one of the most consequential presidential elections of our lifetimes. It's essential that all Americans are able to access clear, concise information on what the outcome of the election could mean for their lives, and the lives of their families and communities. That is our mission at Vox. But our distinctive brand of explanatory journalism takes resources. Even when the economy and the news advertising market recovers, your support will be a critical part of sustaining our resource-intensive work. If you have already contributed, thank you. If you haven't, please consider helping everyone understand this presidential election: Contribute today from as little as $3.

redpajama_set_name: RedPajamaCommonCrawl


MONDAY, NOV. 2, 7:30 P.M.
Check out the City's "News, Meetings & Events" section of its web site, at www.ua-ohio.net for Council Meeting Agendas and Summaries.
Due to early newspaper publication, the above is a tentative agenda only. For complete information, contact the office of the City Clerk, 583-5030, after Noon, Friday.
Upon request to the City Clerk's Office, special accommodations for people with disabilities (e.g., interpreting services, audio recording, etc.) will be arranged for any City meetings open to the public. Requests for special accommodations should be submitted at least 72 hours in advance.


A: It depends on what type of portrait session you would like. A full list of my session prices can be found here.
Q: What's included in the session fee?
A: The session fee acts as a retainer, and simply secures you a place in my diary. It covers use of the studio and all its equipment – i.e. professional lighting, a variety of backdrops, props, wraps, and outfits for you and your little ones. Your session fee also pays for our time and expertise (newborn shoots can last up to 4 hours, and post-processing can take up to 3 hours). It does not include any products – these are purchased separately at the viewing session.
Q: How much are your digitals?/How much for all the digitals on a CD?
A: I cringe when I hear this question. I don't sell digitals, I sell portraits. Digitals is such a crass word, used to describe photos that are stored on a media device (phone/CD/memory stick) and are never looked at. Can you remember the last time you went through your camera roll on your phone? When you have guests round, do you crack out the laptop/tablet to show them photos that you took a few months ago? CDs and memory sticks eventually end up on a shelf or in a drawer gathering dust, fading from memory.
I create portraits designed to be shown off – on the wall, in a presentation box, or in an album. Nothing beats turning the pages and hearing the gasps of wonder from your nearest and dearest when you show off your pride and joy.
For this reason, I only sell digitals as back-ups to accompany a product purchase. So when you buy an album or presentation box, you are provided with a complimentary memory stick that matches the design.
A: As soon as possible! My diary fills up quick, so leaving your booking till you've had your baby may not guarantee you a session. I usually pencil you into my diary a week or so after your due date; if your baby arrives earlier/later than expected, we can always shuffle your session date around – it's easier to shuffle a provisional date around than to book an entirely new date in.
Q: Do you only photograph the baby?
A: Certainly not! Although the new arrival steals everyone's attention for the first few weeks/months/years, the rest of the family is so important as well. I always encourage parents and siblings to join in as well. Mum and Dad will take dozens of photos as the little one grows up, but how often will they be in the shot? A portrait session is one of the rare occasions where the whole family will be in the shot together.
A: Simple, just get in touch, and I'll take care of the rest!


Try to set a system restore point before installing a device driver. This will help if you installed a wrong driver. Problems can arise when your hardware device is too old or not supported any longer.. Laptops, Desktop Computers, Monitors, Printers & PC Accessories | Dell. From personal computing to small, medium or large business, Dell solutions come fully stocked. Find your solutions with Dell laptops, desktops, monitors, printers and computer accessories.
Dell OptiPlex 960 BIOS A01 (Popularity: ) : The initial release of the Dell OptiPlex 960 BIOS A01.
The Dell Client Management Pack v4.0 enables System Center Operations Manager (SCOM) R2/SP1 and System Center Essentials (SCE) SP1 to Discover, Monitor and accurately depict the status of Dell Business Client Computers on a defined network segment.
Real home based internet job with zealworld (Popularity: ) : Post Advertisements Of Leadin Electronic Companies Like DELL , SAMSUNG , E-PRO PHILIPS by which you all can earn 30000 per month from home. For more detail.


DIAP's San Mateo office is a reflection of DIAP's creative process. With an open floor plan, spaces flow into each other, and can be divided by movable wall panels. This flexibility is enhanced by expanses of windows which open to the outside, and an array of expressive lighting options. Finished with the finest materials, DIAP's office provides an environment for excellence in design.


text:
Q: Removing element from array visual basic 6 I've an array which consists of multiple strings, I want to remove one of the strings. If my array has one of the same elements so ["a", "b", "b", "c"] and I want to remove one of the b's, my method will remove both. Here's my code so far:
Private Function Search_Array(Character As String) As Boolean

    For Loop_Index = 1 To UBound(Characters_Array)
        If Characters_Array(Loop_Index) = Character Then
            Search_Array = True
            Characters_Array(Loop_Index) = ""
        End If
    Next

End Function

Does anyone have any suggestion as to how I can remove only one of the b's from the array. Thanks a lot.

A: You just need to exit the loop after setting the first character found to an empty string.
Private Function Search_Array(Character As String) As Boolean

    For Loop_Index = 1 To UBound(Characters_Array)
        If Characters_Array(Loop_Index) = Character Then
            Search_Array = True
            Characters_Array(Loop_Index) = ""
            Exit For
        End If
    Next

End Function

A: The best way which works for me is that you create new function and in that function you put values in new array, and redim old aray to empty, then you will look which item to add back to old array with if . See the code below.
Private Function arrClean_ARR(arrOld As Variant) As variant
On Error GoTo ErrLn
    Const c_strProcName = "countARR"
Dim i As Long
Dim arrayValues As Variant
Dim count As Long

' put values in new array
arrayValues = arrOld

count = 0
For i = LBound(arrayValues) To UBound(arrayValues)
  'if value of the new array is "" then don't add in old array. Here you can   put your value (whatever) and it will not be in array. In that way you actualy remove value from array
  If arrayValues(i) <> "" Then
    ReDim Preserve arrOld (count)
    arrOld (i) = arrayValues(i)
    count = count + 1
  End If
Next i
arrClean_ARR = arrOld
Exit Function

redpajama_set_name: RedPajamaStackExchange


These delightful Birthday Glitz Balloons '70' Blue are a fantastic way to announce a 70th birthday celebration!
Supplied in a pack of 6 with 2 of each blue, light blue and white these high quality latex balloons will measure roughly 30.5cm once filled with air or helium.
These versatile balloons can also be used as a table centrepiece by attaching ribbon and balloon weight.


text:
Een gisant (van het Franse gésir, hulpeloos of (half)dood liggen, verwant aan gîte, schuil- of rustplaats) is een beeldhouwwerk, onderdeel van een grafmonument, waarbij de overledene liggend is afgebeeld. Het vervaardigen van gisanten kwam vanaf de gotiek meer en meer in gebruik.

In Nederland zijn meerdere gisanten behouden gebleven, anderen werden tijdens de Bataafse Republiek vernield. Een voorbeeld daarvan is de gisant van Anna van Oranje bij de Grafkelder van de Friesche Nassau's in Leeuwarden.

Bekendste gisant in Nederland is ongetwijfeld het beeld van Willem van Oranje, onderdeel van het grafmonument in de Nieuwe Kerk in Delft. Opvallend is dat Willem van Oranje op dit monument tweemaal is afgebeeld. Aan de voorzijde zittend in brons en daarachter liggend in marmer. Het grafmonument is vervaardigd door Hendrick de Keyser.

Een van de bekendste gisanten in Vlaanderen is dit van Maria van Bourgondië in de Onze-Lieve-Vrouwekerk (Brugge). Het praalgraf van Maria werd ontworpen door Jan Borman. Ze wordt naar middeleeuwse gewoonte voorgesteld in liggende houding en gevouwen handen. Met geopende ogen is ze in aanschouwing van het eeuwige leven. Aan haar voeten fungeert een hond als symbool van de vrouwelijke trouw. Het gelaat van Maria van Bourgondië is ragfijn weergegeven, geboetseerd naar het dodenmasker. Haar kroon met edelstenen versierd, haar handen en haar weelderig golvende mantel zijn een miniatuurkunstwerk. Het grafmonument is nog volledig gotisch van concept en van geest. Het praalgraf van haar vader Karel de Stoute, ook met gisant, werd later naast het hare geplaatst.

Andere bekende voorbeelden zijn het marmeren grafmonument van de hertog van Bretagne (1435-1488) en zijn vrouw Marguerite in de kathedraal van Nantes of de gisanten van Margaretha van Rohan en Olivier V de Clisson in de Basiliek van Onze-Lieve-Vrouw van Roncier van Josselin of de hertogen Jan II van Bretagne en Jan III van Bretagne in de Sint-Armelkerk van Ploërmel.

Wanneer de dode geknield wordt afgebeeld, spreekt men van een priant. Een gestalte in een aanbiddende houding is een adorant, (orant, orans).

Zie ook
Atlant

Externe links
Statua loricatus - Roel Renmans' uitvoerige database over middeleeuwse en Renaissance gisanten en andere grafmonumenten

Beeldhouwkunst

redpajama_set_name: RedPajamaWikipedia


text:
Xbox's Phil Spencer asks "why is it better for players?" of the metaverse
"I think it's easy for a lot of tech companies to describe why the metaverse might be better for their company"
By Will Nelson
Phil Spencer, Head of Xbox. Credit: Christian Petersen/Getty Images
Xbox chief Phil Spencer has talked about what the future of the metaverse could hold, and how it needs to be player-focused over company-focused.
READ MORE: A love letter to 'Animal Crossing: New Horizons" Snowboy
This comes from a recent interview Spencer did at protocol, where he talked about how developers need to put players first when thinking about the shape of a potential metaverse.
"We're spending a lot of time as leaders coming together talking about the learnings that we've had and how the technical underpinnings might come together. But more fundamental to me is why Microsoft?" said the Xbox head. "Like, why is this metaverse that a lot of people are focusing on, why is it better for players? Why is it better for creators?"
"I think it's easy for a lot of tech companies to describe why the metaverse might be better for their company. But we've just learned that if we put the player at the centre, to use my gaming vocabulary again, and try to build an ecosystem that works around their needs and creator needs, that the platform dynamic will take off," Spencer added.
Spencer seems acutely aware then that the metaverse is still an infantile project, or at least in the form that companies want it to take now. He also talked about how the metaverse as it's looking now would seemingly be controlled by multiple companies, instead of being a truly open platform.
Minecraft. Credit: Mojang
"I draw some analogies to the web. We felt like we had this really open platform for creation and consumption. But frankly, there were some companies that really created and captured some of the control of that web, whether it's the control of the discovery or the monetization or the social, which meant some of what happens on the web today doesn't necessarily feel as open as I think we would all like it to be."
The concept of the metaverse was aligned to games like Roblox and Minecraft by Spencer, in how they have player driven tools that are powered by being social and open to creators.
"Minecraft is really an open creation tool," explained Spencer. "Where people can go and create things, share them through our community marketplace and sell them to other members of the community. And I think that openness inside of Minecraft is such a critical part in terms of what it's become."
It needs to be noted then that Minecraft is owned by Microsoft, who also own Xbox, so Spencer's alignment between Minecraft and the metaverse isn't something he's just saying to be kind. Although considering Minecraft alone crossed one trillion views on YouTube recently, the staying power of it as a player creation tool cannot be denied.
In other news, so many staff are leaving developer Ubisoft that it's been dubbed "the great exodus," as employees at all levels are leaving the company.


text:
Q: Creating Object on the basis of type base on a condition I am facing a unique problem. We have a download functionality in our application in which we have a drop-down which contains type of file user need to download i.e. pdf,csv or excel
To implement this problem we have create one Interface IFileDownaload and three different class clsCSV,ClsPDF and clsExcel which are implemented by IFileDownaload
Now my problem is how to inititate a class on the basis of Dropdown value because i dont want to write down if-else statement
if(option=="pdf") type
because in future if we introduce a new file download type then it will impact us to re-write whole logic again
Any suggestion

A: You can define abbreviation for each class you have, so that you'll have something like this:
public interface IFileDownload
{
    string Abbreviation { get; }
}

public class PDFDonwload : IFileDownload
{
    public string Abbreviation { get; private set; }
}

Then you can make some class, i.e. factory, which have instances of all filedownloaders you have and which iterates through their Abbreviations till it finds proper class. It can be implemented like this:
public static class DownloadHander
    {

    private static List<IFileDownload> _handlers;
    static DownloadHander()
    {
        _handlers = new List<IFileDownload>();
    }

    public static void Initialize()
    {
        _handlers.Add(new PDFDonwload());
    }

    public static Stream HandleDownload(string abbreviation)
    {
        foreach (var fileDownload in _handlers)
        {
            if (fileDownload.Abbreviation == abbreviation)
            {
                //and here you make a stream for client
            }
        }
        throw new Exception("No Handler");
    }
}

A: When I have a number of classes which implement a certain type and those classes are stateless services rather than entities, I use a Registry rather than a Factory.
Your Registry has instances of all the IFileDownload-implementing classes injected into it in an array:
public class FileDownloaderRegistry
{
    private readonly IFileDownload[] _downloaders;

    public FileDownloaderRegistry(IFileDownload[] downloaders)
    {
        _downloaders = downloaders;
    }
}

You then have a property on IFileDownload which indicates the file type handled by the downloader:
public interface IFileDownload
{
    string FileType { get; }
    // etc.
}

And finally a method on your Registry which takes the file type and delegates the work to the appropriate downloader:
public string DownloadFile(string fileName, string fileType)
{
    var handlingDownloader = _downloaders
        .FirstOrDefault(d => d.FileType == fileType);

    if (handlingDownloader == null)
    {
        // Probably throw an Exception
    }

    return handlingDownloader.Download(fileName);
}

DI containers will often implicitly understand arrays, so just registering the various IFileDownloads should end up with them in the array injected into the Registry's constructor. e.g. with StructureMap you use:
For<IFileDownload>().Use<ClsCSV>();
For<IFileDownload>().Use<ClsPDF>();
For<IFileDownload>().Use<ClsExcel>();

Adding a new IFileDownload is then a matter of writing the class and adding it to the set of IFileDownloads registered with your DI container. You can also have the container manage the lifetimes of each object so (if they're stateless) they're only instantiated once each, when they're first needed.


text:
#include <aws/inspector/model/UpdateAssessmentTargetRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;

UpdateAssessmentTargetRequest::UpdateAssessmentTargetRequest() :
    m_assessmentTargetArnHasBeenSet(false),
    m_assessmentTargetNameHasBeenSet(false),
    m_resourceGroupArnHasBeenSet(false)
{
}

Aws::String UpdateAssessmentTargetRequest::SerializePayload() const
{
  JsonValue payload;

  if(m_assessmentTargetArnHasBeenSet)
  {
   payload.WithString("assessmentTargetArn", m_assessmentTargetArn);

  }

  if(m_assessmentTargetNameHasBeenSet)
  {
   payload.WithString("assessmentTargetName", m_assessmentTargetName);

  }

  if(m_resourceGroupArnHasBeenSet)
  {
   payload.WithString("resourceGroupArn", m_resourceGroupArn);

  }

  return payload.WriteReadable();
}

Aws::Http::HeaderValueCollection UpdateAssessmentTargetRequest::GetRequestSpecificHeaders() const
{
  Aws::Http::HeaderValueCollection headers;
  headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.UpdateAssessmentTarget"));
  return headers;

}

redpajama_set_name: RedPajamaGithub


text:
Q: How to stop a variable from being destroyed on pressing F5 in javascript I have the following code
<html>
    <head>
        <script>
            var m=0;
            function add() {
                m++;
            }
        </script>
    </head>
    <body>
        <button onclick="add();">click</button>
    </body>
</html>

But if I refresh the page then again the value of m starts from 0. How can I persist the value of m between each load of the page on a client machine?

A: One way is cookie
document.cookie = 'foo,bar'

Another way to do is use localstorage
localStorage.setItem('foo', 'bar');
localStorage.getItem('foo'); // return 'bar'

A: you can use cookies from javascript. check this link.
http://www.w3schools.com/js/js_cookies.asp
here is the working code sample:
<html>
<head>
<script>
var m=getCookie("m");
if(isNaN(m)) {
    m=0;
}
function add()
{
    m++;
    alert(m);
    setCookie("m",m,86400);
}

function setCookie(c_name,value,exdays)
{
    var exdate=new Date();
    exdate.setDate(exdate.getDate() + exdays);
    var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
    document.cookie=c_name + "=" + c_value;
}

function getCookie(c_name)
{
var i,x,y,ARRcookies=document.cookie.split(";");
for (i=0;i<ARRcookies.length;i++)
{
    x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
    y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
    x=x.replace(/^\s+|\s+$/g,"");
    if (x==c_name)
    {
            return unescape(y);
        }
    }
}
</script>
<body>
<button onclick="add();">click</button>
</body>
</html>

A: Actually it is what js mean to do on browsers, don't fight it, live with it. If you want to store variables in browsers, use cookies or local-storage(html5) then.

A: You might have to use:

*

*setting cookies by your backend script.

*use session in your backed script. eg session_start,$_SESSION in PHP

*use localStorage , that will work only in HTML 5 supporting browsers though.

A: You can't do that. The DOM and all the JS variables in your page get recreated on refresh. If you want to persist it you can either use cookies or localstorage to persist it.

A: It's normal that refreshing the page loads javascript functions again - use sessions or cookies to store variables like that.


text:
Tag: Lakers Lonzo Ball
REPORT: Lakers Would Pass on Lonzo Ball
Published on June 3, 2017 June 3, 2017 by talkingballyoutubeLeave a comment
By John Camera
According to Bleacher Report writer Jordan Schultz, if the NBA Draft was held today, the Los Angeles Lakers would pass on the player many expect them to select, UCLA Point Guard Lonzo Ball. Schultz notes that the Lakers are very concerned with Lonzo's father, LaVar, and the impact he would have. LaVar has manifested fame through the success of his son and with Lonzo landing in a prime time destination like LA, just down the street from where he played college, LaVar could have an even bigger voice. Along with this, the Lakers' front office is concerned with Ball's on-court game, skeptical of whether he can transition to being a true star at the next level.
While his father LaVar is an unknown, who knows how he'll act when his son is in the place he's wanted him to be since the beginning of this process, the Lakers concerns with Lonzo's game are serious and well-warranted.
Ball does has a safety net to fall back on. At the very worst he projects to be a Ricky Rubio type of player who can act as a distributor and play-maker but does little to create for himself. Rubio as a worst case scenario isn't very bad and the best case prospects for Ball should excite anyone. He could be the second coming of Jason Kidd or Penny Hardaway if he adjusts well to the NBA game. However, there are still deterrents that could prevent him from getting there.
The two biggest negatives to Lonzo's game are his lack of elite athleticism and his funky, unorthodox shooting motion. Lonzo does not have blazing speed or quickness like some of his contemporaries in this draft class and it could be a factor that may limit him throughout his career; this isn't a very fixable issue. What is fixable is his lack of great dribble moves that can separate him from defenders, something he will have to work on if he is to create consistent separation at the NBA level.
The other problem Ball will need to clean up to achieve NBA stardom is his shooting motion, which includes a low release point and may limit his dribble jumper at the next level. Ball will need to adjust the shot to get it to work against bigger, stronger, longer defenders or rebuild his mechanics from the ground up. While he should receive credit for being a solid three point and off-ball scorer at UCLA, he will need to do more, such as building a mid-range game, to become an NBA star.
While these are real issues that may hold Lonzo Ball back, it should be noted that he is still the best option for the Lakers if Markelle Fultz is off the board. However, a player to watch for Los Angeles is Kentucky's lightening-fast De'Aaron Fox. Fox could transform into a John Wall-type player as he fills out and learns to shoot better and turn the ball over less. As is, Fox is a speed demon with good mechanics, basketball IQ, and defending ability. If the Lakers are going to pick between Fox and Ball they have two choices; go with the potential homerun in Fox or take the safe pick and select Ball.
Categories Basketball, NBA, NBA Draft, NCAA•Tags LA Lakers Lonzo Ball, La Lakers nba draft, lakers 2017 nba draft, Lakers Lavar Ball, Lakers Lonzo Ball, Lakers NBA Draft, Los Angeles Lakers Lonzo Ball, Los Angeles Lonzo Ball


Research says 50 percent of U.S. mobile subscribers own a smartphone and an accelerating number of those folks rely on the device for everything from banking and driving directions to entertainment, shopping and dining.
With the Sparta's Pizza & Spaghetti mobile app, ordering your favorite food to-go has never been easier. Simply open the app, browse the menu, select your items, and voila! The pizza lovers in Bothell now receive Sparta's Pizza & Spaghetti notifications directly to your mobile about their exclusive deals.
For Sparta's Pizza & Spaghetti, apps can be a cost-effective tool to stand out in a crowded marketplace and jumpstart sales.
Also, by installing Sparta's Pizza & Spaghetti Mobile App, it tip and save your account info as well as Android Pay for easy checkout.
Sparta's Pizza & Spaghetti Mobile App is like having a Sparta's Pizza & Spaghetti's store in your pocket, anywhere at any time! It's fun and interactive and puts you in control!
With plenty of unique taste of pizza combinations, the Sparta's Pizza & Spaghetti Mobile App takes ordering to the next level.
Browse through all the products on our pizza catering in Lynnwood menu, customize your own pizza, design your order, choose pick up or delivery and best of all Track your order from the store to your door with the live Sparta's Pizza & Spaghetti Mobile App.
Join their Sparta's VIP Club to receive great deals and other information! By checking "Join Our Mobile VIP Club" you agree to receive mobile alerts.