Firewall setup for Windows Server acting as FTP client

I have a Windows Server 2012 R2 acting as an FTP client which needs to retrieve some files through FTP from a different device. If I turn off the firewall completely, the transfer is successful. With the firewall up, the process goes through but the file fails to be saved on the Windows server.

I have followed the Microsoft instructions on How to Configure Windows Firewall for a Passive Mode FTP Server, but this still resulted in failure.

I removed the previous firewall rule and replaced it with this one:

New-NetFirewallRule -DisplayName "FTP Service In" -Direction Inbound -Protocol TCP –Enabled True –Action Allow -Profile Any -Service ftpsvc -LocalPort Any -EdgeTraversalPolicy Allow

I also tried to only affect ports 20 and 21. All with the same result.

Any suggestions on how to properly setup the firewall to allow FTP traffic to download files?

All topic

How to remove lines from captcha image which are acting as noise using java?

The images are attached here. I first converted the sample image to grayscale and then binarized it.

Finally i applied median filter to remove the dots from the image. However i am unable to remove the lines which are acting as noise in the image. Kindly help me out.

Original Image:

Original Image

Processed Image:

Processed Image

All topic

Operator acting on an exponential of an operator

In the context of one exercise, I came across the need to act an operator in front of an exponential of another operator. In terms of equations, what I mean is something like:

$hat{a}|crangle=hat{a}exp(-iint d^3p hat{a}^{dagger})|0rangle$

Since this is the first time I’ve seen this, I’m not sure how I could act the operator $hat{a}$ in front of the exponential, or if there’s a way to “switch” the operator so it acts directly on state (I cannot use, for example, BCH relation since the operator is not sandwiched between exponentials). Could you offer me some tips to understand this method?

PS: If it helps, $|crangle$ is a coherent state.

All topic

Covariant derivative acting on vector field

I’m following the lecture here, and this question is with respect to the content on the whiteboard at the timestamp provided.

Consider Newtonian spacetime $(mathcal{M}, mathcal{O}, mathcal{A}, nabla, t)$ where $(mathcal{M}, mathcal{O}, mathcal{A})$ is a smooth 4-dimensional manifold where all charts $(mathcal{U}, x)$ are of the form
$$x^0 : mathcal{U} to mathbb{R}\
x^1 : mathcal{U} to mathbb{R}\
vdots\
x^3 : mathcal{U} to mathbb{R}
$$
where $x^0 = t|_mathcal{U}$ is the restriction of the absolute time function $t$ to the chart domain $mathcal{U}$ and $nabla$ is a prescribed covariant derivative operator with given connection coeffitient functions.

I’m trying to reevaluate the claim on the right, namely
$$ 0 = nabla dt.$$
As I understand it, one does so by picking any direction $frac{partial}{partial x^a}$ from a chart-induced basis for $a=0,1, ldots, 3$, then act on this vectorfield with the prescribed covariant derivative operator and apply the result to the $(0,1)$-tensor field $dt$, which is the gradient of the 0th component function: $d(x^0)$. The action of the covariant derivative along a vectorfield on a $(p, q)$-tensor field yields again a $(p, q)$-tensor field, hence we can look at the resulting $(0,1)$-tensor-field, i.e. a vector field, component-wise for components $b=0, ldots, 3$. Formally, we apply the rules for covariant derivatives
$$
left(nabla_{frac{partial}{partial x^a}} d(x^0)right)_b = frac{partial}{partial x^a}left(d(x^0)_bright) – Gamma_{b m}^n d(x^0)_n left(frac{partial}{partial x^a}right)^m
$$
According to the notes on the blackboard, the first term should vanish entirely, while the second one should reduce to $Gamma_{ba}^0$. I’m havin trouble to see this.

Let’s start with the first term: $d(x^0)$ is a covector, so $d(x^0)_b$ is the 0th component function. $left(frac{partial}{partial x^a}right)$ is a vector field, which can be applied to a fucntion to yield another function. Alright. Still I can’t see how I need to proceed there.

Secondly, I’m stuck with the rightmost term. Somehow, $left(frac{partial}{partial x^a}right)^m$ must reduce to $delta_a^m$ and $d(x^0)_n$ must reduce to $delta_n^0$, however I don’t see how.

