text:
package org.apache.geode.internal.cache.snapshot;

import static org.apache.geode.distributed.internal.InternalDistributedSystem.getLogger;

import java.io.File;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.io.Serializable;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

import org.apache.logging.log4j.LogManager;

import org.apache.geode.cache.DataPolicy;
import org.apache.geode.cache.Region;
import org.apache.geode.cache.client.PoolManager;
import org.apache.geode.cache.client.internal.ProxyRegion;
import org.apache.geode.cache.execute.Function;
import org.apache.geode.cache.execute.FunctionContext;
import org.apache.geode.cache.execute.FunctionException;
import org.apache.geode.cache.execute.FunctionService;
import org.apache.geode.cache.execute.RegionFunctionContext;
import org.apache.geode.cache.execute.ResultCollector;
import org.apache.geode.cache.execute.ResultSender;
import org.apache.geode.cache.partition.PartitionRegionHelper;
import org.apache.geode.cache.snapshot.RegionSnapshotService;
import org.apache.geode.cache.snapshot.SnapshotOptions;
import org.apache.geode.cache.snapshot.SnapshotOptions.SnapshotFormat;
import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.distributed.internal.DistributionConfig;
import org.apache.geode.internal.DSCODE;
import org.apache.geode.internal.InternalEntity;
import org.apache.geode.internal.cache.CachePerfStats;
import org.apache.geode.internal.cache.CachedDeserializable;
import org.apache.geode.internal.cache.CachedDeserializableFactory;
import org.apache.geode.internal.cache.InternalCache;
import org.apache.geode.internal.cache.LocalDataSet;
import org.apache.geode.internal.cache.LocalRegion;
import org.apache.geode.internal.cache.Token;
import org.apache.geode.internal.cache.execute.InternalFunction;
import org.apache.geode.internal.cache.snapshot.GFSnapshot.GFSnapshotImporter;
import org.apache.geode.internal.cache.snapshot.GFSnapshot.SnapshotWriter;
import org.apache.geode.internal.cache.snapshot.SnapshotPacket.SnapshotRecord;

/**
 * Provides an implementation for region snapshots.
 *
 *
 * @param <K> the key type
 * @param <V> the value type
 */
public class RegionSnapshotServiceImpl<K, V> implements RegionSnapshotService<K, V> {
  // controls number of concurrent putAll ops during an import
  private static final int IMPORT_CONCURRENCY = Integer.getInteger(
      DistributionConfig.GEMFIRE_PREFIX + "RegionSnapshotServiceImpl.IMPORT_CONCURRENCY", 10);

  // controls the size (in bytes) of the r/w buffer during imoprt and export
  static final int BUFFER_SIZE = Integer.getInteger(
      DistributionConfig.GEMFIRE_PREFIX + "RegionSnapshotServiceImpl.BUFFER_SIZE", 1024 * 1024);

  static final SnapshotFileMapper LOCAL_MAPPER = new SnapshotFileMapper() {
    private static final long serialVersionUID = 1L;

    @Override
    public File mapExportPath(DistributedMember member, File snapshot) {
      return snapshot;
    }

    @Override
    public File[] mapImportPath(DistributedMember member, File snapshot) {
      if (!snapshot.isDirectory()) {
        return new File[] {snapshot};
      }

      return snapshot.listFiles(pathname -> !pathname.isDirectory());
    }
  };

  /**
   * Provides a destination for snapshot data during an export.
   */
  public interface ExportSink {
    /**
     * Writes snapshot data to the destination sink.
     *
     * @param records the snapshot records
     * @throws IOException error writing records
     */
    void write(SnapshotRecord... records) throws IOException;
  }

  /**
   * Provides a strategy for exporting a region.
   *
   * @param <K> the key type
   * @param <V> the value type
   */
  public interface Exporter<K, V> {
    /**
     * Exports the requested region.
     *
     * @param region the region to export
     * @param sink the sink for the snapshot data
     * @param options snapshot options
     * @return number of entries exported
     * @throws IOException error during export
     */
    long export(Region<K, V> region, ExportSink sink, SnapshotOptions<K, V> options)
        throws IOException;
  }

  /** the region */
  private final Region<K, V> region;

  public RegionSnapshotServiceImpl(Region<K, V> region) {
    this.region = region;
  }

  @Override
  public SnapshotOptions<K, V> createOptions() {
    return new SnapshotOptionsImpl<>();
  }

  @Override
  public void save(File snapshot, SnapshotFormat format) throws IOException {
    save(snapshot, format, createOptions());
  }

  @Override
  public void save(File snapshot, SnapshotFormat format, SnapshotOptions<K, V> options)
      throws IOException {
    // we can't be in a transaction since that will inline the function execution
    if (region.getCache().getCacheTransactionManager().exists()) {
      throw new IllegalStateException("Unable to save snapshot during a transaction");
    }

    if (shouldRunInParallel(options)) {
      snapshotInParallel(new ParallelArgs<>(snapshot, format, options),
          new ParallelExportFunction<K, V>());
    } else {
      exportOnMember(snapshot, format, options);
    }
  }

  @Override
  public void load(File snapshot, SnapshotFormat format)
      throws IOException, ClassNotFoundException {
    load(snapshot, format, createOptions());
  }

  @Override
  public void load(File snapshot, SnapshotFormat format, SnapshotOptions<K, V> options)
      throws IOException, ClassNotFoundException {

    if (shouldRunInParallel(options)) {
      snapshotInParallel(new ParallelArgs<>(snapshot, format, options),
          new ParallelImportFunction<>());

    } else {
      importOnMember(snapshot, format, options);
    }
  }

