Better HN
topnewbestaskshowjobs
Log inSign up

mediumdeviation

1,791 karma · joined Oct 27, 2012 (14y ago) · 297 submissions

Submissions

181.

A New Era of SSRF: Exploiting URL Parser in Trending Programming Languages [pdf](blackhat.com ↗)

4 points · by mediumdeviation · 9y ago · discuss

comment 9y ago · link · parent

On a side note, if your fan started spinning up when you opened this, it's because of the particle simulation in the header.

I know because I reviewed this library (https://github.com/VincentGarreau/particles.js) when a colleague wanted to add something similar to our site. The problem is it uses a naive O(n^2) algorithm for linking up particles when they get near each other, which wastes a lot of CPU cycles.

Running this script with a large number of particles and auto-linking on is ill-advised - but fortunately you can delete the <canvas> element quite easily to stop the script.

comment 9y ago · link · parent

The Flash authoring tool comes bundled with a standalone Flash movie player that can open .swf files. It's available here, but I have no idea if this will continue to work (the page warns against using this if you're not a developer): https://www.adobe.com/support/flashplayer/debug_downloads.ht...

It's also possible to export any Flash movie as a standalone executable with the Flash runtime baked in. This should be immune to any sort of deprecation. Of course this relies on the developer who holds the original source file to do the exporting.

comment 9y ago · link · parent

Laravel 5.4 integrates with Vue. https://laravel.com/docs/5.4/frontend#writing-vue-components

Laravel can act as the API backend to the frontend (basically a set of REST endpoints that the frontend can talk to), or alternatively the Vue components are used only where heavy client-side interactions are required, while the rest of the pages are still served up by Laravel normally.

comment 9y ago · link · parent

But those are product logo, not icons https://imgur.com/a/4kAKt. They don't serve the same purpose - logos are brand assets and are suppose to be distinct, otherwise they can't be trademarked.

186.

Why are crime victims being jailed?(bbc.com ↗)

157 points · by mediumdeviation · 9y ago · 89 comments

comment 9y ago · link · parent

>> having an agent buy their tickets/hotels so it looked like a local was going instead of the BBC?

It is not legal, no. Travel on railway and plane and booking hotels all require you to present your ID, as is signing up for a mobile phone.

188.

They Have, Right Now, Another You(nybooks.com ↗)

2 points · by mediumdeviation · 9y ago · discuss

comment 9y ago · link · parent

Economics is not called the dismal science for nothing

comment 9y ago · link · parent

> To China and Iran - facebook is a "disruptive community." To use reddit's language.

There is a vast difference between the government banning you and reddit banning you (which they are not actually doing here, but for the sake of argument).

You have the right to free expression. You do not have the right to free expression on someone else's platform. reddit is not the Internet - if reddit does not like what you say, you can set up your own space on the Internet. If the government does not like what you say, then there is literally no legal alternative. That's the difference.

Oh, and stop confusing net neutrality with this issue. It's not the same.

comment 10y ago · link · parent

Custom HTML tags are valid HTML. Note the requirements for custom tags to always include a '-' in their names. This distinguishes custom tags from native ones. https://html.spec.whatwg.org/#valid-custom-element-name

comment 10y ago · link · parent

You're conflating two things here - the instrument, which is the survey, and the data it is measuring - the MBTI. Even if we assume the MBTI itself is accurate - that is, it is possible to categorize the entire human race into 16 distinct personality categories, the fluctuating survey results indicate that the instrument used to measure it is wildly imprecise, and using it to make any sort of important decision is irresponsible.

comment 10y ago · link · parent

Actually what happens in China is that homegrown tech companies will take over the market space left by Western ones, which the government is perfectly happy to let happen because

1. It keeps the tech industry domestic

2. The servers are physically inside China, guaranteeing them access to the data

This is why I've always thought that the Great Firewall's purpose is not only censorship, but also a form of Internet-age protectionism.

comment 10y ago · link · parent

Cross-origin window.opener objects are not full window objects. You can test this out on any browser - the most they can do is what the articles you linked to says - redirect the parent window, which can be used for phishing, but is otherwise relatively harmless.

comment 10y ago · link · parent

"Bing" as it is commonly pronounced in English doesn't exist in the Chinese language. Words with the pinyin 'bing' does, but saying it means 'disease' in mandarin is somewhat disingenuous, because it could refer to any of the four inflection and the very large number of words under each of those, like the word for ice, soldier, sideburns, guests, etc.

comment 10y ago · link · parent

The taxi stops are there simply for the convenience of drivers and people looking for taxis. Taxis can still stop and pick up passengers anywhere cars are allowed to stop (double yellow line).

comment 10y ago · link · parent

So I'm not really sure what happened, but I couldn't read the article because the page ate up more than 1.5GB of RAM on Firefox and caused it to peg an entire core at 100% utilization http://i.imgur.com/j3q686E.png

And if I scroll down a bit more you'll find a web worker spawned by the same page consuming another 120MB of RAM. This is a lot of stuff happening on what is suppose to be just a news article.

comment 10y ago · link · parent

