How do I reference a line with two foreign keys as a primary key?

What I would do here would be to have a table with match_winner! It will be a JOINtable (also more formal than ASSOCIATIVE ENTITY as well as many other names from the side).

I'm not sure why you called two tables matches and games – Are not they the same? If not, let me know and I will change the scheme.

Something you need IMHO. There is a connection table between teams and matches

CREATE TABLE match_winner
(
  match_id INTEGER NOT NULL,
  team_id  INTEGER NOT NULL,
  winning_score INTEGER NOT NULL CHECK (winning_score > 0),

  CONSTRAINT 'match_winner_pk' PRIMARY KEY (match_id, team_id),
  CONSTRAINT 'mw_match_fk'     FOREIGN KEY (match_id) REFERENCES matches (match_id),
  CONSTRAINT 'mw_team_fk'      FOREIGN KEY (team_id)  REFERENCES teams   (team_id) 
);

I've made a small change to your scheme id INTEGER SERIAL in the team table definition – here it goes to the violin. SERIALs are great! I also added a restriction CHECK (player1 != player2),

I then ran this SQL

SELECT t.player1, t.player2, m.id, mw.match_id, mw.team_id, mw.winning_score
FROM teams t
JOIN matches m ON t.player1 = m.team_1 AND t.player2 = m.team_2
JOIN match_winner mw ON m.id = mw.match_id;

You can check the result on the violin. If you have the connection table, avoid the use of NULL and offers additional flexibility. Just a few recommendations – use uppercase letters for SQL keywords and lowercase letters for your own variables – or vice versa – just pick a standard and stick to it. You should also name your restrictions as I did for that match_winner Table – it is much easier to find error messages in this way.

I hope this answers your question – if not, let me know! P.S. Welcome to the forum! ūüėČ

Oops – I hardly noticed the question. I've undone my change to your team schema – see the violin here, but the SQL is exactly the same. Use two fields PRIMARY KEY You simply connect both fields instead of just a simple one id one – et voila! Of course you can have that id and with one UNIQUE Coercion, sometimes it's a bit easier – I just wanted to tell you the identities of the players. I've added another fiddle function here, showing how you can alias a table twice in the same query to do useful things – here, to match the names of Player1 and Player2 to your results.

bitcoind – Bitcoin RPC estimates that smartfee ‚Äč‚Äčargument keys are required?

I am trying to connect to Bitcoind for RPC API calls with a PHP RPC wrapper, more specifically EstimatesMartfee.

My question is, do I have to specify the argument keys or just the values?

The following example refers only to the values

public function getSmartFeeEstimate($blocks)
{
    $command = new NbobtcCommandCommand('estimatesmartfee', ($blocks, 'CONSERVATIVE'));
    $response = $this->client->sendCommand($command);
    $contents = $response->getBody()->getContents();

    return $contents;
}

or do I have to enter the keys, for example …

public function getSmartFeeEstimate($blocks)
{
    $command = new NbobtcCommandCommand('estimatesmartfee', ('conf_target' => $blocks, 'estimate_mode' => 'CONSERVATIVE'));
    $response = $this->client->sendCommand($command);
    $contents = $response->getBody()->getContents();

    return $contents;
}

Normally, I would just try each and see what the functions return, but I'm in trial mode, and it gives back the same to both, making me believe it ignores the arguments and just tells me it's not working. ,

{"result":{"errors":("Insufficient data or no feerate found"),"blocks":2},"error":null,"id":null}

Can not log in to SSH (SSH keys are not working?)

Get this error when I try to look at my server.

