skysight-inc/HackerNews huggingface dataset:
Apparently one of the questions was:

Q. Given X-Y coordinates of two rectangles, determine if they intersect or not.

I'll try for an answer -- I looked up nothing, and it took longer to type in the answer than it took to think of it!

A. Given positive integers m and n and m points A(i) = (a_i1, a_i2), i = 1, 2, ..., m and B(j) = (b_j1, b_j2), j = 1, 2, ..., n, determine if the convex hull of the points A(i) intersects the convex hull of the points B(j). So, look for a line that has all the points A(i) on one side and all the points B(j) on the other side.

Suppose we have numbers u, v, w, and consider the set of all (x,y) such that

ux + vy = w

Then those points (x,y) form a line, and every line can be written in this form.

Then we seek u, v, w so that all the A(i) are on one side of the line and all the B(j) are on the other side. So, without loss of generality, we seek u, v, w so that for all i

ua_i1 + va_i2 >= w

and for all j

ub_i1 + vb_i2 <= w

Or, we seek u, v, w to solve the linear program

maximize z = u + v + w

subject to

ua_i1 + va_i2 >= w

ub_i1 + vb_i2 <= w

for all i, j.

The simplex algorithm will determine if this linear program is feasible, that is, if u, v, w exist to satisfy the m + n linear constraints, or not feasible. If the program is feasible, then the two convex hulls are separated by the line the set of all (x,y) such that

ux + vy = w

Else the linear program is not feasible, no line exists separating the convex hulls, and the two convex hulls overlap.

Yes, we could tweak this simple formulation to something a little more involved and, then, determine if the two convex hulls just touch but otherwise don't overlap.

This solution solves the problem about rectangles in the OP as a special case.

Let's see: Given a closed convex set C with points A(i), is the convex hull of the points A(i) also in C?

Well, the intersection of any collection of closed sets is closed (the union of any collection of open sets are open). The intersection of any collection convex sets is convex. Then, the intersection of any collection of closed, convex sets is closed and convex.

The convex hull of a set of points is the smallest closed convex set that contains all the points, that is, the intersection of all closed convex sets that contain all the points and, thus, is closed and convex. Here convex hull is well defined since the intersection is unique. A line in X-Y and one side of that line is closed and convex. So the convex hull of a set of points on the line and some one side of it is closed, convex, and a subset of the line and that side of it. Our algorithm needs this result.

Is that a sufficiently good answer?
Sophia
I contacted Trojan Virus, a credit specialist on a beautiful evening because I saw an ad online saying he could help people fix their credit in no time. I said to him, if this is true, I’m definitely interested in working with you to improve my credit so I can purchase a car this year and he gave me a positive response. I initially had a SCORE of 487 with late payments, lingering debts and a bankruptcy that wouldn’t let me qualify for anything. After 2 weeks, Trojan Virus completed my job and I currently have a score of 793, no more negative items on my report in fact they were all replaced with some couple of beautiful tradelines. I have purchased the car and I’m free to apply for anything. So happy right now because it’s surprisingly amazing to ascertain such a result after several bad experience. This is his contact; TROJANVIRUS212@GMAIL.COM, +1 912 388 3132, hit him up and he will put a smile on your face.
> That doesn't mean we should stop thinking: It's crucial to assess for ourselves whether a picture appears to us as offensive as we are confronted with it.

That's an interesting thought. Do you think photographers should have a moral responsibility? A famous example I can think of is the controversy surrounding "The vulture and the little girl" by Kevin Carter.

In terms of street photography, is it OK to "creep" or invade someone's privacy, especially that of children? There is certainly a line between telling a story and trashy exploitation, the question is where is it?
How many frequencies have their own Wikipedia page?

https://en.wikipedia.org/wiki/Crystal_oscillator_frequencies
How to start a career in IT
In which context, outside a social media website, are "mentions" a common part of text editing on the web?
Yes, it's the problem a basic income proposes to solve. I'm intrigued by the idea, but I do wonder about the long-term economic effects of it.