The template being inline is a bug, not a feature in my opinion. You can actually write arbitrary templates into HTML using <script type='text/template'> (or really any type other than 'javascript'), and with a simple function get ~90% of the power of template strings in languages such as ES6 or Python. Writing your templates into JS like that is plain ugly and unmaintainable.

comment 10y ago · link · parent

The FTSE 250, which is more representative of domestic companies instead of large multinationals[1] is still down more than 7%. https://www.google.com/finance?q=INDEXFTSE:MCX

[1]: http://moneyweek.com/ftse-100-v-ftse-250-why-have-they-diver...

comment 10y ago · link · parent

It's useful for highlighting how useless these poll results actually are for policy making, because people have a propensity to hold opinions on things they have absolutely no knowledge of.

comment 10y ago · link · parent

> Just expand it as part of the nutrition label.

The size of the nutritional label is not infinite. The number of potential labels is. More importantly, by labeling GMO, you're simultaneously implying that there may be something unsafe about them, and distracting from far more important information, like allergens and sugar content.

> I don't think it'd place any sort of unhealthy burden on the industries to write "This food may contain genetically modified organisms"

Fruits and vegetables can be contaminated, for instance if they are grown or stored next to each others. For labeling purposes guidelines are set with some leeway within safe boundaries. Trying to do the same for GMO highlights the silliness of the exercise, since there are no such boundaries, because they are as safe to eat as their non-GMO counterparts.

Then there's processed foods - tracing which of the dozens of ingredients are non-GMO would be non-trivial. It is possible, of course, but why force companies to waste money for something that is of no health consequence?

And finally, there's the issue of GMO entering the food chain. It is at least possible to trace this for livestock, if you have a complete history of everything that they've ever been fed, but what about animals caught in the wild like fishes?

I'd love to have more transparency and information about the food on my plate - I want my fruits grown in areas that are not under water stress, and my vegetables grown sustainably, but let's not waste time and money trying to label things that don't need labeling in the first place.

comment 10y ago · link · parent

Wait, are you Peter Molyneux the game designer of Fable fame, or do you just happen to have the same name?

comment 10y ago · link · parent

It seems you're correct. Specifically, disabling this rule from the inspector instantly fixes the performance issue.

  .widewrapper.main {
    box-shadow: inset 1px 3px 1px -2px #ababab;
  }

comment 10y ago · link · parent

Actually, checking if a font is available does not require canvas (you can simply inject a piece of text into the page with a specific font stack set and check its width). Rather, what canvas is used for is to obtain the sub-pixel anti-aliasing of a given piece of text, which is different between browsers and OS even when the same font is present.

comment 10y ago · link · parent

> A 301 redirect from www.longbets.org/601 to a different URL containing that text would also fulfill those [winning] conditions.

The bet (and the referenced article) is about the availability of the resources at the end of those URLs - the URL itself is just a reference, or a pointer if you will to a resource.

comment 10y ago · link · parent

> Some websites require JavaScript to display images nowadays. What's wrong with <img>?

Because trifecta of retina (hi-dpi) displays, responsive design (use the same code for both mobile and desktop) and miserly bandwidth caps, (especially on mobile networks), means that traditional <img> tags won't do it any more.

<picture> is designed to help with this - and I'm pleasantly surprised to find that it has landed in a surprising number of browsers http://caniuse.com/#feat= picture - but you'll still need a polyfill, which is if course JavaScript.

Pages with a lot of images also use lazy loading to reduce bandwidth usage even further.

Of course a <noscript> should be included, but it's getting harder and harder to make the claim that it is economical to support people without JS.

comment 10y ago · link · parent

What you're suggesting won't work. The problem is that a lot of pages require their resources to be loaded in a specific order. The C in CSS stands for cascading, and means that rules that are loaded later override earlier ones (if selector specificity match). The same goes for JS since later scripts might depend on the framework or libraries loaded in earlier, unless the script has the async attribute. And then there are the content which are loaded by the CSS and JS themselves, which in most modern web apps make up the majority of the content.

comment 10y ago · link · parent

I would think you're too quick to dismiss the number of philosophers of religion, humanists and naturalists, many of whom are experts in the 'field' of religion, as you call it.

comment 10y ago · link · parent

That's funny, because in 2014 the BBC was admonished by independent reviewers for giving too much airtime to climate change deniers under their 'too rigid' impartiality guidelines [1].

From the Telegraph [2]

> The BBC’s determination to give a balanced view has seen it pit scientists arguing for climate change against far less qualified opponents such as Lord Lawson who heads a campaign group lobbying against the government’s climate change policies. Andrew Montford, who runs the Bishop Hill climate sceptic blog, former children’s television presenter Johnny Ball and Bob Carter, a retired Australian geologist, are among the other climate sceptics that have appeared on the BBC.

I think I agree with the BBC's own comedian's take on this, which is to give each side time proportional to the amount of support they have from experts in the field. In other words, for every ten minutes of airtime for climate experts on climate change caused by humans, we can have 18 seconds, or 3% of climate skeptics speaking.

[1]: https://www.washingtonpost.com/news/morning-mix/wp/2014/07/0...

[2]: http://www.telegraph.co.uk/culture/tvandradio/bbc/10944629/B...

1
678910