text:
'use strict';

/**
 * @fileoverview Creates an http server to handle static
 * files and list directories for use with the gulp live server
 */
const BBPromise = require('bluebird');
const app = require('express')();
const bacon = require('baconipsum');
const bodyParser = require('body-parser');
const fs = BBPromise.promisifyAll(require('fs'));
const formidable = require('formidable');
const jsdom = require('jsdom');
const path = require('path');
const request = require('request');
const pc = process;

app.use(bodyParser.json());
app.use('/amp4test', require('./amp4test'));

// Append ?csp=1 to the URL to turn on the CSP header.
// TODO: shall we turn on CSP all the time?
app.use((req, res, next) => {
  if (req.query.csp) {
    res.set({
      'content-security-policy': "default-src * blob: data:; script-src https://cdn.ampproject.org/rtv/ https://cdn.ampproject.org/v0.js https://cdn.ampproject.org/v0/ https://cdn.ampproject.org/viewer/ http://localhost:8000 https://localhost:8000; object-src 'none'; style-src 'unsafe-inline' https://cloud.typography.com https://fast.fonts.net https://fonts.googleapis.com https://use.typekit.net https://p.typekit.net https://maxcdn.bootstrapcdn.com; report-uri https://csp-collector.appspot.com/csp/amp",
    });
  }
  next();
});

app.get('/serve_mode=:mode', (req, res) => {
  const newMode = req.params.mode;
  let info;
  if (newMode == 'default' || newMode == 'compiled' || newMode == 'cdn') {
    pc.env.SERVE_MODE = newMode;
    info = '
Serve mode changed to ' + newMode + '
';
    res.send(info);
  } else {
    info = '
Serve mode ' + newMode + ' is not supported.
';
    res.status(400).send(info);
  }
});

// Deprecate usage of .min.html/.max.html
app.get([
  '/examples/*.(min|max).html',
  '/test/manual/*.(min|max).html',
  '/dist/cache-sw.(min|max).html',
], (req, res) => {
  const filePath = req.url;
  res.send(generateInfo(filePath));
});

app.use('/pwa', (req, res) => {
  let file;
  let contentType;
  if (!req.url || req.path == '/') {
    // pwa.html
    contentType = 'text/html';
    file = '/examples/pwa/pwa.html';
  } else if (req.url == '/pwa.js') {
    // pwa.js
    contentType = 'application/javascript';
    file = '/examples/pwa/pwa.js';
  } else if (req.url == '/pwa-sw.js') {
    // pwa.js
    contentType = 'application/javascript';
    file = '/examples/pwa/pwa-sw.js';
  } else if (req.url == '/ampdoc-shell') {
    // pwa-ampdoc-shell.html
    contentType = 'text/html';
    file = '/examples/pwa/pwa-ampdoc-shell.html';
  } else {
    // Redirect to the underlying resource.
    // TODO(dvoytenko): would be nicer to do forward instead of redirect.
    res.writeHead(302, {'Location': req.url});
    res.end();
    return;
  }
  res.statusCode = 200;
  res.setHeader('Content-Type', contentType);
  fs.readFileAsync(pc.cwd() + file).then(file => {
    res.end(file);
  });
});

app.use('/api/show', (req, res) => {
  res.json({
    showNotification: true,
  });
});

app.use('/api/dont-show', (req, res) => {
  res.json({
    showNotification: false,
  });
});

app.use('/api/echo/post', (req, res) => {
  res.setHeader('Content-Type', 'application/json');
  res.end(JSON.stringify(req.body, null, 2));
});

/**
 * In practice this would be *.ampproject.org and the publishers
 * origin. Please see AMP CORS docs for more details:
 *    https://goo.gl/F6uCAY
 * @type {RegExp}
 */
const ORIGIN_REGEX = new RegExp('^http://localhost:8000|' +
    '^https?://.+\.herokuapp\.com');

/**
 * In practice this would be the publishers origin.
 * Please see AMP CORS docs for more details:
 *    https://goo.gl/F6uCAY
 * @type {RegExp}
 */
const SOURCE_ORIGIN_REGEX = new RegExp('^http://localhost:8000|' +
    '^https?://.+\.herokuapp\.com');

app.use('/form/html/post', (req, res) => {
  assertCors(req, res, ['POST']);

  const form = new formidable.IncomingForm();
  form.parse(req, (err, fields) => {
    res.setHeader('Content-Type', 'text/html');
    if (fields['email'] == 'already@subscribed.com') {
      res.statusCode = 500;
      res.end(`

Sorry ${fields['name']}!

The email ${fields['email']} is already subscribed!

      `);
    } else {
      res.end(`

Thanks ${fields['name']}!

Please make sure to confirm your email ${fields['email']}

      `);
    }
  });
});

app.use('/form/redirect-to/post', (req, res) => {
  assertCors(req, res, ['POST'], ['AMP-Redirect-To']);
  res.setHeader('AMP-Redirect-To', 'https://google.com');
  res.end('{}');
});

app.use('/form/echo-json/post', (req, res) => {
  assertCors(req, res, ['POST']);
  const form = new formidable.IncomingForm();
  form.parse(req, (err, fields) => {
    res.setHeader('Content-Type', 'application/json; charset=utf-8');
    if (fields['email'] == 'already@subscribed.com') {
      res.statusCode = 500;
    }
    res.end(JSON.stringify(fields));
  });
});

app.use('/form/json/poll1', (req, res) => {
  assertCors(req, res, ['POST']);
  const form = new formidable.IncomingForm();
  form.parse(req, () => {
    res.setHeader('Content-Type', 'application/json');
    res.end(JSON.stringify({
      result: [{
        answer: 'Penguins',
        percentage: new Array(77),
      }, {
        answer: 'Ostriches',
        percentage: new Array(8),
      }, {
        answer: 'Kiwis',
        percentage: new Array(14),
      }, {
        answer: 'Wekas',
        percentage: new Array(1),
      }],
    }));
  });
});

app.use('/form/search-html/get', (req, res) => {
  res.setHeader('Content-Type', 'text/html');
  res.end(`

Here's results for your search

Result 1

Result 2

Result 3

  `);
});

app.use('/form/search-json/get', (req, res) => {
  assertCors(req, res, ['GET']);
  res.json({
    term: req.query.term,
    results: [{title: 'Result 1'}, {title: 'Result 2'}, {title: 'Result 3'}],
  });
});

const autosuggestLanguages = ['ActionScript', 'AppleScript', 'Asp', 'BASIC',
  'C', 'C++', 'Clojure', 'COBOL', 'ColdFusion', 'Erlang', 'Fortran', 'Go',
  'Groovy', 'Haskell', 'Java', 'JavaScript', 'Lisp', 'Perl', 'PHP', 'Python',
  'Ruby', 'Scala', 'Scheme'];

app.use('/form/autosuggest/query', (req, res) => {
  assertCors(req, res, ['GET']);
  const MAX_RESULTS = 4;
  const query = req.query.q;
  if (!query) {
    res.json({items: [{
      results: autosuggestLanguages.slice(0, MAX_RESULTS),
    }]});
  } else {
    const lowerCaseQuery = query.toLowerCase();
    const filtered = autosuggestLanguages.filter(
        l => l.toLowerCase().includes(lowerCaseQuery));
    res.json({items: [{
      results: filtered.slice(0, MAX_RESULTS)},
    ]});
  }
});

app.use('/form/autosuggest/search', (req, res) => {
  assertCors(req, res, ['POST']);
  const form = new formidable.IncomingForm();
  form.parse(req, function(err, fields) {
    res.json({
      query: fields.query,
      results: [{title: 'Result 1'}, {title: 'Result 2'}, {title: 'Result 3'}],
    });
  });
});

app.use('/form/verify-search-json/post', (req, res) => {
  assertCors(req, res, ['POST']);
  const form = new formidable.IncomingForm();
  form.parse(req, (err, fields) => {
    res.setHeader('Content-Type', 'application/json; charset=utf-8');

    const errors = [];
    if (!fields.phone.match(/^650/)) {
      errors.push({name: 'phone', message: 'Phone must start with 650'});
    }
    if (fields.name !== 'Frank') {
      errors.push({name: 'name', message: 'Please set your name to be Frank'});
    }
    if (fields.error === 'true') {
      errors.push({message: 'You asked for an error, you get an error.'});
    }
    if (fields.city !== 'Mountain View' || fields.zip !== '94043') {
      errors.push({
        name: 'city',
        message: 'City doesn\'t match zip (Mountain View and 94043)',
      });
    }

    if (errors.length === 0) {
      res.end(JSON.stringify({
        results: [
          {title: 'Result 1'},
          {title: 'Result 2'},
          {title: 'Result 3'},
        ],
        committed: true,
      }));
    } else {
      res.statusCode = 400;
      res.end(JSON.stringify({verifyErrors: errors}));
    }
  });
});

app.use('/share-tracking/get-outgoing-fragment', (req, res) => {
  res.setHeader('AMP-Access-Control-Allow-Source-Origin',
      req.protocol + '://' + req.headers.host);
  res.json({
    fragment: '54321',
  });
});

// Fetches an AMP document from the AMP proxy and replaces JS
// URLs, so that they point to localhost.
function proxyToAmpProxy(req, res, mode) {
  const url = 'https://cdn.ampproject.org/'
      + (req.query['amp_js_v'] ? 'v' : 'c')
      + req.url;
  console.log('Fetching URL: ' + url);
  request(url, function(error, response, body) {
    body = body
        // Unversion URLs.
        .replace(/https\:\/\/cdn\.ampproject\.org\/rtv\/\d+\//g,
        'https://cdn.ampproject.org/')
        // <base> href pointing to the proxy, so that images, etc. still work.
        .replace('', '<base href="https://cdn.ampproject.org/">');
    const inabox = req.query['inabox'] == '1';
    const urlPrefix = getUrlPrefix(req);
    body = replaceUrls(mode, body, urlPrefix, inabox);
    if (inabox) {
      // Allow CORS requests for A4A.
      const origin = req.headers.origin || urlPrefix;
      enableCors(req, res, origin);
    }
    res.status(response.statusCode).send(body);
  });
}

