forms – Is there a standard way to title (describe) individual time zones in an interface for non-technical users?

This comes up over and over and seems like one of the things that every design should have a standard response to.

In the case of non-technical users (regular people, not programmers or anybody that would actually know what UTC is or who would care about current GMT)

How should the time zone be titled?
Some options:
“Pacific (Seattle & LA)”
“Pacific (UTC +8)”
“Pacific Standard Time (UTC +8)”
“Pacific Time (US: Seattle)”

It seems like including a major city is helpful. Is it standard to offer redundant options in the same time zone with different major cities? Seems especially helpful for Arizona which has some different timezones in it.

I, personally, get confused about Daylight vs Standard time and I don’t want to have to get it right in the interface based on the date somebody entered. I’d like to just assume that people say 2pm on a date and plan to have something happen at 2pm whether it’s Daylight Savings time or not.

Context: users creating events that have a specific date, start time, end time and location (that exists in the google maps api)

python – Como crio exceções em interface gráfica? (PySimpleGUI)

Vou tentar colocar só uma parte do código, mas posso passar mais informações caso necessário

def init_pega_dados(self):
        coluna_1 = ((sg.Text('Adicionar Carro:', justification='center', size=(40, 1))),
                    (sg.Text('Modelo:', size=(15, 1)), sg.InputText('', key='modelo')),
                    (sg.Text('Ano:', size=(15, 1)), sg.InputText('', key='ano')),
                    (sg.Text('Cor:', size=(15, 1)), sg.InputText('', key='cor')),
                    (sg.Text('Valor:', size=(15, 1)), sg.InputText('', key='valor')),
                    (sg.Button('Confirmar'), sg.Cancel('Cancelar')))
        layout = ((sg.Text('Adicionar Carro', size=(15, 1), font=("Helvetica", 20), justification="center")),
                  (sg.Column(coluna_1)))
        self.__window = sg.Window('Cadastrar Carro', default_element_size=(25, 1),
                                  element_justification='center').Layout(layout)

Como que eu me certifico que as keys ‘ano’ e ‘valor’ vão ser um inteiro? tem algum comando do sg que pega input de inteiros? e se no input for digitado errado, teria como tratar?

design – What desing pattern / class / interface should I use for encapsulating a program?

I am building a chess – related application, and I want to use a pre-compiled program called Stockfish as my chess engine. I am wondering what is the best practice to encapsulate the usage of the program. There are many design patterns to match – Strategy, as the program is, after all, an algorithm that operate on some context (a.k.a the game position). Adapter, as what I essentially do is to provide an interface for a pre-existing program, Facade, as the engine is, in fact, an entire subsystem of the program, or even just a regular interface, that specifies all engine operations like this example, and more. Of course, every solution requires easy switch to another engine.

What is the best practice in this case?

java – If I have 2 different implementations of the same interface but with the same methods should I have 2 interfaces?

An interface is a contract. Usually, the interfaces define a specific behavior, shared by all the implementations of the interface. For example, IResizable would define a contract that tells that an instance of a class implementing this interface would be able to resize itself.

A class can implement zero, one, or several interfaces. When a class implements a given interface, it promises to follow the contract defined by this interface. For example, class Window : IResizable means that a UI window can be resized. Similarly, there can be a class Button : IResizable, meaning that the UI buttons can, as well, be resized.

Different classes implement the same interface differently. For example, a Square and a Rectangle can both be resized, but the algorithm behind the resize action would not be the same—you can’t, for instance, resize a square in a way it would stop being a square and would start being a rectangle. The sole difference in the implementation, however, doesn’t mean you should use different interfaces. For instance, IEquatable can both be applied to integers and to strings; however, in the first case, the comparison would be performed on the value itself, whereas in the case of the strings, one would probably first look at the length of the string, then the hash, and only then compare the actual strings, either byte by byte or character by character. Different implementations, same interface.

What makes one to decide whether two classes can implement the same interface is, (1) the contract itself, down to the individual arguments, as well as (2) the common logic.

For instance, a resize action for a rectangle might look like this:

void Resize(double width, double height);

Such signature makes no sense for a square. You can’t do square.Resize(20.5, 18.4)—there is no expected behavior for such action. Either you have to ignore one of the arguments, or you need to throw an exception if two values differ. The first case is simply wrong; the second is ugly.

Therefore, a square would rather have something like:

void Resize(double size);

The very same interface would, therefore, apply to a square or a circle, but a different interface would be used for a rectangle or an oval.

c# – Exposing an event source as an interface, but where the source may expose events individually or as a collection

I am using a publish-subscribe event broker, and am constructing libraries to help people interact with this broker consistently.