Basically, as far as I understand, the whole expression needs to be the zero function in the end.

Can anyone explain where I seem to go wrong? Or help me understand the step missing?

All topic

Mathematica is acting as though d is a variable when it isn’t [on hold]

I have the Airy Stress Function

ϕ[x_, y_] = 
  1/120 (P/(d^3))[5*(x^3 - x*L^2)*(y + d)^2*(y - 2*d) - 3*x*y*(y^2 - d^2)^2]

That I need to take 2nd and 4th derivatives of. P, L, and d are constants (a force, length, and height). When I give Mathematica the command:

σ[x_, y_] = D[ϕ[x, y], y, y]

which should take two partial derivatives with respect to y (all else constant), it returns

1/120 (-24 x y^3 + 10 (-L^2 x + x^3) (-2 d + y) + 
    20 (-L^2 x + x^3) (d + y) - 36 x y (-d^2 + y^2)) Derivative[
   1][(1/d^3)][
   5 (-L^2 x + x^3) (-2 d + y) (d + y)^2 - 3 x y (-d^2 + y^2)^2] + 
 1/120 (10 (-L^2 x + x^3) (-2 d + y) (d + y) + 
    5 (-L^2 x + x^3) (d + y)^2 - 12 x y^2 (-d^2 + y^2) - 
    3 x (-d^2 + y^2)^2)^2 ((1/d^3)^[Prime][Prime])[
   5 (-L^2 x + x^3) (-2 d + y) (d + y)^2 - 3 x y (-d^2 + y^2)^2]

While I expect the derivative to be messy, the primes around the 1/d^3 factors means the D[] function isn’t operating as expected, and mathematica wants to take derivatives of d. What is going wrong here?

All topic

Mathematica is acting as though d is a variable when it isn’t

I have the Airy Stress Function

[Phi][x_, y_] = 
 1/120 (P/(d^3))[
   5*(x^3 - x*L^2)*(y + d)^2*(y - 2*d) - 3*x*y*(y^2 - d^2)^2]

That I need to take 2nd and 4th derivatives of. P, L, and d are constants (a force, length, and height). When I give Mathematica the command:

[Sigma][x_, y_] = D[[Phi][x, y], y, y]

which should take two partial derivatives with respect to y (all else constant), it returns

1/120 (-24 x y^3 + 10 (-L^2 x + x^3) (-2 d + y) + 
    20 (-L^2 x + x^3) (d + y) - 36 x y (-d^2 + y^2)) Derivative[
   1][(1/d^3)][
   5 (-L^2 x + x^3) (-2 d + y) (d + y)^2 - 3 x y (-d^2 + y^2)^2] + 
 1/120 (10 (-L^2 x + x^3) (-2 d + y) (d + y) + 
    5 (-L^2 x + x^3) (d + y)^2 - 12 x y^2 (-d^2 + y^2) - 
    3 x (-d^2 + y^2)^2)^2 ((1/d^3)^[Prime][Prime])[
   5 (-L^2 x + x^3) (-2 d + y) (d + y)^2 - 3 x y (-d^2 + y^2)^2]

While I expect the derivative to be messy, the primes around the 1/d^3 factors means the D[] function isn’t operating as expected, and mathematica wants to take derivatives of d. What is going wrong here?

All topic

Cura acting REALLY sluggish all of a sudden

I’ve been using Cura on my computer for a while now, (at least a month) but all of a sudden the entire interface has become noticeably sluggish. Whenever I scroll through the profile parameters list or the settings visibility dialog, the list lags and doesn’t fully appear.

I’m at a loss to explain why this is happening.

Example

All topic

Android AsyncTask isn’t acting correctly

I’m having a bit of a breakdown regarding AsyncTask running one moment but not the next. I have simplified the code as much as possible. The try/catch code below launches my async task when called from MainActivity on app start-up. However, when I put this exact same code into a button which is within the same class file, a classCastException error crashes the app. Is there something I am not understanding about Async? Thanks all.

CODE THAT CALLS ASYNC:

try {
    new MainActivity.MyTask().execute(this);
}
catch (Exception e) {
    e.printStackTrace();
}

ASYNC TASK:

