Business Moves to Cloud Hosting (Security?)

Hi,

We are looking for the first time to switch from a dedicated internal server to a cloud base.

What are the security threats or security issues with the cloud versus dedicated servers?

Our question is how many security issues cloud servers have.

What should we look for when switching to cloud servers?

what questions should we ask

We will use the cloud for networking between two warehouses with Are (ERP) systems.

Is there a list of things that need to be done to switch from dedicated servers to the cloud?

Thank you very much
Nate

c # – Enmy Sprite, which moves in a certain way, depending on how it is generated

So I have a code that creates the sprite outside of the window, and wants it to move on a certain straight line, depending on where it's created. If the sprite is created above, it will be generated below, and conversely, if the sprite is created then the left will go to the right and vice versa.
Code from Game1.cs:

 public class Game1 : Game
{
    GraphicsDeviceManager graphics;
    SpriteBatch spriteBatch;
    Player player;
    List enemies = new List();


    public Game1()
    {
        graphics = new GraphicsDeviceManager(this);
        Content.RootDirectory = "Content";
    }


    protected override void Initialize()
    {


        base.Initialize();
    }


    protected override void LoadContent()
    {
        spriteBatch = new SpriteBatch(GraphicsDevice);
        //player
        Texture2D playertexture = Content.Load("Player");
        player = new Player(new Vector2(350, 175), playertexture);

        //enemy
        Texture2D enemytexture = Content.Load("Enemy");
        Random random = new Random();
        var width = GraphicsDevice.Viewport.Width;
        var height = GraphicsDevice.Viewport.Height;


        for (int i = 0; i < 20; i++)
        {

            enemies.Add(new Enemy(new Vector2(random.Next(width, width + 100), random.Next(0, height)), enemytexture));
            enemies.Add(new Enemy(new Vector2(random.Next(0 - 100, 0), random.Next(0, height)), enemytexture));
            enemies.Add(new Enemy(new Vector2(random.Next(0, width), random.Next(-100, 0)), enemytexture));
            enemies.Add(new Enemy(new Vector2(random.Next(0, width), random.Next(height, height + 100)), enemytexture));
        }




    }

    protected override void UnloadContent()
    {

    }

    protected override void Update(GameTime gameTime)
    {
        if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            Exit();
        foreach (Enemy enemy in enemies)
        {
            enemy.Update(gameTime);
        }
        player.Update(gameTime);



        base.Update(gameTime);
    }

    protected override void Draw(GameTime gameTime)
    {
        GraphicsDevice.Clear(Color.CornflowerBlue);

        spriteBatch.Begin();
        foreach (Enemy enemy in enemies)
        {
            enemy.Draw(spriteBatch);
        }
        player.Draw(spriteBatch);

        spriteBatch.End();

        base.Draw(gameTime);
    }
}

Enemy.cs

class Enemy
{
    Texture2D enemytexture;
    Vector2 enemyposition;


    public Enemy(Vector2 enemyposition, Texture2D enemytexture)
    {
        this.enemyposition = enemyposition;
        this.enemytexture = enemytexture;


    }

    public void Update(GameTime gametime)
    {
        enemyposition.X++;
    }

    public void Draw(SpriteBatch spriteBatch)
    {
        spriteBatch.Draw(enemytexture, enemyposition, Color.White);
    }
}

I wonder if I can do it somehow
enemies.Add (new Enemy (new Vector2 (random.Next (width, width + 100), random.Next (0, height)), enemytexture, enemyposition.X ++));

python – Object of a class that moves from the main process to the child process

I'm trying to use multiprocessing in a class. I use Multiprocessing.Pipe () to pass instance o from the parent process to the child process.

Here I call the Multiprocessing.pipe (): –

conn1, conn2 = multiprocessing.Pipe()


        self.devices = bussiness.initilaztion(self.comm_object,logger)

        conn1.send(self.devices)

        self.callmotor1dprocess = 

        multiprocessing.Process(target=callallmotor1d,args=(conn2))

        self.listofthread.append(self.callmotor1dprocess)

        self.callsov1sprocess =  

        multiprocessing.Process(target=callallsov1s,args=(conn2))

        self.listofthread.append(self.callsov1sprocess)

I call this code within the class. Now I should call method out of class.

 def callallmotor1d(conn):
    devices = conn.recv()
    while True:
        bussiness.motorallprocessing(devices)