It seems to me that at it's core, basic income would involve a transfer of wealth from companies and wage-earners to the unemployable. Isn't that just looking at the issues I described and going "oh well"? It doesn't seem to solve the competitivity problem.

Optimistically, basic income might enable enough workers to re-educate themselves into new roles that the result would be a net positive, but apart from that, I'm not really seeing how it changes the big picture.
Send me something on hello at pushdata. io and I'll respond from my regular email.
It's got to be the impact of climate change?
4 sex tips για τους άνδρες που θέλουν να ευχαριστήσουν μια γυναίκα
Raspberry Pi 3A+ specs and benchmarks
New Raspberry Pi 3 Model A+ unveiled
It's intuitive iff you believe that paying taxes on profits is worse than not even having any profits to tax.

(I don't share that belief)
We just migrated from Draft to Slate for Riot.im: https://github.com/matrix-org/matrix-react-sdk/pull/1890

In general it’s been a massive improvement, with the nasty catch that IME input doesn’t work reliably, impacting CJK languages and similar: https://github.com/vector-im/riot-web/issues/7665.
#Pwn2Own Tokyo 2018 – #iPhone X exploits paid over $100,000
This often trips up people who don't know how big O works (loops are not directly correlated to N), or why it works that way (in general a constant before N is negligible, the curve is more interesting).

This single pass approach introduces a conditional branch inside a loop, which I've found to be generally slower on x86 - because I've made that mistake and years later found a huge performance benefit by using the "dumb" (multiple loop) approach.
Intro to lexing, parsing, generation of stack-based bytecode using RPython
I just saw a help-wanted sign at a supermarket which said they were hiring for "long-term jobs". Now that's a good selling point.
Businesses that are only profitable because they short-change workers... should not exist. Businesses don't have a "right to labour".
Notepad & its underlying text box component support Unix style line endings now.
> There are laws against paying people $1/hr for a very good reason - because if they could corporations would do that to maximize profits. All the employees would suffer. The corporation would make more money.

And yet lots of companies pay people more than the minimum wage, for some reason. Doesn't that by itself disprove the "race to the bottom" narrative you are suggesting?

A company can't simply dictate how much it pays you, any more than you can dictate how much it pays you. It's a market - in the best case scenario, both sides have lots of alternatives, and the price you get paid is the best that both of you can do (lowest for them, highest for you).
These things always remind me of two things.

Only wanting young employees with many years of experience, and that time the Dutch government tried to get unemployed people to work in the green houses. They got hundreds of people on buses, drove them to the green houses "look how wonderful it is to work here", a few million investment later, two people started working there. Both because this was a good way to meet others, and they didn't mind getting a lot less money if they took the job over government payment.
Iranian hackers suspected in cyber breach and extortion attempt
>which allows the software to override the "Avalid" signal with the value from AvalidOvVal.

How is "Avalid" any more meaningful though?

"The AValid signal is used to indicate if the session for an A-peripheral is valid. This signal is 1b when Vbus is above 2V"

They could use some better naming.
Chrome vs. Zapier is an unfair comparison. Chrome is ~6.7 million lines of code and takes hours to build while Zapier is probably a microsevice architecture and is easier to update a component / validate an issue.
Jira has mentions and it’s not social media. Basically anything with users who need to communicate(?)
You don't need to know anything about a project to spot that the candidate is being very vague when quizzed about the details of something that they claimed but didn't actually work on.

And it is surprisingly common.
They are serving people paying more for food.
Thanks for the book, its clear and to the point.

A little feedback:

1) I find the description of the different standards (ES2015 - ES2018) to be inconsistent. ES2015 provides a summary of new features as a bullet point list, each item being a jump link to the detailed description. ES2016 and ES2017 do have the summary but no more jump links and ES2018 does not have the summary at all. I think it would be better to navigate if each chapter had the linked summary.

