text:
Q: Cloudflare Workers - SPA with Vuejs Hello I have deployed my Vue.js app to Cloudflare workers using the following commands:
wrangler generate --site
wrangler publish --env dev

This is my wrangler.toml:
account_id = "xxx"
name = "name"
type = "webpack"
workers_dev = true

[site]
bucket = "./dist"
entry-point = "workers-site"

[env.dev]
name = "name"
route = "xxx.com/*"
zone_id = "XXX"
account_id = "XXX"

The website is fine and live on "xxx.com" but when I refresh the page on any other route I get this error message:

could not find es-es/index.html in your content namespace

Or for example:

could not find category/65/index.html in your content namespace

On nginx I had to create a .htaccess, but I have no idea on how to make it work here.
This is my index.js in case it helps:
import { getAssetFromKV, mapRequestToAsset } from '@cloudflare/kv-asset-handler'

/**
 * The DEBUG flag will do two things that help during development:
 * 1. we will skip caching on the edge, which makes it easier to
 *    debug.
 * 2. we will return an error message on exception in your Response rather
 *    than the default 404.html page.
 */
const DEBUG = false

addEventListener('fetch', event => {
  try {
    event.respondWith(handleEvent(event))
  } catch (e) {
    if (DEBUG) {
      return event.respondWith(
        new Response(e.message || e.toString(), {
          status: 500,
        }),
      )
    }
    event.respondWith(new Response('Internal Error', { status: 500 }))
  }
})

async function handleEvent(event) {
  const url = new URL(event.request.url)
  let options = {}

  /**
   * You can add custom logic to how we fetch your assets
   * by configuring the function `mapRequestToAsset`
   */
  // options.mapRequestToAsset = handlePrefix(/^\/docs/)

  try {
    if (DEBUG) {
      // customize caching
      options.cacheControl = {
        bypassCache: true,
      }
    }
    return await getAssetFromKV(event, options)
  } catch (e) {
    // if an error is thrown try to serve the asset at 404.html
    if (!DEBUG) {
      try {
        let notFoundResponse = await getAssetFromKV(event, {
          mapRequestToAsset: req => new Request(`${new URL(req.url).origin}/404.html`, req),
        })

        return new Response(notFoundResponse.body, { ...notFoundResponse, status: 404 })
      } catch (e) {}
    }

    return new Response(e.message || e.toString(), { status: 500 })
  }
}

/**
 * Here's one example of how to modify a request to
 * remove a specific prefix, in this case `/docs` from
 * the url. This can be useful if you are deploying to a
 * route on a zone, or if you only want your static content
 * to exist at a specific path.
 */
function handlePrefix(prefix) {
  return request => {
    // compute the default (e.g. / -> index.html)
    let defaultAssetKey = mapRequestToAsset(request)
    let url = new URL(defaultAssetKey.url)

    // strip the prefix from the path for lookup
    url.pathname = url.pathname.replace(prefix, '/')

    // inherit all other props from the default request
    return new Request(url.toString(), defaultAssetKey)
  }
}

A: As you know, Vue.js (like many other SPA frameworks) expects that for any path that doesn't map to a specific file, the server falls back to serving the root /index.html file. Vue will then do routing in browser-side JavaScript. You mentioned that you know how to accomplish this fallback with .htaccess, but how can we do it with Workers?
Good news: In Workers, we can write code to do whatever we want!
In fact, the worker code already has a specific block of code to handle "404 not found" errors. One way to solve the problem would be to change this block of code so that instead of returning the 404 error, it returns /index.html.
The code we want to change is this part:
  } catch (e) {
    // if an error is thrown try to serve the asset at 404.html
    if (!DEBUG) {
      try {
        let notFoundResponse = await getAssetFromKV(event, {
          mapRequestToAsset: req => new Request(`${new URL(req.url).origin}/404.html`, req),
        })

        return new Response(notFoundResponse.body, { ...notFoundResponse, status: 404 })
      } catch (e) {}
    }

    return new Response(e.message || e.toString(), { status: 500 })
  }

We want to change it to:
  } catch (e) {
    // Fall back to serving `/index.html` on errors.
    return getAssetFromKV(event, {
      mapRequestToAsset: req => new Request(`${new URL(req.url).origin}/index.html`, req),
    })
  }

That should do the trick.

