Javascript – Pathfinding Algo – Game Development Stack Exchange

OK, I'm building a tower defense game with simple javascript.

Now there is an industry producing tanks, and the tanks should follow the path to a warehouse after leaving the industry.

My question is how to draw the path on which the tank will travel. The tank takes the shortest route to the warehouse.

Many thanks

Update flag in postgresql – Stack Exchange for database administrators

I have data from three sources: "PRM", "CRM", "MDB". I have to set the flag as & # 39; Y & # 39; update in a specific column based on the following table and description. can someone give me a solution as soon as possible?

Enter image description here

Case 1:
In the first sentence, which I highlighted as light orange, and in this case, the source system is & # 39; MDB & # 39; and that is from another group and says that it does not match any matches and acts as a golden record, so I need to update the column & # 39; MDB_FLAG & # 39; as & # 39; Y & # 39; if the creation date is less than 2017

Case 2:
In the second group, which I marked as yellow and in this case the source system & # 39; MDB & # 39; and who belong to the same group and say which matches come from this group, I have to use the column & # 39; MDB_FLAG & # 39; as & # 39; Y & # 39; To update. if the creation date is less than 2017

Case 3:
In the second group, which I marked as light blue and in this case the source system & # 39; MDB & # 39; and & # 39; CRM & # 39; and they belong to the same group and say that they are matches, of which I have the & # 39; MDB & # 39; Must not link to PRM & # 39; as & # 39; Y & # 39 ;, if the creation date is less than 2017 and the source system is not linked to the source system = & # 39; PRM & # 39;

LVM for LUKS Implementation – Information Security Stack Exchange

LVM under LUKS is the only secure option for encrypting a Linux / Ubuntu USB system. If someone gets access to an unencrypted USB device that is not LVM on LUKS, he knows what it is and what it is.

However, LVM on LUKS is not easy to implement. Would anyone be kind enough to tell you how to do it in the simplest steps?

Many thanks.

Transaction Broadcast Error zcash – Bitcoin Stack Exchange

I can not send the transaction to zcash testnet. I will state the entire steps clearly. Could someone tell me where I am doing wrong. Private key – "cSwoLKkeHSj3zaKAqiv8DXKXQVm18Ci3vwTvgrtPAS6a2YJ1HeRY"

step:1 zcash-cli listunspent 6 9999999 "["tmRvLFZ3Lnz9vhd9bG2JuWakYESEi4ukxqs"]"
    "txid": "8a1ce0ecc491ba2cb234674662769774ce81e4beaa7a7aff466aa62ea8b8345b",
    "vout": 1,
    "generated": false,
    "address": "tmRvLFZ3Lnz9vhd9bG2JuWakYESEi4ukxqs",
    "scriptPubKey": "76a914b1c61a54ae002ef35bf1fcdbdde9ea9e02b486bc88ac",
    "amount": 2.89999774,
    "confirmations": 16,
    "spendable": true

step 2

    zcash-cli createrawtransaction "[{"txid":"8a1ce0ecc491ba2cb234674662769774ce81e4beaa7a7aff466aa62ea8b8345b","vout":1}]" "{"tmGrqWFJQJtYXFwm6b4ptKpDetNTWdpc3kX":0.4,"tmFHNDXpWYgRQ44FXPidCiiq1Rfx9gESuQ1":2.39999774}"
output for step-2 "030000807082c403015b34b8a82ea66a46ff7a7aaabee481ce74977662466734b22cba91c4ece01c8a0100000000ffffffff02005a6202000000001976a9144e63b9f685635c97f578c2e94f4aba622b65d11a88ac1e1b4e0e000000001976a9143d171848a9caf0a64b7f069b116675bca56ac08b88ac00000000a52a030000"

step 3