  private boolean shouldRunInParallel(SnapshotOptions<K, V> options) {
    return options.isParallelMode() && region.getAttributes().getDataPolicy().withPartitioning()
        && !(region instanceof LocalDataSet);
  }

  private void snapshotInParallel(ParallelArgs<K, V> args, Function fn) throws IOException {
    try {

      ResultCollector rc = FunctionService.onRegion(region).setArguments(args).execute(fn);
      List result = (List) rc.getResult();
      for (Object obj : result) {
        if (obj instanceof Exception) {
          throw new IOException((Exception) obj);
        }
      }

      return;
    } catch (FunctionException e) {
      throw new IOException(e);
    }
  }

  private void importOnMember(File snapshot, SnapshotFormat format, SnapshotOptions<K, V> options)
      throws IOException, ClassNotFoundException {
    final LocalRegion local = getLocalRegion(region);

    if (getLogger().infoEnabled())
      getLogger().info(String.format("Importing region %s", region.getName()));
    if (snapshot.isDirectory()) {
      File[] snapshots =
          snapshot.listFiles((File f) -> f.getName().endsWith(SNAPSHOT_FILE_EXTENSION));
      if (snapshots == null) {
        throw new IOException("Unable to access " + snapshot.getCanonicalPath());
      } else if (snapshots.length == 0) {
        throw new IllegalArgumentException("Failure to import snapshot: "
            + snapshot.getAbsolutePath() + " contains no valid .gfd snapshot files");
      }
      for (File snapshotFile : snapshots) {
        importSnapshotFile(snapshotFile, options, local);
      }
    } else if (snapshot.getName().endsWith(SNAPSHOT_FILE_EXTENSION)) {
      importSnapshotFile(snapshot, options, local);
    } else {
      throw new IllegalArgumentException("Failure to import snapshot: "
          + snapshot.getCanonicalPath() + " is not .gfd file or directory containing .gfd files");
    }
  }

  private void importSnapshotFile(File snapshot, SnapshotOptions<K, V> options, LocalRegion local)
      throws IOException, ClassNotFoundException {
    long count = 0;
    long bytes = 0;
    long start = CachePerfStats.getStatTime();

    // Would be interesting to use a PriorityQueue ordered on isDone()
    // but this is probably close enough in practice.
    LinkedList<Future<?>> puts = new LinkedList<>();
    GFSnapshotImporter in = new GFSnapshotImporter(snapshot, local.getCache().getPdxRegistry());

    try {
      int bufferSize = 0;
      Map<K, V> buffer = new HashMap<>();

      SnapshotRecord record;
      while ((record = in.readSnapshotRecord()) != null) {
        bytes += record.getSize();
        K key = record.getKeyObject();

        // Until we modify the semantics of put/putAll to allow null values we
        // have to subvert the API by using Token.INVALID. Alternatively we could
        // invoke create/invalidate directly but that prevents us from using
        // bulk operations. The ugly type coercion below is necessary to allow
        // strong typing elsewhere.
        V val = (V) Token.INVALID;
        if (record.hasValue()) {
          byte[] data = record.getValue();
          // If the underlying object is a byte[], we can't wrap it in a
          // CachedDeserializable. Somewhere along the line the header bytes
          // get lost and we start seeing serialization problems.
          if (data.length > 0 && data[0] == DSCODE.BYTE_ARRAY.toByte()) {
            // It would be faster to use System.arraycopy() directly but since
            // length field is variable it's probably safest and simplest to
            // keep the logic in the InternalDataSerializer.
            val = record.getValueObject();
          } else {
            val = (V) CachedDeserializableFactory.create(record.getValue(), local.getCache());
          }
        }

        if (includeEntry(options, key, val)) {
          buffer.put(key, val);
          bufferSize += record.getSize();
          count++;

          // Push entries into cache using putAll on a separate thread so we
          // can keep the disk busy. Throttle puts so we don't overwhelm the cache.
          if (bufferSize > BUFFER_SIZE) {
            if (puts.size() == IMPORT_CONCURRENCY) {
              puts.removeFirst().get();
            }

            final Map<K, V> copy = new HashMap<>(buffer);
            Future<?> f = local.getCache().getDistributionManager().getWaitingThreadPool().submit(
                (Runnable) () -> local.basicImportPutAll(copy, !options.shouldInvokeCallbacks()));

            puts.addLast(f);
            buffer.clear();
            bufferSize = 0;
          }
        }
      }

      // send off any remaining entries
      if (!buffer.isEmpty()) {
        local.basicImportPutAll(buffer, !options.shouldInvokeCallbacks());
      }

      // wait for completion and check for errors
      while (!puts.isEmpty()) {
        puts.removeFirst().get();
      }

      if (getLogger().infoEnabled()) {
        getLogger().info(String.format(
            "Snapshot import of %s entries (%s bytes) in region %s from file %s is complete",
            new Object[] {count, bytes, region.getName(), snapshot.getAbsolutePath()}));
      }

    } catch (InterruptedException e) {
      while (!puts.isEmpty()) {
        puts.removeFirst().cancel(true);
      }
      Thread.currentThread().interrupt();
      throw (IOException) new InterruptedIOException().initCause(e);

    } catch (ExecutionException e) {
      while (!puts.isEmpty()) {
        puts.removeFirst().cancel(true);
      }
      throw new IOException(e);

    } finally {
      in.close();
      local.getCachePerfStats().endImport(count, start);
    }
  }