However, the above solution has a slight problem: For any HTML page (other than the root), it will do two lookups, first for the specific path, and only after that will it look for /index.html as a fallback. These lookups are pretty fast, but maybe we can make things faster by being a little bit smarter and detecting HTML pages upfront based on the URL.
To do this, we want to customize the mapRequestToAsset function. You can see a hint about this in a comment in the code:
  /**
   * You can add custom logic to how we fetch your assets
   * by configuring the function `mapRequestToAsset`
   */
  // options.mapRequestToAsset = handlePrefix(/^\/docs/)

Let's go ahead and use it. Replace the above comment with this:
  options.mapRequestToAsset = req => {
    // First let's apply the default handler, which we imported from
    // '@cloudflare/kv-asset-handler' at the top of the file. We do
    // this because the default handler already has logic to detect
    // paths that should map to HTML files, for which it appends
    // `/index.html` to the path.
    req = mapRequestToAsset(req)

    // Now we can detect if the default handler decided to map to
    // index.html in some specific directory.
    if (req.url.endsWith('/index.html')) {
      // Indeed. Let's change it to instead map to the root `/index.html`.
      // This avoids the need to do a redundant lookup that we know will
      // fail.
      return new Request(`${new URL(req.url).origin}/index.html`, req)
    } else {
      // The default handler decided this is not an HTML page. It's probably
      // an image, CSS, or JS file. Leave it as-is.
      return req
    }
  }

Now the code detects specifically HTML requests and replaces them with the root /index.html, so there's no need to waste time looking up a file that doesn't exist only to catch the resulting error. For other kinds of files (images, JS, CSS, etc.) the code will not modify the filename.

A: There appears to be a built-way to do this now:
import { getAssetFromKV, serveSinglePageApp } from '@cloudflare/kv-asset-handler'
...
let asset = await getAssetFromKV(event, { mapRequestToAsset: serveSinglePageApp })

https://github.com/cloudflare/kv-asset-handler#servesinglepageapp

redpajama_set_name: RedPajamaStackExchange


Rejoice! For it's Taco Tuesday! Arguably the very greatest of all of the mid-week nights on account of its, well….taco-ness! Great for entertaining or for a fresh summery meal; and when you sun is actually shining like it is today, well the that's all one could ask for in life isn't it?! Here is a platter with all of the trimmings, except for the protein. Marinated fish, chicken, prawns and tofu are on a constant rotation in our house, but the fillings stay pretty much consistent. Because, if it ain't broke and all that, why fix it? Packing in a mighty 6 of your five-a-day with a smoky salsa, some spirulina guacamole and a chipotle red pepper aioli, alongside more rainbow veggies than you can shake a stick at.
I do feel like it is high time I confessed to something that many taco-lovers would pour scorn on me for. Ok, deep breath, here goes – I don't like coriander. In fact, I would go as far as to say that I bloody it. Phew, I said it. What a relief. So in light of this, I used fresh basil in my salsa and it works a treat. But of course, if you are all about authenticity and don't think that coriander tastes like eating a bar of soap, then by all means, swap the basil for coriander.
Once you add your preferred protein of choice, the meal becomes wonderfully balanced - with a ton of fibre and blood-sugar stabilizing complex carbs from the wholewheat seeded tortillas. I just love a meal that I can make in advance and keep in the fridge for later when I'm too 'hangry' to think straight! Plus it means there is minimal washing up for a dinner party too. When I make this for the kids, I just leave out all the chillis so it is not spicy, and they love being able to assemble their own meal.
· Simply put all of the salsa ingredients in a high-speed blender and blitz to desired consistency.
· Repeat this step for the guacamole and red pepper aioli too.
· Serve with wholegrain tortillas, sautéed onions, sliced cucumber, gem lettuce leaves and some cooked protein of your choice – enjoy!


text:
Q: Magento certification versions? Which magento versions are the certifications based on for both the plus and regular versions?
Are the 1.6 for regular and 1.12 for enterprise?

A: As of December 2013 it's Magento 1.7CE for Developer and Magento 1.12EE for DevPlus.
Source: http://www.magentocommerce.com/certification/developer

A: Pretty much the latest versions. Although the above answer is technically correct, you can expect challenge questions to include some stuff from whatever the latest release is.
Don't forget to study what a nominal product means...