One of the things I would like to design is some kind of IEventSource interface that each potential publisher could implement. The broker libraries would then natively understand the IEventSource interface, meaning the application developers would not need to code up all of the plumbing to get events from their system into the broker as publishers.

In trying to think about what this interface should look like, I am running into one fundamental problem: Some event sources will want to publish events in batches (for example, events coming from something like a database with change data capture, or events coming from files full of records). Other systems can natively raise events in a serial fashion as they happen, and would be publishing them one at a time.

So, what does my IEventSource look like? Does it expose the available events as a collection? Some kind of stream? As individual events via a GetEvent() method?

I could of course decide that the available events are always exposed as a collection, and if a particular publisher is publishing one at a time, they simply have a collection with a single member. But this seems inelegant and inefficient.

One important consideration is that the IEventSource will need to have some way of being told that the available events have been successfully received, because the goal is to guarantee successful transmission to the broker, with no events being lost. To use the cdc-enabled-database example again, we might get a batch of 500 events from the source, we then start publishing to the broker, and encounter some kind of issue on the 301st event. Ideally we wouldn’t want to retransmit all 500 messages, just pick up again at 301 and send the last 200. So we’d want to tell the source “you can go ahead and discard the first 300 now”. So in addition to some way to get events from the source (individually or in batches) I would want some way to “acknowledge” the receipt of events back to the source – again, individually or in batches.

I could, of course, simply have an IEventBatchSource and an ISingleEventSource, and build two different implementations using those two different interfaces all the way through the plumbing. But for obvious reasons I’d prefer not to write all of the plumbing twice.

networking – packet retransmission when using scp/ssl over wireGuard interface

I’ve created wireGuard based network interface on my macOS.

and according to the protocol description, WireGuard is working over UDP.

So I was wondering which layer handle the packets retransmission (in case of network failure) when I use “scp” (which works over ssl) over the WireGuard interface.

Thanks

Limit Apache to a single interface

While I know I can Limit Apache to a single IP as shown here, is there a way to bind this limit to the interface instead of the IP just in case the IP will change (I know that I should use static IP’s but this will not guarantee that it will be unchanged)

Is this a proprietary DDR2 interface on this memory module from my Fujitsu laptop?

I would like to upgrade the memory in my Fujitsu laptop but it uses a memory form factor that I’ve never seen before.

Is this a proprietary connector or is this size defined by some standard that I can use to find an alternative module.

enter image description here

apache dolphinscheduler – Zookeeper management interface in monitoring center displays abnormal

Describe

Zookeeper management interface in monitoring center displays abnormal。In fact, zookeepeer is running normally, both master and worker are successfully registered in zookeeper

Reproduce

1、After normal installation and deployment, log in to the dolphinscheduler web interface
2、Check the zookeeper management interface of the monitoring center, you can find this problem

Expected behavior

It can display various monitoring indicators of zookeeper normally

networking – Multiple IPs needing each separate MAC on same interface

You will likely need to take a peek at 1, maybe 2) of my previous questions to understand the setup and why currently, although the NIC has 4 ports, I use only 1 and all 3 IPs are assigned to it.
Nftables DNAT doesn’t seem to be working
and original one
Multiple internet connections, incoming packets on wrong NIC port (inbound routing issue?)

The problem came up after some occasional reboots, where 2 of the 3 IPs would not “come online” (they were fine locally, just not reachable from inet, requiring call to ISP and some hours of “something” from their end to get things sorted out).

Recently my ISP suggested that the issue may be caused by all 3 IPs sharing the same MAC (could be reasonable considering the 1 IP that is always good is say A.B.C.D/21 and the 2 that usually have issues are in the form A.B.E.F/21 and A.B.E.G/21 (so looks like same “lan”)), so I tried a few options from online

# ip link add link ens160f0 address 00:15:17:7f:16:02 ens160f0:0 type macvlan
RTNETLINK answers: Invalid argument

# ifconfig ens160f0:1 down
# ifconfig ens160f0:1 hw ether 00:15:17:7f:16:02
# ifconfig ens160f0:1 up
SIOCSIFFLAGS: Cannot assign requested address

I also found asuggestion about arp filtering

# sysctl -w net.ipv4.conf.all.arp_filter=1

but am not sure how I could test this myself.

Originally, I had the aliases as IPADDR1 and IPADDR2 in the same ifcfg file. The addresses would not show up in ifconfig, but did show up in ip addr show
Then I changed to dedicated ifcfg files in an attempt to set HWADDR but that didn’t do anything after a reboot/restart of network in regards to the mac addresses, they were still all using the NIC original ones (however now they would show up in ifconfig)

Not really sure what to try next, without messing up my setup (I could move the cables out to their own port, but then I am back at my routing and filtering issue from Nftables DNAT doesn’t seem to be working )

Any ideas much appreciated.
Thanks.