def callallsov1s(conn):
    while True:
        devices = conn.recv()
        bussiness.allsov1processing(devices)

Now I call all multiprocessing initiate

def startprocess(self):
        for item in self.listofthread:
            item.start()
        self.button3.config(text="started")

   def stopprocess(self):
        for item in self.listofthread:
            item.kill()

But I got the mistake that is very common:
Error message:-

can't pickle _thread.lock objects
Traceback (most recent call last):
 File "C:/Users/misu01/PycharmProjects/opcua/ui_v7.py", line 226, in initilization conn1.send(devices)
 File "C:Usersmisu01AppDataLocalProgramsPythonPython37libmultiprocessingconnection.py", line 206, in send self._send_bytes(_ForkingPickler.dumps(obj))
 File "C:Usersmisu01AppDataLocalProgramsPythonPython37libmultiprocessingreduction.py", line 51, in dumps cls(buf, protocol).dump(obj)
TypeError: can't pickle _thread.lock objects

I do not know why the thread.lock object is created in my Alldevices class. I never used thread.lock in my class.

To avoid this error, I am trying to change my Alldevices class as follows:

Here is my change: –

Nevertheless, I got a mistake.
Is this my implementation correct?

Here self.allmotor1dobjects, self.allsov1sobjects, etc. are also class instances. I suspect that I have invoked instances of classes in my alldevice class because this does not work.

How can I fix this?

I'm not sure if multiprocessing.pipe () is the correct way to send an instance of the class to the main process to the child process

I also try to know how to create the thread.lock () object in my alldevice class.

Any help in this regard is greatly appreciated

class AllDevices:


def __init__(self,comobject,logger):
    self.mylock = threading.Lock()
    self._comobject = comobject
    dfM1D = pd.read_excel(r'D:OPCUAWorking_VF1.xls', sheet_name='Motor1D')
    dfM2D = pd.read_excel(r'D:OPCUAWorking_VF1.xls', sheet_name='Motor2D')
    dfsov1S = pd.read_excel(r'D:OPCUAWorking_VF1.xls', sheet_name='Valve1S')
    dfsov2S = pd.read_excel(r'D:OPCUAWorking_VF1.xls', sheet_name='Valve2S')
    dfanalog = pd.read_excel(r'D:OPCUAWorking_VF1.xls', sheet_name='AnalogTx')
    dfcontrolvalve = pd.read_excel(r'D:OPCUAWorking_VF1.xls', sheet_name='ControlValves')
    dfvibrofeeder = pd.read_excel(r'D:OPCUAWorking_VF1.xls', sheet_name='VibroFeeder')
    dfconveyor = pd.read_excel(r'D:OPCUAWorking_VF1.xls', sheet_name='Conveyor')
    dfdrives = pd.read_excel(r'D:OPCUAWorking_VF1.xls', sheet_name='Drive')

    self.allmotor1dobjects = callallmotor1D_V1.Cal_AllMotor1D(dfM1D, comobject, logger)
    self.allmotor2dobjects =  callallmotor2D_V1.Cal_AllMotor2D(dfM2D,comobject,logger)
    self.allsov1sobjects = callallsov1S_V1.Cal_AllSov1S(dfsov1S,comobject,logger)
    self.allsov2sobjects = callallsov2S_V1.Cal_AllSov2S(dfsov2S, comobject,logger)
    self.allanalogobjects = calallanalog_V1.Cal_AllAnalogInputs(dfanalog,comobject,logger)
    self.allcontrolvalveobjects = calallcontrolvalves_V1.Cal_AllControlValve(dfcontrolvalve,comobject,logger)
    self.allvibrofeederobjects = callallvibrofeeder_V1.Cal_AllVibroFeeder(dfvibrofeeder,comobject,logger)
    self.allconveyorobjects = callallconveyor_V1.Cal_AllConveyor1D(dfconveyor,comobject,logger)
    self.allabbdrivesobjects = calallABPdrives_V1.Cal_AllDrives(dfdrives, comobject,logger)

    def __getstate__(self):
    # Copy the object's state from self.__dict__ which contains
    # all our instance attributes. Always use the dict.copy()
    # method to avoid modifying the original state.
    state = vars(self).copy()
    # Remove the unpicklable entries.
    del state('mylock')
    return state

def __setstate__(self, state):
    # Restore instance attributes.
    vars(self).update(state)
    self.mylock = threading.Lock()