  private void exportOnMember(File snapshot, SnapshotFormat format, SnapshotOptions<K, V> options)
      throws IOException {
    if (!snapshot.getName().endsWith(SNAPSHOT_FILE_EXTENSION)) {
      throw new IllegalArgumentException("Failure to export snapshot: "
          + snapshot.getCanonicalPath() + " is not a valid .gfd file");
    }
    File directory = snapshot.getAbsoluteFile().getParentFile();
    if (directory == null) {
      throw new IllegalArgumentException("Failure to export snapshot: "
          + snapshot.getCanonicalPath() + " is not a valid location");
    }
    directory.mkdirs();
    LocalRegion local = getLocalRegion(region);
    Exporter<K, V> exp = createExporter(local.getCache(), region, options);

    if (getLogger().fineEnabled()) {
      getLogger().fine("Writing to snapshot " + snapshot.getAbsolutePath());
    }

    long count = 0;
    long start = CachePerfStats.getStatTime();
    SnapshotWriter writer =
        GFSnapshot.create(snapshot, region.getFullPath(), (InternalCache) region.getCache());
    try {
      if (getLogger().infoEnabled())
        getLogger().info(String.format("Exporting region %s", region.getName()));

      SnapshotWriterSink sink = new SnapshotWriterSink(writer);
      count = exp.export(region, sink, options);

      if (getLogger().infoEnabled()) {
        getLogger().info(String.format(
            "Snapshot export of %s entries (%s bytes) in region %s to file %s is complete",
            new Object[] {count,
                sink.getBytesWritten(), region.getName(), snapshot.getAbsolutePath()}));
      }

    } finally {
      writer.snapshotComplete();
      local.getCachePerfStats().endExport(count, start);
    }
  }

  private boolean includeEntry(SnapshotOptions<K, V> options, final K key, final V val) {
    if (options.getFilter() != null) {
      Entry<K, V> entry = new Entry<K, V>() {
        @Override
        public V setValue(V value) {
          throw new UnsupportedOperationException();
        }

        @Override
        public K getKey() {
          return key;
        }

        @Override
        public V getValue() {
          if (val instanceof CachedDeserializable) {
            return (V) ((CachedDeserializable) val).getDeserializedForReading();
          }
          return null;
        }
      };

      return options.getFilter().accept(entry);
    }
    return true;
  }

  static <K, V> Exporter<K, V> createExporter(InternalCache cache, Region<?, ?> region,
      SnapshotOptions<K, V> options) {
    String pool = region.getAttributes().getPoolName();
    if (pool != null) {
      return new ClientExporter<>(PoolManager.find(pool));

    } else if (cache.getInternalDistributedSystem().isLoner()
        || region.getAttributes().getDataPolicy().equals(DataPolicy.NORMAL)
        || region.getAttributes().getDataPolicy().equals(DataPolicy.PRELOADED)
        || region instanceof LocalDataSet || (options.isParallelMode()
            && region.getAttributes().getDataPolicy().withPartitioning())) {

      // Avoid function execution:
      // for loner systems to avoid inlining fn execution
      // for NORMAL/PRELOAD since they don't support fn execution
      // for LocalDataSet since we're already running a fn
      // for parallel ops since we're already running a fn
      return new LocalExporter<>();
    }

    return new WindowedExporter<>();
  }

  static LocalRegion getLocalRegion(Region<?, ?> region) {
    if (region instanceof LocalDataSet) {
      return ((LocalDataSet) region).getProxy();
    } else if (region instanceof ProxyRegion) {
      return (LocalRegion) ((ProxyRegion) region).getRealRegion();
    }
    return (LocalRegion) region;
  }

  /**
   * Writes snapshot data to a {@link SnapshotWriter}. Caller is responsible for invoking
   * {@link SnapshotWriter#snapshotComplete()}.
   */
  static class SnapshotWriterSink implements ExportSink {
    private final SnapshotWriter writer;
    private long bytes;

    public SnapshotWriterSink(SnapshotWriter writer) {
      this.writer = writer;
    }

    @Override
    public void write(SnapshotRecord... records) throws IOException {
      for (SnapshotRecord rec : records) {
        writer.snapshotEntry(rec);
        bytes += rec.getSize();
      }
    }

    public long getBytesWritten() {
      return bytes;
    }
  }

  /**
   * Forwards snapshot data to a {@link ResultSender}. Caller is responsible for invoking
   * {@link ResultSender#lastResult(Object)}.
   */
  static class ResultSenderSink implements ExportSink {
    /** the fowarding destination */
    private final ResultSender<SnapshotRecord[]> sender;

    public ResultSenderSink(ResultSender<SnapshotRecord[]> sender) {
      this.sender = sender;
    }

    @Override
    public void write(SnapshotRecord... records) throws IOException {
      sender.sendResult(records);
    }
  }

  /**
   * Carries the arguments to the export function.
   *
   * @param <K> the key type
   * @param <V> the value type
   */
  private static class ParallelArgs<K, V> implements Serializable {
    private static final long serialVersionUID = 1;

    private final File file;
    private final SnapshotFormat format;
    private final SnapshotOptionsImpl<K, V> options;

    public ParallelArgs(File f, SnapshotFormat format, SnapshotOptions<K, V> options) {
      this.file = f;
      this.format = format;

      // since we don't expose the parallel mode, we have to downcast...ugh
      this.options = (SnapshotOptionsImpl<K, V>) options;
    }

