ArchTypical
Joined 8 years ago
Joined 8 years ago
This looks just like an Ad I see on reddit all over the place.
//checkVolumeSatisfyClaim checks if the volume requested by the claim satisfies the requirements of the claim
func checkVolumeSatisfyClaim(volume *v1.PersistentVolume, claim *v1.PersistentVolumeClaim) error {
// check if PV's DeletionTimeStamp is set, if so, return error.
if utilfeature.DefaultFeatureGate.Enabled(features.StorageObjectInUseProtection) {
if volume.ObjectMeta.DeletionTimestamp != nil {
return fmt.Errorf("the volume is marked for deletion")
}
}
volumeSize := volume.Spec.Capacity[v1.ResourceStorage].Value()
requestedSize := claim.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)].Value()
if volumeSize < requestedSize {
return fmt.Errorf("requested PV is too small")
}elseif v1helper.GetPersistentVolumeClass(volume) != v1helper.GetPersistentVolumeClaimClass(claim) {
return fmt.Errorf("storageClassName does not match")
}
// function here, obviously
err = volumeAccessModeChecks(volume, claim)
return err
}
// Here's the function
func volumeAccessModeChecks(volume *v1.PersistentVolume, claim *v1.PersistentVolumeClaim) error {
// even the naming sucks. DISTINCT case error name
isMismatch, volumeModeErr := checkVolumeModeMismatches(&claim.Spec, &volume.Spec)
if err != nil {
return fmt.Errorf("error checking volumeMode: %v", volumeModeErr)
}elseif isMismatch {
return fmt.Errorf("incompatible volumeMode")
}elseif !checkAccessModes(claim, volume) {
return fmt.Errorf("incompatible accessMode")
}
return nil
}
This whole function is already a separated function from the middle of the file, no reason to stop there. No need for separate files when the function calls are going to be distinct and inline beneath their usage.Any guy quitting facebook (who can sign up again for free in a heartbeat, it's zero risk) is an event, granted. Might as well talk about the time someone quit selling on eBay or had a video removed by Youtube or went to Ohio. It doesn't mean anything until you sensationalize it. This indicates that it is not news, but raw sensationalism.
That's a good parallel.
> My point was he's using inexperience and/or familiarity with C/C++ as a reason to "hate" it.
I have less familiarity with C/C++ than Python and I hate it because it's not about language perspective. It's bad language design, for such a high level language. Inclusion wrapped with execution is unsafe and has an easy fix for most language interpreters. Don't allow execution during a declaration. If you want to do metaprogramming, there are other ways that don't break the paradigm (rewriting files before inclusion, chaining programs, etc).
That's not the point at all. I mean, did you read it?
How do you mischaracterize the specific point about the casual opportunity for foreign module metaprogamming? Module initialization is bad in a pernicious way. While you can't do operator overloading, you can clobber namespaces (which was referenced). Paired with a community repository, this is exactly the same case of what's so dangerous about npm.
Not my belief. I have evidence, so it's what I know, since previously I did not know. I found your arguments compelling and looked it up.
> In case you missed in the post you are replying to:
Nope. You decided to ignore a statement you agreed with for another you wanted to attack.
The largest pro life groups (as a body made up of pie slices) does evidently (ie have evidence) that supports:
> they are not just anti abortion, they are also anti birth control
Which is what was being referenced by at least a partial correctness, since it was a following statement. Not sure who you're trying to fool.
> Yes? The four humors theory of health and medicine was based on reason and logic. It was also wrong
Wrong is a matter of evidence. For the time, it was right as right can be. That's how science works and is in accordance with rationality. Proving a theorem, does not mean that bringing it up as a theorem was/is wrong. Over time, changes in knowledge are part of the process.
Good luck with your religious convictions to these issues.
[Edit:] > The point is that GET is not supposed to change the information stored on the server side.
The RFCs for HTTP USAGE are guidelines that are less about utility and more of an interoperability dream that was never realized. There's nothing sancrosanct about them. There have been DECADES of usage contrary (eg medical, gamedev, advertising, ERP, etc). At some point people realize it's bikeshedding issue that's more trouble than it's worth.
No, it's not ENTIRELY wrong.
https://www.quora.com/Does-the-pro-life-movement-consider-co...
> It isn't irrational. Being wrong is not the same as being irrational.
Rational: based on or in accordance with reason or logic.
Your argumentative tone is not compelling and you fail to demonstrate your position within some very constrained topics. Perhaps you will reconsider some of these ideas.
Who cares what "Trump" loses? This is about the USA and Trump will be long gone before any of these situations are measured. The USA is not starting a trade war with Iran (first time I've ever heard sanctions called a trade war), the US is enacting sanctions to hurt Iran without scaring allies like Saudi Arabia.
> China holds far more US debt than Americans hold Chinese debt
That's intentional and good for the US. If you don't understand this, I really think you need to understand why we sell it to foreign powers at all.
> China has far more market reach into emerging markets in Africa
That's a real problem which the USA is losing out on potentially. It won't be apparent for some time, since people who are industrialized enough to get out of self-oppressive warlord control will not handle foreign occupation very well either. The US answer is always to enable the counter-revolutionaries anyway until the US has someone they want to deal with.
https://en.wikipedia.org/wiki/Renewable_energy_in_China
China adds renewables as they expand their population, where it makes economic sense.
Unfortunately (for most), this is not a change from the existing course: https://www.bbc.com/news/science-environment-45640706
At least they are getting out of nuclear, so yay? I think it's just backpedaling due to the low standards and high operational risk of many Chinese industries.
Making statements about immoral acts by the Chinese government is probably something that takes a little bit of secrecy, security and assurances in the modern era. I have to wonder if you understand the situation.