There are a host of changes that need to take place once you, as a software vendor, decide to make the leap to become a service provider. Of course the main difference is that you're now selling a service as opposed to an application; but alongside this are changes to your business model, your approach to service and even remuneration and budgeting.
From an operational point of view you need to look at your end-to-end business processes, including the ever-important service level agreement (SLA) that up until now you haven't been responsible for. You may need to give assurances regarding performance, service availability, and the ability of your software to integrate with or work on difference platforms.
The important takeaway here is to decide how you'll demonstrate value to customers over and above the software you're providing, and then match the appropriate SLA commitments with your target market. This may include 9-5 corporates that don't need 24/7 support or, on the other hand, organisations with high net worth users (clients or fee earners) that may call you at any time of day with issues. For the latter, can you charge a premium for this type of service? But how do you measure your costs when you enter into the market as a service provider and how do you model that charge as an operating expense back to your customer? If the hosting of the software is a new model for you, the overheads of maintaining a service desk and engineers to monitor, manage, assess and resolve infrastructure issues is a considerable expense that will be new to the business. If you are already doing this internally, can you scale to cover forecast growth, 24×7 cover, the increased cyber threats? Could your resources that know your customers and services be better aligned to supporting the software and leave the infrastructure to a specialist?
These are all questions you should be asking yourself, as well as about your infrastructure partner if you're working with one. If a partner is helping deliver the backend platform you need to ensure your organisations are closely aligned so that your processes and operations work together to fulfil the SLAs. Having a good relationship with your infrastructure partner is absolutely critical as they need to understand your business, your market demands and your customers so that they effectively match their operational processes to match your requirements.
Just consider that as a service provider your customers will be asking you questions they've never needed to before – about security of the platform, how the backend infrastructure works, access methods, compliance and what to do in the event of a failure. And your infrastructure partner is the lynchpin in answering them. As a result, you need to work with them to pre-empt the questions and proactively have answers available to ease the concerns of your customers and reassure them about security, performance and availability. This is especially important in highly regulated markets, like financial services or healthcare, where in order to meet compliance requirements customers will often need to visit datacentre sites in order to audit and understand the processes, procedures and security controls that are in place.
Finally, from a contractual point of view, you need to look at your terms and conditions of service, how you're putting those together, what you're responsible for and how you're going to address any failures. Of course if you're working with an infrastructure or hosting partner, you have to make sure that their terms and conditions are reflected in your own. Ideally, you need a flexible partner who is willing to tweak these terms to make them more suitable for the market you're working in.
If you'd like to understand more about the journey to SaaS, take a look at our website that has a host of valuable resources.


Now you have to tell me this!!!
Do you think the back to school no taxes is really no taxes on the school purchases? I had some people tell me that they could not see where the taxes was taken off. You tell me what do you think?


Pulse diagnosis, one of the jewels of traditional Chinese medicine, is a profoundly subtle instrument for the early diagnosis and prevention of disease Yet far too often, in the haste of modern education and practice, it has become a neglected art Chinese Pulse Diagnosis Revised Edition offers a clear and practical path toward a much deeper understanding of this traditiPulse diagnosis, one of the jewels of traditional Chinese medicine, is a profoundly subtle instrument for the early diagnosis and prevention of disease Yet far too often, in the haste of modern education and practice, it has become a neglected art Chinese Pulse Diagnosis Revised Edition offers a clear and practical path toward a much deeper understanding of this traditional diagnostic method, while recasting its interpretation in the context of our own times The book is organized in seventeen chapters, which are presented in an advancing hierarchy of complexity The early chapters consider such general issues as terminology, classification of pulse qualities, historical comparisons of positions and depths, the effects of age and gender, and a methodology for taking the pulse The middle chapters provide an in depth look at each of the individual pulse qualities, identified by felt sensation based on such characteristics as rate and rhythm, stability, volume, depth, size, and shape The types of pathology associated with each of the qualities are also discussed Later chapters examine the significance of the qualities when found across the entire pulse, or large segments of the pulse left or right side, across the burners , and at different depths The relationship of the various pulse qualities to psychology and prognosis are addressed in separate chapters A final summary chapter on interpretation, supported with case histories, draws everything together to show how this information can be formulated into a rational diagnosis Key information in the book is organized and richly illustrated in over one hundred tables and graphic drawings Individual chapter tables of contents and extensive indexes provide convenient access to every aspect of this important subject Pulse diagnosis, one of the jewels of traditional Chinese medicine, is a profoundly subtle instrument for the early diagnosis and prevention of disease Yet far too often, in the haste of modern education and practice, it has become a neglected art Chinese Pulse Diagnosis Revised Edition offers a clear and practical path toward a much deeper understanding of this traditional diagnostic method, while recasting its interpretation in the context of our own times The book is organized in seventeen chapters, which are presented in an advancing hierarchy of complexity The early chapters consider such general issues as terminology, classification of pulse qualities, historical comparisons of positions and depths, the effects of age and gender, and a methodology for taking the pulse The middle chapters provide an in depth look at each of the individual pulse qualities, identified by felt sensation based on such characteristics as rate and rhythm, stability, volume, depth, size, and shape The types of pathology associated with each of the qualities are also discussed Later chapters examine the significance of the qualities when found across the entire pulse, or large segments of the pulse left or right side, across the burners , and at different depths The relationship of the various pulse qualities to psychology and prognosis are addressed in separate chapters A final summary chapter on interpretation, supported with case histories, draws everything together to show how this information can be formulated into a rational diagnosis Key information in the book is organized and richly illustrated in over one hundred tables and graphic drawings Individual chapter tables of contents and extensive indexes provide convenient access to every aspect of this important subject.
Every pulse quality is a hypothesis, the first step in a true science of insight. I have never been disappointed in my search for understanding if I turn to this book for clarification. There is no other text like it. It contains almost as much incredible information regarding the author's exhaustive understanding of pathophysiology from the Chinese medical model as it does about pulse diagnosis. This is a work of genius.