    public File getFile() {
      return file;
    }

    public SnapshotFormat getFormat() {
      return format;
    }

    public SnapshotOptionsImpl<K, V> getOptions() {
      return options;
    }
  }

  private static class ParallelExportFunction<K, V> implements InternalFunction {
    @Override
    public boolean hasResult() {
      return true;
    }

    @Override
    public void execute(FunctionContext context) {
      try {
        Region<K, V> local =
            PartitionRegionHelper.getLocalDataForContext((RegionFunctionContext) context);
        ParallelArgs<K, V> args = (ParallelArgs<K, V>) context.getArguments();
        File f = args.getOptions().getMapper().mapExportPath(
            local.getCache().getDistributedSystem().getDistributedMember(), args.getFile());

        if (f == null || f.isDirectory()) {
          throw new IOException(String.format("File is invalid or is a directory: %s", f));
        }

        local.getSnapshotService().save(f, args.getFormat(), args.getOptions());
        context.getResultSender().lastResult(Boolean.TRUE);

      } catch (Exception e) {
        context.getResultSender().sendException(e);
      }
    }

    @Override
    public String getId() {
      return "org.apache.geode.cache.snapshot.ParallelExport";
    }

    @Override
    public boolean optimizeForWrite() {
      return true;
    }

    @Override
    public boolean isHA() {
      return false;
    }
  }

  private static class ParallelImportFunction<K, V> implements Function, InternalEntity {
    @Override
    public boolean hasResult() {
      return true;
    }

    @Override
    public void execute(FunctionContext context) {
      try {
        Region<K, V> local =
            PartitionRegionHelper.getLocalDataForContext((RegionFunctionContext) context);
        ParallelArgs<K, V> args = (ParallelArgs<K, V>) context.getArguments();

        File[] files = args.getOptions().getMapper().mapImportPath(
            local.getCache().getDistributedSystem().getDistributedMember(), args.getFile());

        if (files != null) {
          for (File f : files) {
            if (f.exists()) {
              local.getSnapshotService().load(f, args.getFormat(), args.getOptions());
            } else {
              LogManager.getLogger(RegionSnapshotServiceImpl.class)
                  .info("Nothing to import as location does not exist: " + f.getAbsolutePath());
            }
          }
        }
        context.getResultSender().lastResult(Boolean.TRUE);

      } catch (Exception e) {
        context.getResultSender().sendException(e);
      }
    }

    @Override
    public String getId() {
      return "org.apache.geode.cache.snapshot.ParallelImport";
    }

    @Override
    public boolean optimizeForWrite() {
      return true;
    }

    @Override
    public boolean isHA() {
      return false;
    }
  }
}