private class MyTask extends AsyncTask {

MainActivity activity;

@Override
protected String doInBackground(Object... params) {
    activity = (MainActivity)params[0];
    try {
        StringBuilder sb = new StringBuilder();
        URL url = new URL("https://www.example.com");
        BufferedReader in;
        in = new BufferedReader(new InputStreamReader(url.openStream()));
        String inputLine;
        while ((inputLine = in.readLine()) != null)
        sb.append(inputLine);
        in.close();

        html = sb.toString();
    }
    catch (Exception e) {
        e.printStackTrace();
    }

    // SOME WORK IS DONE USING HTML VARIABLE & URL DATA...

    @Override
    protected void onPostExecute(String str) {

        // RESULT IS LOADED INTO LIST VIEW...
    }
}

All topic

Laptop touchscreen acting like a mouse after eGalaxTouch driver installation on Windows 10

I have been using windows 10 for a week now without any problems. Today windows 10 installed “eGalaxTouch – Other hardware – USB Touchscreen Controller(A103)” through windows update. It has turned my touch screen into a mouse.

Edit: By acting like a mouse I mean that, I can not use touch gestures, option to open on-screen keyboard has disappeared, and scrolling the web browser’s page results in selection of text instead of scrolling. Also it lists under ‘Mice and other pointing devices’ in the device manager.

Edit 2: Also touchscreen driver is not listed on my laptop’s (HP ENVY TouchSmart 15-j137tx ) website.

This driver does not show in ‘installed updates’, so I can’t uninstall it. I tried deleting the driver from device manager but it does not work.

How do I revert to older touchscreen driver?

All topic

Clone object acting in strange way?

I wrote a script for throwing grenade with model animation.Its working without any error. But the clone “grenadeWeaponClone” acting in strange way ! moving in wrong direction or stop from moving !! I could not understand why. If any one could please check my script and tell me what’s wrong with clone object will be appreciated.

private Animator mAnimator;
public GameObject grenadeWeapon, gripPlace, grenadeWeaponClone;
public UI_AVATAR _grenades_c;
public Vector3 grenadePointer;
public Transform pointer;
public guideLine _throwgrenade;
public character_animation _anim;
public bool grenade_, button_grenades, _awaGrenadeBool, ThrowGrenadeBool;
public clickme _th;
public awa _awaGrenade;


public float RotationSpeed;
private Quaternion _lookRotation;
private Vector3 _direction;

// Use this for initialization
void Start()
{
    grenadeWeaponClone.SetActive(false);
    mAnimator = GetComponent();

}

// Update is called once per frame
void Update()
{
    _awaGrenadeBool = _awaGrenade.grenade;
    _direction = (grenadePointer - transform.position).normalized;
    _lookRotation = Quaternion.LookRotation(_direction);

    if (_awaGrenadeBool)
    {
        transform.rotation = Quaternion.Slerp(transform.rotation, _lookRotation, Time.deltaTime * RotationSpeed);
    }

    if (button_grenades == true)
    {
        Ray mouseRay = Camera.main.ScreenPointToRay(Input.mousePosition);
        RaycastHit mousePoint;
        _grenades_c.UI_on = true;

        if (Physics.Raycast(mouseRay, out mousePoint, 100))
        {
            grenadePointer = mousePoint.point;
            pointer.transform.position = grenadePointer;

        }

        if (button_grenades == true && Input.GetMouseButtonDown(0) && _th.actives == false)
        {
            grenade_ = true;
            print("tt");
            button_grenades = false;

        }


    }

    if (button_grenades == false && Input.GetMouseButtonUp(0))
    {
        grenade_ = false;

    }

    mAnimator.SetBool("grenade", grenade_);

    if (ThrowGrenadeBool)
    {
        grenadeWeaponClone.GetComponent().useGravity = true;

    }
    else
    {
        grenadeWeaponClone.GetComponent().useGravity = false;
        grenadeWeaponClone.transform.position = gripPlace.transform.position;

    }



}// end update

public void grenade()
{
    button_grenades = !button_grenades;
}

void gripG() // animation events
{
    ThrowGrenadeBool = false;
    print("grip");
    grenadeWeaponClone.SetActive(true);
    grenadeWeaponClone = Instantiate(grenadeWeapon) as GameObject;


}

void throwG()  // animation events
{
    print("throw");
    _throwgrenade.Launch();
    ThrowGrenadeBool = true;
}

All topic