ag.algebraic geometry – detecting a semi-free module from its bar-resolution?

Let $A$ be a DG-algebra over a field (say $k$). A DG-module $M$ over $A$ is said to be semi-free if it admits an exhaustive filtration $0 = M_0 subset M_1 subset cdots subset M$ such that the cones of $M_i to M_{i+1}$ are finite direct sums of shifts of finite-dimensional free $A$-modules (I insist on the finite-dimensional hypothesis which I need for my problem).

In case $A$ is proper and $M$ is finite-dimensional (perfect?) DG-module over $A$ then the bar-resolution of $M$ is an (infinite) semi-free resolution of $M$.

I am wondering if there is a way to detect that $M$ itself is semi-free from its bar resolution? I am not sure what to expect. Perhaps that one can extract a finite resolution from the bar-resolution when $M$ is semi-free?

Since I am looking for positive result, extra-hypotheses can be made on $A$. I just don’t want to assume that $A$ is smooth (since in my example it is not).

java – Minecraft Forge Mod: Block detecting arrows that hit him

I want to create a block like the target block in the Minecraft 1.7.10 version. I am a beginner in Forge Modding, so I am struggling a lot with it.

The block should detect arrows that hit him and then tell me where they hit him, so I can calculate a number that should present by a redstone signal how close the block to the center is.

But my problem is that I do not know how the block can tell me where the arrow is.

I tried to copy some code of the target of the OpenBlocks Mod, but they have created classes like TileEntityTarget, that extends SyncedTileEntity that extends OpenTileEntity that extends TileEntity so I ended up with trying to edit the code and failing a lot…

Here is my code:

@Override public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) {

if (!world.isRemote && entity != null && entity instanceof EntityArrow) {
    if (lastEntityHit != entity.getEntityId()) {
        lastEntityHit = entity.getEntityId();
        return;
    }
    lastEntityHit = entity.getEntityId();
    onTargetHit(world, x, y, z, Vec3.createVectorHelper(entity.posX, entity.posY, entity.posZ));
}

}

public void onTargetHit(World world, int x, int y, int z, Vec3 entityPosition) {

if (world.isRemote) return;

final TileEntity target = getTileEntity(world, x, y, z, TileEntity.class);
if (target == null) return;

Vec3 bullseye = Vec3.createVectorHelper(x, y, z);

double distance = entityPosition.distanceTo(bullseye);

BlockTargetBlock.setStrength(15 - Math.min(15, Math.max(0, (int)(distance * 32))));

}

@Override
public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int m) {
final TileEntity tile = getTileEntity(world, x, y, z, TileEntity.class);
return tile != null? BlockTargetBlock.getStrength() : 0;
}

@Override
public int isProvidingStrongPower(IBlockAccess world, int x, int y, int z, int m) {
return isProvidingWeakPower(world, x, y, z, m);
}

@Override
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
setBlockBoundsBasedOnState(world, x, y, z);
return super.getSelectedBoundingBoxFromPool(world, x, y, z);
}

@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
setBlockBoundsBasedOnState(world, x, y, z);
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
}

private TileEntity getTileEntity(IBlockAccess world, int x, int y, int z, Class class1) {
return (worldObj != null && worldObj.blockExists(x, y, z))? worldObj.getTileEntity(x, y, z) : null;
}

public static void setStrength(int strength) {
BlockTargetBlock.strength = strength;
tickCounter = 10;
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, null);
}

public static int getStrength() {
return strength;
}
I would be glad if someone could help me out. They don’t have to give me the code, it would be enough if I could get a tip or a link to an article or video or something like this that could explain me how I can do it or at least give me also useful tips.

Greetings
Xydru

unity – Player not detecting layermask

I’m trying to implement a simple collision detection for my player but it is not detecting the layer mask as my Player comes into contact with it. I have a move point that moves slightly ahead of the player, and if it comes in contact with the StopMovement layermask then it should NOT move any further. Unfortunately, the layer is never detected and therefore the player just moves right through the object.