text:
Q: animate scrolling after append jQuery I do a simple horizontal scroll like this (fiddle here: http://jsfiddle.net/Xwr8P/1/):
$('#previousBtn').click(function(){
    $('.anImage').last().clone().prependTo("#scrollContainer");
    $('.anImage').last().remove();
});

$('#nextBtn').click(function(){
    $('.anImage').first().clone().appendTo("#scrollContainer");
    $('.anImage').first().remove();
});

Works great... but I can't seem to figure out how to animate a scroll effect while flipping through. I have googled and can only find solutions for vertical scrolling after appending. here's My Fiddle http://jsfiddle.net/Xwr8P/1/ when you flip through it's very rigid obviously because its just being appended and removed. Looking for a way to animate a scroll.

redpajama_set_name: RedPajamaStackExchange


Today's health plan administrative roles have expanded beyond traditional claims processing, enrolment and payment accuracy. The shift from an insurance provider to additional role as care provider demands new approaches to how you design products, deliver information and engage with consumer, while meeting a myriad of new federal and state regulations. NTT DATA can help. For more than 30 years, our Business Process Outsourcing (BPO) team has implemented the processes and technologies that bring about real transformation for customers of all sizes.
Our end-to-end administrative services help you streamline operations, improve productivity and strengthen cash flow to stay competitive and improve member satisfaction. We help you with back, middle and front office functions, allowing you to focus on strategic initiatives that drive growth and care quality. Learn more about our health plan-focused BPO services today.
Process assistants offer you a hybrid automation approach to increase the productivity of your high-value staff. To know what processes you should be automating, think about it in steps.
Our approach to Business Process Outsourcing helps you improve efficiencies in your non-core operations. That allows you to focus on strategy, market share and customer base, ultimately providing better care.
When you engage Business Process as a Service, you'll get back to the heart of your business.
Our Healthcare Staffing Services are designed to meet your project and budgetary requirements with professionals who have an average of 5-10 years of experience.
Streamline claims processing, billing, customer service, enrolment and more, and adopt payment integrity solutions that add value.
We offer a wide range of administrative solutions for health plans, including sales and enrolment call centres and direct marketing.
Lower costs by focusing on improved outcomes with care management, disease management, utilisation management, on-site nurse support and telemedicine.


Firefighter Moving Company | Dallas Moving Company - MoveStar Inc.
When you move, you only have one chance to get it right. That's why you need a moving company that is experienced and dependable. MoveStar Inc. is a well-established, trusted and affordable firefighter moving company in the Dallas-Fort Worth area. We are owned and operated entirely by off-duty firefighters, and every firefighter on our team is committed to giving you the best moving experience possible.
We operate our firefighter moving company with the same integrity and professionalism we demonstrate every day on the job as firefighters. And if you trust us with your move, we will work diligently to prove you made the right choice.
We offer a full line of services to help you with all aspects of your move. These include packing, loading and unloading, professional cleaning, storage facilities, packing supplies and more.
We are highly experienced and have specialized equipment for all types of residential moves, including luxury and high-rise. We are also expert commercial movers with years of experience in both office and industrial relocations. We know planning is the key to successful commercial moves. That's why we'll help you strategically plan your move so that it has minimal impact on your business.
Don't take chances with your move. Call a firefighter moving company that has a solid reputation and record of good service to its customers. Call MoveStar today.
One of our firefighter moving company team members will come to your home or business to speak with you face-to-face about planning your move. They will get to know your specific needs, answer any questions you may have, and offer professional advice to help you prepare for your move.


text:
E-commerce business & global logistics advice | Discover DHL Australia
E-commerce sector guides to boost your business
The Grand Tour all the way to Niagara Falls
The Grand Tour: Next Stop Niagara Falls
It's Episode 2, Season 2 of The Grand Tour and the team pits car against public transport in a race to Niagara Falls. An over-the-top car and a wounded colleague only serve to make the challenge even more complicated.
TRAINS, PLANES, BUSES AND AUTOMOBILES
It's a race from the Big Apple to Niagara Falls, and who's going to be first over the finish line? Jeremy Clarkson in "the fastest, most beautiful, most expensive car Ford has ever made," or James May and Richard Hammond using only public transport? May and Hammond's task is further complicated because Hammond is now on crutches, after breaking his leg in a previous episode. So can a man in a carbon fibre-bodied twin engine missile overtake a disgruntled man dragging a moaning colleague on buses, trains and planes? We'll just have to see.
THE TRIP OF A LIFETIME
Clarkson described the route to Niagara Falls as "a simple 420 mile thrash from one side of New York State to the other." And whether you choose to fly solo in a super-charged four-wheel missile or be surrounded by other passengers, it's a bucket list must-do. Niagara Falls isn't a place visited by 12 million people a year for nothing. Here you can experience the power of Mother Nature at full throttle, see panoramic views to make your jaw drop, hear the thunderous roar of the waters and feel the spray lashing your poncho. Awesome!
THERE'S A REASON IT'S CALLED THE BIG APPLE
This week, the team's starting point is New York, one of the most exciting cities in the world. To call New York a wealthy city is a bit of an understatement – the combined Gross Metropolitan Product of the New York area is US$1.55bn, roughly equal to the GDP of South Korea. No wonder it's as attractive to ambitious entrepreneurs as it is to tourists.
THE CENTER OF THE WORLD
With not just one but three major airports, New York is one of the world's major transport hubs and it's very big on business. JFK ships more air freight than any other airport in the nation. And let's not forget this place's excellent maritime advantage. In 2011 alone, more than 34 million tons of cargo went through the Ports of New York and New Jersey. So there are most definitely some import/export opportunities here.
Great articles, direct to your inbox
Home to Wall Street and the NASDAQ, New York has always been a major player in global banking, finance and world trade. However, the city isn't resting on its lucrative laurels. Recent years have seen the meteoric rise of Silicon Alley – in 2015, New York's high tech industries like digital media, telecoms, biotechnology and game design generated over US$7.3bn in venture capital investment.
IF YOU CAN MAKE IT HERE …
Full disclosure: with steep real estate prices and a high cost of living, we're not going to pretend that New York is an easy place to make your mark. However, the state has created some tax benefits and incentives specifically to reduce the burden on small businesses and attract entrepreneurs, like Startup NY – a program that allows businesses to operate for 10 years tax free.
BRING YOUR A-GAME
New York is the business capital that never sleeps, it's all about the hustle 24/7. On the plus side, because it's hungry for new ideas and its doors are always open, it's a rich area of opportunity for anyone who's willing to invest the energy and passion into networking and pressing the flesh.
AN EXCITING STARTING POINT
So whether you're setting off on a Grand Tour to Niagara Falls or embarking on a brand new business venture, you couldn't ask for a more exciting and dynamic starting point than New York.
Watch episode 2 now, exclusively on Amazon Prime Video
How to grab a slice of the US import market
The Grand Tour: downhill in Colorado
The Grand Tour in the UK
How to import and succeed as an SME in the world's largest economy.
E-commerce · 3 min read
DHL Express reveals the high points of doing business in America's mountain paradise.
DHL Express catches up with The Grand Tour on their UK home turf as Hammond and May conduct an important fuel experiment...
The Grand Tour take on Mozambique
The Grand Tour team transport fish to Mozambique and DHL Express unearth its glittering business opportunities.
The Grand Tour tests Canada
The Grand Tour chaps test SUVs while DHL Express looks at the sweet business opportunities in the home of maple syrup.
The Grand Tour heads to Italy
DHL Express gives you high-powered advice on doing business in Italy's car capital – Turin.
The Grand Tour go to Dubai
DHL Express gives you some hot tips on doing business in the gateway to the Middle East.

redpajama_set_name: RedPajamaCommonCrawl


text:
Kurt Mendelssohn
(1906-01-07)7 January 1906
Berlin, German Empire
18 September 1980(1980-09-18) (aged 74)
University of Berlin
Hughes Medal (1967),
Fellow of the Royal Society[1]
Scientific career
Franz Eugen Simon
Other academic advisors
Walther Nernst
Erwin Schrödinger
Harold Max Rosenberg
David Stanley Evans
Kurt Alfred Georg Mendelssohn FRS[1] (7 January 1906 – 18 September 1980) was a German-born British medical physicist, elected a Fellow of the Royal Society 1951.[2][3]
He was a great-great-grandson of Saul Mendelssohn, the younger brother of philosopher Moses Mendelssohn.[4] He received a doctorate in physics from the University of Berlin, having studied under Max Planck, Walther Nernst, Erwin Schrödinger, and Albert Einstein. Leaving Germany at the advent of the Nazi regime in 1933, he went to England. He worked at the University of Oxford from 1933. He was Reader in Physics there, 1955–1973, Emeritus Reader, 1973; Emeritus Professorial Fellow of Wolfson College, Oxford, 1973 (Professorial Fellow, 1971–1973).
His scientific work included low temperature physics, transuranic elements, and medical physics.
He was awarded the Royal Society's Hughes Medal in 1967 and the Simon Memorial Prize in 1968.
In 1974, he published The Riddle of the Pyramids, in which he sought to explain the whys and wherefores of the earliest Egyptian pyramids. Though Mendelssohn himself was not an Egyptologist, the book builds on advice from experts like Sir Robert Mond and Walter Emery, as well as his own visits to Egypt and Mexico. His principal thesis was that the pyramid at Meidum had collapsed during construction, a conclusion he arrived at using his knowledge of physics and which was sparked in 1966 by images of the Aberfan disaster, where Mendelssohn saw similarities to the rubble mound surrounding the Meidum pyramid, a primary destination for his travel to Egypt the year before. Working from that conclusion, he further elaborated a theory that pyramid construction in Egypt took on a life of its own during the Third and Fourth Dynasties, more or less independently of the reigns of pharaohs. His theory has not been taken up by the Egyptological community, but the book remains a stimulating and detailed study of the Egyptian pyramids.
The Pyramid Theory[edit]
Mendelssohn's pyramid theory suggests explanations to a couple of mysteries in pyramid construction:
Why in the time of the fourth dynasty, when all of the large Egyptian pyramids were built, there were only three Pharaohs but (with Meidum) five pyramids built.
According to Mendelssohn the pyramids were constructed as cenotaphs, not as tombs and did not have to coincide with a Pharaoh's lifetime.
Building of the Great Pyramids must have required a large workforce. Considering the state of perfection these pyramids show, a decisive amount of this workforce must have been highly trained professionals. Furthermore, due to the geometrical constraints, the higher a pyramid grows, the fewer people are able to work on it. If the pyramids were built independently of each other and at distinct times, it would have been necessary to assemble and train the workforce for each building and lay them off as the work continued. According to Mendelssohn, as soon as a pyramid had reached about half its final size, work started on the successor to alleviate this problem.
The change of the angle seen at the Bent Pyramid can be explained as a reaction to a catastrophic collapse of the Meidum Pyramid, if these monuments were not constructed successively but with an overlap.
Books by Mendelssohn[edit]
The Riddle of the Pyramids. Thames & Hudson, 1974; Sphere Cardinal Edition, 1976.
The Quest for Absolute Zero. McGraw-Hill, 1966.
In China Now, 1969.
The World of Walther Nernst, 1973.
Science and Western Domination, Thames & Hudson, 1976.
^ a b Shoenberg, D. (1983). "Kurt Alfred Georg Mendelssohn. 7 January 1906 – 18 September 1980". Biographical Memoirs of Fellows of the Royal Society. 29: 360–398. doi:10.1098/rsbm.1983.0015. JSTOR 769808.
^ Kurt Mendelssohn at the Mathematics Genealogy Project
^ Kurti, N. (April 1981). "Obituary: Kurt Mendelssohn". Physics Today. 34 (4): 87–89. Bibcode:1981PhT....34d..87K. doi:10.1063/1.2914538. Archived from the original on 28 September 2013.
^ nndb.com. Retrieved 4 May 2009.
Moses Mendelssohn family
Sons of Mendel Dessau
Moses Mendelssohn (married Fromet Gugenheim)
Saul Mendelssohn
Moses Mendelssohn's children
Dorothea Mendelssohn
Recha Mendelssohn
Joseph Mendelssohn
Henriette (Maria) Mendelssohn
Abraham Mendelssohn Bartholdy
Nathan Mendelssohn
Abraham Mendelssohn's children
Fanny Mendelssohn
Rebecka Mendelssohn
Paul Mendelssohn
Other descendants of Moses
Philipp Veit
Arnold Mendelssohn
Paul Hensel
Kurt Hensel
Paul Mendelssohn Bartholdy
Alexander Carl Otto Westphal
Joachim Wach
Mendelssohn & Co. (bank)
Itzig family (related by marriage)
Kurt Mendelssohn (descendant of Saul Mendelssohn)
Fellows of the Royal Society elected in 1951
Carlyle Smith Beals
David Catcheside
Arthur Herbert Cook
Sydney John Folley
Herbert Fröhlich
Geoffrey Gee
Hans Heilbronn
Gerhard Herzberg
Joseph Hutchinson
Raymond Ing
David Lack
Thaddeus Mann
Albert Neuberger
Leonard Bessemer Pfeil
James Arthur Prescott
Maurice Pryce
William John Pugh
John Ashworth Ratcliffe
Thomas Alan Stephenson
William Homan Thorpe
Petrus Johann du Toit
Alfred Ubbelohde
Statute 12
Prince Philip, Duke of Edinburgh
Herbert McLean Evans
Karl Lashley
Carl Størmer
Ralph Walter Graystone Wyckoff
DBLP: 182/9569
MGP: 76489
NKC: mzk2014810526
SNAC: w6rc4wq4
Retrieved from "https://en.wikipedia.org/w/index.php?title=Kurt_Mendelssohn&oldid=862415758"
Fellows of the Royal Society
British physicists
German scientists
Jewish scientists
Fellows of Wolfson College, Oxford
Jewish emigrants from Nazi Germany to the United Kingdom
Mendelssohn family
Medical physicists
EngvarB from July 2017
Use dmy dates from July 2017
Pages using infobox scientist with unknown parameters
Wikipedia articles with DBLP identifiers
Wikipedia articles with MGP identifiers


text:
< Go back to all articles
Stop Using Too Many Acronyms (Nobody Understands You)
Elon Musk famously hates acronyms.
He coined the phrase "Acronyms Seriously Suck," or ASS.
According to his autobiography by Ashlee Vance (which is a seriously good read, by the way), he lambasts anyone who uses too many acronyms in presentations and insists on them being written out in long form.
I like Elon.
Sure, he has his faults, but he's arguably done more to save the planet than any Green Party has done.
So, I took the gist of what Elon did at SpaceX and put my own twist on it:
Stop using too many acronyms: You're confusing your audience and they're scared to ask
Acronyms are the worst form of consultant speak.
It's the confusing, technocratic language that alienates anyone who isn't an SME (sorry, subject matter expert).
You see?!
In the movie Jerry Maguire, high-flying sports agent Tom Cruise charms Renee Zellweger with his grovelling apology, and she then replies, "you had me at hello".
Fast forward from cheesy 90s movies to today's business world, and presenters are losing their audience at hello.
Or rather, at the moment they unleash their first confusing acronym without adding a clear explanation of what it stands for.
Nobody likes speaking up in meetings or presentations to ask what something means, for fear of looking stupid. But overuse of acronyms means that otherwise engaged listeners are turned off because they don't understand something which could so easily be madeEspecially if the person presenting is a more senior member of staff.
So, my little rant for the day is this:
Let's stop talking like morons just because we're trying to show off how much we know about a certain topic, and let's curb our overuse of acronyms.
Speak in plain English
Oh, and speak it at a speed which is comprehensible to non-native speakers.
Trust me, you'll reach a lot more people with your message.
Don't be like the former VP of Product Supply in one of my former companies who spoke his northern English dialect at normal speed to a room full of perplexed French, Germans and Italians who were sat there scratching their heads thinking "what is this dude talking about?"
Know your audience and adapt your language to make sure they're with you on the journey.
It's not hard.
Avoid using too many acronyms. Speak clearly and lucidly.
It just takes a bit of thought and emotional intelligence.


text:
Q: Spring webflux difference between block, flatmap and subscribe I have an api which needs to call 3 other apis, the second and third api calls rely on the result of the first.
I'm slightly confused about the best way to do this and the difference between using block, subscribe and flatmap. All 3 of these methods work for me but I am not sure which one is the best one to use.
This is what I currently have:
webClient1.getApi1(request.getId())
   .subscribe(api1Response -> {
      if (api1Response.hasData()) {
         Mono<ApiTwoResponse> monoTwo = webClient2
            .post()
            .syncBody(...)
            .bodyToMono(ApiTwoResponse.class)
         monoTwo.subscribe(two -> log.info(two));

         Mono<ApiThreeResponse> monoThree = webClient3
            .put()
            .syncBody(...)
            .bodyToMono(ApiThreeResponse.class)
         monoThree.subscribe(three -> log.info(three));
      }
});

I've also tried block although this seems to be discouraged:
Api1Response response = webClient1.getApi1(request.getId()).block()

and i also tried flatmap although this forces you to return something:
webClient1.getApi1(request.getId())
   .flatmap(api1Response -> {
      ...
      return Mono.empty();
});

Any help and feedback on the above code is appreciated.

A: block operation, stops and waits essentially. It would be the equivalent to Future.get() in java. It defeats the purpose of non-blocking code.
Flatmap flattens a sequence of sequence into a single sequence, so a List {List{?}} will turn into a list{Object}.
subscribe essentially starts to listen, and can perform actions. Usually nothing happens until subscribe.
But for your use case, you can use filter here is an example,
Which looks filters over the {true, false} items, then for each filter that is true,
I zip the results of two mono's together, then subscribe with an action
Flux<Boolean> bool = Flux.just(true, false);
    Mono<Integer> mono1 = Mono.just(1);
    Mono<String> mono2 = Mono.just("string");

    bool.filter(b -> b)
            .flatMap(b -> Mono.zip(mono1, mono2))
            .subscribe(tuple -> System.out.println(tuple.getT1() + ", " + tuple.getT2()));


How's your week been at the helm of digital marketing? A lot's been going on across some of our most valuable platforms. It's almost too much to keep up with.
So let's break it down piece by piece before the weekend, so we can be ready to tweak our campaigns in line with the latest Facebook, Twitter and Snapchat updates when Monday comes round next.
It's been a busy week for Facebook on the updates front, most notable of which has been the changes made to the Ads Manager and Power Editor – have you noticed?
If you haven't, then get in your car and drive over to your Facebook For Business page right now!
Facebook has given both of these tools a revamp to make things far easier for marketers to create, optimise and monitor their ad campaigns, which is awfully generous of everyone's favourites social network as I'm sure you will agree.
As you park up and jump out of your car, you'll notice firstly that the performance metrics of your various ad campaigns have been brought right to the forefront of the tool, i.e. to the very same page that you will create and edit your ads. This is all part of the update's efforts to bring a simplified layout to its analytics functions – now everything is there in one place for the advertiser's convenience.
When you begin to play around, you'll soon see how much more streamlined Facebook Ads Manager has become since the update. By clicking into a campaign, the performance, audience and placement data is displayed right in the centre of the screen, and can be measured easily against your account's ad spend over the past week.
From here, you can adjust the date range and filter performance data by ad objective, metric, delivery status and other custom options, and even set your account to save and send out reports at set intervals, negating the need to do this manually.
Within this same environment, advertisers can now create and edit multiple ads at once – which is great news for those who are pushed for time (which is all of us, right?). There's now even a "Create Similar" tool, which allows advertisers to quickly duplicate an ad, ad set or campaign. Great stuff.
The Power Editor tool is of course mainly the reserve of the large business that needs to create and track a multitude of ads all at once. However, I know of many SMEs who make regular use of it, and the updates are worth noting.
As with the updates to Ads Manager, the new version of Power Editor is largely about improving the functional layout of the tool, making it easier for bulk creation and editing of ads, as well as making it easier for advertisers to find existing ads amongst the multitude.
The edit pane in the new layout gives advertisers more space to work with while creating and editing ads, while at the same time tracking the campaign's data.
Advertisers can also find ads, ad sets or campaigns faster by searching by name or ID or by filtering by delivery status or objective. There are also new "recently edited" and "recently uploaded" filter options, so recent work is easy to find.
All in all, some simple changes, but nonetheless ones that will save a lot of time, which is always welcome news for marketers.
The traffic reports inform us that the M25 is jammed full circle, so, ditch the car, get your Oyster Card out, and catch the tube over to Twitter and familiarise yourself with the powerful new feature Twitter Insiders.
This really is exciting news for marketers. Twitter has for a long, long time been a key resource for research, and of course one of the most diverse internet communities where key influencers in all industries can be tracked down, followed and engaged. And now, finally, Twitter has officially acknowledged this particularly important role that it plays in the content marketing sphere, and has produced Twitter Insiders to make access to key research and influencers a whole lot easier.
Essentially, Twitter Insiders is brand new resource that will help marketers bring the latest research to their audiences. A great tool for optimising campaigns, pitching to new clients, delivering breaking news, or beefing-up blogs, whitepapers, eBooks and articles.
But, perhaps even more importantly, the data that the Twitter Insiders will generate for users will provide key insights that can inform business decisions. Businesses can engage the Twitter Insiders directly, and ask for research on whatever they want.
"When online, Twitter Insiders are always available – so they're ideal for performing fast, continuous research," the blog explains. "Our short-term projects take as little as few days to bring back actionable results, opening opportunities for unplanned research." More great stuff to be experimented with in our future campaigns.
Snapchat is increasingly becoming a more and more important asset in the content marketer's arsenal. Though still perhaps not top of the list for many SMEs, its rapid growth in popularity over the past couple of years especially means that anyone who hasn't started exploiting its marketing potential yet are potentially missing out on a massive untapped market.
So, let's don our lifejackets and catch the boat over to Snapchat, for the most recent update to the platform has just made content a lot more discoverable.
Snapchat's redesign of its Discover page has changed the way users view and find content provided by publishers in no insignificant way.
Before the update, the Discover Page, well – it wasn't all that discoverable. Users of the mobile app would have to swipe through a couple of pages, beyond where they can find their friends' Snaps, to get to the brand's page where publishers were displayed as colourful bubbles that featured their brand's logo.
This page, it has to be said, was often ignored by many users of the platform – but now Snapchat has integrated this section with Live Stories in an effort to bring more eyes to the content created by paying publishers, which should indeed give a boost to their traffic.
The result of the update presents an almost Pinterest-style page of discoverable content that actively carousels on its own, meaning that the absolute most is made of the space provided.
Furthermore, users can now tap-and-hold to subscribe to a Discover channel, giving publishers a new opportunity to imbed further calls-to-action into their content marketing efforts on the platform.
Ultimately, the goal is to give Snapchat publishers an extra chance to make their content as attractive and, indeed, discoverable as what their friends share on the app. Put simply, there's never been a better time to start experimenting with Snapchat as a valuable marketing channel.
That's it for this week! We'll see you next time – and don't forget your passports for who knows where you'll have to fly to next! Cheers all.


Over the past 20 years, South American paleontologists have unearthed several giant species of dinosaurs, including the Argentinosaurus, which is considered to be the biggest dinosaur of all. However, in a report published last Tuesday, it seems that North America now has its' own species to brag about. Two giant vertebrae and a femur belonging to the Alamosaurus sanjuanensis, a sauropod species, were discovered in New Mexico between 2003 and 2006. Originally, researchers thought that this 69-million-year-old species weighed about 30 tons. Yet the findings from this most recent study showed that the femur discovered belonged to a dinosaur that was still growing, indicating that the Alamosaurus got much bigger than they had ever imagined. This puts the species in the same league as the Argentinosaurus, which weighed about 70 tons and was 40 meters long. Paleontologists are now on the hunt to find more clues about this species' life, death, and enormity.
Read more about this discovery at MSNBC!