@property
def allmotor1d(self):
    return self.allmotor1dobjects

@property
def allsov1s(self):
    return self.allsov1sobjects

No improvement of the error: –

2019-09-06 10: 54: 17,835: _thread.lock objects can not be cracked
Tracing (last call last):
File "C: Users misu01 Desktop SMS_SIMULATION ui_v7.py", line 220, in Initialization
conn1.send (devices)
File "C: Users misu01 AppData Local Programs Python Python37 lib multiprocessing connection.py", line 206, in send
self._send_bytes (_ForkingPickler.dumps (obj))
File "C: Users misu01 AppData Local Programs Python Python37 lib multiprocessing reduction.py", line 51, in dumps
cls (buf, protocol) .dump (obj)

Python – Find possible moves in a chess game

Recently I developed a chess game in Python – with Pygame – only as a project for me. I have a class for every piece type and in every class I have a method called find_available_moves This returns an array that represents the board indicating where the part is allowed to move legally. I have achieved this, but I feel that there are many repetitions and I'm not sure how to make my code more precise.

Here's the method from the Rook class, for example:

def find_available_moves(self, grid):
    """
    :param grid: Grid class
    :return list: The spaces where the rook can move to
    """
    available_spaces = ((False) * grid.columns for i in range(grid.rows))

    # Check spaces to the right
    for x in range(self.grid_position(0) + 1, grid.columns):
        # Position to check
        position = (x, self.grid_position(1))

        # If there is nothing in the space it is available
        if grid.board_layout(position(1))(position(0)) is None:
            available_spaces(position(1))(position(0)) = True

        # If there is a piece of the opposite colour in the space it is available, but further spaces are not
        elif grid.board_layout(position(1))(position(0))('colour') != self.colour:
            available_spaces(position(1))(position(0)) = True
            break

        # If there is a piece of the same colour in the space it is not available, neither are further spaces
        else:
            break

    # Check spaces to the left
    for x in range(self.grid_position(0) - 1, -1, -1):
        # Position to check
        position = (x, self.grid_position(1))

        # If there is nothing in the space it is available
        if grid.board_layout(position(1))(position(0)) is None:
            available_spaces(position(1))(position(0)) = True

        # If there is a piece of the opposite colour in the space it is available, but further spaces are not
        elif grid.board_layout(position(1))(position(0))('colour') != self.colour:
            available_spaces(position(1))(position(0)) = True
            break

        # If there is a piece of the same colour in the space it is not available, neither are further spaces
        else:
            break

    # Check spaces below
    for y in range(self.grid_position(1) + 1, grid.rows):
        # Position to check
        position = (self.grid_position(0), y)

        # If there is nothing in the space it is available
        if grid.board_layout(position(1))(position(0)) is None:
            available_spaces(position(1))(position(0)) = True

        # If there is a piece of the opposite colour in the space it is available, but further spaces are not
        elif grid.board_layout(position(1))(position(0))('colour') != self.colour:
            available_spaces(position(1))(position(0)) = True
            break

        # If there is a piece of the same colour in the space it is not available, neither are further spaces
        else:
            break

    # Check spaces above
    for y in range(self.grid_position(1) - 1, -1, -1):
        # Position to check
        position = (self.grid_position(0), y)

        # If there is nothing in the space it is available
        if grid.board_layout(position(1))(position(0)) is None:
            available_spaces(position(1))(position(0)) = True

        # If there is a piece of the opposite colour in the space it is available, but further spaces are not
        elif grid.board_layout(position(1))(position(0))('colour') != self.colour:
            available_spaces(position(1))(position(0)) = True
            break

        # If there is a piece of the same colour in the space it is not available, neither are further spaces
        else:
            break

    return available_spaces

So, is there any way to simplify this by perhaps using another method to test what's in each gridspace? I'm just not sure how to do it.

Thank you for your help.

Variable definitions:

  • The grid Variable is just a class that contains information about it
    the current layout of the board and is responsible for the drawing of the parts
    in the right places.

  • grid.rows and grid.columns are integers that contain the dimensions
    of the board.

  • grid.board_layout is an array that contains a dictionary of the form
    {'piece': 'rook', 'colour': 'white'} where is there a piece and
    contains None where does not exist.

  • Rook.grid_position is a tuple with the grid coordinates of
    the piece.

