231 karma · joined August 14, 2012
var x = new Car() with { make = "Volvo"; year = "2023"; };
If you want the Car constructor to enforce constraints, you could use this pattern in a separate Builder record: record Car(String make, String year) {
Car {
Objects.requireNonNull(make);
Objects.requireNonNull(year);
}
record Builder(String make, String year) {
Builder() {
this(null, null);
}
Car build() {
return new Car(make, year);
}
}
}
var x = new Car.Builder() with { make = "Volvo"; year = "2023"; }.build();
Obviously syntax TBD.This sounds like something you would hear 10 years ago in relation to the CMS garbage collector. Since Java 9, G1 has been the default gc for multi core workloads and is self-tuning. The CMS gc was removed 4 years ago. If you do need to tune G1, the primary knob is target pause time. While other knobs exist, you should think carefully before using them.
We run all of our workloads with vanilla settings.
For example, when I found a table top RPG podcast with 7 years of history, I set it up with:
Archive mode (start from the beginning of the RSS)
Automatic download
In my global settings, I have it set to keep at most 5 episodes per podcast. The result being that when I was done with one episode, it would automatically download the next, and I had a buffer of 5 episodes for trains and flights. Note too that if the canonical constructor checks invariants, then a with expression will check them too. For example:
record Rational(int num, int denom) {
Rational {
if (denom == 0)
throw new IllegalArgumentException("denom must not be zero");
}
}
If we have a rational, and say
r with { denom = 0; }
we will get the same exception, since what this will do is unpack the numerator and denominator into mutable locals, mutate the denominator to zero, and then feed them back to the canonical constructor -- who will throw.I feel like the gke-gcloud-auth-plugin cloud do something very similar.
[1]: https://github.com/GoogleCloudPlatform/cloudsql-proxy
[2]: https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket...
I'll keep using the OpenJDK Docker images.
Good search results, with privacy
You make this almost binary by using food poisoning as your metaphor (either you get it or you don't), but normally there is a much more nuanced range of experiences.
> The company gained unauthorized access to the heart of the mobile network from China.
... but then, in the very next sentence:
> How often that happened is not clear because it was not recorded anywhere.
This wording is a bit unclear. The first sentence states as a matter of fact that there was unauthorized access, while the second states that there are no records.
With green threads being "free" (you can have millions), it might be reasonable to just block your green thread until the callback arrives.
At the bottom line, commitment impedes change.
Pixel phones get security updates for at least 3 years from when the device first became available on the Google Store, or at least 18 months from when the Google Store last sold the device, whichever is longer.
Parameter class in question: http://download.java.net/java/jdk9/docs/api/java/beans/Prope...
Another point here is that Google Search isn't an authoritative source of information, it is up to the end user to inspect the returned links and decide if they can trust that site. This is something that I would not try to automate to the point that I could ask users for money in exchange, and if it can't be automated it doesn't seem like a great fit for Google.
Before anything else, the format and schema of the customer data would have to be analyzed and converted to data structures that match Google's internal models. While I imagine a computer could do it, I certainly would want a human to verify that the analysis makes sense.
Assuming this has been done, they are then at the mercy of the customer as far as whether the data is accurate, whether it is complete, how often it is updated, etc.
At the end of the day, I don't see how they would build a reliable business around arbitrary data structures which they have no control over. Information you can't trust is pretty useless.
Edit: They would also have to understand how the data was selected. Looking at a series of data points, you would wonder if all these are from Arizona, or all from the year 1976, or all from color blind individuals. Without understanding such limitations, making any sort of deduction from a dataset will just lead you the wrong way.