debug1: Trying private key: C:\Users\admin/.ssh/id_dsa
debug3: no such identity: C:\Users\admin/.ssh/id_dsa: No such file or directory
debug1: Trying private key: C:\Users\admin/.ssh/id_ecdsa
debug3: no such identity: C:\Users\admin/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: C:\Users\admin/.ssh/id_ed25519
debug3: no such identity: C:\Users\admin/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: C:\Users\admin/.ssh/id_xmss
debug3: no such identity: C:\Users\admin/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password 
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug3: send packet: type 50
debug2: we sent a keyboard-interactive packet, wait for reply
debug3: receive packet: type 60 
debug2: input_userauth_info_req 
debug2: input_userauth_info_req: num_prompts 1
debug3: failed to open file:C:/dev/tty error:3
debug1: read_passphrase: can't open /dev/tty: No such file or directory
Password for root@******.com:

I tried manually inserting keys and editing the sshd_config file to enable root login and pub key authentication.

My operating system is Ubuntu 16.

Keylogger – Prevents logging of cross-iframe keys in Javascript

We have a web application where other partners can embed their pages as iframes. We implemented a server-to-server method to authenticate users to the iframes, but a partner does not want to implement this.

The bad thing is that they do not want to display their login page in the iframe to avoid being vulnerable to JavaScript key loggers.

We always include iFrames sandbox="allow-forms allow-scripts allow-top-navigation-by-user-activation allow-same-origin" – to ensure the security on our side, of course, I could not find a place where the iframe server could prompt the sandbox for activation. Is there a way for them, or would they just have to trust us?

Does that too sandbox Attribute guarantee that we can not log keystrokes that were created while the focus was on their iframe? – I thought it would guarantee it, but I could not find it documented anywhere.

Regarding the server, which ensures that the iframe can not be loaded into a malicious page, you could simply call us https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X- Put the frame in a whitelist – options or?

Corporate Development – How can I prevent the sharing of internal API keys in a company?

Together sum up:

Relief, benefits, friction and police:

A few more words

relief: First, make it easy for a team to get a new API key. For example, include a reminder in the business processes for launching new projects and offer a friendly service to request new keys without asking for justification.

Services: Use a custom API key for the team or product owner. For example, suggest feedback on app usage based on this key.

friction: Depending on the key function, you can create friction points, such as: For example, if the key is associated with a domain defined by the app (that is, key reuse would not necessarily provide access to all desired services).

police workFinally, you may need to provide some monitoring. For example, you can monitor the use of API functions with an API key, and after a period of time, make a request to use API parts that is not expected in terms of the baseline. If this is not realistic, just include a confirmation in the Company's Project Checklists that a valid key has been used.

*Annotation: You may need to clearly define your API key policy: Does a new major release require its own API key? What about a fork or when an app is split? what if another team is responsible, etc …

usb – How to turn on Google Pixel 3a with broken power and volume keys

I'm really smart and broke both the volume and volume buttons when I changed the screen of my Google Pixel 3a. (Put the shaver in the wrong slot)

Anyway, the screen works and I can see that a% screen is displayed when plugged in. If I can turn on the device, I should be able to use the phone with no keys working.

However, I can not turn it on, For every method I've studied, at least one working key is required.

I found a method that uses ADB (a command-line Andriod debugging tool)

adb.exe reboot

It does not work because it does not recognize the device. I tried to install the driver manually, and the phone is still not recognized.

Can I do anything or did I just build my phone?

tls – How can I distribute highly confidential keys for symmetric encryption?

Suppose I want to exchange a key with someone for a symmetric cipher (such as AES) without meeting him personally. What would be the surest way to do this over the internet? My first instinct would be to use a custom RSA channel over HTTPS for the highest level of security.
I need a future-proof method. (Remember that this only needs to be done once so a "crazy" method can be considered as an answer.)

Is there a list of unused shortcut keys in macOS Mojave?

I'm trying to define a new shortcut for "Select Previous Input Source" because the default shortcut (Ctrl + Space) conflicts with another app you're trying to use. Is there a table with a list of unused links in Mojave that could be good candidates for custom links? I try to find a balance between good usability (without having to stretch my hand in uncomfortable positions to enter the link) and avoiding conflicts with existing links.