zcash-cli signrawtransaction "030000807082c403015b34b8a82ea66a46ff7a7aaabee481ce74977662466734b22cba91c4ece01c8a0100000000ffffffff02005a6202000000001976a9144e63b9f685635c97f578c2e94f4aba622b65d11a88ac1e1b4e0e000000001976a9143d171848a9caf0a64b7f069b116675bca56ac08b88ac00000000a52a030000" "[{"txid":"8a1ce0ecc491ba2cb234674662769774ce81e4beaa7a7aff466aa62ea8b8345b","vout":1,"scriptPubKey":"76a914b1c61a54ae002ef35bf1fcdbdde9ea9e02b486bc88ac","amount":2.89999774}]" "["private_key"]"
output :
  "hex": "030000807082c403015b34b8a82ea66a46ff7a7aaabee481ce74977662466734b22cba91c4ece01c8a010000006a47304402201607a0454a641dc28a81324dd292275780fde44bbdec4d95131d0be35bcd591f0220601161a481a4b690076febf5c1c7508cddfd1972fda432b9bbc55d87289beb9c012103472fba697de28693fea3ea2d7a0d744d164d6264f8c4f44648eb904162387fe4ffffffff02005a6202000000001976a9144e63b9f685635c97f578c2e94f4aba622b65d11a88ac1e1b4e0e000000001976a9143d171848a9caf0a64b7f069b116675bca56ac08b88ac00000000a52a030000",
  "complete": true

Step 4

zcash-cli sendrawtransaction "030000807082c403015b34b8a82ea66a46ff7a7aaabee481ce74977662466734b22cba91c4ece01c8a010000006a47304402201607a0454a641dc28a81324dd292275780fde44bbdec4d95131d0be35bcd591f0220601161a481a4b690076febf5c1c7508cddfd1972fda432b9bbc55d87289beb9c012103472fba697de28693fea3ea2d7a0d744d164d6264f8c4f44648eb904162387fe4ffffffff02005a6202000000001976a9144e63b9f685635c97f578c2e94f4aba622b65d11a88ac1e1b4e0e000000001976a9143d171848a9caf0a64b7f069b116675bca56ac08b88ac00000000a52a030000"
error code: -25
error message:

Plugins – Ultimate Member – WordPress Development Stack Exchange

I have just installed the Ultimate Member plug-in and my website says, "This website redirected you too often". If I disable the plugin, my site works, but immediately I re-enable the plugin, the same problem. What could that be? I have already checked the settings of WordPress to confirm that the URL does not contain "www". Many thanks

Option buttons Direction – User Experience Stack Exchange

Vertical is preferred.

According to research by the Neilson Norman Group and the various guidelines for Apple and Microsoft user interfaces, option buttons should have the circle to the left of the label and the list should be stacked vertically.

This helps the user to scan the choices and also reduces the ambiguity caused by alternating circles and labels in the horizontal arrangement of selections.

Like most things in UX, the actual answer depends on your use case. The fewer options you see, the fewer problems you will have with a horizontal layout. For example, yes / no pairs are often placed side by side, although there is a sufficient gap between the two options.

Further reading:

unity – Radar / Minimap System – Stack Exchange for Game Development

I'm trying to create a radar effect (almost GTA-shaped minimap). The radar shows the position of an enemy (represented by a small image) when in range.
The problem I have here is: I want the radar to indicate if the enemy is higher or lower than the player (if the y-position of the enemy is greater or less than the y-position of the player).
I want to accomplish this goal by switching the image on the radar (representing the enemy) to a different image relative to the y-position of the enemy.

Here is my radar script:

public class RadarObject


public Image icon { get; set; }
public GameObject owner { get; set; }


public radar: MonoBehaviour

(SerializeField) private Transform playerPosition;

private float MapScale = 2.0f;

private Image NormalImage;
private Image UpImage;
private Image DownImage;

public static List radObjects = new List();

public static Radar Instance;

private void Awake()
    Instance = this;

public void CustomRegisterRadarObject(GameObject o, Image u, Image d, Image n)
    NormalImage = Instantiate(n);
    UpImage = Instantiate(u);
    DownImage = Instantiate(d);

    radObjects.Add(new RadarObject() { owner = o, icon = NormalImage });
    radObjects.Add(new RadarObject() { owner = o, icon = UpImage });
    radObjects.Add(new RadarObject() { owner = o, icon = DownImage });

