b 'My search for the boy in a child abuse video' By www.bbc.co.uk Published On :: Sun, 08 Mar 2020 00:09:54 GMT Lucy Proctor was horrified when she was WhatsApped a sex abuse video. And she wanted to find out if the boy was safe. Full Article
b The actor who was really stabbed on stage By www.bbc.co.uk Published On :: Sat, 14 Mar 2020 00:57:41 GMT Conor Madden was playing Hamlet when a sword fight went badly wrong. Would he ever act again? Full Article
b The volunteer army helping self-isolating neighbours By www.bbc.co.uk Published On :: Mon, 23 Mar 2020 00:09:19 GMT The coronavirus outbreak has left many feeling trapped indoors, but for some help may not be far away. Full Article
b Coronavirus: Here's how you can stop bad information from going viral By www.bbc.co.uk Published On :: Mon, 20 Apr 2020 10:39:28 GMT Experts are calling on the public to practise ‘information hygiene’ to help stop the spread of falsehoods online. Full Article
b Birth in a pandemic: 'You are stronger than you think' By www.bbc.co.uk Published On :: Tue, 31 Mar 2020 23:09:29 GMT Coronavirus is throwing many birth plans up in the air and leading some health trusts to increase home births. Full Article
b Coronavirus: The grandad who became a TikTok star without realising it By www.bbc.co.uk Published On :: Sun, 12 Apr 2020 23:42:47 GMT Joe Allington was persuaded to dance on TikTok for the first time in January. Now he's got 1.5 million followers. Full Article
b Why being gay in Russia is about "love and passion" By www.bbc.co.uk Published On :: Sat, 15 Feb 2020 00:19:02 GMT The secret moment between two gay Russian lovers that defied haters. Full Article
b Electrosensitivity: 'I didn't believe people had it, then it happened to me' By www.bbc.co.uk Published On :: Fri, 07 Feb 2020 00:13:15 GMT Velma, Emma and Dean believe mobile phone signals, wi-fi and other modern technology makes them ill. Full Article
b Rob Lawrie, the ex-squaddie, and the girl taken By www.bbc.co.uk Published On :: Mon, 30 Mar 2020 00:13:01 GMT Rob thought he was helping a refugee girl and her father as they struggled to get to the UK. But he found out it was all a lie. Full Article
b Coronavirus: DIY hair shaving and beauty treatments By www.bbc.co.uk Published On :: Fri, 17 Apr 2020 07:15:21 GMT As hair dye and clippers become the next thing on the stockpile list - we look at how people are managing their hair and beauty. Full Article
b Dirty streaming: The internet's big secret By www.bbc.co.uk Published On :: Thu, 05 Mar 2020 01:03:57 GMT Figures suggest that IT now generates as much CO2 as flying, with some arguing it's nearly double. Full Article
b Sex, Disability, and Sex and Disability By www.bbc.co.uk Published On :: Thu, 23 Apr 2020 01:12:00 GMT Disability and sex is a topic around which there are a lot of misconceptions, but what do disabled people think when people get awkward talking about sex with them? Full Article
b Ramadan and Coronavirus: Breaking my fast on Zoom By www.bbc.co.uk Published On :: Thu, 30 Apr 2020 23:57:07 GMT How fasting in lockdown and isolation has changed Ramadan for young Muslims this year. Full Article
b Coronavirus: 'I'm being bombarded by gambling ads' By www.bbc.co.uk Published On :: Sat, 02 May 2020 00:41:18 GMT Gambling companies have halted TV and radio ads during lockdown - but not online ads. Full Article
b Coronavirus: Flower grower donates blooms to key workers By www.bbc.co.uk Published On :: Sun, 05 Apr 2020 00:06:58 GMT Horticulturalist Ben Cross is working with supermarkets to donate flowers to NHS workers. Full Article
b The shop where you can still buy huge bags of pasta By www.bbc.co.uk Published On :: Mon, 06 Apr 2020 23:08:08 GMT Wholesalers are opening their doors to members of the public keen to buy supplies in bulk. Full Article
b Coronavirus tests and masks sold by fraudsters online By www.bbc.co.uk Published On :: Fri, 10 Apr 2020 04:54:22 GMT A BBC investigation has found online scams selling fake protective equipment and coronavirus tests. Full Article
b Coronavirus: 'My parents' campervan has become my office' By www.bbc.co.uk Published On :: Fri, 10 Apr 2020 21:26:57 GMT A marketing manager explains why she turned a campervan into her office during coronavirus. Full Article
b Bill Gates: Few countries will get 'A-grade' for coronavirus response By www.bbc.co.uk Published On :: Sun, 12 Apr 2020 05:00:05 GMT The Microsoft billionaire says we find ourselves in uncharted territory with the coronavirus pandemic. Full Article
b Coronavirus: ‘Buying a round’ to thank NHS workers By www.bbc.co.uk Published On :: Sat, 18 Apr 2020 23:05:01 GMT Social enterprise Brewgooder is helping people buy beers for those on the coronavirus front line. Full Article
b Coronavirus: UK chancellor on new microloan scheme for small businesses By www.bbc.co.uk Published On :: Mon, 27 Apr 2020 16:30:38 GMT Firms will be able to borrow up to £50,000, which will be interest free for the first year. Full Article
b Coronavirus: Pint delivery service to challenge Belfast ban By www.bbc.co.uk Published On :: Sun, 26 Apr 2020 23:11:06 GMT A pub delivering Guinness to people's homes during lockdown says it was operating within the law. Full Article
b Coronavirus: Should maternity and paternity leave be extended? By www.bbc.co.uk Published On :: Sun, 26 Apr 2020 23:22:29 GMT A petition calling for maternity leave to be extended due to coronavirus has attracted many signatures. Full Article
b Coronavirus: 'My cafe's going bust before it's even opened' By www.bbc.co.uk Published On :: Tue, 28 Apr 2020 23:04:30 GMT A car factory worker turned cafe owner explains how coronavirus is affecting his business dream. Full Article
b Coronavirus: Bread and cake tips from a self-isolating baker By www.bbc.co.uk Published On :: Fri, 08 May 2020 23:02:33 GMT Ray normally runs his family bakery, Rinkoffs, but is currently staying at home with his wife. Full Article
b Staging a 'socially distanced' boxing match By www.bbc.co.uk Published On :: Wed, 29 Apr 2020 23:31:52 GMT Inside the Nicaraguan boxing event that caught the world's attention during the pandemic. Full Article
b Coronavirus: Disease meets deforestation at heart of Brazil's Amazon By www.bbc.co.uk Published On :: Mon, 04 May 2020 01:24:37 GMT Coronavirus has overwhelmed Manaus, the Amazon's biggest city, and the worst is yet to come. Full Article
b Millie Small: My Boy Lollipop singer dies aged 72 By www.bbc.co.uk Published On :: Wed, 06 May 2020 09:47:49 GMT The singer, who had Jamaica's first million-selling single, dies after suffering a stroke. Full Article
b Life for asylum seekers in lockdown on the US-Mexico border By www.bbc.co.uk Published On :: Wed, 06 May 2020 23:06:57 GMT Magaly Contreras has spent nine months in a Tijuana shelter and is worried about her future. Full Article
b Coronavirus: São Paulo governor at odds with Bolsonaro By www.bbc.co.uk Published On :: Thu, 07 May 2020 08:40:54 GMT São Paulo Governor João Doria has imposed tough virus curbs, a move slammed by President Bolsonaro. Full Article
b Brazil's Amazon: Surge in deforestation as military prepares to deploy By www.bbc.co.uk Published On :: Fri, 08 May 2020 21:17:52 GMT The military is preparing to deploy to the region to try to stop illegal logging and mining. Full Article
b Coronavirus: Brazil's outbreak 'threatens Paraguay's success' By www.bbc.co.uk Published On :: Sat, 09 May 2020 04:20:41 GMT Paraguay's president says he has reinforced the border with the worst-hit country in South America. Full Article
b Venezuela: Trump denies role in bungled incursion By www.bbc.co.uk Published On :: Fri, 08 May 2020 19:25:57 GMT Venezuela has accused the US of being behind a botched raid to oust President Maduro. Full Article
b React Router & Webpack in Production By reactjsnews.com Published On :: Sun, 13 Mar 2016 04:00:09 +0000 I’ve been working on a pretty large react-router codebase at work. Currently it has around 50~ code splits, which as you can imagine, is a lot of routes. This is going to be a post on the things I’ve learned throughout building out my development / production config and how we are using webpack in production. ###Initial Setup Before I really dive into how my webpack config is setup and the problems I’ve found, I’ll quickly go over how this app is setup. Currently, there’s one entry point and it looks like this: import React from 'react' import { render } from 'react-dom' import { match, Router, browserHistory } from 'react-router' import AsyncProps from 'async-props' import routes from '../routes/index' /* globals document, window */ const { pathname, search, hash } = window.location const location = `${pathname}${search}${hash}` match({ routes, location }, () => { render( <Router render={props => <AsyncProps {...props}/>} routes={routes} history={browserHistory} />, document.getElementById('app') ) }) It looks like a standard react-router setup, except a couple things are different. For one, there’s way too many routes to have them all in this file, so we are importing the main route object into this file. Second, we are using match on the client side. Without matching first, the client side would try to render before the splits were downloaded causing an error. You can read a little more about match on the client here. Next, we are using Ryan Florence’s awesome async-props library for loading data into components. It allows me to load data from an api before the server renders components. It will pass the data down to the client for the client-side render, and then data will load as you navigate to new pages automatically. ###Routes Our main routes file looks like this: export default { component: 'div', path: '/', indexRoute: require('./index'), childRoutes: [ require('./login'), require('./account'), ... ] } There’s a lot more require’s in our app of course. And these are nested pretty deep. The files referenced in the root file have more child routes, and those use require.ensure which you can read about in the webpack docs on code splitting. It tells webpack to make a new bundle, and then load that bundle when require.ensure is called on the client. Here’s an example: if(typeof require.ensure !== "function") require.ensure = function(d, c) { c(require) } module.exports = { path: 'account', getComponent(location, cb) { require.ensure([], (require) => { cb(null, require('../../views/master/index.jsx')) }) }, childRoutes: [ require('./settings'), ] } There’s a few things going on here. First, we have a function at the top that will polyfill require.ensure. Why? Well, on this project we are server rendering our whole site as well, which I would rather not do, but due to the type of site we are building: we have to. The next thing is the relative require path. I’m using this awesome babel resolver plugin along with webpack’s resolve paths so that I can import files like this: import Header from '../../master/header' //becomes import Header from 'master/header' Why do I have to use a babel plugin AND webpack’s resolve feature? Once again, doing a server rendered app, the code is ran on the server and also through webpack. In this particular app, I haven’t had time to experiment with webpacking the server. Anyways, if I didn’t use the babel plugin, errors would be thrown on the server, but webpack would work fine. This is one of the common things I have ran into while building this app. Realizing some things need to be done slightly different on the server or client. You may still be wondering why I am referencing the component as a relative path in the above route example, and that’s because the babel plugin I’m using only works with import and not require. My route objects are the one place that I have these “nasty” looking paths. ##Webpack I was prompted to make this article after tweeting this out: webpack splits vs AggressiveMergingPlugin({minSizeReduce: 1.0}) pic.twitter.com/b6kxHEqNcO— ReactJS News (@ReactJSNews) March 10, 2016 A couple people wanted a better explanation as to what’s happening here. When I was first building my production webpack config, even after using all of these plugins: new webpack.optimize.CommonsChunkPlugin('vendor', 'vendor.js'), new webpack.optimize.OccurenceOrderPlugin(), new webpack.optimize.DedupePlugin(), new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false }, comments: false, sourceMap: false, mangle: true, minimize: true }), My bundle looked like this: That’s pretty huge if you think about it. And I’m not talking about the amount of bundles. I’m talking about the file size. After searching everywhere for a solution to get the bundle size down further, I found webpack’s AggressiveMergingPlugin. This thing is a life saver. As you may have seen from the tweet, the output turns into this: Just having the main, vendor, and one other bundle brings the whole site under 1MB. I’m using the plugin to only merge files if the size reduction is more than 50%, which is the default. People talk about code splitting in webpack and think it’s really amazing to load the JS for the page you’re on and nothing more. It sounds great. The problem is that the file size is immensely bigger. If someone more familiar with webpack has a better idea as to why this is, I’d like a better explanation. It isn’t feasable to keep the splits instead of merging them. This site is pretty large, with a lot of routes as you can tell from the screenshots. Codesplitting without merging would cause way more waiting on the client side every time you navigate to a new page. Even if the JS was heavily cached, the first time you hit these pages it will have to load a 300kb bundle for some of them. ##Caching That takes us to caching. We are about a month away from publicly launching this site, so we haven’t setup the workflow for pushing updates through a cdn, but that will be the end result. For now, in my webpack config, my output object looks like this: output: { path: __dirname + '/public/assets/js/[hash]/', filename: '[name].js', chunkFilename: '[id].js', publicPath: '/assets/js/[hash]/' }, This is in the production config of course. This way I can cache the files and when I update the code, the hash will change and the browser won’t be caching the old code. I pass in the hash as an env variable at runtime to that the server has the correct path to the assets folder. ##Problems There were a few big problems I came across while building out a server rendered app with dynamic routes. The first was page titles. How am I supposed to have the right title on the client and on the initial server render? Thankfully, Ryan has yet another solution. react-title-component solves this perfectly. The next was, how do I hit an api, wait for the response on server render, load new data on route changes, and of course, do this at the component level. As I mentioned before, async-props solves this problem too. It will give you route info so that you can make requests based on things in the url. The next problem is one that I haven’t fully solved. Webpack is getting really slow. It takes around 20 seconds on a maxed out macbook 15” to build code in production. On the server, it takes more like a minute! If I’m in development mode, it takes around 10 seconds to make the initial build, and sometimes it lags on building the splits on code change. If anyone has insight into this I would love to hear it. This one goes along with the webpack one, and it is reloading the server. I haven’t tried to webpack the server but I hear doing so works great for this. I don’t think it would fix the problem with webpack being slow though, and in fact it would probably make it even slower. ##Folder structure I almost forgot to throw this one in here! I’m really happy with the structure of this project. I have a views folder that has all of the same folders and file names as the routes folder. It makes it really easy to find things. These also correspond with the URL to the page. /account/settings will be in views/account/settings.jsx and routes/account/settings.js. The same is true for my tests folder. ##Conclusion I hope this gave you a good glimpse at how webpack and react router work at a larger scale than you see most blog posts cover. If you have any questions or things that you would like me to talk about that I haven’t already, please leave a comment below and I will update this post! I’m sure that I forgot a few problems and tips writing this. I was thinking this would be a short post but it blew up on me! Full Article
b Building Redux Middleware By reactjsnews.com Published On :: Sun, 13 Mar 2016 23:00:09 +0000 After writing my post a few months ago on building your own redux app, I have been asked a couple times to write a guide on creating redux middleware and how it works. This will be a quick post on how you can acheive anything with your own middleware! ##Basic middleware const customMiddleware = store => next => action => { if(action.type !== 'custom') return next(action) //do stuff! } Applying it: import { createStore, applyMiddleware, } from 'redux' import reducer from './reducer' import customMiddleware from './customMiddleware' const store = createStore( reducer, applyMiddleware(customMiddleware) ) Whaaa? store => next => action => I know that looks confusing. Essentially you are building a chain of functions, it will look like this when it gets called: //next looks something like this: let dispatched = null let next = actionAttempt => dispatched = actionAttempt const dispatch = customMiddleware(store)(next) dispatch({ type: 'custom', value: 'test' }) All you are doing is chaining function calls and passing in the neccesary data. When I first saw this I was confused a little due to the long chain, but it made perfect sense after reading the article on writing redux tests. So now that we understand how those chained functions work, let’s explain the first line of our middleware. if(action.type !== 'custom') return next(action) There should be some way to tell what actions should go through your middleware. In this example, we are saying if the action’s type is not custom call next, which will pass it to any other middleware and then to the reducer. ##Doing Cool stuff The official guide on redux middleware covers a few examples on this, I’m going to try to explain it in a more simple way. Say we want an action like this: dispatch({ type: 'ajax', url: 'http://api.com', method: 'POST', body: state => ({ title: state.title description: state.description }), cb: response => console.log('finished!', response) }) We want this to do a post request, and then call the cb function. It would look something like this: import fetch from 'isomorphic-fetch' const ajaxMiddleware = store => next => action => { if(action.type !== 'ajax') return next(action) fetch(action.url, { method: action.method, body: JSON.stringify(action.body(store.getState())) }) .then(response => response.json()) .then(json => action.cb(json)) } It’s pretty simple really. You have access to every method redux offers in middleware. What if we wanted the cb function to have access to dispatching more actions? We could change that last line of the fetch function to this: .then(json => action.cb(json, store.dispatch)) Now in the callback, we can do: cb: (response, dispatch) => dispatch(newAction(response)) As you can see, middleware is very easy to write in redux. You can pass store state back to actions, and so much more. If you need any help or if I didn’t go into detail enough, feel free to leave a comment below! Full Article
b 2000 FIFA Club World Championship: Corinthians 0-0 Vasco da Gama (4-3 PSO) By www.fifa.com Published On :: Sun, 02 Dec 2012 23:18:00 GMT Corinthians-Vasco da Gama, FIFA Club World Cup Brazil 2000 Final: The all-Brazilian final had a plethora of familiar names - including legend Romario, Edmundo, Gilberto Melo, Ricardinho and Dida - and ended in a dramatic penalty shootout. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Championship Brazil 2000
b 2005 Club World Cup Final: Sao Paulo 1-0 Liverpool By www.fifa.com Published On :: Thu, 06 Dec 2012 04:45:00 GMT Sao Paulo-Liverpool, FIFA Club World Cup Japan 2005 Final: The English side saw Steven Gerrard go close twice, but they could not deny a spirited performance by the Brazilians. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Championship Toyota Cup Japan 2005
b 2006 Club World Cup Final: Internacional 1-0 Barcelona By www.fifa.com Published On :: Fri, 07 Dec 2012 02:37:00 GMT Internacional-Barcelona, FIFA Club World Cup Japan 2006 Final: The powerful side of Ronaldinho, Deco and Andres Iniesta lost out to the Brazilians despite creating a number of chances. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Cup Japan 2006
b 2007 Club World Cup Final: Boca Juniors 2-4 AC Milan By www.fifa.com Published On :: Sat, 08 Dec 2012 02:03:00 GMT In the final of the FIFA Club World Cup Japan 2007, Italian giants AC Milan got two goals from 'Pippo' Inzaghi and one each from Kaka and Alessandro Nesta to become the world's top team. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Cup Japan 2007
b 2008 Club World Cup Final: LDU Quito 0-1 Manchester United By www.fifa.com Published On :: Mon, 10 Dec 2012 02:58:00 GMT Liga de Quito-Manchester United, FIFA Club World Cup Japan 2008 Final: Both teams showed impressive attacking flair, but it was Wayne Rooney's angled shot that made the difference. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Cup Japan 2008
b 2009 Club World Cup: Estudiantes 1-2 Barcelona (AET) By www.fifa.com Published On :: Tue, 11 Dec 2012 03:06:00 GMT A:Estudiantes-Barcelona, FIFA Club World Cup UAE 2009 final: Barcelona won their sixth trophy of the year following a last-gasp equaliser and a headed winner in extra time against a dogged Argentine opponent. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Cup UAE 2009
b 2010 Club World Cup Final: TP Mazembe 0-3 Inter By www.fifa.com Published On :: Thu, 13 Dec 2012 04:50:00 GMT TP Mazembe-Inter Milan, FIFA Club World Cup UAE 2010: Internazionale was in rampant form as they crushed the dreams of the first African finalists. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Cup UAE 2010
b 2011 Club World Cup Final: Santos 0-4 Barcelona By www.fifa.com Published On :: Fri, 14 Dec 2012 02:18:00 GMT Hopes were high in the final of the FIFA Club World Cup Japan 2011 that Brazilian team Santos could match Barcelona's firepower, but Lionel Messi, Cesc Fabregas, Xavi and crew had other ideas. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Cup Japan 2011
b 2012 Club World Cup Final: Corinthians 1-0 Chelsea By www.fifa.com Published On :: Mon, 17 Dec 2012 02:43:00 GMT Corinthians and Chelsea met in the FIFA Club World Cup Cup Japan 2012 final. Watch highlights from the match when the South American champions defeated their European counterparts. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Cup Japan 2012
b 2013 Club World Cup Final: Bayern Munich 2-0 Raja Casablanca By www.fifa.com Published On :: Sun, 22 Dec 2013 03:51:00 GMT Bayern Munich - Raja Casablanca, FIFA Club World Cup Morocco 2013: The European champions got goals from Dante and Thiago as the host Moroccan club came close but fell in the end in this well-played final. Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Cup Morocco 2013
b FIFA Club World Cup UAE 2018 - Official Draw By www.fifa.com Published On :: Thu, 23 Aug 2018 08:45:00 GMT Full Article Area=Tournament Section=Competition Kind=Video Tournament=FIFA Club World Cup UAE 2018
b Claudio Gomes of France and Abel Ruiz of Spain pose for photos By www.fifa.com Published On :: Fri, 27 Oct 2017 13:00:00 GMT GUWAHATI, INDIA - OCTOBER 17: Claudio Gomes of France and Abel Ruiz of Spain pose for photos with referees prior to the FIFA U-17 World Cup India 2017 Round of 16 match between France and Spain at Indira Gandhi Athletic Stadium on October 17, 2017 in Guwahati, India. (Photo by Tom Dulat - FIFA/FIFA via Getty Images) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
b Abel Ruiz of Spain celebrates a scored goal By www.fifa.com Published On :: Fri, 27 Oct 2017 13:01:00 GMT MUMBAI, INDIA - OCTOBER 25: Abel Ruiz of Spain celebrates a scored goal during the FIFA U-17 World Cup India 2017 Semi Final match between Mali and Spain at Dr DY Patil Cricket Stadium on October 25, 2017 in Mumbai, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
b Abel Ruiz of Spain waits in the tunnel By www.fifa.com Published On :: Fri, 27 Oct 2017 13:14:00 GMT KOCHI, INDIA - OCTOBER 22: Abel Ruiz of Spain waits in the tunnel ahead of the FIFA U-17 World Cup India 2017 Quarter Final match between Spain and Iran at the Jawaharlal Nehru International Stadium on October 22, 2017 in Kochi, India. (Photo by Mike Hewitt - FIFA/FIFA via Getty Images) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017
b The dressing room of Brazil team By www.fifa.com Published On :: Sat, 28 Oct 2017 11:43:00 GMT KOLKATA, INDIA - OCTOBER 28: The dressing room of Brazil team is pictured prior to the FIFA U-17 World Cup India 2017 3rd Place match between Brazil and Mali at Vivekananda Yuba Bharati Krirangan on October 28, 2017 in Kolkata, India. (Photo by Buda Mendes - FIFA/FIFA via Getty Images) Full Article Area=Tournament Section=Competition Kind=Photo Tournament=FIFA U-17 World Cup India 2017