unity – Unity3D: Moves the parent game object relative to the child

Enter image description here

So i have X and Y game objects, I have a vector Z = X - Y what is indicated by the green line.

I have one too Parent Game object and it has one Child Game object. How do I move the parent so that the child game object is in? Point Y

I tried,

                  Z -= new Vector3(child.localPosition.x, 0, child.localPosition.z);
                  Parent.transform.position = Z

that does not work as expected.
Thanks a lot!

Algorithms – Minimum number of moves to reach a grid point by a modified knight in a variant chessboard

I apologize if this is not the forum to post this question, but I am a cross posting from the Mathematics Forum. I'm dealing with a computer question that poses in https://math.stackexchange.com/questions/104700/minimum-number-of-moves-to-reach-a-cell-in-a-chessboard-by Question added -a knight for the variant of chess, which is placed in https://math.stackexchange.com/questions/710815/knight-move-variant-can-it-move-from-a-to-b. What is the number of minimum moves for a modified knight (name it ($ alpha, beta $) -knight) who moves with $ pm alpha $ and $ pm beta $ along the coordinates (instead of the usual $ ( pm 2, pm 1) $)) in any direction to reach a point $ (x, y) $ Starting from the origin (0,0)? That would mean we move away from here $ (x, y) $ to one of the following: (𝑥 ±$ alpha $±$ beta $), (𝑥∓$ alpha $±$ beta $), (𝑥 ±$ beta $±$ alpha $) or (𝑥∓$ beta $±$ alpha $). We can accept this without restriction of the general public $ x geq y $,

This is similar to the question asked in this forum: Knights on a chessboard. I would like to know if there is an answer in a closed form, rather than a solution that requires FSO, because I want to work with a chessboard (or coordinate grid) $ N times N $ from where $ N $ is big (z. $ 10 ^ 6 $).

My first considerations are as follows:

  1. Change the equation to either achieve that $ x $Axis or diagonal and the number of subsequent movements from the diagonal to the origin, as shown in https://math.stackexchange.com/questions/104700/minimum-number-of-moves-to-reach-a-zelle- in-a-checkered-of-a-knight.
  2. Solve this problem arithmetically with a repetition equation that can be solved with dynamic programming (which I think is greater)$ N $ in one $ N times N $ Chessboard for big $ alpha $ and big $ beta $this becomes insoluble). Would that be more practicable than the BFS solution in: Knight on a chessboard?
  3. Use the logic behind the proof given in https://math.stackexchange.com/questions/710815/knight-move-variant-can-it-move-from-a-to-b to provide an analytical solution for a find repetitive equation instead of trying to solve it by calculation.
  4. Graphical approach using the Dijkstra algorithm similar to the solution published in https://math.stackexchange.com/questions/1585538/chess-knight-move-in-8×8-chessboard. This in turn can be computationally intensive, unless this is solved with the help of sparse graphs.

Suggestions would be appreciated.

android – How to implement an onTap method for ListTile that moves away from ListView when typed?

I'd like to implement the onTap method for my ListTile so I can remove it by tapping. I can not think of another way than to extract the ListTile widget and pass the list as a parameter, but that will obviously lead to a circular reference.

sample code

List list = (
 ListTile( onTap: () { /*Remove itself from the list*/ }, title: /*sometext*/ ),
 ListTile( onTap: () { /*Remove itself from the list*/ }, title: /*sometext*/ ),
 ListTile( onTap: () { /*Remove itself from the list*/ }, title: /*sometext*/ ),
);

class SetupScreen extends StatefulWidget {
  @override
  _SetupScreenState createState() => _SetupScreenState();
}

class _SetupScreenState extends State {
@override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: Padding(
          padding: EdgeInsets.symmetric(horizontal: 7, vertical: 12),
          child: ListView.builder(
           itemCount: list.length,
           itemBuilder: (BuildContext context, int index) {
              return list(index);
           },
          ),
         ),
        ),
       };
}
}

I'm happy about every suggestion how to handle it

[WTS] Get powerful KVMSSD and XEN VPS plans

Are you looking for total flexibility to customize the performance of each VM?
https://cloudarion.com/service is the perfect solution.

Clou Darion has been a significant presence in the web hosting market since 2011. All our employees are internal and we are proud to operate our own networks and infrastructures. If you extend the power of KVMSSD and XEN VPS hosting to our high quality, you will receive a winning package. We have always been proud of our 99.9% availability of VPS systems.