2) I guess in ES2017 the trailing comma description is missing a trailing comma:

This feature allows to have trailing commas in function declarations, and in functions calls:

const doSomething = (var1, var2) => {
//...
}

doSomething('test2', 'test2')

At least I can not see a trailing comma there.

3) Unicode property escapes (p. 33ff) examples do have a comment at the end of each line which I guess is supposed to tell you whether the match will be true or false, but all comments are empty (in the pdf version).

4) The template literal interpolation example on page 69 is invalid syntax

const var = 'test'
const string = `something ${var}` //something test

as var is a reserved keyword and can not be used as a variable name.

5) On pages 76-77, for some reason the formatted code looks different to all other code snippets (and it doesn't look good either as it is too huge and kind of blurred)
> Much of the Western canon on governance obsesses about the importance of the rule of law: the idea that the laws should apply to commoners and kings (or powerful companies) equally.

Does it mean that everybody has the same taxes and the same governmental benefits/incentives? For examples, if somebody buys an electric car (in California), they get government subsidy and the benefit of unrestricted use of a carpool lane. I don't get this if I don't buy that car. Should I protest this? How about if I put my money in 401k/IRA, it doesn't get taxed, but if I invest it in my own brokerage account, it does? Isn't it laws not applying equally to all people?

You can say - well, the government wants to encourage certain behavior and thus different behaviors have different tax consequences, different benefits and so on. Well, what if the government wants to encourage behavior of commercial mega-corporations investing in specific areas?

I personally would gladly give up all encouragement of behaviors in favor of simple, plain and transparent tax system that is not being used as social engineering too. Good luck passing that through the legislature. And if this doesn't happen, targeting specifically Amazon deal makes little sense.
Super cool results.

I enjoy zone focusing with an Industar 50-2 on my Spotmatic. Actually, that is really the only way to enjoy using that lens because it has a fully manual, one-ring iris – on an SLR lens! Stopped down to about f/8 it was pretty easy to focus by the scale only. I did check my composition in the viewfinder, but that was about it.

I'll try shooting without using the viewfinder at all next time. Shutter speed is pretty easy to set and forget at daytime (Sunny 16 all day! ...literally)
> This often trips up people who don't know how big O works

They didn't ask for an algorithm with linear complexity. They explicitly asked for a solution "in one pass". That's highly misleading.

Edit (after the reply by zamalek): And you are perfectly right about the performance: it's probably slower than just doing two passes (one to find the length, the second to find the middle).
That's a really interesting question. However, I think that's not something regular, so there's no fixed multiplication. It may double or multiply even more, there's no rule :-).
A summary of Marco Montemagno's best videos about entrepreneurship and growth
The problem is that the thing you're really trying to control here is technologically-enabled gossip. You don't need a behemoth the size of Facebook for that. Stuff like Myanmar, that could happen just as well with simple text messages (1 guy sends to 2, each of those sends to 2 as well, and it goes exponential).
As the root comment points out, both solutions (the second being two loops) are 1.5 passes.
Not a native speaker, but doesn't mediocre mean average? Surely most people are working for a mediocre salary or less?
"Basically, the compiler has a state which can be modified by these directives. Since every .c file is treated independently, every .c file that is being compiled has its own state. The headers that are included modify that file's state. The pre-processor works at a string level and replaces the tags in the source file by the result of basic functions based on the state of the compiler."

I almost sort of get what the author means here but then I don't really. I mean, there is no 'state' for the compiler that is modified by precompiler directives, so this is probably an analogy or simplification he's making here, but I don't really understand how he gets to the mental image of 'compiler state'. Why not just say it like it is: the preprocessor generates long-assed .i (or whatever) 'files' in memory before the actual compiler compiles them, the content of which can be different between compilation units, because preprocessor preconditions might vary between compilation units?
iCloud, iWork(web based), email, Time Machine(backup), Messages, Apple Pay.

Those are some of the things that Apple already does in the cloud. I anticipate it will expand significantly as they grow their services business.