public static void RemoveRadarObject(GameObject o)
    List newList = new List();
    for(int i = 0; i < radObjects.Count; i++)
        if(radObjects(i).owner == o)
    radObjects.RemoveRange(0, radObjects.Count);

private void DrawRadarDots()
    foreach (RadarObject ro in radObjects)
        Vector3 radarPos = (ro.owner.transform.position - playerPosition.position);
        float distToObject = Vector3.Distance(playerPosition.position, ro.owner.transform.position) * MapScale;
        float deltaY = Mathf.Atan2(radarPos.x, radarPos.z) * Mathf.Rad2Deg - 270 - playerPosition.eulerAngles.y;
        radarPos.x = distToObject * Mathf.Cos(deltaY * Mathf.Deg2Rad) * -1;
        radarPos.z = distToObject * Mathf.Sin(deltaY * Mathf.Deg2Rad);

        ro.icon.transform.position = new Vector3(radarPos.x, radarPos.z, 0) + transform.position;

void Update()

public void CheckHeightDifference(Transform o)
    foreach (RadarObject ro in radObjects)
        if (o.position.y > playerPosition.position.y && ro.icon.color != Color.yellow)  //if enemy is above the player
            //ro.icon.color = Color.yellow;
            ro.icon = UpImage;
        else if (o.position.y < playerPosition.position.y && ro.icon.color !=    //if enemy is below the player
            //ro.icon.color =;
            ro.icon = DownImage;
        else if (o.position.y == playerPosition.position.y && ro.icon.color != //if enemy and the player are at the same height
            //ro.icon.color =;
            ro.icon = NormalImage;


And here's the script attached to the enemy to make it visible on the radar:

public class MakeAvailableOnRadar : MonoBehaviour


(SerializeField) private Image RadarImage; //Image that shows if the player and enemy are at the same height
(SerializeField) private Image RadarImageUp; //Image that shows if the enemy is higher than the player
(SerializeField) private Image RadarImageDown; //Image that shows if the enemy is lower than the player

private Radar radar;

void Start()
    radar = Radar.Instance;

    radar.CustomRegisterRadarObject(gameObject, RadarImageUp, RadarImageDown, RadarImage);

private void Update()

void OnDisable()


It does not seem to work the way I want it to. Is there a workaround? How do I fix this?

I follow Hollistic3D's Creating a Mini Card System in Unity 5 ( as a guide.

Blockchain 51% attack – Bitcoin Stack Exchange

No. A 51% attack can not change transactions or these transactions become invalid. Blocks do not determine if a transaction is valid. Transactions have their own validation rules. If a block contains an invalid transaction, this block is invalid regardless of the proof of work.

If you want to change the details of a transaction, you must create a new signature. This can only be done by the original creator of this transaction. Therefore, attackers can not easily arbitrarily change people's transactions because they do not have the private keys needed to create those signatures. Therefore, any changes you make will result in invalid transactions.

An attacker can only remove transactions from the history and insert their own transactions. They could only replace their own transactions. The risk of a 51% attack is that the attackers can replace their own transactions that another person pays with a double-spending transaction that pays off itself, reversing a transaction.

Mini-Seed by Single Utxo – Bitcoin Stack Exchange

Imagine, we have a cold storage wallet with several utxos and a master seed for this wallet.

If we want to spend out of Coldstorage, but first want to go through a new wallet like a coin purse, we have two alternatives: we could send a single Utxo that we would like to use for this wallet, or even import the master key after the new wallet ( not sure).

It would be very interesting to have a mini seed of a single Utxo from our stock that we could import into the hot wallet and use to spend that single utxo. In this way, we do not have to create a new program for the hot wallet, or give up information such as the entire stash or Xpub or subsequent risks of the hot wallet.

It would be great to right-click on a single utxo in our coldstorage wallet and retrieve the mini-seed for that single utxo like another 24 words or 48 words.
Just an idea.