check-Out Cloudarion KVMSSD VPS Hosting Packages:

KVMSSD1 VPS hosting plan
RAM – 1024 Mb
SSD – 10 GB
OS – CentOS, Debian, Linuxmint, Scilinux or Ubuntu.
Windows 2008 Server R2 Trial
Windows 2012 Server Trial
Price $ 10 / month – order now

KVMSSD2 VPS hosting plan
RAM – 2 GB
SSD – 20 GB
OS – CentOS, Debian, Linuxmint, Scilinux or Ubuntu.
Windows 2008 Server R2 Trial
Windows 2012 Server Trial
Price $ 20 / month – order now

KVMSSD4 VPS hosting plan
RAM – 4 GB
SSD – 30 GB
OS – CentOS, Debian, Linuxmint, Scilinux or Ubuntu.
Windows 2008 Server R2 Trial
Windows 2012 Server Trial
Location – De
Price $ 40 / month – order now

KVMSSD8 VPS hosting plan
RAM – 8 GB
SSD – 50 GB
OS – CentOS, Debian, Linuxmint, Scilinux or Ubuntu.
Windows 2008 Server R2 Trial
Windows 2012 Server Trial
Location – De
Price $ 80 / month – order now

KVMSSD16 VPS hosting plan
RAM – 16 GB
SSD – 100 GB
OS – CentOS, Debian, Linuxmint, Scilinux or Ubuntu.
Windows 2008 Server R2 Trial
Windows 2012 Server Trial
Location – De
Price $ 160 / month – order now

KVMSSD32 VPS hosting plan
RAM – 32 GB
SSD – 200 GB
OS – CentOS, Debian, Linuxmint, Scilinux or Ubuntu.
Windows 2008 Server R2 Trial
Windows 2012 Server Trial
Location – De
Price $ 320 / month – order now

Our hosting service combines the stability and reliability of Linux systems with the flexibility of Xen / KVM Distribution. If you are looking for a stable, strong hosting setup, this is your best bet.

Take a look at Cloudarion XEN VPS hosting Packages:

XenVps05 VPS Hosting Plan
RAM – 512 Mb
Hard disk – 15 GB
OS – CentOS, Fedora, Debian or Ubuntu
Location – Switzerland, Russia, USA or De
Price $ 7 / month – order now

XenVps1 VPS Hosting Plan
RAM – 1024 Mb
Hard disk – 25 GB
OS – CentOS, Fedora, Debian or Ubuntu
Location – Switzerland, Russia, USA or De
Price $ 10 / month – order now

XenVps2 VPS Hosting Plan
RAM – 2 GB
Hard disk – 50 GB
OS – CentOS, Fedora, Debian or Ubuntu.
Location – Switzerland, Russia, USA or De
Price $ 20 / month – order now

XenVps4 VPS Hosting Plan
RAM – 4 GB
HDD – 80 GB
OS – CentOS, Fedora, Debian or Ubuntu.
Location – Switzerland, Russia, USA or De
Price $ 40 / month – order now

XenVps8 VPS Hosting Plan
RAM – 8 GB
Hard drive – 150 GB
OS – CentOS, Fedora, Debian or Ubuntu.
Location – Switzerland, Russia, USA or De
Price $ 80 / month – order now

XenVps16 VPS hosting plan
RAM – 16 GB
HDD – 300 GB
OS – CentOS, Fedora, Debian or Ubuntu.
Location – Switzerland, Russia, USA or De
Price $ 160 / month – order now

XenVps32 VPS hosting plan
RAM – 32 GB
HDD – 500 GB
OS – CentOS, Fedora, Debian or Ubuntu.
Location – Switzerland, Russia, USA or De
Price $ 320 / month – order now

Accepted payment methods: Paypal, Payza, Bitcoin, WebMoney, Payoneer.

Hard drives are located in a redundant RAID 10 array to ensure the security of your data!
Local and Backup to Remote Server! Your VPS container resides on local RAID 10 storage arrays to ensure the fastest, most reliable storage architecture for your sites. The RAID 10 technology offers a remarkable increase in input / output operations per second (IOPS).

== >> check-Out Cloudarion.com Windows VPS Hosting Plans
== >> check-Out cloudarion.com Dedicated Servers

Need help? Contact with ours technical support,

https://cloudarion.com/

,