Whether they build a “server” is irrelevant - the “service” however, is key.
Does this just scrape the AWS status page, or is it getting something that’s indicative of failure sooner?
Low carb is not (only) keto. And given the fact the ketosis changes completely the rules of the game, I would actually put keto in it's own category.

So 100g of carbs seems like a reasonable number if you want to be sure that your subjects do not enter ketosis.
In case it wasn't clear, I'm not the author of the piece I linked. It's adapted from a talk, so there are slides.
Consider obfuscating it?
Yes, all the nuance, and several centuries of intelligent debates from either side.

But don't let nuance get in the way of rooting for your preferences.
> Talent is a useless concept. Varying conceptions of natural ability ('talent' e.g.) tend to mystify excellence, treating it as the inherent possession of a few; they mask the concrete actions that produce outstanding performance; they avoid the work of empirical analysis and logical explanations (clear definitions, seperable dependent and independent variables, and at least an attempt at establishing the temporal priority of the cause); and finally such conceptions perpetuate the sense of innate psychological differences between top performers and other people.

+1
Excel has a lot of this stuff builtin as well in the PowerQuery editor [0] which supports CSV, JSON and XML data sources. Albeit not SQL, it allows you to do almost everything SQL can do, but in a GUI.

After you're done preparing your data in PowerQuery you can run PowerPivot on it for aggregations.

[0]: https://cdn-5a6cb102f911c811e474f1cd.closte.com/wp-content/u...
Bewilderment is the antidote to scientific reductionism
If newspapers were only interested in clicks, no one would write such a story. No journalist would spend 6 months of their time researching such a story. Would you please stop with this simplistic media meme? This is not how things work in journalism.
Paying more could work for certain kinds of jobs, but others are simply not productive enough to justify paying more. I recently went to a country without a minimum wage and it was amazing what they were paying people (presumably very little) to do, such as sell napkins and straws in a market. Without a regulatory requirement to do so, it's simply impossible for an employer to extract a U.S. minimum wage's worth of productivity doing that kind of activity.

That's not to say that every low paying job is like this.
We in the U.S. have gotten used to certain blue collar jobs paying very little because of massive numbers of new immigrants, legal and illegal. Now that the spigot is being turned off, there's a labor shortage at the low end. Maybe, e.g., food and construction ought to cost more to compensate, which will certainly change the type of offerings of each, but we might get more efficient usage as a result.
There's no way around it.

What I described is what higher-level languages do if they provide this sort of protection and it's what must do done if such protection is required.
Don't get me wrong. I think it's possible, but it would be so costly that you would need to close nearly every software business in the US.

Safety critical software costs about 100x as much money/time to develop as compared to non safety critical software. "Algorithms" are everywhere, so certification costs would make any software shop as costly as automotive and aerospace. That's just completely misguided. Countries without such restrictions would take over the global software market quickly.
Elites who are out of touch with the native culture or even hostile towards it tend to cause populist reactions. Take SV elites for example. Bezos, Zuckerberg, and Dorsey seem out of touch in a way Rockefeller, Carnegie, and Ford did not.
We've had this for ages now: the F# type provider gives strongly types access to CSV files, and the resulting object heiarchies are LINQ compatible. There's even support for applying units of measure.

Veeeery nice for data munging :)

http://fsharp.github.io/FSharp.Data/library/CsvProvider.html
I'm not _just_ talking about Chrome. I think that you would be hard-pressed to find any Google product where you'll find a responsive support channel.
There's also this:

https://github.com/dkogan/vnlog

This is effectively a set of wrappers around awk, sort, join, etc that knows about field names, and lets you use the vanilla shell tools in a much nicer way. It's exactly what you want for the 99% use case. If your problem is complicated enough that you feel like sql is what you want, maybe leaving the shell is ok at that point.
See also https://en.wikipedia.org/wiki/IBM_and_the_Holocaust
As someone who grew up in a house of 4 that spent multiple years living off of a single unemployment check, you'd be surprised at how easily you can fall into a very low spending pattern when you have to.