const liveListUpdateFile = '/examples/live-list-update.amp.html';
let liveListCtr = 0;
let itemCtr = 2;
let liveListDoc = null;
const doctype = '<!doctype html>\n';
app.use('/examples/live-list-update.amp.html', (req, res, next) => {
  const mode = pc.env.SERVE_MODE;
  if (mode != 'compiled' && mode != 'default') {
    // Only handle compile(prev min)/default (prev max) mode
    next();
    return;
  }
  // When we already have state in memory and user refreshes page, we flush
  // the dom we maintain on the server.
  if (!('amp_latest_update_time' in req.query) && liveListDoc) {
    let outerHTML = liveListDoc.documentElement./*OK*/outerHTML;
    outerHTML = replaceUrls(mode, outerHTML);
    res.send(`${doctype}${outerHTML}`);
    return;
  }
  if (!liveListDoc) {
    const liveListUpdateFullPath = `${pc.cwd()}${liveListUpdateFile}`;
    const liveListFile = fs.readFileSync(liveListUpdateFullPath);
    liveListDoc = jsdom.jsdom(liveListFile);
  }
  const liveList = liveListDoc.querySelector('#my-live-list');
  const perPage = Number(liveList.getAttribute('data-max-items-per-page'));
  const items = liveList.querySelector('[items]');
  const pagination = liveListDoc.querySelector('#my-live-list [pagination]');
  const item1 = liveList.querySelector('#list-item-1');
  if (liveListCtr != 0) {
    if (Math.random() < .8) {
      // Always run a replace on the first item
      liveListReplace(item1);

      if (Math.random() < .5) {
        liveListTombstone(liveList);
      }

      if (Math.random() < .8) {
        liveListInsert(liveList, item1);
      }
      pagination.textContent = '';
      const liveChildren = [].slice.call(items.children)
          .filter(x => !x.hasAttribute('data-tombstone'));

      const pageCount = Math.ceil(liveChildren.length / perPage);
      const pageListItems = Array.apply(null, Array(pageCount))
          .map((_, i) => `<li>${i + 1}</li>`).join('');
      const newPagination = '' +
          `<ul class="pagination">${pageListItems}</ul>` +
          '';
      pagination./*OK*/innerHTML = newPagination;
    } else {
      // Sometimes we want an empty response to simulate no changes.
      res.send(`${doctype}<html></html>`);
      return;
    }
  }
  let outerHTML = liveListDoc.documentElement./*OK*/outerHTML;
  outerHTML = replaceUrls(mode, outerHTML);
  liveListCtr++;
  res.send(`${doctype}${outerHTML}`);
});

function liveListReplace(item) {
  item.setAttribute('data-update-time', Date.now());
  const itemContents = item.querySelectorAll('.content');
  itemContents[0].textContent = Math.floor(Math.random() * 10);
  itemContents[1].textContent = Math.floor(Math.random() * 10);
}

function liveListInsert(liveList, node) {
  const iterCount = Math.floor(Math.random() * 2) + 1;
  console.log(`inserting ${iterCount} item(s)`);
  for (let i = 0; i < iterCount; i++) {
    const child = node.cloneNode(true);
    child.setAttribute('id', `list-item-${itemCtr++}`);
    child.setAttribute('data-sort-time', Date.now());
    liveList.querySelector('[items]').appendChild(child);
  }
}

function liveListTombstone(liveList) {
  const tombstoneId = Math.floor(Math.random() * itemCtr);
  console.log(`trying to tombstone #list-item-${tombstoneId}`);
  // We can tombstone any list item except item-1 since we always do a
  // replace example on item-1.
  if (tombstoneId != 1) {
    const item = liveList./*OK*/querySelector(`#list-item-${tombstoneId}`);
    if (item) {
      item.setAttribute('data-tombstone', '');
    }
  }
}

// Generate a random number between min and max
// Value is inclusive of both min and max values.
function range(min, max) {
  const values =
      Array.apply(null, new Array(max - min + 1)).map((_, i) => min + i);
  return values[Math.round(Math.random() * (max - min))];
}

// Returns the result of a coin flip, true or false
function flip() {
  return !!Math.floor(Math.random() * 2);
}

function getLiveBlogItem() {
  const now = Date.now();
  // Generate a 3 to 7 worded headline
  const headline = bacon(range(3, 7));
  const numOfParagraphs = range(1, 2);
  const body = Array.apply(null, new Array(numOfParagraphs)).map(() => {
    return `<p>${bacon(range(50, 90))}</p>`;
  }).join('\n');

  const img = `<amp-img
        src="${flip() ? 'https://placekitten.com/300/350' : 'https://baconmockup.com/300/350'}"
        layout="responsive"
         height="300" width="350">
      </amp-img>`;
  return `<!doctype html>

    <amp-live-list id="live-blog-1">

          ${headline}

              by Lorem Ipsum

              lorem.ipsum@

PublisherName News Reporter

${Date(now).replace(/ GMT.*$/, '')}

${body}

        ${img}

          <amp-social-share type="facebook"
              data-param-text="Hello world"
              data-param-href="https://example.com/?ref=URL"
              data-param-app_id="145634995501895"></amp-social-share>
          <amp-social-share type="twitter"></amp-social-share>

    </amp-live-list>`;
}

function getLiveBlogItemWithBindAttributes() {
  const now = Date.now();
  // Generate a 3 to 7 worded headline
  const numOfParagraphs = range(1, 2);
  const body = Array.apply(null, new Array(numOfParagraphs)).map(() => {
    return `<p>${bacon(range(50, 90))}</p>`;
  }).join('\n');

  return `<!doctype html>

    <amp-live-list id="live-blog-1">

          ${body}

 As you can see, bacon is far superior to
          everything!!

    </amp-live-list>`;
}

app.use('/examples/live-blog(-non-floating-button)?.amp.html',
    (req, res, next) => {
      if ('amp_latest_update_time' in req.query) {
        res.setHeader('Content-Type', 'text/html');
        res.end(getLiveBlogItem());
        return;
      }
      next();
    });

app.use('/examples/bind/live-list.amp.html',
    (req, res, next) => {
      if ('amp_latest_update_time' in req.query) {
        res.setHeader('Content-Type', 'text/html');
        res.end(getLiveBlogItemWithBindAttributes());
        return;
      }
      next();
    });

app.use('/impression-proxy/', (req, res) => {
  assertCors(req, res, ['GET']);
  // Fake response with the following optional fields:
  // location: The Url the that server would have sent redirect to w/o ALP
  // tracking_url: URL that should be requested to track click
  // gclid: The conversion tracking value
  const body = {
    'location': 'localhost:8000/examples/?gclid=1234&foo=bar&example=123',
    'tracking_url': 'tracking_url',
    'gclid': '1234',
  };
  res.send(body);
});

// Proxy with local JS.
// Example:
// http://localhost:8000/proxy/s/www.washingtonpost.com/amphtml/news/post-politics/wp/2016/02/21/bernie-sanders-says-lower-turnout-contributed-to-his-nevada-loss-to-hillary-clinton/
app.use('/proxy/', (req, res) => {
  const mode = pc.env.SERVE_MODE;
  proxyToAmpProxy(req, res, mode);
});

// Nest the response in an iframe.
// Example:
// http://localhost:8000/iframe/examples/ads.amp.html
app.get('/iframe/*', (req, res) => {
  // Returns an html blob with an iframe pointing to the url after /iframe/.
  res.send(`<!doctype html>

          `);
});

// Returns a document that echoes any post messages received from parent.
// An optional `message` query param can be appended for an initial post
// message sent on document load.
// Example:
// http://localhost:8000/iframe-echo-message?message=${payload}
app.get('/iframe-echo-message', (req, res) => {
  const message = req.query.message;
  res.send(
      `<!doctype html>

      `);
});

// A4A envelope.
// Examples:
// http://localhost:8000/a4a[-3p]/examples/animations.amp.html
// http://localhost:8000/a4a[-3p]/proxy/s/www.washingtonpost.com/amphtml/news/post-politics/wp/2016/02/21/bernie-sanders-says-lower-turnout-contributed-to-his-nevada-loss-to-hillary-clinton/
app.use('/a4a(|-3p)/', (req, res) => {
  const force3p = req.baseUrl.indexOf('/a4a-3p') == 0;
  let adUrl = req.url;
  const templatePath = '/build-system/server-a4a-template.html';
  const urlPrefix = getUrlPrefix(req);
  if (!adUrl.startsWith('/proxy') &&
      urlPrefix.indexOf('//localhost') != -1) {
    // This is a special case for testing. `localhost` URLs are transformed to
    // `ads.localhost` to ensure that the iframe is fully x-origin.
    adUrl = urlPrefix.replace('localhost', 'ads.localhost') + adUrl;
  }
  adUrl = addQueryParam(adUrl, 'inabox', 1);
  fs.readFileAsync(pc.cwd() + templatePath, 'utf8').then(template => {
    const result = template
        .replace(/FORCE3P/g, force3p)
        .replace(/DISABLE3PFALLBACK/g, !force3p)
        .replace(/OFFSET/g, req.query.offset || '0px')
        .replace(/AD_URL/g, adUrl)
        .replace(/AD_WIDTH/g, req.query.width || '300')
        .replace(/AD_HEIGHT/g, req.query.height || '250');
    res.end(result);
  });
});

// In-a-box envelope.
// Examples:
// http://localhost:8000/inabox/examples/animations.amp.html
// http://localhost:8000/inabox/proxy/s/www.washingtonpost.com/amphtml/news/post-politics/wp/2016/02/21/bernie-sanders-says-lower-turnout-contributed-to-his-nevada-loss-to-hillary-clinton/
app.use('/inabox/', (req, res) => {
  let adUrl = req.url;
  const templatePath = '/build-system/server-inabox-template.html';
  const urlPrefix = getUrlPrefix(req);
  if (!adUrl.startsWith('/proxy') &&  // Ignore /proxy
      urlPrefix.indexOf('//localhost') != -1) {
    // This is a special case for testing. `localhost` URLs are transformed to
    // `ads.localhost` to ensure that the iframe is fully x-origin.
    adUrl = urlPrefix.replace('localhost', 'ads.localhost') + adUrl;
  }
  adUrl = addQueryParam(adUrl, 'inabox', 1);
  fs.readFileAsync(pc.cwd() + templatePath, 'utf8').then(template => {
    const result = template
        .replace(/AD_URL/g, adUrl)
        .replace(/OFFSET/g, req.query.offset || '0px')
        .replace(/AD_WIDTH/g, req.query.width || '300')
        .replace(/AD_HEIGHT/g, req.query.height || '250');
    res.end(result);
  });
});

app.use('/examples/analytics.config.json', (req, res, next) => {
  res.setHeader('AMP-Access-Control-Allow-Source-Origin', getUrlPrefix(req));
  next();
});

app.use(['/examples/*', '/extensions/*'], (req, res, next) => {
  const sourceOrigin = req.query['__amp_source_origin'];
  if (sourceOrigin) {
    res.setHeader('AMP-Access-Control-Allow-Source-Origin', sourceOrigin);
  }
  next();
});

/**
 * Append ?sleep=5 to any included JS file in examples to emulate delay in loading that
 * file. This allows you to test issues with your extension being late to load
 * and testing user interaction with your element before your code loads.
 *
 * Example delay loading amp-form script by 5 seconds:
 *
 */
app.use(['/dist/v0/amp-*.js'], (req, res, next) => {
  const sleep = parseInt(req.query.sleep || 0, 10) * 1000;
  setTimeout(next, sleep);
});

