text:
"""Base class for testing serializable datasets."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import os

import numpy as np

from tensorflow.contrib.data.python.ops import iterator_ops as contrib_iterator_ops
from tensorflow.python.data.ops import iterator_ops
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import errors
from tensorflow.python.framework import ops
from tensorflow.python.framework import sparse_tensor
from tensorflow.python.ops import lookup_ops
from tensorflow.python.ops import variables
from tensorflow.python.platform import gfile
from tensorflow.python.platform import test
from tensorflow.python.training import saver as saver_lib
from tensorflow.python.util import nest

def remove_variants(get_next_op):
  # TODO(b/72408568): Remove this once session.run can get
  # variant tensors.
  """Remove variants from a nest structure, so sess.run will execute."""

  def _remove_variant(x):
    if isinstance(x, ops.Tensor) and x.dtype == dtypes.variant:
      return ()
    else:
      return x

  return nest.map_structure(_remove_variant, get_next_op)

class DatasetSerializationTestBase(test.TestCase):
  """Base class for testing serializable datasets."""

  def tearDown(self):
    self._delete_ckpt()

  # TODO(b/72657739): Remove sparse_tensor argument, which is to test the
  # (deprecated) saveable `SparseTensorSliceDataset`, once the API
  # `from_sparse_tensor_slices()`and related tests are deleted.
  def run_core_tests(self, ds_fn1, ds_fn2, num_outputs, sparse_tensors=False):
    """Runs the core tests.

    Args:
      ds_fn1: 0-argument function that returns a Dataset.
      ds_fn2: 0-argument function that returns a Dataset different from
        ds_fn1. If None, verify_restore_in_modified_graph test is not run.
      num_outputs: Total number of outputs expected from this Dataset.
      sparse_tensors: Whether dataset is built from SparseTensor(s).

    Raises:
      AssertionError if any test fails.
    """
    self.verify_unused_iterator(
        ds_fn1, num_outputs, sparse_tensors=sparse_tensors)
    self.verify_fully_used_iterator(
        ds_fn1, num_outputs, sparse_tensors=sparse_tensors)
    self.verify_exhausted_iterator(
        ds_fn1, num_outputs, sparse_tensors=sparse_tensors)
    self.verify_init_before_restore(
        ds_fn1, num_outputs, sparse_tensors=sparse_tensors)
    self.verify_multiple_breaks(
        ds_fn1, num_outputs, sparse_tensors=sparse_tensors)
    self.verify_reset_restored_iterator(
        ds_fn1, num_outputs, sparse_tensors=sparse_tensors)
    self.verify_restore_in_empty_graph(
        ds_fn1, num_outputs, sparse_tensors=sparse_tensors)
    if ds_fn2:
      self.verify_restore_in_modified_graph(
          ds_fn1, ds_fn2, num_outputs, sparse_tensors=sparse_tensors)

  def verify_unused_iterator(self,
                             ds_fn,
                             num_outputs,
                             sparse_tensors=False,
                             verify_exhausted=True):
    """Verifies that saving and restoring an unused iterator works.

    Args:
      ds_fn: See `run_core_tests`.
      num_outputs: See `run_core_tests`.
      sparse_tensors: See `run_core_tests`.
      verify_exhausted: See `gen_outputs`.

    Raises:
      AssertionError if any test fails.
    """
    self.verify_run_with_breaks(
        ds_fn, [0],
        num_outputs,
        sparse_tensors=sparse_tensors,
        verify_exhausted=verify_exhausted)

  def verify_fully_used_iterator(self, ds_fn, num_outputs,
                                 sparse_tensors=False):
    """Verifies that saving and restoring a fully used iterator works.

    Note that this only checks saving and restoring an iterator from which
    `num_outputs` items have been produced but does not check for an
    exhausted iterator, i.e., one from which an OutOfRange error has been
    returned.

    Args:
      ds_fn: See `run_core_tests`.
      num_outputs: See `run_core_tests`.
      sparse_tensors: See `run_core_tests`.

    Raises:
      AssertionError if test fails.
    """
    self.verify_run_with_breaks(
        ds_fn, [num_outputs], num_outputs, sparse_tensors=sparse_tensors)

  def verify_exhausted_iterator(self, ds_fn, num_outputs, sparse_tensors=False):
    """Verifies that saving and restoring an exhausted iterator works.

    An exhausted iterator is one which has returned an OutOfRange error.

    Args:
      ds_fn: See `run_core_tests`.
      num_outputs: See `run_core_tests`.
      sparse_tensors: See `run_core_tests`.

    Raises:
      AssertionError if any test fails.
    """
    self.gen_outputs(
        ds_fn, [],
        num_outputs,
        verify_exhausted=True,
        sparse_tensors=sparse_tensors)
    actual = self.gen_outputs(
        ds_fn, [],
        0,
        ckpt_saved=True,
        verify_exhausted=True,
        sparse_tensors=sparse_tensors)
    self.assertEqual(len(actual), 0)

  def verify_init_before_restore(self,
                                 ds_fn,
                                 num_outputs,
                                 sparse_tensors=False,
                                 verify_exhausted=True):
    """Verifies that restoring into an already initialized iterator works.

    Args:
      ds_fn: See `run_core_tests`.
      num_outputs: See `run_core_tests`.
      sparse_tensors: See `run_core_tests`.
      verify_exhausted: See `gen_outputs`.

    Raises:
      AssertionError if any test fails.
    """
    self.verify_run_with_breaks(
        ds_fn,
        self.gen_break_points(num_outputs),
        num_outputs,
        init_before_restore=True,
        sparse_tensors=sparse_tensors,
        verify_exhausted=verify_exhausted)

  def verify_multiple_breaks(self,
                             ds_fn,
                             num_outputs,
                             num_breaks=10,
                             sparse_tensors=False,
                             verify_exhausted=True):
    """Attempts to save/restore at multiple break points.

    Args:
      ds_fn: See `run_core_tests`.
      num_outputs: See `run_core_tests`.
      num_breaks: The number of break points. These are uniformly spread in
        [0, num_outputs] both inclusive.
      sparse_tensors: See `run_core_tests`.
      verify_exhausted: See `gen_outputs`.

    Raises:
      AssertionError if any test fails.
    """
    self.verify_run_with_breaks(
        ds_fn,
        self.gen_break_points(num_outputs, num_breaks),
        num_outputs,
        sparse_tensors=sparse_tensors,
        verify_exhausted=verify_exhausted)

  def verify_reset_restored_iterator(self,
                                     ds_fn,
                                     num_outputs,
                                     break_point=None,
                                     sparse_tensors=False,
                                     verify_exhausted=True):
    """Attempts to re-initialize a restored iterator.

    This is useful when restoring a training checkpoint during validation.

    Args:
      ds_fn: See `run_core_tests`.
      num_outputs: See `run_core_tests`.
      break_point: Break point. Optional. Defaults to num_outputs/2.
      sparse_tensors: See `run_core_tests`.
      verify_exhausted: See `gen_outputs`.

    Raises:
      AssertionError if any test fails.
    """
    break_point = num_outputs // 2 if not break_point else break_point

    # Collect ground truth containing all outputs.
    expected = self.gen_outputs(
        ds_fn, [],
        num_outputs,
        sparse_tensors=sparse_tensors,
        verify_exhausted=verify_exhausted)

    # Skip some items and save checkpoint.
    self.gen_outputs(
        ds_fn, [],
        break_point,
        sparse_tensors=sparse_tensors,
        verify_exhausted=False)

    actual = []
    # Restore from checkpoint and then run init_op.
    with ops.Graph().as_default() as g:
      saver = self._import_meta_graph()
      init_op, get_next_op = self._get_iterator_ops_from_collection(
          ds_fn, sparse_tensors=sparse_tensors)
      get_next_op = remove_variants(get_next_op)
      with self.test_session(graph=g) as sess:
        self._restore(saver, sess)
        self._initialize(init_op, sess)
        for _ in range(num_outputs):
          actual.append(sess.run(get_next_op))
        if verify_exhausted:
          with self.assertRaises(errors.OutOfRangeError):
            sess.run(get_next_op)
    self.match(expected, actual)

  def verify_restore_in_modified_graph(self,
                                       ds_fn1,
                                       ds_fn2,
                                       num_outputs,
                                       break_point=None,
                                       sparse_tensors=False,
                                       verify_exhausted=True):
    """Attempts to restore an iterator in a modified graph.

    Builds an input pipeline using ds_fn1, runs it for `break_point` steps
    and saves a checkpoint. Then builds a new graph using ds_fn2, restores
    the checkpoint from ds_fn1 and verifies that the restore is successful.

    Args:
      ds_fn1: See `run_core_tests`.
      ds_fn2: See `run_core_tests`.
      num_outputs: See `run_core_tests`.
      break_point: Break point. Optional. Defaults to num_outputs/2.
      sparse_tensors: See `run_core_tests`.
      verify_exhausted: See `gen_outputs`.

    Raises:
      AssertionError if any test fails.
    """
    break_point = num_outputs // 2 if not break_point else break_point

    # Skip `break_point` items and store the remaining produced from ds_fn1
    # in `expected`.
    self.gen_outputs(
        ds_fn1, [],
        break_point,
        sparse_tensors=sparse_tensors,
        verify_exhausted=False)
    expected = self.gen_outputs(
        ds_fn1, [],
        num_outputs - break_point,
        ckpt_saved=True,
        sparse_tensors=sparse_tensors,
        verify_exhausted=verify_exhausted)

    # Generate `break_point` items from ds_fn1 and save checkpoint.
    self.gen_outputs(
        ds_fn1, [],
        break_point,
        sparse_tensors=sparse_tensors,
        verify_exhausted=False)

    actual = []
    # Build graph for ds_fn2 but load checkpoint for ds_fn1.
    with ops.Graph().as_default() as g:
      _, get_next_op, saver = self._build_graph(
          ds_fn2, sparse_tensors=sparse_tensors)
      get_next_op = remove_variants(get_next_op)
      with self.test_session(graph=g) as sess:
        self._restore(saver, sess)
        for _ in range(num_outputs - break_point):
          actual.append(sess.run(get_next_op))
        if verify_exhausted:
          with self.assertRaises(errors.OutOfRangeError):
            sess.run(get_next_op)

    self.match(expected, actual)

  def verify_restore_in_empty_graph(self,
                                    ds_fn,
                                    num_outputs,
                                    break_point=None,
                                    sparse_tensors=False,
                                    verify_exhausted=True):
    """Attempts to restore an iterator in an empty graph.

    Builds an input pipeline using ds_fn, runs it for `break_point` steps
    and saves a checkpoint. Then builds a new empty graph, restores
    the checkpoint from ds_fn and verifies that the restore is successful.

    Args:
      ds_fn: See `run_core_tests`.
      num_outputs: See `run_core_tests`.
      break_point: Break point. Optional. Defaults to num_outputs/2.
      sparse_tensors: See `run_core_tests`.
      verify_exhausted: See `gen_outputs`.

    Raises:
      AssertionError if any test fails.
    """
    break_point = num_outputs // 2 if not break_point else break_point

    # Skip `break_point` items and store the remaining produced from ds_fn
    # in `expected`.
    self.gen_outputs(
        ds_fn, [],
        break_point,
        sparse_tensors=sparse_tensors,
        verify_exhausted=False)
    expected = self.gen_outputs(
        ds_fn, [],
        num_outputs - break_point,
        ckpt_saved=True,
        sparse_tensors=sparse_tensors,
        verify_exhausted=verify_exhausted)

    # Generate `break_point` items from ds_fn and save checkpoint.
    self.gen_outputs(
        ds_fn, [],
        break_point,
        sparse_tensors=sparse_tensors,
        verify_exhausted=False)

    actual = []
    # Build an empty graph but load checkpoint for ds_fn.
    with ops.Graph().as_default() as g:
      get_next_op, saver = self._build_empty_graph(
          ds_fn, sparse_tensors=sparse_tensors)
      get_next_op = remove_variants(get_next_op)
      with self.test_session(graph=g) as sess:
        self._restore(saver, sess)
        for _ in range(num_outputs - break_point):
          actual.append(sess.run(get_next_op))
        if verify_exhausted:
          with self.assertRaises(errors.OutOfRangeError):
            sess.run(get_next_op)

    self.match(expected, actual)

  def verify_error_on_save(self,
                           ds_fn,
                           num_outputs,
                           error,
                           break_point=None,
                           sparse_tensors=False):
    """Attempts to save a non-saveable iterator.

    Args:
      ds_fn: See `run_core_tests`.
      num_outputs: See `run_core_tests`.
      error: Declared error when trying to save iterator.
      break_point: Break point. Optional. Defaults to num_outputs/2.
      sparse_tensors: See `run_core_tests`.

    Raises:
      AssertionError if any test fails.
    """

    break_point = num_outputs // 2 if not break_point else break_point
    with ops.Graph().as_default() as g:
      init_op, get_next_op, saver = self._build_graph(
          ds_fn, sparse_tensors=sparse_tensors)
      get_next_op = remove_variants(get_next_op)
      with self.test_session(graph=g) as sess:
        self._initialize(init_op, sess)
        for _ in range(break_point):
          sess.run(get_next_op)
        with self.assertRaises(error):
          self._save(sess, saver)

  def verify_run_with_breaks(self,
                             ds_fn,
                             break_points,
                             num_outputs,
                             init_before_restore=False,
                             sparse_tensors=False,
                             verify_exhausted=True):
    """Verifies that ds_fn() produces the same outputs with and without breaks.

    1. Builds a Dataset using `ds_fn` and produces `num_outputs` items from it
       *without* stopping at break points.
    2. Builds a Dataset using `ds_fn` and produces `num_outputs` items from it
       with stopping at break points.

    Deep matches outputs from 1 and 2.

    Args:
      ds_fn: See `gen_outputs`.
      break_points: See `gen_outputs`.
      num_outputs: See `gen_outputs`.
      init_before_restore: See `gen_outputs`.
      sparse_tensors: See `run_core_tests`.
      verify_exhausted: See `gen_outputs`.

    Raises:
      AssertionError if any test fails.
    """
    expected = self.gen_outputs(
        ds_fn, [],
        num_outputs,
        init_before_restore=init_before_restore,
        sparse_tensors=sparse_tensors,
        verify_exhausted=verify_exhausted)

    actual = self.gen_outputs(
        ds_fn,
        break_points,
        num_outputs,
        init_before_restore=init_before_restore,
        sparse_tensors=sparse_tensors,
        verify_exhausted=verify_exhausted)

    self.match(expected, actual)

  def gen_outputs(self,
                  ds_fn,
                  break_points,
                  num_outputs,
                  ckpt_saved=False,
                  init_before_restore=False,
                  sparse_tensors=False,
                  verify_exhausted=True,
                  save_checkpoint_at_end=True):
    """Generates elements from input dataset while stopping at break points.

    Produces `num_outputs` outputs and saves the state of the iterator in the
    Saver checkpoint.

    Args:
      ds_fn: 0-argument function that returns the dataset.
      break_points: A list of integers. For each `break_point` in
        `break_points`, we produce outputs till `break_point` number of items
        have been produced and then checkpoint the state. The current graph
        and session are destroyed and a new graph and session are used to
        produce outputs till next checkpoint or till `num_outputs` elements
        have been produced. `break_point` must be <= `num_outputs`.
      num_outputs: The total number of outputs to produce from the iterator.
      ckpt_saved: Whether a checkpoint already exists. If False, we build the
        graph from ds_fn.
      init_before_restore: Whether init should be called before saver.restore.
        This is just so that we can verify that restoring an already initialized
        iterator works.
      sparse_tensors:  Whether dataset is built from SparseTensor(s).
      verify_exhausted: Whether to verify that the iterator has been exhausted
        after producing `num_outputs` elements.
      save_checkpoint_at_end: Whether to save a checkpoint after producing all
        outputs. If False, checkpoints are saved each break point but not at the
        end. Note that checkpoints overwrite each other so there is always only
        a single checkpoint available. Defaults to True.

    Returns:
      A list of `num_outputs` items.
    """
    outputs = []

    def get_ops():
      if ckpt_saved:
        saver = self._import_meta_graph()
        init_op, get_next_op = self._get_iterator_ops_from_collection(
            ds_fn, sparse_tensors=sparse_tensors)
      else:
        init_op, get_next_op, saver = self._build_graph(
            ds_fn, sparse_tensors=sparse_tensors)
      get_next_op = remove_variants(get_next_op)
      return init_op, get_next_op, saver

    for i in range(len(break_points) + 1):
      with ops.Graph().as_default() as g:
        init_op, get_next_op, saver = get_ops()
        get_next_op = remove_variants(get_next_op)
        with self.test_session(graph=g) as sess:
          if ckpt_saved:
            if init_before_restore:
              self._initialize(init_op, sess)
            self._restore(saver, sess)
          else:
            self._initialize(init_op, sess)
          start = break_points[i - 1] if i > 0 else 0
          end = break_points[i] if i < len(break_points) else num_outputs
          num_iters = end - start
          for _ in range(num_iters):
            outputs.append(sess.run(get_next_op))
          if i == len(break_points) and verify_exhausted:
            with self.assertRaises(errors.OutOfRangeError):
              sess.run(get_next_op)
          if save_checkpoint_at_end or i < len(break_points):
            self._save(sess, saver)
            ckpt_saved = True

    return outputs

  def match(self, expected, actual):
    """Matches nested structures.

    Recursively matches shape and values of `expected` and `actual`.
    Handles scalars, numpy arrays and other python sequence containers
    e.g. list, dict.

    Args:
      expected: Nested structure 1.
      actual: Nested structure 2.

    Raises:
      AssertionError if matching fails.
    """
    if isinstance(expected, np.ndarray):
      expected = expected.tolist()
    if isinstance(actual, np.ndarray):
      actual = actual.tolist()
    self.assertEqual(type(expected), type(actual))

    if nest.is_sequence(expected):
      self.assertEqual(len(expected), len(actual))
      if isinstance(expected, dict):
        for key1, key2 in zip(sorted(expected), sorted(actual)):
          self.assertEqual(key1, key2)
          self.match(expected[key1], actual[key2])
      else:
        for item1, item2 in zip(expected, actual):
          self.match(item1, item2)
    else:
      self.assertEqual(expected, actual)

  def does_not_match(self, expected, actual):
    with self.assertRaises(AssertionError):
      self.match(expected, actual)

  def gen_break_points(self, num_outputs, num_samples=10):
    """Generates `num_samples` breaks points in [0, num_outputs]."""
    return np.linspace(0, num_outputs, num_samples, dtype=int)

  def _build_graph(self, ds_fn, sparse_tensors=False):
    iterator = ds_fn().make_initializable_iterator()

    saveable = contrib_iterator_ops.make_saveable_from_iterator(iterator)
    ops.add_to_collection(ops.GraphKeys.SAVEABLE_OBJECTS, saveable)
    init_op = iterator.initializer
    if sparse_tensors:
      get_next = sparse_tensor.SparseTensor(*iterator.get_next())
    else:
      get_next = iterator.get_next()
    self._add_iterator_ops_to_collection(init_op, get_next, ds_fn,
                                         sparse_tensors)
    saver = saver_lib.Saver(allow_empty=True)
    return init_op, get_next, saver

  def _build_empty_graph(self, ds_fn, sparse_tensors=False):
    iterator = iterator_ops.Iterator.from_structure(
        self._get_output_types(ds_fn),
        output_shapes=self._get_output_shapes(ds_fn),
        output_classes=self._get_output_classes(ds_fn))
    saveable = contrib_iterator_ops.make_saveable_from_iterator(iterator)
    ops.add_to_collection(ops.GraphKeys.SAVEABLE_OBJECTS, saveable)
    if sparse_tensors:
      get_next = sparse_tensor.SparseTensor(*iterator.get_next())
    else:
      get_next = iterator.get_next()
    saver = saver_lib.Saver(allow_empty=True)
    return get_next, saver

  def _add_iterator_ops_to_collection(self,
                                      init_op,
                                      get_next,
                                      ds_fn,
                                      sparse_tensors=False):
    ops.add_to_collection("iterator_ops", init_op)
    # `get_next` may be a tuple e.g. in TensorSliceDataset. Since Collections
    # do not support tuples we flatten the tensors and restore the shape in
    # `_get_iterator_ops_from_collection`.

    # TODO(shivaniagrwal): `output_classes` is a nested structure of classes,
    # this base class is specific to current test cases. Update when tests are
    # added with `output_classes` as a nested structure with at least one of the
    # component being `tf.SparseTensor`.
    if (sparse_tensors or
        self._get_output_classes(ds_fn) is sparse_tensor.SparseTensor):
      ops.add_to_collection("iterator_ops", get_next.indices)
      ops.add_to_collection("iterator_ops", get_next.values)
      ops.add_to_collection("iterator_ops", get_next.dense_shape)
    else:
      for el in nest.flatten(get_next):
        ops.add_to_collection("iterator_ops", el)

  def _get_iterator_ops_from_collection(self, ds_fn, sparse_tensors=False):
    all_ops = ops.get_collection("iterator_ops")
    if (sparse_tensors or
        self._get_output_classes(ds_fn) is sparse_tensor.SparseTensor):
      init_op, indices, values, dense_shape = all_ops
      return init_op, sparse_tensor.SparseTensor(indices, values, dense_shape)
    else:
      return all_ops[0], nest.pack_sequence_as(
          self._get_output_types(ds_fn), all_ops[1:])

  def _get_output_types(self, ds_fn):
    with ops.Graph().as_default():
      return ds_fn().output_types

  def _get_output_shapes(self, ds_fn):
    with ops.Graph().as_default():
      return ds_fn().output_shapes

  def _get_output_classes(self, ds_fn):
    with ops.Graph().as_default():
      return ds_fn().output_classes

  def _ckpt_path(self):
    return os.path.join(self.get_temp_dir(), "iterator")

  def _latest_ckpt(self):
    return saver_lib.latest_checkpoint(self.get_temp_dir())

  def _save(self, sess, saver):
    saver.save(sess, self._ckpt_path())

  def _restore(self, saver, sess):
    sess.run(lookup_ops.tables_initializer())
    saver.restore(sess, self._latest_ckpt())

  def _initialize(self, init_op, sess):
    sess.run(variables.global_variables_initializer())
    sess.run(lookup_ops.tables_initializer())
    sess.run(init_op)

  def _import_meta_graph(self):
    meta_file_path = self._ckpt_path() + ".meta"
    return saver_lib.import_meta_graph(meta_file_path)

  def _delete_ckpt(self):
    # Remove all checkpoint files.
    prefix = self._ckpt_path()
    pattern = prefix + "*"
    files = gfile.Glob(pattern)
    map(gfile.Remove, files)


Xamlon Pro, Flash Edition, lets developers use Microsoft's C# and Visual Basic .Net to write applications for Flash. The company's chief executive says the product will swell the ranks of Flash developers.
Xamlon Inc. is expected to release a preview of its latest product, Xamlon Pro, Flash Edition, on April 6.
Xamlon, which focuses on producing tools that enable developers to create rich applications for Windows PocketPC and the Web, is scheduled to release the preview of this product, which lets developers use Microsoft Corp.s C# and Visual Basic .Net to write applications for Macromedia Inc.s Flash environment.
Paul Colton, chief executive of La Jolla, Calif.-based Xamlon, said that with the new Xamlon Pro Flash Edition, Xamlon will be able to tap millions of Visual Basic and C# developers and swell the ranks of Flash developers with programmers who can use the .Net languages to write Flash applications.
/zimages/3/28571.gifTo read more about Xamlons Xamlon Pro, Compact Edition, click here.
Colton said Xamlon is enabling developers to publish to Flash using .Net and design their user interfaces in XAML, the Extensible Application Markup Language from Microsoft.
The approach Xamlon is promoting is somewhat like the Ajax model that is gaining popularity, Colton said.
/zimages/3/28571.gifRead more here about Ajax and "smart clients."
Ajax is a set of technologies for building rich Web applications.
Xamlon is attempting to piggyback on Ajaxs momentum with its own set of Web development technologies, which it has christened Aflax (for asynchronous Flash and XML).
The new Xamlon Pro Flash Edition tool is one element of Aflax.
Xamlons premise: By using C# and Visual Basic .Net (or Java, later this year), a developer will be able to deploy directly to Flash, instead of to multiple browsers.
Next week at the Flashforward conference in San Francisco, Xamlon will show off a near final beta Xamlon Pro Flash Edition.
Some examples of applications Colton said developers will be able to build with the tool include ads and banners, online games, learning tools, interactive applications, dashboards, e-commerce shopping sites and cartography applications.
"The value proposition is that this enables developers and designers to work with the tools they already know," Colton said.
The preview release will be available on Xamlons Web site.
And the final 1.0 version will cost $499 per developer and should be available May 3.
Later in the year, Xamlon will release an enterprise edition of the product and a version for Java developers, Colton said.


This 60 Minutes report -"Is your credit report accurate?" explains some of the problems with the three major credit reporting agencies.
When consumers with credit card debt unpaid for over six months check their credit score, they will notice that in addition to each original credit card bank there are one or more debt collectors reporting a negative listing on their credit report for that same bank's credit card debt. These multiple listings for each credit card debt are what really ruin their credit score. Each debt collector places a bad mark on their credit score to motivate them to pay or settle the debt. Unless they do something about it, that bad mark could stay there for seven years from the date of first delinquency of that debt.
If there are several overdue credit cards, the multiplier effect will trash the consumer's credit score. Two or three bad debts could mushroom into eight or twelve negative listings, counting each bank, that bank's debt collector, one or more junk debt buyers who buy then sell each debt, as well as the debt collection agencies and/or collection law firms working for the junk debt buyer(s).
Consumers with overdue credit card debt and the resulting damage to their credit scores are susceptible to credit repair scams. They need to be careful because they should not pay self-proclaimed experts any money on the promise of better credit in the future.
It is important to understand how the credit reporting agencies work, as well as to access your credit reports regularly to find who is reporting negative information about you.
It would also be a good idea to have access to the Fair Credit Reporting Act to learn the protections it affords you.
Despite credit-repair scam artists claims to the contrary, getting the original credit card bank's negative listing off of a credit report is difficult. However, debt collectors and collection attorneys, as well as junk debt buyers are covered by the Fair Debt Collection Practices Act (FDCPA). Negative credit listings by all these debt collectors are considered collection activity by the FDCPA, and as such, must be removed from a consumer's credit report, if the consumer tells the debt collector in writing to cease all collection activity.
With the right letter, a consumer can protect their credit and at the same time defeat credit card debt collectors and collection attorneys. That letter should be sent to each debt collector CMRRR within 30 days of receipt of the first written collection notice. In addition to the instruction to cease all collection activity, that letter show deny and dispute the alleged debt. It should request specific, detailed documentation of the contract, a detailed accounting of the alleged amount owed, and proof of ownership, if it is from a junk debt buyer or their debt collector.
I, Mel Thompson, owed over $63,000 in credit card debt I could not afford to pay. I got rid of the debt collectors and collection attorneys and protected my credit score without paying what I could not afford to pay. Since then I have been helping others to help themselves defeat debt collectors and collection attorneys and protect their credit scores. You are welcome to read my posts and educate yourself about how non-payment of credit card debt works. You can read my credit card debt story here.


Image 1a (Computed Tomography): Inflammatory changes are seen around the sigmoid colon without abscess formation (arrow).
1b Image 1b (Computed Tomography): Sigmoid diverticulitis complicated by an abscess (arrow).
Image 2a: Sigmoid colectomy showing multiple diverticular outpouchings through the bowel wall. Note the attenuated muscularis propria (black arrows) compared to the normal muscle layer (blue arrow).
2b Image 2b (H&E, x2.5): Histological section showing an uninflamed diverticulum extending through the muscularis propria of the large bowel wall.


This is easily the best Clapton CD to get if your just getting into his modern stuff. This CD, along with 1994's The Cream Of Clapton, will give you a great oversight into his career! Blue Eyes Blue is a brilliant song, and in my opinion it is worth buying the CD just to hear it! There isn't a bad song on this album IMO, but buy Unplugged to get his the full force of that album! As a previous reviewer said, a must buy indeed!
Acoustic, electric, drum machine, live, hits, new songs, ballads, it has this and much more take a journey with this album with EC and his taste of music.
This is a CD chocked full of his more recent classics and needs to be in every EC fans collection. Blue eyes blue is one of his better acoustic songs of his career. It is on par with "Tears in Heaven" and "If I could change the World" Just that song alone makes the CD worth purchasing.
I got lost is another song that appears on this CD that doesn't appear on any other EC albums.
This album is such a inspiration to me. I am 17 years old and I love to sing as well as act. My favourite songs on the album are 'Blue Eyes Blue', 'Layla' and the touching 'My Father's Eyes'. As I am only 17 I did not know about Eric's life, but I'm so glad I do now. He has accomplished so much in such a short time, I hope he is proud of what he has accomplished because he should be, to me he is one of the most successful solo artists ever to be born. I would love to sing with Eric Clapton as I think he is so talented. Before I knew about his son Conor, I loved 'My Father's Eyes', but when I did have knowledge that the song was dedicated to his song it only made me love it more because the song shows how Eric was feeling at that time and it's such a beautiful song. I would like to say to Eric that he is such an inspiration to me and that he should never lose faith.
This album I had bought nearly two years ago and still give me a good inspiration because I can say that all of his songs is so fabulous. For an example, "My Father's Eyes", "Wonderful Tonight", "Layla", "Forever Man" and many more. Finally I'd like to say to all fans of Eric, please do more support him no matter in singing or producing. Mr Clapton, sing more and hope you could success more on your career, Good Luck!
This is a really good album this is a must buy I bought it while I was on holiday. I just couldn't resist it. We have played most of the songs in our band Relasys.
Let me first say: The songs on this album are all great. Some of the songs are in better versions than on the original albums, but the majority are weak versions on my opinion. Take for example the version of Wonderful Tonight. This is not even the entire song.
Also: If you own 24 Nights the songs from Journeyman and other classics seem extremely "flat" and boring, in these versions. It would be a great idea to create a "EC Greatest: Live" Because his music is best in live concerts.
This album, The Best of Eric Clapton, is truly an excellent for a younger audience because it gives a great overview of his life works. From the 80s to the 00 we hear the transitions in different genres of music and how Eric deals with his life problems. especially in "Tears in Heaven". For a new audience this album contracts Eric's accomplishments and all that he endures into one great album.
This album would satisfy any music lover and thrill any EC fan....a must buy album.
This is the best album for new fans in order to have a good taste about EC's music. For us, it is a review about EC's evolution through blues.


How can I review store orders?
How can I filter for specific Store Orders?
You can use the following filters to bring up a list of members with pending store orders or those without pending store orders. Once you select the filters you would like, click Find to apply the filters. If you want to see a list of all pending store orders, click Reset Filters and then click Find.
4. Flags: Filter for all members with a specific Flag. Flags can be added under the Contact Info tab of a member account in the dashboard.
How do I Export and Email Members With Store Orders?
Just like with subscriptions, you can export and email members who have a store order.
To email members with store orders, click the Email Members button in the upper right corner. If you have filters applied, the email will only be sent to the members listed in the results from the applied filters. You can either type an email directly or use one of your previously created templates.
Reminding members that they can add items from your store to their subscription is a good way to kick-start higher participation from existing members. We recommend sending an email to all of your members who have not placed a store order. You can use the Status - Not Submitted filter to easily pull a list of these members. Then, click the email members button in the upper right hand corner.


text:
Welcome to Dechra Pharmaceuticals PLC
Growing Our Geographical Footprint
Dechra's Strengths
Chairman's View
Global Market Dynamics
Product Market Dynamics
Creating Value for Our Stakeholders
Delivering Our Strategy
Strategic Timeline
Our Achievements and Progress
Chief Executive Officer's Statement
Q&A with Ian Page
Pipeline Delivery
Portfolio Focus
Geographical Expansion
Product Development Pipeline
International Product Offering
How the Business Manages Risk
Understanding Our Key Risks
Letter from the Chairman on Governance
Compliance with the Code
Senior Executive Team
Relations with Shareholders
Audit Committee Report
Letter from the Audit Committee Chairman
Nomination Committee Report
Letter from the Nomination Committee Chairman
Director's Remuneration Report
Letter from the Remuneration Committee Chairman
Remuneration at a Glance
2019 Annual Report on Remuneration
Directors' Remuneration Policy
Directors' Report - Other Disclosures
Statement of Directors' Responsibilities
Independent Auditors' Report to the Members of Dechra Pharmaceuticals PLC
Consolidated Income Statement
Consolidated Statement of Changes in Shareholders' Equity
Company Statement of Financial Position
Company Statement of Changes in Shareholders' Equity
Annual Report and Accounts for the year ended 30 June 2019
Letter from the Chairman on Governance Compliance with the Code Corporate Governance Audit Committee Report Nomination Committee Report Director's Remuneration Report Directors' Report - Other Disclosures Statement of Directors' Responsibilities
Statement of Directors' Responsibilities in Respect of the Annual Report and Financial Statements
The Directors are responsible for preparing the Annual Report and the Financial Statements in accordance with applicable law and regulations.
Company law requires the Directors to prepare Financial Statements for each financial year. Under that law the Directors are required to prepare the Group Financial Statements in accordance with International Financial Reporting Standards (IFRSs) as adopted by the European Union (EU) and Company Financial Statements in accordance with United Kingdom (UK) Generally Accepted Accounting Practice (United Kingdom Accounting Standards, comprising FRS 101 'Reduced Disclosure Framework', and applicable law).
Under company law, the Directors must not approve the Financial Statements unless they are satisfied that they give a true and fair view of the state of affairs of the Group and Company and of the profit or loss of the Group and Company for that period. In preparing the Financial Statements, the Directors are required to:
select suitable accounting policies and then apply them consistently;
state whether applicable IFRSs as adopted by the European Union have been followed for the Group Financial Statements and United Kingdom Accounting Standards, comprising FRS 101, have been followed for the Company Financial Statements, subject to any material departures disclosed and explained in the Financial Statements;
make judgements and estimates that are reasonable and prudent; and
prepare the Financial Statements on the going concern basis unless it is inappropriate to presume that the Group and Company will continue in business.
The Directors are also responsible for safeguarding the assets of the Group and Company and hence for taking reasonable steps for the prevention and detection of fraud and other irregularities.
The Directors are responsible for keeping adequate accounting records that are sufficient to show and explain the Group and Company's transactions and disclose with reasonable accuracy at any time the financial position of the Group and Company, and enable them to ensure that the Financial Statements and the Directors' Remuneration Report comply with the Companies Act 2006 and, as regards the Group Financial Statements, Article 4 of the IAS Regulation.
The Directors are responsible for the maintenance and integrity of the Company's website. Legislation in the United Kingdom governing the preparation and dissemination of Financial Statements may differ from legislation in other jurisdictions.
The Directors consider that the Annual Report and Accounts, taken as a whole, is fair, balanced and understandable and provides the information necessary for shareholders to assess the Group and Company's performance, business model and strategy.
Each of the Directors as at the date of the Annual Report, whose names and functions are set out in the Board, confirm that to the best of their knowledge:
the Company Financial Statements, which have been prepared in accordance with United Kingdom Generally Accepted Accounting Practice (United Kingdom Accounting Standards, comprising FRS 101 'Reduced Disclosure Framework', and applicable law), give a true and fair view of the assets, liabilities, financial position and profit of the Company;
the Group Financial Statements, prepared in accordance with IFRSs as adopted by the EU, give a true and fair view of the assets, liabilities, financial position and profit or loss of the Group; and
the Strategic Report includes a fair review of the development and performance of the business and the position of the Group and Company, together with a description of the principal risks and uncertainties that it faces.
Approved by the Board and signed on its behalf by:
Ian Page
Non-Executive Chairman
previous Directors' Report - Other Disclosures
next Independent Auditors' Report to the Members of Dechra Pharmaceuticals PLC
©2019 Dechra Pharmaceuticals PLC
www.dechra.com
Designed and developed by jonesandpalmer.co.uk

redpajama_set_name: RedPajamaCommonCrawl


text:
Q: Update or create price of product from the purchase order. How? I have this code for the module purchase supplier in OPENERP.  When one validates a purchase, the partner is converted in product supplier inside the product.
# -*- encoding: utf-8 -*-

from openerp.osv import osv

class purchase_order(osv.Model):
_inherit = "purchase.order"

def wkf_confirm_order(self, cr, uid, ids, context=None):
    product_supp_obj = self.pool.get('product.supplierinfo')
    company_id = self.pool.get(
        'res.users').browse(cr, uid, uid).company_id.id
    product_obj = self.pool.get('product.template')
    if super(purchase_order, self).wkf_confirm_order(cr, uid, ids,
                                                     context=context):
        for po in self.browse(cr, uid, ids, context=context):
            partner_id = po.partner_id.id
            for line in po.order_line:
                product_id = line.product_id.product_tmpl_id.id
                if not product_supp_obj.search(cr, uid,
                                               [('product_id', '=',
                                                               product_id),
                                               ('name', '=', partner_id)]):
                    product_obj.write(cr, uid, [product_id],
                                      {
                                      'seller_ids': [(0, 0,
                                                      {'name': partner_id,
                                                       'min_qty': 1.0,
                                                       'delay': 1,
                                                       'sequence': 10,
                                                       'product_id':
                                                       product_id,
                                                       'company_id':
                                                       company_id,
                                                       'product_uom':
                                                       line and
                                                     line.product_id and
                                                     line.product_id.
                                                       uom_id and
                                                     line.product_id.
                                                       uom_id.id})]})
        return True
    else:
        return False

I want to extend the code, because the supplier is created, but there is no update or even no create the new price from that purchase order. I think the object is 'pricelist.partnerinfo' and that field is a price from product.
Am I right? How to update it?
Thanks and regards!

redpajama_set_name: RedPajamaStackExchange


We service the entire area of greater Brisbane City. From the busiest building of the Inner City Centre out to the farthest house of the North, South, East and Western suburbs. We almost always arrive within 30 minutes from the time you call. However we guarantee to get there within an hour, if we don't, we pay you $50. Here at Dr Air Conditioning Brisbane we consist of a team of local technicians that believe great service is our most important feature. So whether its in the middle of peak hour traffic or an emergency in the middle of the night, call us first, we answer your call first time and we get to you fast because we always have someone close by.
Trust us to get to you quickly and get your electrical problem solved even faster, all for the most reasonable rate. We don't just make claims, we back them up with guarantees, put us to the test now; call 1300 366 959.


In alignment with our church, the chief mission of the Anointed Vessels Liturgical Dance Ministry is to Glorify God, Who has given us the highest revelation of Himself in the person of Jesus Christ. In glorifying God in our ministry of dance, we enter into worship, seeking to give fitting expression to the profound and dedicated commitment of our Lord Jesus Christ. The ministry of dance is a form of expression to minister the Gospel of Jesus Christ. It is in this expression that people are saved, healed, delivered and set free.


text:
Andre Bazin Net Worth
Andre Bazin was born on April 18, 1918 in Angers, France, French, is Film Critic. Andre Bazin was an influential French film critic and film theorist who revolutionized the field of film criticism with his works. He lived during a time when a film was considered simply as a medium of entertainment and was not accorded the status of a piece of art. He helped to change the public perspective regarding films through his simple yet strong technique of film criticism. During his days, film criticism was limited to a simple description and evaluation of the film in question. It was Bazin who elevated film criticism to a serious discussion of film as an art form, focusing not just on the content, but also on the techniques of film making used. Understanding cinema as an art form seems to be a peculiar career option he had chosen given that in his young age he had no interest in any form of art whatsoever. As a teenager he was a brilliant student and a voracious reader. He was a big animal lover and had a huge collection of lizards and snakes in his house. Initially he aspired to be a teacher but the outbreak of the World War II shattered his dreams. Fate led him to a totally unrelated vocation, film criticism, which ironically became his area of expertise.
Andre Bazin is a member of Miscellaneous
Who is it? Film Critic
Birth Day April 18, 1918
Birth Place Angers, France, French
Age 102 YEARS OLD
Died On 11 November 1958(1958-11-11) (aged 40)\nNogent-sur-Marne, France
Birth Sign Taurus
Alma mater Ecole Normale Supérieurede Saint-Cloud
Occupation Film critic, film theorist
💰 Net worth: $1.9 Million
Some Andre Bazin images
Biography/Timeline
Bazin was born in Angers, France, in 1918. He died in 1958, age 40, of leukemia.
The long-held standard view of Bazin's critical system is that he argued for films that depicted what he saw as "objective reality" (such as documentaries and films of the Italian neorealism school) and Directors who made themselves "invisible" (such as Howard Hawks). He advocated the use of deep focus (Orson Welles), wide shots (Jean Renoir) and the "shot-in-depth", and preferred what he referred to as "true continuity" through mise-en-scène over experiments in editing and visual effects. This placed him in opposition to film theory of the 1920s and 1930s, which emphasized how the cinema could manipulate reality. The concentration on objective reality, deep focus, and lack of montage are linked to Bazin's belief that the interpretation of a film or scene should be left to the spectator. He watched film as personally as he expected the Director to undertake it. His personal friendships with many Directors he wrote about also furthered his analysis of their work. He became a central figure not only in film critique, but in bringing about certain collaborations, as well. Bazin also preferred long takes to montage editing. He believed that less was more, and that narrative was key to great film.
Bazin started to write about film in 1943 and was a co-founder of the renowned film magazine Cahiers du cinéma in 1951, along with Jacques Doniol-Valcroze and Joseph-Marie Lo Duca. Bazin was a major force in post-World War II film studies and criticism. He edited Cahiers until his death, and a four-volume collection of his writings was published posthumously, covering the years 1958 to 1962 and titled Qu'est-ce que le cinéma? (What is Cinema?). A selection from this collection was translated into English and published in two volumes in the late 1960s and early 1970s. They became mainstays of film courses in the English-speaking world, but were never updated or revised. In 2009, the Canadian publisher Caboose, taking advantage of more favourable Canadian copyright laws, compiled fresh translations of some of the key essays from the collection in a single-volume edition. With annotations by translator Timothy Barnard, this became the only corrected and annotated edition of these writings in any language.
Bazin, who was influenced by personalism, believed that a film should represent a director's personal vision. This idea had a pivotal importance in the development of the auteur theory, the manifesto for which François Truffaut's article, "A Certain Tendency of the French Cinema", was published by his mentor Bazin in Cahiers in 1954. Bazin also is known as a proponent of "appreciative criticism", the notion that only critics who like a film should review it, thus encouraging constructive criticism.
1918 births 1958 deaths Film theorists French film critics French Roman Catholics People from Angers French male writers École Normale Supérieure alumni
Andre Bazin fans also viewed:
Charles Eames Net Worth
Augustus Pitt Rivers Net Worth
Anjali Tendulkar Net Worth
William Randolph Net Worth
Edward Hargraves Net Worth
Sir Charles Trevelyan, 1st Baronet Net Worth
Joseph Smith Jr. Net Worth
Princess Anne Net Worth
Sarah Baartman Net Worth
Bart Cummings Net Worth


Happy Tuesday, everyone! We are in the full throes of summer here in Southern Arizona, and sometimes the only reprieve comes in the form of cocktails on the patio while enjoying friendly company. It seems everyone is hosting a get-together this summer, and since my Mom always told me to never go to a party empty-handed, I decided an embroidered wine tote would be a great hostess gift for the occasion.
I have been wanting to use this burlesque fan dancer embroidery pattern from Jenny Hart's, Embroidered Effects book for some time, and why not add her to a wine tote as a flirty hostess or host gift? Sounds good to me. I also thought a monogrammed tote would be great for this project, as well, but I'll do that for the next party.
Step One: Transfer your embroidery pattern to one exterior piece of fabric and stitch.
Step Two: Assemble the exterior portion of the bag by laying the exterior pieces of fabric right sides together and the batting on the outside of either piece. Stitch around three sides using a 1/4 seam allowance, leaving the top open.
Step Three: Create a square flat bottom for the bag by taking the bottom corner seams and and pressing them flat against one another. Sew 2-inches down from the point. Clip the excess fabric and repeat on opposite corner.
Step Four: Assemble the lining of the bag by placing the two lining pieces right sides together. Mark a 2-inch space to leave unsewn, this will be used to flip the bag inside out later. Sew around the three sides using a 1/4-inch seam allowance, leaving the top open. Make sure to leave your marked space open, as well.
Step Five: Square off the corners of the lining as you did in Step Three for the tote exterior.
Step Six: To assemble the strap, take the 4x21-inch piece of fabric, fold it in half, and press.
Unfold, and press the outer edges in toward the center crease you just created.
Top stitch on either side of the strap.
Step Seven: Take the strap, align each edge on the center of each side seam of the tote, and pin in place.
Step Eight: Take the lining of the tote and place it inside of the exterior piece, with right sides together. Pin it in place, making sure to keep the straps aligned along the side seams. Stitch along the top using a 1/2-inch seam allowance.
Step Nine: Flip the tote through the opening in the lining and stitch shut. I like to run this through the sewing machine, but it can be hand sewn with a slip stitch if you like.
Step Ten: Top stitch around the top edge.
Step Eleven: Insert bottle and you are ready for the party!
Stitched Gifts Review and Giveaway!
Today I have the honor of sharing with you the lovely new book by Jessica Marquez, Stitched Gifts: 25 Sweet and Simple Embroidery Projects for Every Occasion. Jessica was kind enough to send us a copy of the book to review, along with another wonderful goodie that I'll reveal to you later in this post!
From start to finish, this is a beautiful book, and has all of Jessica's signature style and inspiring photography. Jessica's eye for detail and flawless stitching are fully evident throughout this book. It's a great book for any level of stitcher - there so many unique projects that are simple and also beautiful, and I would definitely recommend it.
There are a total of 25 projects in this book, and something for every level of embroiderer. Projects are divided into the following sections: Home & Hearth, Engagement, Wedding, and Anniversary, Babies & Little Ones, Holidays, Birthdays, and Special Occasions, and Keepsakes & Forget-Me-Nots. The last section of the book is dedicated to finishing techniques.
Patterns can all be found at the back of the book, most are at full-size, except for the Zodiac, Family Tree, Wedding Table Markers, and various alphabets, which need enlarging. The patterns are not iron-ons and need to be transferred or traced.
But the book was not all that I was lucky enough to receive! Jessica also sent this beautiful Orion Kit, from her Miniature Rhino shop, which she would also like to offer one lucky Feeling Stitchy reader in this giveaway!
To win, all you need to do is leave a comment - tell us which of the projects I pictured is your favorite, and who you might give it to. I'll leave comments open through Sunday, August 4, 2013, at 9 PM, when I will close them and choose one random winner to receive a book and kit. This giveaway is also open to our International readers!
Thank you again, Jessica, for sharing this wonderful book with us!
Wild Olive has just released a very cuddly new pattern, check out Mollie's blog post on how she did the watercolour tinting.
Olá! In the past weeks I've been working on some Portuguese traditional patterns, trying to gather some motifs that I want to make available. Fiancé kerchiefs were the first ones to claim my attention. I've done some research, trying to understand which are the most authentic motifs, the ones that respect the certification process that now rules this type of embroidery.
There are not very precise rules for the motifs nor for the colors... However, love is the most important source of inspiration and primary colors are the most common. Tracing appears to be very asymmetric on the popular kerchiefs and the triangular interpretations predominate. There is a list of stitches that are accepted but I would say that stem stitch is really the one that characterizes this regional embroidery, followed by satin stitch.
Soon I'll tell you more about the most typical symbols found on this type of embroidery... Today I bring you some very simple but beautiful pieces of embroidery using patterns inspired by fiancé kerchiefs.
They were brought to me by a dear neighbour that lives down the street. They were embroidered by someone that has mãos de fada (fairy hands) an expression we use describing someone with a special ability and talent for handwork... Her name is Maria Alice. And they were not gifts of passion but gifts of friendship.
There's a fantastic stitchalong going on at Fandom in Stitches at the moment, commemorating 50 years of Doctor Who. I particularly love the 10th Doctor pattern, maybe because I've got an extra soft spot for that particular Doctor! There's still time to join in, I can't wait to see the pattern for the 11th Doctor!
Olá! For the first time (Oh!!! Maybe second time...) I bring you cross stitch... One of these days I will talk a bit more about the importance of cross stitch in Portuguese traditional embroidery. This time I will only share my happiness on returning to this technique.
Cross stitch (Ponto cruz in Portuguese) was my first "embroidery" passion. And for a long time the only one... But since I began my project, agulha não pica, I've changed my heart and mind to free embroidery... And I was happy!!! Until I found the most challenging book... I'm not revealing the name of the book today... Some suspense will be good!!!
And the first one I chose was a Rooster of Barcelos... I've already talked about how special this rooster is for Portuguese people. For many this is a unofficial symbol of Portugal. And it is very interesting, again, to see how pottery can inspire embroidery.
I could also not resist to tell you about one of my latest finds... I'm always searching for Portuguese embroidery supplies... And I was so happy to know that there still are scissors made in Portugal! And they come from the North of Portugal... like the Rooster of Barcelos!!
This was my first work from this book, but I have some more and I'll show them soon! I'm thinking of using it to make an album to file all my posts on Feeling Stitchy... What do you think? Do you have a better idea???
Love, Cecil's unravel pieces are breathtaking. The piece is so clever. Make sure you check out her other work, it will not disappoint you.
I have a quick and easy tutorial for you today. This idea came to me when I realized I keep losing sight of my embroidery scissors while I am stitching. Does that ever happen to you? Well, a little handy dandy tassel and some stitched felt has helped me keep better track of them, and I hope it will help you, too!
Step One: Using pinking shears, trim the pieces of felt down to 2.5-inches long by 1-inch wide. Stitch some little flowers on one piece by holding the felt taut in one hand. If you don't want to stitch flowers, I think an initial would be cute, too or your favorite stitch, maybe a few wheatear stitches. It's totally up to you!
Step Two: Once you have your stitched piece of felt finished, place it on top of the blank piece of felt. Using an accent color of floss, attached the two pieces together with a running stitch. Make sure to hide the knotted ends of the accent floss in between the two pieces of felt.
Step Three: Cut a 4.5-inch piece of floss and pull it through the top of the back side of felt to create a loop. Knot the ends together. This will be how it hangs from the scissors.
Step Four: To make the tassel, take one skein of embroidery floss and wrap it around a 3.5-inch piece of cardboard or thick card stock (I used a small notebook). Make sure the cardboard or card stock does not bend or curl as you wrap the floss around it. When finished, gently pull the skein off the cardboard.
Step Five: Beginning at 0.5-inches below the top of one loop, wrap the 30-inch piece of floss around the skein multiple times and tie the ends in a tight double knot.
Step Six: Using large scissors, cut through the loop of floss opposite the wrapped end. Trim any uneven ends and trim the ends of the floss used to wrap the top loop.
Step Seven: Take a 4.5-inch piece of floss and run it through the top loop of the tassel. Knot the ends.
Step Eight: Take the tassel and stitched felt piece and attach them to the handle of your scissors using a lark's head knot.
Now your scissors will be easier to find when they slide away from you. Hope you enjoy!


text:
Q: AWS Lambda next.js - Failed to post 2MB file to api route I deployed my next.js app to aws usingserverless-next.js package.
When I'm trying to post a big file (~1MB) to the api route, I'm getting a 503 response code.
The full response content:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>

503 ERROR

The request could not be satisfied.

The Lambda function associated with the CloudFront distribution is invalid or doesn't have the required permissions.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.

If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: X

<ADDRESS>
</ADDRESS>

The CloudWatch log shows:
{
    "errorType": "Error",
    "errorMessage": "Cannot call write after a stream was destroyed",
    "code": "ERR_STREAM_DESTROYED",
    "stack": [
        "Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed",
        "    at WriteStream._write (internal/fs/streams.js:379:33)",
        "    at WriteStream.<anonymous> (internal/fs/streams.js:375:12)",
        "    at Object.onceWrapper (events.js:422:26)",
        "    at WriteStream.emit (events.js:327:22)",
        "    at WriteStream.EventEmitter.emit (domain.js:483:12)",
        "    at internal/fs/streams.js:366:10",
        "    at FSReqCallback.oncomplete (fs.js:156:23)"
    ]
}

I'm using formidable to parse the body of the request. It working with smaller file sizes.
What can I do? 1MB does not count as big file size.
In development everything works even with 10MB files, but not in AWS lambda@edge

A: It's written here: https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
You can't have a request + response larger than 256 KB if you upload in  asynchronous mode.
Because serverless is only here to make your routes in lambda functions. If you want to upload this file, you can use S3 bucket with pre-signed url.
With that you doesn't need to upload the file to the lambda function.


More than $2.4 trillion is currently stashed offshore by the 500 largest U.S. companies, costing American taxpayers nearly $700 billion in unpaid taxes. Indeed, the annual cost of offshore tax avoidance by multinational companies is $94 billion to $135 billion, while overseas tax evasion by individuals drains an additional $40 billion to $70 billion each year from the American public.
Ensure that the U.S. constructively engages in global financial transparency initiatives.