Slums in the US can be fine. If it's just surface level disrepair that's fine. The real issue is cultural, especially if you have kids.

You haven't said which city you're in, but I think the number of cities in the US where it wouldn't be possible to live alone on $25,000 a year is actually quite low.
Creating a real-time dashboard using webhooks for uptime monitoring
50 customer journey templates for marketers
I just came to say this too. Turns out it was last updated in October 2018 :o
I think you didn't try yourself to place bricks. That part requires some stamina, after building one home I got a big jump in muscle mass (from super-wimpy to average male). Also your "hard" part is not that hard.
Innovating Car Parking Systems Software Around the World – Admyt App
From product perspective, Google cloud is far ahead from AWS and Azure.

As one who runs a company that operates on all 3, serving over 3b+ HTTPS requests daily, across 250K of web apps, in all continents, I can say clear and simple:

GCP Compute, Networking stack and storage are a superior product when compared to AWS and Azure.

For every dollar you pay:

- You get more compute power per core, while paying less.

- You get faster network, internal and external, with an amazing layer of load-balancing and Anycast IP.

- You get the best "data processing at scale".

Google has a business problem rather than product. A smart man once told me,

In B2C, the one with the better product is most likely to win.
In B2B, the one with the larger sales team will.

Perhaps, Google is still learning that vast majority of business, especially the larger ones are not about easy self sign up, rather face-to-face meetings, price quotes, negotiations, etc. It is a different culture that almost as oppose to how they used to run things thus far.

Figures don't lie however, and revenue streams are the oxygen of a business.

All it takes for GCP to get the crown would be a series of right and bold decisions by its executives, which I hope they will make those eventually, since the product deserves a wider recognition.
There is a similar competition in Germany called the CaroloCup. Here is a video of our run when I was still a student [1].

We used model-predictive control which evaluated about 10k trajectories with look-ahead, which works really well even when tires begin to degrade after a few minutes. You can see the effects in the video towards the end, where the car starts to slide, but the controller manages to catch it in time.

Our CV was a bit more complex as we had to deal with missing line segments. We pre-processed the camera image with a distance transform, then used an optimization pass written in opencl to fit a 3rd-order polynomial to the image.

[1] https://www.youtube.com/watch?v=Of_D_Z9gbeg
nah sqlite is what you want when you want a step up from CSV.
You have a perfectly valid point. After a PhD and 10 years of industry experience I interviewed at Google, mostly out of curiosity and because a former colleague recommended me.

I had never done an "algorithms" type interview before, had done no specific preparation, and was a bit baffled by being asked to do a coding exercise in a text editor whilst talking on the phone.

Since I was an "internal recommend" they gave me a second chance. Presumably because they were surprised at how badly I did. But the second interview was worse than the first.

I came away feeling quite humiliated.
>To even write unit tests effectively you need to write your code in a certain differently.

>In C# this normally means using IOC + DI.

I've become quite partial to functional programming in the last few years. Side effect free functions with functions as interfaces for DI lend themselves perfectly to TDD and data parallel async without worrying too much.

C# is now slowly taking over most of the good features from F#, but I think the culture won't transform so easily.
Recently got told by some founders doing a farming technology startup that nobody gets paid because "We don't even pay ourselves!", but if I would like to volunteer my time doing automation and robotics R&D, then that would be great.

I always think that you should account a startup as though you are going to be paying everyone properly even when you cannot, and then start to pay out based on a combination of need and who has the oldest outstanding credit, when money starts to appear.

If you do this, then your company accounts are actually useful documents that you can project costs off going forward and actually attract investment, rather than living in some optimistic dreamland where the numbers you have do not represent anything like the actual costs of running the business properly.
This can only go on so long before they have to raise pay.
Introduction to Azure Durable Functions
Riposte: Scripting Language for JSON HTTP APIs