Script:

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController : MonoBehaviour
{
    public float moveSpeed = 5f;
    private float moveHorizontal;
    private float moveVertical;

    public Transform movePoint;

    public LayerMask whatStopsMovement;

    // Start is called before the first frame update
    void Start()
    {
        movePoint.parent = null;
    }

    // Update is called once per frame
    void Update()
    {
        moveHorizontal = Input.GetAxisRaw("Horizontal");
        moveVertical = Input.GetAxisRaw("Vertical");
    }

    private void FixedUpdate()
    {
        transform.position = Vector3.MoveTowards(transform.position, movePoint.position, moveSpeed * Time.fixedDeltaTime);

        // stops the movePoint from going too far
        if (Vector3.Distance(transform.position, movePoint.position) == 0f)
        {
            if (Mathf.Abs(moveHorizontal) == 1f) // makes it so we can check if 1f OR -1f without == 1f || -1f
            {
                if (!Physics2D.OverlapCircle(movePoint.position + new Vector3(moveHorizontal, 0f, 0f), 0.2f, whatStopsMovement))
                {
                    Debug.Log("No collision");
                    movePoint.position += new Vector3(moveHorizontal, 0f);
                }
                else
                {
                    Debug.Log("Collision");
                }
            }

            else if (Mathf.Abs(moveVertical) == 1f) // makes it so we can check if 1f OR -1f without == 1f || -1f
            {
                if (!Physics2D.OverlapCircle(movePoint.position + new Vector3(moveVertical, 0f, 0f), 0.4f, whatStopsMovement))
                {
                    Debug.Log("No collision");
                    movePoint.position += new Vector3(0f, moveVertical);
                }
                else
                {
                    Debug.Log("Collision");
                }
            }
        }
    }
}

enter image description here

enter image description here

Any help at all is appreciated.

android – Detecting battery power using serviceuuid

how can ı detect battery power from tlm uuid in android?

I can send a service uuid over socket.io from node.js server to android.But I cannot get battery power because libraries that I can use to get battery power neeeds to search over the android but I want to use the service uuid to get battery power.How can I solve this problem.

thank you for your help

Machine Learning/Deep Learning in detecting Ransomware

As ransomwares continue to disturb businesses and daily lives of internet users, I wonder whether there are any real products which use Machine Learning and Deep Learning to detect this kind of attacks.

I have read many scientific papers about ML and DL in this matter but couldn’t find a real product which takes this approach.

dock – 16″ MBP is detecting 2 displays as one, mirroring them

I want 3 independed, extended monitors. The retina on my MBP and 2 displays.

In my current setup this isn’t working as expected.

I have 2 DELL2415 connected via a dock, but both are mirrored, while the Retina display is independent.

I have “Mirror displays” unchecked.

enter image description here

I it almost feels, as if the dock has something to do with it, because it seems like it doesn’t matter if one or 2 displays are connected. If I keep the mirror option unchecked it’s either extending the MBP display onto 1 or 2 of the DELLs.

Dock “Reg Type No.” is K20A001. Also Dell.


computer architecture – Detecting Data and Control Hazards for a mips 5 stage pipeline

I’m practicing data and control dependencies, but having trouble detecting them. For this example, I’m assuming this pipeline is fully bypassed (with forwarding). I think the only data dependency is i3 on i2. Is this correct? I also don’t know how to detect the control dependency. I know there will be one because of the bne, but not sure how and on which one…

i1: lw $t0, 10($t1)
i2: lw $t4, 3($t2)
i3: addiu $t0, $t4, 3
i4: addu $t0, $t0, $t2
i5: addiu $t2, $t2, -8
i6: addiu $t1, $t1, -4
i7: bne $t1, $0, i1

Detecting mixed character codes to catch spam

I manage code detecting spam in contact forms, a common technique spammers use is mixing character codes so content checks will not recognise the phrases but a user will, as long as they are viewing in a UTF character set (if not they will see a mess of characters) so my method is detect this mixing and you’ve caught the spam.

For example a A is ASCII 65 but a very similar character is ASCII 1040

I’m not good on the intricacies of the different character encodings and don’t want to have any ‘false positives’, the strings received will depend on the character set in the senders (or bot) browser and the receiving sites set character set. My current tests are:

preg_match_all("/&#((3-9)d{2}|d{4});/", $text) // ASCII > 299
strlen($text) != strlen(utf8_decode($text))

Either of the above flags mixed character codes. I would be grateful to know if there is a better way or if the above might create false positives.

multiple monitors – I have Amd RX570 4gb when i connect second display using DVI To VGA Converter, Both screen stop detecting no signal

I have a AMD RX570 4GB Using Window 10 ,i want to setup dual screen, my first screen is plug in hdmi port of gpu, when I plug second vga monitors using DVI-D to VGA converters DVI-D port on the same video card. However, gpu stops, both screens go black, Both screen stop detecting no signal, as soon as I plug the 2nd monitor.and when I unplug the second monitor and restart the pc in order to get display again. Any leads? Thanks.

virus – Antivirus constantly detecting temp files as threats

My antivirus has been constantly detecting threats and It’s always temp files. Everyday I open a programme or use/inject a dll and it detects a Gen:Variant.Application.HackTool.180 or Tojan.GenericKD.33997631.

I scanned with Malwarebytes, CCleaner, Tdsskiller, RogueKiller, ESET and others, today. The scans have only detected temp files after they found a backdoor (quite sure that the backdoor is deleted).

I’ve had this for a while and I haven’t found ANYTHING about my current state.

Here are some pictures of my processes:
https://imgur.com/a/sDsn3sN