|
Is the power output of the SBC ok? Sorry, no other idea.
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
It must be because when I power the SBC via USB and connect the Molex to the hat and drive bay all is fine - weird
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
pkfox wrote: I need a female to female I've got just the site for that!
pkfox wrote: Molex power cable for my NanoPi M4 project Oh uh... Nevermind
|
|
|
|
|
Is the UK still in the EU?
|
|
|
|
|
public class SomeLocationData
{
public SomeLocationData(Long someAreaId, String longitude, String latitude)
{
if ((someAreaId == null) == (longitude == null || latitude == null))
{
throw new IllegalArgumentException("Either someAreaId or coordinates must be specified.");
}
THAT CHECK.
|
|
|
|
|
That's the most horrible thing I've seen today.
Regards,
Rob Philpott.
|
|
|
|
|
TBF it's an IDE's "autofix". I've written a condition:
isValid = (someAreaId != null) ^ (longitude != null && latitude != null);
if (!isValid) { ...
Which literally translates to "either someAreaId is not null or both coordinates are not null". This is a required business logic and it doesn't seem to be a way around it.
And then I got a "simplify boolean" and "inline variable" quickfixes. If you pass the initial "WTF" feeling, then it starts to make sense.
|
|
|
|
|
Looks like a buggy check... what if all 3 are specified?
That's will throw the error, that's what!
|
|
|
|
|
I think that's what it's supposed to do.
Either one or the other needs to have a value, not both and not neither
|
|
|
|
|
well perhaps.. but then the error message is misleading!
|
|
|
|
|
How is
Either someAreaId or coordinates must be specified.
misleading, it doesn't say AND?
|
|
|
|
|
Mmm.. maybe the nuance of English are lost on me.. not being a native...
This message doesn't seem to imply to me that it is wrong to have both condition true...
|
|
|
|
|
It's the very definition of "either... or..." (a.k.a. XOR)
Actually, I don't think the code is that bad.
I think a lot more programmers can read that than an XOR, which is far from common in C#.
|
|
|
|
|
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Sander Rossel wrote: Actually, I don't think the code is that bad.
I think a lot more programmers can read that than an XOR, which is far from common in C#.
OK so I don't need to duck & cover if I say that I have left it as it was?
|
|
|
|
|
|
|
Ouch!. My bad. Thanks
modified 23-Jun-22 21:01pm.
|
|
|
|
|
It's old school rock!
I remembered how to MessageBox (in Client) some texts on ASP.NET...
protected void ShowMessage(string message)
{
string msg = "alert('" + message + "');";
base.ClientScript.RegisterStartupScript(base.GetType(), "jsShowMessage", msg, true);
}
Yeah!
|
|
|
|
|
Has anyone played with Outerrnet/Othernet? What were your experiences with it?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Out of this world!
[EDIT] I just realised it's a real thing!
Were you asking about it?
|
|
|
|
|
looks like just another version of NAS over wifi
=====================================================
The grass is always greener on the other side of the fence
|
|
|
|
|
I HAVEN'T MESSED WIH nas EITHER. dID YOU ACTUALLY USEoUTERNET? OR JUST READ THE WEBPAGE?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
If you are interested in crashing software projects, be prepared to invest some time:
“Anthem is the game you get from a studio that is at war with itself,” said one former BioWare developer.
kotaku.com/how-biowares-anthem-went-wrong
"If we don't change direction, we'll end up where we're going"
modified 5-Apr-19 9:40am.
|
|
|
|
|
BioWare
The saddest part, as we all know, is that management gets golden handshakes while the developers get the blame (and mental issues)
|
|
|
|