app.get(['/examples/*.html', '/test/manual/*.html'], (req, res, next) => {
  const filePath = req.path;
  const mode = pc.env.SERVE_MODE;
  const inabox = req.query['inabox'] == '1';
  const stream = Number(req.query['stream']);
  fs.readFileAsync(pc.cwd() + filePath, 'utf8').then(file => {
    if (req.query['amp_js_v']) {
      file = addViewerIntegrationScript(req.query['amp_js_v'], file);
    }

    file = replaceUrls(mode, file, '', inabox);

    if (inabox && req.headers.origin && req.query.__amp_source_origin) {
      // Allow CORS requests for A4A.
      enableCors(req, res, req.headers.origin);
    }

    // Extract amp-ad for the given 'type' specified in URL query.
    if (req.path.indexOf('/examples/ads.amp.html') == 0 && req.query.type) {
      const ads = file.match(
          elementExtractor('(amp-ad|amp-embed)', req.query.type));
      file = file.replace(
          /[\s\S]+<\/body>/m, '' + ads.join('') + '');
    }

    // Extract amp-analytics for the given 'type' specified in URL query.
    if (req.path.indexOf(
        '/examples/analytics-vendors.amp.html') == 0 && req.query.type) {
      const analytics = file.match(
          elementExtractor('amp-analytics', req.query.type));
      file = file.replace(
          /
[\s\S]+<\/div>/m,
          '
' + analytics.join('') + '
');
    }

    if (stream > 0) {
      res.writeHead(200, {'Content-Type': 'text/html'});
      let pos = 0;
      const writeChunk = function() {
        const chunk = file.substring(pos, Math.min(pos + stream, file.length));
        res.write(chunk);
        pos += stream;
        if (pos < file.length) {
          setTimeout(writeChunk, 500);
        } else {
          res.end();
        }
      };
      writeChunk();
    } else {
      res.send(file);
    }
  }).catch(() => {
    next();
  });
});

function elementExtractor(tagName, type) {
  return new RegExp(
      `<${tagName} [^>]*['"]${type}['"][^>]*>([\\s\\S]+?)</${tagName}>`,
      'gm');
}

// Data for example: http://localhost:8000/examples/bind/xhr.amp.html
app.use('/bind/form/get', (req, res) => {
  assertCors(req, res, ['GET']);
  res.json({
    bindXhrResult: 'I was fetched from the server!',
  });
});

// Data for example: http://localhost:8000/examples/bind/ecommerce.amp.html
app.use('/bind/ecommerce/sizes', (req, res) => {
  assertCors(req, res, ['GET']);
  setTimeout(() => {
    const prices = {
      '0': {
        'sizes': {
          'XS': 8.99,
          'S': 9.99,
        },
      },
      '1': {
        'sizes': {
          'S': 10.99,
          'M': 12.99,
          'L': 14.99,
        },
      },
      '2': {
        'sizes': {
          'L': 11.99,
          'XL': 13.99,
        },
      },
      '3': {
        'sizes': {
          'M': 7.99,
          'L': 9.99,
          'XL': 11.99,
        },
      },
      '4': {
        'sizes': {
          'XS': 8.99,
          'S': 10.99,
          'L': 15.99,
        },
      },
      '5': {
        'sizes': {
          'S': 8.99,
          'L': 14.99,
          'XL': 11.99,
        },
      },
      '6': {
        'sizes': {
          'XS': 8.99,
          'S': 9.99,
          'M': 12.99,
        },
      },
      '7': {
        'sizes': {
          'M': 10.99,
          'L': 11.99,
        },
      },
    };
    const object = {};
    object[req.query.shirt] = prices[req.query.shirt];
    res.json(object);
  }, 1000); // Simulate network delay.
});

app.use('/list/fruit-data/get', (req, res) => {
  assertCors(req, res, ['GET']);
  res.json({
    items: [
      {name: 'apple', quantity: 47, unitPrice: '0.33'},
      {name: 'pear', quantity: 538, unitPrice: '0.54'},
      {name: 'tomato', quantity: 0, unitPrice: '0.23'},
    ],
  });
});

app.use('/list/vegetable-data/get', (req, res) => {
  assertCors(req, res, ['GET']);
  res.json({
    items: [
      {name: 'cabbage', quantity: 5, unitPrice: '1.05'},
      {name: 'carrot', quantity: 10, unitPrice: '0.01'},
      {name: 'brocoli', quantity: 7, unitPrice: '0.02'},
    ],
  });
});

// Simulated Cloudflare signed Ad server

const cloudflareDataDir = '/extensions/amp-ad-network-cloudflare-impl/0.1/data';
const fakeAdNetworkDataDir = '/extensions/amp-ad-network-fake-impl/0.1/data';

/**
 * Handle CORS headers
 */
app.use([cloudflareDataDir], function fakeCors(req, res, next) {
  assertCors(req, res, ['GET', 'OPTIONS'], ['X-AmpAdSignature']);

  if (req.method == 'OPTIONS') {
    res.status(204).end();
  } else {
    next();
  }
});

/**
 * Handle fake a4a data
 */
app.get([fakeAdNetworkDataDir + '/*', cloudflareDataDir + '/*'], (req, res) => {
  let filePath = req.path;
  const unwrap = !req.path.endsWith('.html');
  filePath = pc.cwd() + filePath;
  fs.readFileAsync(filePath).then(file => {
    res.setHeader('X-AmpAdRender', 'nameframe');
    if (!unwrap) {
      res.end(file);
      return;
    }
    const metadata = JSON.parse(file);
    res.setHeader('Content-Type', 'text/html');
    res.setHeader('X-AmpAdSignature', metadata.signature);
    res.end(metadata.creative);
  }).error(() => {
    res.status(404);
    res.end('Not found: ' + filePath);
  });
});

/*
 * Serve extension script url
 */
app.get('/dist/rtv/*/v0/*.js', (req, res, next) => {
  const mode = pc.env.SERVE_MODE;
  const fileName = path.basename(req.path);
  let filePath = 'https://cdn.ampproject.org/v0/' + fileName;
  if (mode == 'cdn') {
    // This will not be useful until extension-location.js change in prod
    // Require url from cdn
    request(filePath, (error, response) => {
      if (error) {
        res.status(404);
        res.end();
      } else {
        res.send(response);
      }
    });
    return;
  }
  filePath = replaceUrls(mode, filePath);
  req.url = filePath;
  next();
});

/**
 * Serve entry point script url
 */
app.get(['/dist/sw.js', '/dist/sw-kill.js', '/dist/ww.js'],
    (req, res, next) => {
      // Special case for entry point script url. Use compiled for testing
      const mode = pc.env.SERVE_MODE;
      const fileName = path.basename(req.path);
      if (mode == 'cdn') {
        // This will not be useful until extension-location.js change in prod
        // Require url from cdn
        const filePath = 'https://cdn.ampproject.org/' + fileName;
        request(filePath, function(error, response) {
          if (error) {
            res.status(404);
            res.end();
          } else {
            res.send(response);
          }
        });
        return;
      }
      if (mode == 'default') {
        req.url = req.url.replace(/\.js$/, '.max.js');
      }
      next();
    });

app.get('/dist/iframe-transport-client-lib.js', (req, res, next) => {
  req.url = req.url.replace(/dist/, 'dist.3p/current');
  next();
});

/*
 * Start Cache SW LOCALDEV section
 */
app.get('/dist/sw(.max)?.js', (req, res, next) => {
  const filePath = req.path;
  fs.readFileAsync(pc.cwd() + filePath, 'utf8').then(file => {
    let n = new Date();
    // Round down to the nearest 5 minutes.
    n -= ((n.getMinutes() % 5) * 1000 * 60)
        + (n.getSeconds() * 1000) + n.getMilliseconds();
    file = 'self.AMP_CONFIG = {v: "99' + n + '",' +
        'cdnUrl: "http://localhost:8000/dist"};'
        + file;
    res.setHeader('Content-Type', 'application/javascript');
    res.setHeader('Date', new Date().toUTCString());
    res.setHeader('Cache-Control', 'no-cache;max-age=150');
    res.end(file);
  }).catch(next);
});

app.get('/dist/rtv/9[89]*/*.js', (req, res, next) => {
  res.setHeader('Content-Type', 'application/javascript');
  res.setHeader('Date', new Date().toUTCString());
  res.setHeader('Cache-Control', 'no-cache;max-age=31536000');

  setTimeout(() => {
    // Cause a delay, to show the "stale-while-revalidate"
    if (req.path.includes('v0.js')) {
      const path = req.path.replace(/rtv\/\d+/, '');
      return fs.readFileAsync(pc.cwd() + path, 'utf8')
          .then(file => {
            res.end(file);
          }).catch(next);
    }

    res.end(`
      const li = document.createElement('li');
      li.textContent = '${req.path}';
      loaded.appendChild(li);
    `);
  }, 2000);
});

app.get(['/dist/cache-sw.html'], (req, res, next) => {
  const filePath = '/test/manual/cache-sw.html';
  fs.readFileAsync(pc.cwd() + filePath, 'utf8').then(file => {
    let n = new Date();
    // Round down to the nearest 5 minutes.
    n -= ((n.getMinutes() % 5) * 1000 * 60)
        + (n.getSeconds() * 1000) + n.getMilliseconds();
    const percent = parseFloat(req.query.canary) || 0.01;
    let env = '99';
    if (Math.random() < percent) {
      env = '98';
      n += 5 * 1000 * 60;
    }
    file = file.replace(/dist\/v0/g, `dist/rtv/${env}${n}/v0`);
    file = file.replace(/CURRENT_RTV/, env + n);

    res.setHeader('Content-Type', 'text/html');
    res.end(file);
  }).catch(next);
});

app.get('/dist/diversions', (req, res) => {
  let n = new Date();
  // Round down to the nearest 5 minutes.
  n -= ((n.getMinutes() % 5) * 1000 * 60)
      + (n.getSeconds() * 1000) + n.getMilliseconds();
  n += 5 * 1000 * 60;
  res.setHeader('Content-Type', 'application/json');
  res.setHeader('Date', new Date().toUTCString());
  res.setHeader('Cache-Control', 'no-cache;max-age=150');
  res.end(JSON.stringify(['98' + n]));
});
/*
 * End Cache SW LOCALDEV section
 */

/**
 * Web worker binary.
 */
app.get('/dist/ww(.max)?.js', (req, res) => {
  fs.readFileAsync(pc.cwd() + req.path).then(file => {
    res.setHeader('Content-Type', 'text/javascript');
    res.setHeader('Access-Control-Allow-Origin', '*');
    res.end(file);
  });
});

/**
 * @param {string} mode
 * @param {string} file
 * @param {string=} hostName
 * @param {boolean=} inabox
 */
function replaceUrls(mode, file, hostName, inabox) {
  hostName = hostName || '';
  if (mode == 'default') {
    file = file.replace(
        /https:\/\/cdn\.ampproject\.org\/v0\.js/g,
        hostName + '/dist/amp.js');
    file = file.replace(
        /https:\/\/cdn\.ampproject\.org\/shadow-v0\.js/g,
        hostName + '/dist/amp-shadow.js');
    file = file.replace(
        /https:\/\/cdn\.ampproject\.org\/amp4ads-v0\.js/g,
        hostName + '/dist/amp-inabox.js');
    file = file.replace(
        /https:\/\/cdn\.ampproject\.org\/v0\/(.+?).js/g,
        hostName + '/dist/v0/$1.max.js');
    if (inabox) {
      file = file.replace(/\/dist\/amp\.js/g, '/dist/amp-inabox.js');
    }
  } else if (mode == 'compiled') {
    file = file.replace(
        /https:\/\/cdn\.ampproject\.org\/v0\.js/g,
        hostName + '/dist/v0.js');
    file = file.replace(
        /https:\/\/cdn\.ampproject\.org\/shadow-v0\.js/g,
        hostName + '/dist/shadow-v0.js');
    file = file.replace(
        /https:\/\/cdn\.ampproject\.org\/amp4ads-v0\.js/g,
        hostName + '/dist/amp4ads-v0.js');
    file = file.replace(
        /https:\/\/cdn\.ampproject\.org\/v0\/(.+?).js/g,
        hostName + '/dist/v0/$1.js');
    file = file.replace(
        /\/dist.3p\/current\/(.*)\.max.html/g,
        hostName + '/dist.3p/current-min/$1.html');
    if (inabox) {
      file = file.replace(/\/dist\/v0\.js/g, '/dist/amp4ads-v0.js');
    }
  }
  return file;
}

/**
 * @param {string} ampJsVersion
 * @param {string} file
 */
function addViewerIntegrationScript(ampJsVersion, file) {
  ampJsVersion = parseFloat(ampJsVersion);
  if (!ampJsVersion) {
    return file;
  }
  let viewerScript;
  if (Number.isInteger(ampJsVersion)) {  // eslint-disable-line no-es2015-number-props
    // Viewer integration script from gws, such as
    // https://cdn.ampproject.org/viewer/google/v7.js
    viewerScript =
        '';
  } else {
    // Viewer integration script from runtime, such as
    // https://cdn.ampproject.org/v0/amp-viewer-integration-0.1.js
    viewerScript = '';
  }
  file = file.replace('', viewerScript + '');
  return file;
}

function getUrlPrefix(req) {
  return req.protocol + '://' + req.headers.host;
}

/**
 * @param {string} url
 * @param {string} param
 * @param {*} value
 * @return {string}
 */
function addQueryParam(url, param, value) {
  const paramValue =
      encodeURIComponent(param) + '=' + encodeURIComponent(value);
  if (!url.includes('?')) {
    url += '?' + paramValue;
  } else {
    url += '&' + paramValue;
  }
  return url;
}

function enableCors(req, res, origin, opt_exposeHeaders) {
  res.setHeader('Access-Control-Allow-Credentials', 'true');
  res.setHeader('Access-Control-Allow-Origin', origin);
  res.setHeader('Access-Control-Expose-Headers',
      ['AMP-Access-Control-Allow-Source-Origin']
          .concat(opt_exposeHeaders || []).join(', '));
  res.setHeader('AMP-Access-Control-Allow-Source-Origin',
      req.query.__amp_source_origin);
}

function assertCors(req, res, opt_validMethods, opt_exposeHeaders) {
  // Allow disable CORS check (iframe fixtures have origin 'about:srcdoc').
  if (req.query.cors == '0') {
    return;
  }

  const validMethods = opt_validMethods || ['GET', 'POST', 'OPTIONS'];
  const invalidMethod = req.method + ' method is not allowed. Use POST.';
  const invalidOrigin = 'Origin header is invalid.';
  const invalidSourceOrigin = '__amp_source_origin parameter is invalid.';
  const unauthorized = 'Unauthorized Request';
  let origin;

  if (validMethods.indexOf(req.method) == -1) {
    res.statusCode = 405;
    res.end(JSON.stringify({message: invalidMethod}));
    throw invalidMethod;
  }

  if (req.headers.origin) {
    origin = req.headers.origin;
    if (!ORIGIN_REGEX.test(req.headers.origin)) {
      res.statusCode = 500;
      res.end(JSON.stringify({message: invalidOrigin}));
      throw invalidOrigin;
    }

    if (!SOURCE_ORIGIN_REGEX.test(req.query.__amp_source_origin)) {
      res.statusCode = 500;
      res.end(JSON.stringify({message: invalidSourceOrigin}));
      throw invalidSourceOrigin;
    }
  } else if (req.headers['amp-same-origin'] == 'true') {
    origin = getUrlPrefix(req);
  } else {
    res.statusCode = 401;
    res.end(JSON.stringify({message: unauthorized}));
    throw unauthorized;
  }

  enableCors(req, res, origin, opt_exposeHeaders);
}

function generateInfo(filePath) {
  const mode = pc.env.SERVE_MODE;
  filePath = filePath.substr(0, filePath.length - 9) + '.html';

  return '
Please note that .min/.max is no longer supported
' +
      '
Current serving mode is ' + mode + '
' +
      '
Please go to Unversioned Link to view the page
' +
      '

' +
      '
' +
      'Change to DEFAULT mode (unminified JS)
' +
      '
' +
      'Change to COMPILED mode (minified JS)
' +
      '
Change to CDN mode (prod JS)
';
}

module.exports = app;


text:
A New War Plan for Defense Contractors
Restructuring & Turnaround Global Trade Management & Leadership Construction Information Technology Government & Public Contracts Aerospace & Defense Telecommunications Transportation
With the Iraq war over and the Afghanistan conflict in its final stages, relentless pressure on government spending is creating a very different terrain for defense contractors selling to the U.S. military. If they expect to thrive in the "new normal," contractors need to assess their situations and develop different competitive approaches and defenses.
A few statistics paint the picture of the new normal. The U.S. Department of Defense (DOD) budget for contractors is expected to decrease by 12.4 percent in fiscal year (FY) 2013 and another 7.6 percent in FY 20141. The budget for operations and maintenance-related projects alone has taken a 37 percent hit during the last three years. In addition, the budgets for Overseas Contingency Operations spending are projected to plummet from $162 billion in FY 2010 to the $40 billion range by FY 2014. For defense contractors, traditional sources of revenues and profitability are deteriorating. Those that will survive — and thrive in the long run — will adopt more stringent cost controls, compliance programs and increased operational scrutiny.
Opportunities are emerging for companies that are able to develop innovative solutions and/or gear existing capabilities to meet the needs of new customers such as non-defense-related federal and state agencies and foreign governments. In this article, we delve into the forces creating the new normal and discuss what senior managers at defense contractors can do to navigate it successfully.
Defense Spending: The Situation Today
National security priorities have been shifting for decades. Although the conflicts in Iraq and Afghanistan are dissipating, threats are emerging from North Korea, Iran, and ungoverned regions in the Middle East and North Africa. Dangerous weapons are more widespread, and rogue states and individuals have easier access to military technology. In addition, regional conflicts potentially could require U.S. intervention. Cyber threats — which didn't exist a decade ago — can threaten the country's security, economy and energy grid. The Department of Defense is targeting its resources to these recent threats.
The budget situation, however, is far from stable. The sequester cuts resulted in an automatic decrease of $42.7 billion from the DOD's budget for the 2013 fiscal year. Although a March 2013 resolution restored $85 billion for operations in Iraq and Afghanistan and eased some of the sequester cuts, Congress hasn't reached consensus on a permanent fix. If it fails to address the situation, the defense budget possibly may fall by an additional $500 billion over the next 10 years. To cope with the budget pressures, Chuck Hagel, current Secretary of Defense, is driving efforts to make procurement programs highly efficient, cost-effective and more responsive to military needs.
The DOD has placed a priority on minimizing the budget impact on personnel. Both President Obama and Congress have expressed the desire to preserve funding for military personnel — about 25 percent of the DOD budget — to prevent base closings, layoffs and pay cuts. As a result, defense contractors likely will bear the brunt of the new normal.
The Future of Defense Spending
Since budgets are developed annually, it is difficult to predict future spending trends. However, history teaches us that defense spending drops significantly when wars end. As the Iraq and Afghanistan conflicts reach their respective conclusions, the reduced need for large peacekeeping forces is shifting the DOD budgetary focus from the U.S. Army and U.S. Marine Corps to the Reserves and the National Guard. In terms of future growth, the DOD is planning to invest in naval surveillance, unmanned aircraft, ballistic missile defense and related equipment systems. Whatever the budget scenario, procurement efficiency will continue to be a priority.
THE BETTER BUYING POWER INITIATIVE
In 2010, the DOD began a comprehensive effort to control costs, eliminate unproductive processes and promote competition among its suppliers. The Better Buying Power initiative gained steam two years later with more specific guidelines for contracts, affordability caps and profit levels in line with DOD expectations. As a result, contractors no longer can depend on quick approval for change orders and compensation for additional products and services not explicitly included in contracts.
The federal government is becoming more stringent with procurement requirements in new and existing contracts as well. Contract renewals for incumbents currently include reduced and more competitive margins. Increasingly, government agencies have been utilizing contract vehicles that shift greater performance risk onto the contractor. In addition, government agency procurement officers have been implementing more competitively bid contracts by leveraging lowest price, technically acceptable bid review processes.
INCREASED REGULATORY SCRUTINY
Although the Defense Contract Audit Agency (DCAA) has a $573 billion backlog stretching six years back, politicians in Washington, D.C., are politically eager to ferret out and punish contractors that overbill or commit fraud. The Pentagon recently chastised the DCAA after a March 2013 report revealed that 37 out of 50 audited contracts were not compliant with Generally Acceptable Government Accounting Standards. As the DCAA scrambles to address its critics — shifting staffing, priorities and areas of focus — it is difficult to predict which contractors will be the next targets. The challenge is compounded by the six-year statute of limitations for claims made under the Contract Disputes Act. The act is inconsistently enforced, and a 2012 district court case — United States v. BNP Paribas SA —suspends the statute of limitations until five years after a war ends. Given the complexity of defining the end of modern day conflicts, audits could occur decades after a given contract or transaction has transpired.
Capitalizing on New Growth
Defense companies must refocus business plans, improve efficiency and position themselves effectively to capitalize on opportunities in both the defense and non-defense sectors. To make the transition, companies should take these critical steps:
Evaluate Strengths and Develop New Revenue Sources
Defense companies should thoroughly examine their structure, overhead and offerings to find ways to adapt and bring innovative solutions to the market. For example, companies that can marshal thousands of employees overseas can provide similar services to the Federal Emergency Management Agency (FEMA) or to non-governmental agencies that need support for domestic or international disasters. By the same token, companies that provide defense information technology (IT) solutions can offer those capabilities to improve systems for the Veterans Affairs agency or to bolster fraud detection programs for Medicare and Social Security.SAIC is a case in point. In 2012, 43 percent of the IT service firm's revenues came from its defense solutions business and 32 percent from cybersecurity. Only 25 percent came from health, energy and civil solutions. After thoroughly evaluating its portfolio of capabilities, the company realized it could leverage its health, energy and civil solutions expertise to add value to other government agencies. As a result, SAIC is scoring new contracts with the Transportation Security Administration, FEMA, the National Aeronautics and Space Administration, the National Institutes of Health and the Pension Benefit Guaranty Corporation.
Along similar lines, security service contractors with experience in places such as Iraq and Afghanistan are offering their services to the private sector. These companies know the drill and can provide their capabilities to a host of government and private sector companies. In May 2013, for example, KBR, Inc. won a contract from the London Mayor's Office for Policing and Crime. The company now designs and manages facilities such as call centers for Britain's largest police force.
Contain Costs
Management teams need to focus more on overhead costs, especially when cost-plus contracts are a major source of revenues. In addition, chief financial officers should take a hard look at other expenses that might jeopardize future revenues, profitability and cash flows. It is clear that reducing overhead helps government contractors offer more competitive prices that will assist them in winning new contracts.
DynCorp, for example, embarked on a major overhaul to improve its cost structure. In April 2013, the company reduced the number of its business units from five to three. The restructuring eliminated many layers of overhead and allowed the company to become a more nimble player. DynCorp now can aggressively invest in its three remaining business units.
Create New Specialized Capabilities
Developing specialized capabilities and intellectual property can help separate companies from their competitors. Commoditized services — such as providing resources for rebuilding efforts in Iraq and Afghanistan or semi-technical services in telecommunications — can provide significant revenues. However, service contracts that use unskilled labor and lower-level competencies tend to be highly competitive. The low-margin work can drain long- term earnings and profitability.
Lockheed Martin particularly has been forward looking in developing innovative capabilities and technologies. Seeing the trend toward unmanned aircraft systems, Lockheed Martin acquired companies with this specialized knowledge to boost its existing strengths. Recognizing the challenges that lie ahead in providing potable water, the company built a molecular filtration system that removes sodium, chlorine and other ions from seawater. Lockheed Martin also is creating solutions to address the environmental degradation associated with aquaculture. The company has partnered with fish producers to construct remotely controlled fish pens that can drift in open sea currents and produce millions of sushi-quality fish with little adverse environmental impact.
The Basic Business Playbook
In an era of increased government scrutiny and new demands, defense contractors must ensure that their business practices and systems are bulletproof and adaptable. To achieve the needed readiness, companies should concentrate on three areas:
IMPROVED PROCUREMENT PROCESSES:
Material and overhead expenses should be reduced so businesses can bid more aggressively and operate more profitably. In addition, a contractor whose systems aren't buttoned down could attract added scrutiny from the DCAA. An administrative contracting officer can withhold up to 10 percent of payments if a contractor's accounting system appears to have problems. If government auditors disapprove the system, a contractor could face cash flow problems that thwart its ability to win future cost-plus contracts.
STRENGTHENED BILLING AND COLLECTION CONTROLS:
Strong controls can minimize unbilled revenues and fortify liquidity and working capital — both critical for needed investment. Businesses should monitor all phases of the billing process: circulating forward pricing rates, analyzing and resolving at-risk or unbilled receivables, and fixing billing errors. Billing that is less than transparent can jeopardize relationships with lenders and can lead to government audits.
MORE RELIABLE AND DETAILED REPORTING AND PLANNING TOOLS:
These tools can help companies coordinate business development, finance, operations, financial planning and analysis, and treasury functions. Making the tools interactive can assist management in understanding different scenarios and realizing how a change in one contract or project can affect the entire business. These tools also help manage working capital and effectively promote the organization to capital markets. This especially is important as contractors position themselves for future growth.
For the past 10 years — since the invasion of Iraq in March 2003 — the United States has paid the lion's share of the allied military and reconstruction expenses there. The Iraq war cost the United States at least $138 billion, and the top 10 contractors received some $72 billion. That picture is changing. Most defense contractors no longer can rely on their traditional defense customers. To thrive, they must develop new competitive defenses and approaches and adapt to meet the needs of non-traditional customers across the globe.
The authors wish to thank Mac Garber, Senior Consultant at FTI Consulting, for his contributions to this article.
1-Defense Government Services: Lazard, September 19, 2012.
FTI Consulting analysis.
Published August 2013
© Copyright 2013. The views expressed herein are those of the authors and do not necessarily represent the views of FTI Consulting, Inc. or its other professionals.
Timothy J. Dragelin
tim.dragelin@fticonsulting.com
Senior Managing Director
Corporate Finance & Restructuring
James W. Wolf
james.wolf@fticonsulting.com
Corporate Finance/Restructuring
The CEO As Statesman
To keep investors happy and protect their own interests, companies and CEOs will need to play a more active role in policy and regulatory debates.
A Communications Strategy for Volatile Times
In today's uncertain environment, companies need a sound understanding of what their stakeholders think.
Turning the Turnaround on its Head
In a turnaround situation, too many businesses rush to apply short-term fixes rather than diagnosing the real problem. There is only one cure: identifying the competitive advantage and transforming the corporate culture, while keeping a laser-sharp focus on the end-game.
https://ftijournal.com/article/a-new-war-plan-for-defense-contractors

redpajama_set_name: RedPajamaCommonCrawl


text:
FROM ubuntu:20.04
RUN apt-get update && apt-get install -y --no-install-recommends \
  gcc-multilib \
  libc6-dev \
  ca-certificates

redpajama_set_name: RedPajamaGithub


Comments: 8 bdrms/8 baths 3,400 sq. ft. SFR and Back Units on a 7,309 sq. ft. lot. The home was built in 1987 and is located in a very nice and conforming neighborhood. The subject property is being purchased as an investment, today it is a nursing home business. The buyer is in this line of business.
Comments: Duplex with two 2 bedroom/ 1 bath units, one is 608 sq. ft. and the other is 576 sq. ft. totalling 1,184 sq. ft. on a 4,626 sq. ft. lot. Borrower is using funds to refinance existing loan on rental property and purchase another investment property.
Comments: Property #1: 2 bed/1 bath, 870 sq. ft. SFR on a 6,098 sq. ft. lot. #2: 2 bed/1 bath 825 sq ft. SFR on a 6,098 sq. ft. lot. #3: 2 bed/1 bath 1,080 sq. ft. SFR on a 6,098 sq. ft. lot. #4: 2 bed/ 2 bath, 1,106 sq. ft. SFR on 7,841 sq. ft. lot.
Comments: Commercial property with a 784 sq. ft. restaurant on a 6,740 sq. ft. lot. The borrower is using the funds to purchase another investment property.
Comments: Newly constructed 4 bdr/3.5 bath sfr with over 2,900 square feet. Property includes tons of amenities and city lights views. The purpose is to pay off a construction loan and finish the final touches than prepare the home for sale.
Comments: 6 bedroom/ 6.5 bath, 6,500 sq. ft. SFR with pool and spa, view of the Pacific Ocean and built on 26,592 sq. ft. Borrower is using funds to pay off note maturing shortly and taking cash out to purchase another investment property.
Comments: 3 bdrms/2 bath 1,344 sq. ft. Manufactured home on a 4 acre lot. The home was built in 1989 and is located in rural area. The subject property is being refinance as an investment to rent out ASAP.
Comments: 5,480 sq. ft church building built on a 15,000 sq. ft. lot. Borrower is using funds to refinance existing church loan.
Comments: 3 bedroom/ 2 bath, 1,455 sq. ft. manufactured home/SFR built on 1.13 acres of land. Borrower is using funds to upgrade property and sell it.
Comments: 4 bed/ 3 bath 3,927 sq. ft. two-story SFR with pool on a 20,000 sq. ft. lot of land. Borrower is using funds for business purposes. Seller is doing $75,000 carryback.
Comments: 5,586 sq ft commercial building being used as a temple. Buyers negotiated a lease option to buy 3 years ago and put down a $25K nonrefundable deposit. Buyer has also put about $100K of upgrades and repairs into the property.
Comments: Crossing both properties. Property in Sacramento is tenant occupied and Garden valley will be rented out with 60 days of closing escrow. Borrower has great credit.
*A BPO is being completed on this property and should be into our office by tomorrow morning to confirm the value.
Comments: 78,950 sq. ft. winery complex built on 23.61 acres of land. Borrower is using funds for business purposes.


text:
Home Bernie's Tales On Tour Twenty-One Years Ago Bernie's Historic First New 'Millenium' Tee Shot On A Golf Course In Tonga
Twenty-One Years Ago Bernie's Historic First New 'Millenium' Tee Shot On A Golf Course In Tonga
1 year ago by Bernie McGuire Comments Off on Twenty-One Years Ago Bernie's Historic First New 'Millenium' Tee Shot On A Golf Course In Tonga
Twenty-one years ago today, and in the spirit of a new Millennium, I hit the first golf shot on a golf course of this millenium at midnight on the 1st January, 2000 on the tiny Pacific Ocean island of Tonga.
I flew from Sydney via Auckland to the Tongan capital of Nuku 'alofa.
Tonga encompasses around 170 islands of which 36 are inhabited while some 70% of the now 100,000 total population of the islands live on the main island.
So why go to Tonga to golf?
Bernie (left) on the morning of 1st January, 2000 and after having at midnight become the first to hit a golf shot on a golf course in 2000. The Pacific Island club then celebrated two other firsts when club member David Kongaika ensured his place in golf history later that morning at 8.40am when he aced the 124-metre, par-four seventh. Then just a couple of hours later, Elina Maka was also was celebrating when she too hit a hole-in-one also at the seventh. No club this century will be able to beat these three 2000 golfing firsts! (Photo – Bernie McGuire)
Tonga is located two-thirds of the way between New Zealand and Hawii.
The International Dateline lies just to east of Tonga and with Tonga boasting the most easterly golf course in the world.
Before jetting out of Sydney, I organised myself with 'Welcome to 200o' banners (see photograph above), posters and bunting and then jetted off to Tonga.
The nine-hole Tonga Club chose to celebrate the dawn of a new century with a special 'YK2' (Year 2000) event firstly playing 18 holes on 31st December, 1999 and the second 18 holes on 1st January, 2000.
I made my way to the golf course around 11pm on 31st December and with the course naturally in darkness but thanks to help of a couple of the locals we used car headlights to light-up the first tee while I set-up the banners I had brought with me.
Then on the stroke of midnight I drove a golf ball into the darkness and a golf course boasting the largest leaf grass I've ever played on – buffalo grass and the leafs as big as your fingers.
No sooner had history been created and sadly an elderly couple arrived soon after and having left midnight mass with same intention only to be scooped by a visiting Aussie.
The next day and on the second day of the event one of the club members got a 'hole-in-one' on the second day of the Tongan YK2 tournament (See photograph)
Bernie (left) at the Pacific Island club on 1st January, 2000 to help celebrate club member David Kongaika (right) ensure his place in golf history at 8.40am ib 1st January, 2000 when he aced the 124-metre, par-four seventh. Then just a couple of hours later, Elina Maka (centre) was also celebrating when she too hit a hole-in-one also at the seventh. (Photo – Bernie McGuire)
I remember that 1st January, 2000 also as an American named Bill Areson with access to a private jet teed-up with me at 6.35am on the second day competition on the Tonga Golf Club and then after completing his round he headed to the airport to board his flight heading east to Hawaii.
You see, it was still the 31st December, 1999 on the opposition side of the International Dateline and the gentleman was intending to play a first game in 2000 and the be the only person to also then play a last game of golf 1999 on a course in Hawaii.
How is that for uniquness?
After I had completed my second round I headed back to my hotel and very proudly wrote the story of my historic midnight shot for the Daily Record and appearing in the 2nd January, 2000 edition.


text:
So what was the point of that data date?
by Lou Graziani on March 6, 2014 at 10:02 am
Chapter: #1 Hard Driving, Kayla
Characters: Kayla, Pounder
This page shows Lester, a.k.a. "Pounder", a major character from my other Cy-Boar comics. It was established that Pounder and Kayla were friends, of some sort, WAY back in this page first posted in 2006!: http://cy-boar.com/archives/comic/cy-boar-5-the-intruder-3
Attention small press comic lovers in central Ohio!
I'll be back at S.P.A.C.E. (Small Press & Alternative Comics Expo) this year exhibiting my latest comics.
I'll have LOTS of new books!
Coming up on it's 15th year, S.P.A.C.E. (Small Press & Alternative Comics Expo) is the midwest's longest running exhibition of small press, creator owned and art comics. And Columbus' only locally owned and operated COMICS show. Sponsored by Back Porch Comics.
www.backporchcomics.com
April 12 at 10:00am until April 13 at 5:00pm
Ramada Plaza Hotel & Conference Center
Yee-Ha!
Cyan Action
Squirrel in the news
Susy says step off!
Sneak and Hack
Comics: 28
Recent Appearance: Squirrel in the news
First Appearance: Returning Fire!
Comics: 5
Recent Appearance: Final Twist
First Appearance: Final Collapse


McVac has experience working on major construction projects by top contractors and consultants in the Northeast and Mid-Atlantic regions. We have developed a reputation for being a "one stop solution" that self-performs all work. Contractors and consultants turn to McVac for turnkey service, eliminating the need for multiple contractors who can only handle small portions of the job. Utilizing McVac allows contractors to dedicate more time towards the project and less time tracking down sub-contractors.
McVac teams up with contractors and consultants on DOT projects, remediation projects, site development, utility projects, bridge projects and specialty construction projects.


Torrential rains on the AirVenture airshow in Oshkosh, Wisc., are making the Innovation Hangar at the show a very popular spot. The hangar is filled with spectators all clad in plastic rain slickers of every hue, trying to stay out of the pounding downpour.
Elektra One, the solar electric-powered airplane that SolarWorld is supporting here at the show, is attracting lots of interest and inquiries from Hawaii, New Mexico, and California already this morning.
A retired dairy farmer named Ron Mueller (pictured on right), 69, of Mishicot, Wisc., about an hour east of Oshkosh, came to our booth this morning and proudly announced that he's a very satisfied SolarWorld customer. He has 9.2 kW of ground mounted solar panels along his grass airstrip, where he flies his home-built Zenith 701. He started his experience with solar in 2009 using – let's call them "brand x" -- panels, and then he installed 20 SolarWorld Sunmodule 245 watt solar panels in 2010 and added another 20 earlier this month.
Mueller expects to end up with a net-zero energy bill this month for the first time, now that he has the last 20 solar panels installed. The array powers his geothermal heat system for the house. Does he have plans for adding any more panels? "No. I'm sick of projects," he told me.
As for Elektra One, late yesterday afternoon the FAA guys gave her (and her German test pilot) a thorough inspection and pronounced them both fit for flight. But we've just learned that the weather has definitely cancelled the planned flight of Elektra One for today. Everyone here in the Innovation Hangar is hopeful that the forecast for tomorrow improves so that she can stretch her wings.


This clean-lined bed is crafted of pine with a wingback-style headboard and linen-blend upholstery in a refreshing mint hue. Generous padding ensures long-lasting comfort and support while sitting up to read or watch TV. Mattress and box spring required. Handcrafted in the USA.


This series welcomes back 22 classic M.I. Hummel favorites at very attractive prices. The memories and the artistry of these beloved figurines are as appealing as the low prices. They are ready to capture the hearts of a new generation of M.I. Hummel enthusiasts.


text:
Home » Blog » A Tribute to Patricia Jacobs.
A Tribute to Patricia Jacobs.
THE WILLIAM ALLAN MEMORIAL AWARD
Presented to Patricia A. Jacobs, D.Sc., at the annual meeting
of the American Society of Human Genetics
Dallas, October 28-31, 1981.
Introduction by
JOHN L. HAMERTON
The presentation of the William Allan Memorial Award is a special occasion each year for this Society. The award has been presented to distinguished human geneticists both from North America and overseas since 1962 and is accepted as one of the premier awards for the recognition of exceptional achievement in the field of human genetics. This year, our Society, for only the third time, has a woman president; moreover, it is unique this year that both the president and president-elect are women and also that, for the first time in its history, the Allan Awardee is a woman, a scientist of great distinction who has made exceptional contributions to her chosen field of study, human cytogenetics-Dr. Patricia Jacobs.
Pat, as she is known to many of us, was born in October 1934, in London, England, where her father worked for the I.C.I. Nobel Explosives division. On September 1, 1939, the whole division was transferred to the west coast of Scotland, and, of course, Pat, aged 5, followed. She received a Scottish public school education and after matriculating went to St. Andrew's University to study botany.
She quickly transferred to zoology and came under the influence of a man who was then one of the youngest professors of zoology in the United Kingdom and who still holds the same chair, Prof. H. G. Callan, or "Mick" Callan, as he is more generally known. Callan, of course, is a cytogeneticist of lampbrush chromosome fame, and his "master" and "slave" hypothesis of gene regulation is well known.
In 1956, Pat obtained her bachelor's degree with first-class honours in zoology, her undergraduate thesis being on the meiotic process in Mantis religiosa, which was subsequently published in the Journal of Genetics with Callan. Pat's early upbringing on the coast of Scotland gave her a love for the sea, the coast, and the islands, and this she maintains to this day, having her major residences on two islands on opposite sides of the world: Hawaii, an island of sunshine, flowers, sandy beaches, and hula dancers in the Pacific, where she spends 9-10 months each year, and Barra, an island off the west coast of Scotland, where she spends as much of each summer as possible. Her connections with Barra go back many years, as she spent many holidays there as a child.
The Isle of Barra is at the southernmost tip of that group of islands, The Hebrides, which protect the west coast of Scotland from the ferocity of the storms in the North Atlantic. In 1966, a team of scientists, led by Pat, from Edinburgh's Western General Hospital MRC Clinical and Population Cytogenetics Unit descended on the island to carry out a chromosome study on all members of the population over the age of 65. Barra, like many other remote places, has a record of longevity among its population, as well as of keeping extensive genealogical records. Thus it was an ideal population in which to study the effects of aging on the chromosomes and be able to follow up interesting findings in descendant generations. Finally, in 1976, while on holiday in Barra, she found the property that she had been looking for many years and purchased a home on the island.
After graduating in 1956, Pat did not follow the usual North American pattern of today; PhD, then post-doc academic position; instead, she got a job. Her first job was as a mouse geneticist, running the mouse room for Dr Kathleen Stein at Mount Holyoke College, Massachusetts.
On her return to England in 1957, she joined the staff at the Medical Research Council Clinical Effects of Radiation Research Unit as a scientist under the direction of Dr Michael Court Brown. It was around that time that I first met Pat when she was spending some time in the laboratory of Dr Charles Ford at Harwell and I was visiting that lab, which I had recently left. From that point on, Pat's career never looked back, and by 1966 she was made a permanent member of the Medical Research Council's scientific staff,
and although now in Hawaii, she still holds an honorary appointment with the British Medical Research Council. In 1966, she was granted the Degree of Doctor of Science from St. Andrew's University for her work on human cytogenetics. The year 1970-71 was, in some ways, a turning point in her career. That year she spent a sabbatical with Dan Lindsley at the University of California at San Diego working on aneuploidy in Drosophila and getting back to first principles with an experimental organism which could be manipulated to answer questions in ways not possible with man.
Pat has been constantly productive in the 26 years since she began publishing, having produced a total of 116 papers in that time. I will now try to summarize what I feel to be her major contributions to our field. In 1958, she published with Ford and Lajtha one of the earliest descriptions of the human karyotype, which, together with those of other workers who had published by 1960, provided the data on which the Denver System of Nomenclature was based. 1959 marked a vintage year for early human cytogenetics, and a paper by Jacobs and Strong described the first example of the 47, XXY karyotype in Klinefelter syndrome and provided the first evidence for the possible role of the human Y in male sex determination. In the same year, Jacobs and her co-authors provided the first evidence of the 47, XXX female, which, following the Drosophila terminology, they
termed the "super-female." Those were exciting days, in which the feelings of excitement were similar to those one can detect among molecular biologists today. In one year, the chromosomes of Down syndrome, Klinefelter syndrome, the triple X female, Turner syndrome, the first human chromosome mosaic, and the first double aneuploid (XXY/+21) were described, essentially by three groups: the Edinburgh group of which Jacobs was part; Charles Ford at Harwell, working with a group of clinicians from Guy's Hospital and the Galton Laboratory; and the French group under Lejeune.
There is no doubt that priority for the discovery of the extra chromosome in Down syndrome must go to Lejeune, with rapid and independent confirmation coming from Jacobs and her co-authors, and the Harwell/Galton group, in that order. Priority for the XXY and XXX female goes to Jacobs and her coworkers, while priority for the first mosaic [8] and the first double aneuploid goes to the Guy's Hospital/Galton/Harwell group [8], as does priority for the first XO female to be reported in man.
In addition to these chromosome abnormalities, Jacobs and her coworkers also examined the chromosomes in a case of testicular feminization and showed these to be XY, a first example of supposed sex reversal in man, now known to be due to a receptor defect.
In 1960, Jacobs was part of a group which reported the first fertile XO female; perhaps 10 are now known in the world. In many ways, these were halcyon years for human cytogeneticists. Skilled cytogenetics labs were few, accreditation exams had not been heard of, and it was a case of "Have Microscope, Will Examine Chromosomes," and perceptive clinicians were only too ready to respond.
When discussing Jacobs' career, one must say something, I believe, of the environment in which she was working at the time. This was the Medical Research Council Clinical Effects of Radiation Research Unit (now the MRC Clinical and Population Cytogenetics Research Unit), which was then under the direction of the late Dr Michael Court Brown, a gifted and farsighted clinician and epidemiologist. Court-Brown recognized very early that to make progress in this field one needed a team in which all the elements required for the study of chromosome disease at the population level were present and working together. In his view, such a team consisted of cytogeneticists, clinicians, and epidemiologists; and this he set about to develop. Thus from an early stage, the Edinburgh group was self-sufficient and not dependent on random referrals from friendly clinicians, but had a clinical arm which could seek out and evaluate the patients it needed.
During the early and middle sixties, a continued stream of high-class papers emanated from Edinburgh, many with Jacobs as senior author. An interesting observation was made by Jacobs, Court-Brown, and Doll, with a subsequent paper in 1963, which was that there is an increase in the frequency of aneuploid cells with age in lymphocyte cultures and that this occurrence is especially evident in females of 55 years and over and relates to an increase in frequency of 45, X and to a lesser extent to 47, XXX, with age; while in males, there is less conclusive evidence that the Y is preferentially subject to loss or gain.
In a series of papers beginning in 1965, Jacobs and her colleagues examined the chromosomes of almost all of the male patients in the Scottish Maximum Security Hospital at Carstairs and found nine out of 315 patients to have a 47, XYY chromosome complement. This was the first description of a group of 47, XYY males. They concluded their first paper [14] with the statement that all these males were exceptionally tall, but that "at present, it is not clear whether the unusual frequency of XYY males found in this Institution is related to their aggressive behaviour or their mental deficiency or to a combination of these factors." These initial studies have, of course, been followed up by extensive studies on 47, XYY males ascertained in various ways. Jacobs' early observations of an increased frequency of XYY males in certain special security settings have been confirmed, but it has also been shown that many XYYs apparently develop
normally without special problems.
Some of Jacobs' most interesting work has been done since she went to Hawaii, where she is a professor of anatomy and reproductive biology at the University of Hawaii Medical School. Her laboratory has produced a steady stream of papers on structural heterozygosity in man, chromosome mutation rates and the effect of chromosome abnormalities on reproductive fitness. In addition, a classic series of papers on the chromosomes in spontaneous abortions have provided data on the frequencies of the different chromosome abnormalities, their origin, and etiology. In particular, Jacobs and her colleagues have provided evidence on the origin of triploids in man, and have shown that trisomics are usually maternal in origin, usually resulting from nondisjunction at meiosis I; that irrespective of the chromosomes involved, there is a high level of recurrence risk for trisomies; and, most interestingly, that hydatidiform moles, which are usually 46 XX result from the fertilization of an empty egg by a haploid sperm, which then duplicates without cytokinesis to restore the diploid number.
Credit must also go to Jacobs' laboratory for the first method for the direct chromosome analysis of human spermatozoa by allowing them to fertilize hamster eggs and then analyzing the chromosomes of the male pronucleus. In 1981, Jacobs reported on the fifth female with Duchenne muscular dystrophy to have an X/autosome translocation with breakpoints at Xp21 and argued convincingly that Xp21 is the site for the locus for Duchenne muscular dystrophy.
In this brief review, I have touched upon but a few of the firsts of Jacobs' career. Above all, Jacobs enjoys her laboratory and time spent at the bench. In these days of photographic cytogenetics, where much analysis is done, not from the microscope but from the photographic print, Jacobs is old-fashioned. She believes in the direct analysis down the microscope in a good, old-fashioned way.
She has been one of the pioneers concerned from the very beginning with the nomenclature of human chromosomes. In 1960, she was a participant in the Denver conference; in 1963, in the London conference; in 1965, in Chicago; and 1971, in Paris. In 1975, she became a member of the International Standing Committee on Human Cytogenetic Nomenclature and has been a signatory on each of the successive reports on this subject. As a former chairman of several of these meetings, no one was more aware than I how much Pat's participation and common sense contributed to the final consensus and agreement.
In 1972, she married Newton Morton, himself an Allan Award winner in 1963, whom she had met at the 1969 Birth Defects Conference at the Hague. Since then, they have published together and have brought to their science two totally different, but highly complementary, approaches to the answering of the many questions left in the area of human population cytogenetics.
Clearly, Jacobs has been an extraordinarily successful research worker. It is an honour for our Society to honour you, the 1981 Allan Awardee, and it gives me great personal pleasure to introduce to our Society Dr Patricia Jacobs, the 1981 Allan Award winner.
Originally posted in 1982 by the American Society of Human Genetics.
Where it all began, Patricia's discovery of 47 XXY
Research, Science, Sex, Women, XXY Awareness, Research
Previous Entry Mortality in Patients with Klinefelter Syndrome in Britain: A Cohort Study
Next Entry Do you speak open science? Resources and tips to learn the language


text:
Wayne Lee - Carl Joe Williams Whispers to God, Being Here When Women Need Me to Be Here! - Carl Joe Williams Deidre Dumas Labat - Carl Joe Williams Reynold T. Decou - Carl Joe Williams
Whispers to God, Being Here When Women Need Me to Be Here!
113 x 150 x 7.25 in. (287.02 x 381 x 18.415 cm)
Carl Joe Williams (New Orleans, LA, 1970 – ) Artist
Object Type: Installation
Medium and Support: multimedia installation with three-channel video
Statement by Carl Joe Williams, on his artistic response to Dolfinette Martin's experience:
When I started this work series, I was interested in the exploration of ideas to create work about mass incarceration. I wanted to create work that could be broken down into components of video testimony and expression to create experiential pieces. In part, a portion of those components exist as an activist work in cyberspace. The pieces would allow formally incarcerated people to tell their own compelling stories. Prisoners of injustice could spark a movement of consciousness, raise awareness, and promote change. The process was filmed over four hours of interviews with 5 people.
Through a series of meetings, I had chance to interview Dolfinette Martin. I wanted her words to be featured as a larger installation piece. I wanted to create a piece that served as a portrait, as an activist message, as a document of the impact of this type of loss of freedom to women. Through the portrait of Ms. Martin's perspective and consequential work with women who have been incarcerated, the message of despair, injustice and deliverance is illuminated.
I was moved by Dolfinette's statement that all the risk factors - such as being poor, the lack of opportunity and lack of access to resources - were central to imprisonment; crimes had little to do with what was actually committed. This idea was profound, and it has stuck with me as a major social problem for us to resolve.
PER(SISTER): Incarcerated Women in Louisiana , 1/19/2019 - 3/18/2022
overall, wall panel Dimensions: 113 x 150 x 7.25 in. (2870.2 x 3810 x 184.15 mm)
Your current search criteria is: Portfolio is "Browse All" and [Objects]Display Artist is "Carl Joe Williams".


Suncoast casino official site. S top entertainment destination, offering events, family fun, movies dining and gaming thrills on durban. Enjoy gaming like never before at colorado belle casino resort, the premier casino destination conveniently located in laughlin, nv. Book your stay today.
Punch inn casino where the old west meets up with the 21st century. C punch ranch is a fully operational cattle ranch and alfalfa farm. Fremont street experience is an incredible entertainment and gaming destination in the heart of the world. S most exciting city, las vegas.
A casino is a facility which houses and accommodates certain types of gambling activities. The industry that deals in casinos is called the gaming industry. Is the design movement in interior, product, graphic design, architecture, and urban development from roughly.
How to play fortune pai gow poker. How to play ultimate texas hold. How to play 21st century blackjack. Join our mailing list and like us on facebook for all the latest news and events related to the new hpc.
Learn more about the exciting selection of table games at crown casino melbourne, including earning crown rewards, learn to play and more. Barona casino resort time. 7 pm brochure download. Honoring our youth education.
Century casino has a great selection of popular penny slots, all the hot new slots, video poker machines and classic reel games. Join the gold club for. Hialeah park racing casino has a first. Class casino with slots and poker tables, horse racing, live entertainment, and wedding and event space.
Simply the best hotel in downtown deadwood. The bullock hotel is the jewel of downtown deadwood. With much tradition and historic ambience, deadwood. Towers casino is a casino and card room located in grass valley, ca. Offering texas holdem poker, blackjack, and pai gow.
50 bonus at ladbrokes when you stake a minimum of. 10 in our uk online casino games like blackjack, roulette, slots, baccarat, texas hold. Century casino is an extra addition to the city. S entertainment options. Set across three floors, the casino features a luxurious cocktail lounge with.
We provide informative news, coverage of international, national and local events, expert advice from local professionals, entertainment and interactive. Visit the orleans casino site to book rooms or for casino gaming on the strip in las vegas, nv. Find ticketing for las vegas shows and entertainment and.
Enjoy a relaxing night at the century orleans 18 movie theater in las vegas, nv hosting the latest, most popular movies. View showtimes buy tickets here. Visit san diego county. S only truck stop casino. 7 and offer everything you need such as clean restrooms, hot showers, laundry, food and more.
If you are a chairperson of a committed fundraiser with entertainment. Account has already been created for you. A memorable and high performing one. Mile racetrack with a minimum of. Race days per year is projected to open in april,.


This product supports healthy functioning of the throat & respiratory membranes.
Kosher coconut and/or palm kernel glycerine, purified water, essential oil of peppermint and citric acid.
Do not use if safety seal is broken or missing. Keep out of reach of children. Keep your licensed health care practitioner informed when using this product. Do not use if you are pregnant or nursing. Not for prolonged use or in high doses except under supervision of a qualified health practitioner; contraindicated for diabetes and in hypertension, liver disorders, severe kidney insufficiency, and hypokalemia.


Melodie Waters is situated in Hartbeespoort Dam. The properties have been designed to resemble the Balinese style. And since they are built on the water's edge, boathouses have been conveniently developed for owners who just can't live without their water toys. The Estate has a club house, swimming pool and park & braai area for the exclusivity of residents. There is also access to the Dam itself. For safety and peace of mind, the Estate is also accesses controlled by 24 hour service security guards.
Please send me more information about web reference P24-107056386 in Melodie, Hartbeespoort.
Thank you for your enquiry. A message has been sent to RealNet Hartbeespoort and an agent will be in contact with you shortly.


text:
https://mmajunkie.usatoday.com/2016/07/mma-writer-chad-dundas-hopes-acclaimed-champion-of-the-world-novel-appeals-to-new-audiences
MMA writer Chad Dundas hopes acclaimed 'Champion of the World' novel appeals to new audiences
Trent Reinsmith
July 12, 2016 9:15 pm ET
Longtime MMA journalist Chad Dundas has written one of the great debut novels of 2016 in "Champion of the World."
Now, as a reader, you might wonder what a 474-page book about professional wrestling in the early 20th century has to offer you, and that's a fair question. And the answer is "Champion of the World" isn't just a historical fiction novel about wrestling; it's a whole lot more than that.
The novel is an engaging tale of carnivals, gangsters, bootlegging, race relations, decisions, deception, attempted redemption, tragedy and life. It's a spectacular piece of writing, which even before publication was seeing Dundas compared to American greats such as Cormac McCarthy and Jim Thompson – and justifiably so.
If you have doubts about the book, just read the first line: "The clowns came to get him when it was time for the hanging."
C'mon, tell me that doesn't want to make you read on and find out just what's going on in this book.
"The opening line has gotten a lot of attention, which is both flattering and a little surprising, and it is totally not the first thing that I thought of, nor the first thing that I wrote for the opening of the book," Dundas told MMAjunkie. "I don't remember what the other previous first lines were, probably because when I landed on that one, I was like, 'Oh, that's the one right there.' After that, it was only 480 pages to go."
Between research, revisions and working with his editor and publisher, it took Dundas, a lead MMA writer for Bleacher Report who also hosts the Co-Main Event Podcast with MMAjunkie's Ben Fowlkes, about five years to come up with those 480 pages.
One thing Dundas accomplished during that time was that he developed amazingly complete and utterly compelling characters. While the lead character, former lightweight wrestling champion Pepper van Dean, was pretty well formed for Dundas before he wrote the book, others, such van Dean's wife, Moira, and African-American heavyweight contender Garfield Taft took longer to take shape.
Moira, a cardsharp who sticks with van Dean through relatively good times and really bad times, was a pleasant surprise for Dundas.
"I really didn't know who she was going to be when I started to write her character," he said. "She just kind of came alive for me and didn't necessarily take over the entire book, but became a character who I thought could hold her own around the other very strong personalities within the book."
The character that became Garfield Taft originally began as legendary wrestler Frank Gotch. That changed when, during the creative process, Dundas sat down and reread Geoffrey C. Ward's book "Unforgivable Blackness" and watched the Ken Burns documentary of the same name about heavyweight champion Jack Johnson.
"It kind of struck me that the same racial tensions that existed around boxing at that time also must have existed in wrestling," Dundas said. "And once I came up with the idea of having Garfield Taft, the African-American wrestler who had run afoul of the law and was now training for a comeback, purely from an artistic standpoint, I felt that it made the book so much more interesting. So I plunged in from there and tried to create Garfield Taft as an amalgamation of Jack Johnson and Frank Gotch and a little bit of my imagination."
As for van Dean, his character came from Dundas' interest in wrestling and his work in MMA.
"I think people who are MMA fans who read the book will see a lot of modern day fighters in Pepper," Dundas said. "There's some Matt Hughes in him, there's some Dan Severn in him, and there's probably some Mark Coleman in him – this kind of hard-nosed American wrestler personality that if you've been around the sport you probably recognize as a fairly well-known trope in MMA."
That "Champion of the World" will appeal to fans of MMA and wrestling is a given, but that's not a very robust demographic for a writer to draw from. That fact was not lost on Dundas.
"An outside goal of mine was that I wanted to try to make the book accessible to people who might not feel like literature is typically marketed toward them," Dundas said. "I wanted to make it accessible to people who don't necessarily feel like they are excited to read a lot of novels and a lot of long works of fiction, and I hope that I did that."
With "Champion of the World" set for release today in hardcover, e-book and audiobook, Dundas has already begun work on a second novel, which for someone with a full-time MMA-writing gig has not been without stress.
"I've had to be more judicious, a little more motivated, and a little more meticulous about my time because I do have to find that balance between the MMA journalism and the fiction writing," he said. "On top of that, my wife and I had our second child, and we moved in the middle of the process, so it has taken some added dedication to try to find time in the day to work on fiction."
Now that he's a published novelist, Dundas, who has spent much of his career as the interviewer, has become the interviewee, and he said that is a little bit weird.
"Yup, it is," Dundas said. "Doing interviews is really weird. It brings up a lot of questions in my mind since I interview people for a living, so as I'm being interviewed, I'm thinking, 'Am I doing a good job. Am I quotable, and articulate? Am I going to sound stupid? Am I one of those people who words sound reasonable when they are coming out of my mouth but seem ridiculous when you see them on the page?' So yeah, it brings up some anxiety. I'm not totally comfortable with it yet, but I'm doing my best."
Check out these photos from UFC 284 media day in Perth, Australia, where fighters answered questions from the media in attendance.


Abstract Dynamics of inland fishery remain poorly understood despite their increasing socioeconomic importance and rapid growth. Here we analyze the changes in the dynamics of Chinese traditional and new inland fisheries by examining 26 years (1991-2016) of reported annual catch and mean trophic level in relation to socioeconomic development in China at provincial level. Results from spatial panel linear models indicate a significant correlation between socioeconomic and fishery variables, strongly suggesting that the development of these fisheries is nested in the socioeconomic context specific to each province. A preference towards higher trophic level species (i.e., investment in quality) is revealed under a status of socioeconomic wealth, while a focus on production (i.e., quantity) is observed when population, and therefore food demand, increases. By providing novel evidence on the links between large-scale dynamics in production and trophic structure of a country's inland fishery and the socioeconomic context driving the fish demand and consumption, our work represents an important contribution towards a broader assessment and management of inland fishery resources. (C) 2018 Published by Elsevier B.V.
GB/T 7714 Zhao, Kangshun,Jorge, Garcia Molinos,Zhang, Huan,et al. Contemporary changes in structural dynamics and socioeconomic drivers of inland fishery in China[J]. SCIENCE OF THE TOTAL ENVIRONMENT,2019,648(1):1527-1535.
APA Zhao, Kangshun,Jorge, Garcia Molinos,Zhang, Huan,Zhang, Min,&Xu, Jun.(2019).Contemporary changes in structural dynamics and socioeconomic drivers of inland fishery in China.SCIENCE OF THE TOTAL ENVIRONMENT,648(1),1527-1535.
MLA Zhao, Kangshun,et al."Contemporary changes in structural dynamics and socioeconomic drivers of inland fishery in China".SCIENCE OF THE TOTAL ENVIRONMENT 648.1(2019):1527-1535.


Mark T. Beaman is an experienced trial attorney and administrative lawyer. He has been with the Firm since 1998. He is a Fellow of the American College of Trial Lawyers and a member of the American Board of Trial Advocates. He has been representing physicians in medical malpractice litigation and in cases before the Texas Medical Board for over 30 years. Mark was recognized as a "Texas Super Lawyer", a Thompson Reuters publication, from 2006-2015. He was also included in The Best Lawyers in America, by BL Rankings, from 2005-2018. He is also listed as a recommended attorney in Physician, Protect Thyself, a book on malpractice prevention. Mark graduated from the University of Virginia in 1976 with a degree in Government and Foreign Affairs. He obtained his legal education at the University of Arkansas Law School in Fayetteville, Arkansas. He was a member and an Associate Editor of the Arkansas Law Review.
Mark practices in both state and federal courts throughout Texas. He is licensed to practice in the Supreme Court of Texas, Texas Courts of Appeals, Texas trial courts, the United States District Court for the Western, Eastern, Northern and Southern Districts of Texas. He has also handled appeals in the Texas Courts of Civil Appeals, the Texas Supreme Court, and the United States Courts of Appeals for the Fifth Circuit. He is a member of the State Bar of Texas and Austin Bar Association. He is a member and past director of the Texas Association of Defense Counsel. In addition to medical malpractice cases and medical board actions he has also handled a wide variety of personal injury, insurance coverage, employment law, products liability and construction defect cases.


text:
Q: .NET Azure Database Upload This is my connection string for my azure database:
Server=tcp:linkofy.database.windows.net,1433;Initial Catalog=Linkofy;Persist Security Info=False;User ID={your_username};Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;

my .NET database connection string is:
Data Source=|DataDirectory|Linkofy-Release.sdf

In the Package/Publish SQL do I just add my azure connection string to the destination database with my username and password, will this upload my database to azure?
What would my web.config transformation connection string then be?

A: I would get the database up to Azure myself. I recommend you look into the Data Migration Assistant.
Once on Azure, you can use the Azure App service App Settings to specify the connection string your application should use instead of web.config transformations.

redpajama_set_name: RedPajamaStackExchange


text:
"Catholics for Choice" bakes a cake for Planned Parenthood
How nice.
From the group's press release:
Women's health clinics across the country will again be harassed by the antichoice movement this weekend. In response, Catholics organized to remind clinic staff that we stand with Planned Parenthood and support the important work they do. Today, Catholics for Choice delivered cakes and messages of goodwill to women's clinics on behalf of Catholic supporters, showing that only a small minority of Catholics agree with the extremist voices of the bishops on the question of abortion. "It is clear that Catholics support Planned Parenthood and reject the extremist rhetoric and dirty, underhanded tactics of the antiabortion lobby," said Jon O'Brien, president of Catholics for Choice. "We wanted clinic workers, doctors and nurses to know that we stand with Planned Parenthood and the women they care for.
As Lifenews noted:
Unfortunately, for the pro-abortion group, it is unlikely that the majority of Catholics agree with their radical views on abortion; and it is even more unlikely that Catholics look favorably upon Planned Parenthood's practice of dismembering babies and selling their organs for profit. The truth is the Catholic Church's teaching on abortion is clear, and in 2013, Pope Francis reiterated that they will never compromise on their opposition against it. He said, "I want to be completely honest in this regard. This is not something subject to alleged reforms or 'modernizations'. It is not 'progressive' to try to resolve problems by eliminating a human life."
Lest we forget: morality is not subject to the whims of popular opinion. Evil remains evil, and sin remains sin—no matter how strenuously its proponents attempt to sweeten it.
As the church teaches:
Since the first century the Church has affirmed the moral evil of every procured abortion. This teaching has not changed and remains unchangeable. Direct abortion, that is to say, abortion willed either as an end or a means, is gravely contrary to the moral law Formal cooperation in an abortion constitutes a grave offense. The Church attaches the canonical penalty of excommunication to this crime against human life. "A person who procures a completed abortion incurs excommunication latae sententiae, "by the very commission of the offense," and subject to the conditions provided by Canon Law. The Church does not thereby intend to restrict the scope of mercy. Rather, she makes clear the gravity of the crime committed, the irreparable harm done to the innocent who is put to death, as well as to the parents and the whole of society.
Catholics for a Free Choice "has no affiliation, formal or otherwise, with the Catholic Church," according to the Administrative Committee of the National Conference of Catholic Bishops. The committee said that during the August visit by Pope John Paul II to World Youth Day in Denver, "programs about dissent in the Catholic Church often included a spokesperson for a group calling itself Catholics for a Free Choice. Both before and since World Youth Day, because of CFFC's presuming to speak for American Catholics and because of the attention the media have paid to the group, many people, including Catholics, may be led to believe that it is an authentic Catholic organization. It is not.a'


The building located at Pamplona Street No.88 of Barcelona used to be a warehouse and storage space covered in graffiti. Andrew Trotter talks with its owner Skye Maunsell.
Tell us a little about the history of you guys, your studio and the building.
Jordi Veciana and Jordi Castel moved to this building 9 years ago, they restored it and set up their studio Castel Veciana Arquitectura. The building used to be a warehouse and storage space covered in graffiti, now the space is divided in two main areas, the design studio at the back and what we call Espacio88 in the front. I have an independent design firm based within the space and am also part of Espacio88. At 88 we organise creative/artistic and cultural events, and at the same time rent out the space for private events, photo shoots, comercial ads, art exhibitions. And more, its becoming a very popular platform for the area. We recently built a mobile kitchen to organise food related events, and of course it's also the parking spot of Skye Coffee co.
How and when did you have the idea to start Skye Coffee co, and open up Espacio 88 to the public?
The idea was there quite a long time ago, but just under a year ago it actually became reality. I always thought the coffee world was very interesting, and wanted to learn more about it, and having discovered all sorts of great spots for drinking great coffee in London and New York, I realised there was a need for something appealing, new and different in Barcelona. Mix that with my passion for classic vehicles, design and restoring things, Skye Coffee co. finally happened. For me Espacio88 was the perfect parking spot for Skye Coffee co, we wanted to open up the space to the public more by converting it into an inspiring meeting point for people, businesses and friends that work or live in the area.
I guess it is only in Poblenou that you have spaces like this in Barcelona!
The building's shape and structure is typical of the neighbourhood of Poblenou, wooden trusses and brick walls. At the end of the XIX century it was the most important industrial area of Catalunya and from that period a lot of those industrial buildings have remained, sadly a lot have also been taken down.
This neighbourhood reminds me a lot of Shoreditch in London or Williamsburg in New York. The space is quite unique, we enjoy working in it and people love to come in, explore and walk around, it's great to be a part of that.
Did it all start with the van? What is the history of the van?
Well I had my eye on the classic Citroen H van for a while.I had always wanted one, even if it was just to drive up the coast or buzz around town! This one is from 1972, I bought it from a retired Industrial designer whose wife had a florist, and used the van to display flowers.It took quite a long time to restore and design the interior, adapting it into the mobile coffee shop, particularly when one´s so picky about image, details and style like me!
Surrounded by the Northern Alps, the mountainous Hida region of the Gifu Prefecture is in the centre of the archipelago, 90 percent of which is forested.
The difference here is the people who know how to welcome you, who make you feel at home and experience something truly unique.


text:
MUSIC NEWS: @Renaiszance release graphic novel based video for "I Will Rise."
Renaiszance, a pop / electronic dance group comprised of brother/sister duo Ravé Mehta (producer) and Radha Mehta (lead singer) recently premiered a music video for their current single, "I Will Rise" on CraveOnline. "I Will Rise" is the group's first single from their debut album, Rise, which was released in April of this year. Fans can pick up Rise on iTunes here. Renaiszance, "I Will Rise" and Rise are currently up for nomination for the 56th Grammy Awards in the following 4 categories: Best New Artist, Song of the Year, Best Pop Vocal Album and Best Pop Duo/Group Performance.
"I Will Rise" is inspired by the #1 selling non-fiction graphic novel THE INVENTOR, based on the true story of famed inventor and mystic, Nikola Tesla. The music video uses the art from the graphic novel to evoke Tesla's story in a unique and powerful way.
Ravé Mehta created THE INVENTOR to illustrate how Nikola Tesla won the epic AC/DC battle against Thomas Edison during the late 19th century, which regarded Tesla as the true Father of Modern Electricity. Although Tesla later died penniless, many of his inventions and ideas continue to live on and are still used in today's technology, including the creation of electronic music. As a tribute to Tesla, Ravé produced RISE as an electronic dance album that speaks to THE INVENTOR's themes of LOVE, HOPE and FREEDOM. Find out more about THE INVENTOR graphic novel here.
Ravé Mehta was the featured opening speaker at TEDxMiami recently where he discussed the role of graphic novels in today's hyper-visual society as tools to re-engage kids to read and learn while inspiring them to use the power of their mind and imagination.
To stay current with all things Renaiszance be sure to follow them on Facebook, Twitter, and their Official Site.