using System.ComponentModel; | |
using System.ComponentModel.DataAnnotations; | |
using System.ComponentModel.DataAnnotations.Schema; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.EntityFrameworkCore.ChangeTracking; | |
using Microsoft.EntityFrameworkCore.Metadata; | |
using MassTransit; |
/* ------------------------------------------------------- / | |
TITLE: SQL Server Find and Replace Values in All | |
Tables and All Text Columns | |
SOURCE: https://www.mssqltips.com/sqlservertip/1555/sql-server-find-and-replace-values-in-all-tables-and-all-text-columns/ | |
/ ------------------------------------------------------- */ | |
USE MyDatabaseNameHere | |
BEGIN TRANSACTION |
Composition of <Route>
elements in React Router is changing in v6 from how it worked in v4/5 and in Reach Router. React Router v6 is the successor of both React Router v5 and Reach Router.
This document explains our rationale for making the change as well as a pattern you will want to avoid in v6 and a note on how you can start preparing your v5 app for v6 today.
In React Router v5, we had an example of how you could create a element](https://github.com/remix-run/react-router/blob/320be7afe44249d5c025659bc00c3276a19f0af9/packages/react-router-dom/examples/Auth.js#L50-L52) to restrict access to certain routes on the page. This element was a simple [wrapper around an actual
element that made a simple decision: is the user authenticated or not? If so, ren
Profile | download (kb/s) | upload (kb/s) | latency (ms) |
---|---|---|---|
Native | 0 | 0 | 0 |
GPRS | 50 | 20 | 500 |
56K Dial-up | 50 | 30 | 120 |
Mobile EDGE | 240 | 200 | 840 |
2G Regular | 250 | 50 | 300 |
2G Good | 450 | 150 | 150 |
3G Slow | 780 | 330 | 200 |
// app.js: register the route. In our case, we don't want authorization for this route | |
app.use('/healthcheck', require('./routes/healthcheck.routes')); | |
// healthcheck.routes.js: return a 2xx response when your server is healthy, else send a 5xx response | |
import express from 'express'; | |
const router = express.Router({}); | |
router.get('/', async (_req, res, _next) => { | |
// optional: add further things to check (e.g. connecting to dababase) |
import { useState, useCallback, useRef } from "react"; | |
// Usage | |
function App() { | |
const [hoverRef, isHovered] = useHover(); | |
return ( | |
<div ref={hoverRef}> | |
{isHovered ? '😁' : '☹️'} | |
</div> |
/* | |
Incredibly simple Node.js and Express application server for serving static assets. | |
DON'T USE THIS IN PRODUCTION! | |
It is meant for learning purposes only. This server is not optimized for performance, | |
and is missing key features such as error pages, compression, and caching. | |
For production, I recommend using an application framework that supports server-side rendering, | |
such as Next.js. https://nextjs.org |
RUN curl -o ioncube.tar.gz http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz \ | |
&& tar -xvvzf ioncube.tar.gz \ | |
&& mv ioncube/ioncube_loader_lin_5.6.so `php-config --extension-dir` \ | |
&& rm -Rf ioncube.tar.gz ioncube \ | |
&& docker-php-ext-enable ioncube_loader_lin_5.6 |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.