In South Africa, most of the adults who spend time with children in their various capacities, including parents, teachers, caregivers, adopters and custodians, do not regularly read aloud to them. And even if they do, with repeated readings of favourite storybooks, most can't sustain the activity long enough for it to become a habit.
This is because if they choose to read in a mother tongue other than English, after a month or so they deplete the available supply of books.
In South Africa, it is only printed stories in English that published prolifically – a critically important point to stress. This leaves aside, for now, all the questions about the choice and availability of widely ranging and enticing stories.
Many publishing companies and initiatives are addressing these language limitations, including the Nal'ibali reading-for-enjoyment campaign in which I perform a role. But even having stories in relevant languages does not mean that adults will automatically reach for them to read with their children, nor does it mean they know how to.
Firstly, reading is a habit that matures over time, and coming to know which books to select is a kind of apprenticeship. We develop from being novices to more experienced readers. The historical fact is that African languages have been systematically denied their place in writing literature – and many adults are not leisure readers.
Without a personal inner library of stories, what does an adult have to offer a child who is looking for guidance (I mean an adult who can read but doesn't)? This is the position of many adults who are the custodians of children's formal or informal education in South Africa.
Some simply don't know what stories to choose or why they would choose one over another. Some also have little, if any, practice in reading aloud. It is a kind of skill that is often assumed to "just exist" – but it doesn't. Practice makes perfect.
Large numbers of adults involved in early literacy education also tend to hold children to the dictum "Learn to read, then read to learn", focusing their gaze and attention on combining letters and sounds that lead tidily to easily decodable words and phrases in mother and/or other tongues.
If, and when, our eager young learners, brimming with potential and interest, master this arid feat, they're inched up to the next level of more challenging but still controlled texts.
Reading to children is important in early literacy education's official curriculum, but its priority is delivering a carefully managed process to children so that the books they learn to read with are "just right" and not too easy or too hard.
This works for some children, but it does so often because somewhere else – at school or at home, or in a reading club – they have other literacy lessons that show them the value of reading. These are the kinds of authentic, messy forays into print, stories and books that unleash children's imaginations and bring them the joy and satisfaction that great stories offer.
It is these kinds of personally satisfying experience that teach us what reading is really about and lead to invaluable reading habits.
More and more adults are now beginning to wake up to the power they wield when they read stories to their children: they are offering them the benefits of this superbly nutritious brain food. Great stories weave magic. Our hearts beat as fast when we identify with fictitious characters suffering hardship and indignity as when we are empathising with our real friends and family. We feel their pain and their glory. And we now know from research why this is so.
Brain scans show how narrative stimulates many other parts of our brains, not just the "language regions", which we've known about for some time.
Brain areas dealing with smell, for instance, are activated when we read evocative words such as "jasmine" or "petrol".
In laboratories, scientists can see how reading phrases involving texture metaphors light up our sensory cortex, which enables it to perceive touch. So "his leathery hands" and "her velvet voice" evoke responses that "his strong hands" and her "pleasing voice" do not.
This suggests that our brains do not operationally distinguish between our reading about an experience and personally having it. Our basic brain functions can't tell the difference between a real event and one in a story – and voluminous research suggests that this capacity of stories predates language.
The possible worlds that fiction conjures up, especially those replete with moral quandaries, metaphors and finely spun descriptions of others, allow us to experience so much more than we can when our experience is restricted to our own lives.
With stories, we weigh up our values and consider what our actions would be if we were in the shoes of others. And those of us who grew up with the great stories from around the world are stronger when fearful, in danger or abandoned in a time of need, because we have the decisions and actions of inspiring characters and heroes to draw on.
So, although reading aloud to children will not magically rocket them to the top of the school ladder, there is much evidence to suggest that reading aloud to children will help them develop excellent memories and vocabularies, think critically and logically, and help their comprehension skills to soar.
Even more impressive is that it will help them grow up as people who engage with the world in ways that are empathetic, critically analytical and full of curiosity.
by Carole Bloch, Director of The Project for the Study of Alternative Education in South Africa (PRAESA), which is driving the Nal'ibali reading-for-enjoyment campaign. For more information, visit www.praesa.org.za or www.nalibali.org.
I attended a very informative Nal'ibali training in Grahamstown last week with the lovely Malusix2!
I loved the ideas shared, and I was particularly struck by the importance of building up the personal story bank. I thoroughly enjoyed the fun ideas and easy ways to stimulate others to develop and value their own stories. All power and elbow grease to the team! As I sit here thinking of the stories of my childhood, I hear my ever be-jeweled, rose-fragranced grand-mama whispering in her palest-of-pink-voices into my eager and curious ear… thank you for the memories.


text:
Dental Malpractice Litigation
General/Civil Litigation
Long-term Care Litigation
Medical Licensing, Staff Privileges & Credentialing
Medical Malpractice and Health Care Litigation
Andrew R. Booth
Karen Cooke
Leonard W. Dooren
Gerard J. Emig
Michael F. Flynn, Jr.
James P. Gleason, Jr.
Steven A. Hamilton
Paul Iyob
Larry D. McAfee
Patricia Morse
Nathan J. Postillion
Bradford Roegge
Erin Schiesel
Andrew J. Spence
Luke C. Veale
Rachel I. Viglianti
Attorney Positions
Recent Hires
Larry McAfee
lmcafee@gleason-law.com | DOWNLOAD vCARD
Larry McAfee is a Shareholder at the firm. His practice areas include general/civil litigation, medical licensing, staff privileges & credentialing, medical malpractice and health care litigation. Mr. McAfee is licensed in the state and federal courts of Maryland and the District of Columbia. He is a Fellow in the American College of Trial Lawyers and a member of the American Board of Trial Advocates, DC Defense Lawyers Association, and the Bar Association of Montgomery County, MD. Mr. McAfee has an "AV" rating from Martindale-Hubble (highest in legal ability and ethical standards).
Mr. McAfee received a Bachelor of Science degree in Nuclear Engineering from the University of Maryland at College Park in 1993. Mr. McAfee attended the Washington College of Law, American University, where he received a Juris Doctorate degree in 1996. After graduating from law school, Mr. McAfee accepted a position at the Federal Labor Relations Authority, as an attorney advisor in the Office of the Chair. Mr. McAfee left public service in 1997 to practice at a private law firm in the District of Columbia. In 1999, Mr. McAfee accepted a position at Gleason, Flynn, Emig & McAfee, as a litigation associate and was promoted to Shareholder in July 2006.
University of Maryland, College Park (B.S. 1993)
Washington College of Law, American University (J.D. 1996)
Bar Association of Montgomery County, Maryland
DC Defense Lawyers Association
11 North Washington Street, Suite 400, Rockville, MD 20850-4278 P:301.294.2110 F:301.294.0737 Privacy Policy Site Map
©2020 Gleason, Flynn, Emig & McAfee, Chartered . All Rights Reserved | Website Design and Development by Americaneagle.com

redpajama_set_name: RedPajamaCommonCrawl