Problem with setting a direction for multiple entitys in a java game

I wan’t to give all of my gost entities a random direction, but I can’t figure out how

I’ve tried with just setting directionX to 1 but only one of the entities move. I don’t have to give them a random direction but it would be “cooler” to give them that rather then a static direction which they always follow.

    private GameScreen gs;      private boolean gameRunning = true;     private int fps;      private Entity player;      private Entity gost;      private ArrayList<Entity> entityList = new ArrayList<>();      private HashMap<String, Boolean> keyDown = new HashMap<>();      public void loadObjects() {         Image playerImg = new ImageIcon(getClass().getResource("/playerImg.png")).getImage();         Image gostImg = new ImageIcon(getClass().getResource("/gostImg.png")).getImage();          player = new Entity(playerImg, 100, 200, 200);         entityList.add(player);          gost = new Entity(gostImg, 224, 350, 10);         entityList.add(gost);          gost = new Entity(gostImg, 460, 20, 10);         entityList.add(gost);          gost = new Entity(gostImg, 624, 300, 10);         entityList.add(gost);          gost = new Entity(gostImg, 942, 550, 20);         entityList.add(gost);          gost = new Entity(gostImg, 520, 760, 30);         entityList.add(gost);     }     public void update(long deltaTime) {         checkCollisionandRemove();          if(keyDown.get("right")) {             player.setDirectionX(1);             player.setDirectionY(0);         }         else if(keyDown.get("left")){             player.setDirectionX(-1);             player.setDirectionY(0);         }          if(keyDown.get("up")) {             player.setDirectionY(-1);             player.setDirectionX(0);         }         else if(keyDown.get("down")) {             player.setDirectionY(1);             player.setDirectionX(0);         }            if(player.getX() < 0) {             player.setX(0);         }          if(player.getX() > gs.getWidth() -  player.getWidth()) {             player.setX(gs.getWidth() -  player.getWidth());         }          if(player.getY() < 0) {             player.setY(0);         }          if(player.getY() > gs.getHeight() -  player.getHeight()) {             player.setY(gs.getHeight() -  player.getHeight());         }            player.moveX(deltaTime);         player.moveY(deltaTime);         gost.moveX(deltaTime);         gost.moveY(deltaTime);      } 

I wan’t all of the gost entities to move, but only 1 moves if I set a direction

recover or reset BIOS setting

Alienware Aurora with Windows 10 preinstalled.

I was following, trying to install Linux on my Desktop. After changing SATA Operation from “RAID On” to “AHCI”, I couldn’t load into Windows, only to get INACCESSIBLE_BOOT_DEVICE error:

enter image description here

And after rebooting, it fails to load BIOS setting. Now I couldn’t load Windows not edit BIOS setting.

Now how do I do to recover/reset BIOS setting?

I can use both Windows and OS X, and 1 USB drive.

How to play Pathfinder in a future Earth setting? [on hold]

I am putting together a homespun world for my PCs to play Pathfinder in. Rather than being based on high fantasy, it is set in a future Earth, post-calamity setting. It has been several thousand years since the calamity, and vestiges of the old world remain: Remnants of technology, for instance… Books in ancient languages containing forgotten knowledge… And, somehow, magic has entered the world.

I would like to play in this setting, and I would like to leverage all of the Pathfinder rules that I have access to – but I want to refactor them so that they make sense in this world. I want to concentrate on building the world, leveraging the Pathfinder rules I already have access to and have invested in, while minimizing the required effort to do so. Any advice?

Setting up uWSGI Server Permissions

I’m looking to deploy virtual machines to run a single instance of Django REST framework. I would like to use uWSGI since it seems pretty light weight and can be configured with a single file. I have figured out most of the configuration, and have SSL running just fine. These VMs are being deployed with cloud-init, so the bulk is taken care of with minimal scripting. Everything else will be done via SSH.

My question is: where should I place my Django application, and what permissions should be set on that folder? What about uWSGI log and ini file locations? For reference, this is my ini file:

[uwsgi] shared-socket = :443 https = =0,fullchain.pem,privkey.pem,HIGH uid = vmuser gid = www-data chdir = /home/vmuser/project wsgi-file = project/ master=true processes = 4 threads = 2 daemonize = /home/vmuser/uwsgi_443.log safe-pidfile=/tmp/ check-static = /home/vmuser/webroot/ logfile-chown = true 

and this is what my home directory looks like that the moment. I think there are better locations for these files, but I don’t know where.

drwxrwxr-x 3 vmuser www-data     4096 Apr 11 20:53 app drwxrwxr-x 4 vmuser www-data     4096 Apr 11 23:23 project -rw-rw-r-- 1 vmuser vmuser       435  Apr 11 23:37 uwsgi_443.ini -rw-r----- 1 vmuser www-data     2247 Apr 11 23:40 uwsgi_443.log drwxrwxr-x 3 vmuser vmuser       4096 Apr 11 20:52 webroot 

Setting property bag values only set sporadic

We have created site design/script that trigger a function app. The function app set’s some property bag values:

var adminCtx = ClientContextExtension.GetAppContext("", Configuration.AppRegistrationId, Configuration.AppRegistrationKey, Logger); var tenant = new Tenant(adminCtx); tenant.SetSiteProperties(Site.Context.Url, noScriptSite: false); adminCtx.ExecuteQuery();                   Logger.WriteTrace("Ownership found in DB. Setting propertybag values", SeverityLevel.Verbose); Site.Context.Web.SetPropertyBagValue("forvaltning", KKOrg.Forvaltning); Site.Context.Web.SetPropertyBagValue("afdeling", KKOrg.Afdeling); Site.Context.Web.SetPropertyBagValue("kkorg", KKOrg.KKOrgNr); Site.Context.Web.Update(); Site.Context.ExecuteQueryWithIncrementalRetry(3, 5, Logger); 

This works around 3 out of 4 times. Around 25% of the time this code does not set the values in property bag. Any ideas what can cause this? I can see in the logging the code is executed. Is it the site design kicking in to early and then being overriden or?

Wake lock setting

I know that there is full wake lock setting in Android which prevents the screen from turning off. Also, there is a partial wake lock, by which the CPU runs in it’s full speed even if the screen is off.

So, my question is that, is there any setting by which the screen can be kept on without having the CPU running in full speed?
Actually, I want to make an app by which the phone’s screen can be used as a digital clock, and a clock can run even if the CPU isn’t running at full speed.
So, I want to conserve battery power by not waking up the CPU from doze. Is there anything like that in Android?

Setting up a launch daemon without an MDM

I have an install pkg I created that starts a system process named Company [being the name of where I’m at].

My network admins need a system process to scan for when a device tries to connect via VPN.

It’s to verify it’s a company asset. I wrote the ‘app’ and .plist for a launch daemon.

I need to create a pack that has my .pkg in it – but also moves the .plist to where it needs to go – and loads it right away.

I don’t know how to create a package that would include & move a .plist.

I don’t yet have the MDM running to use the Jamf functions. I have to deploy the installer either manually or through Apple Remote Desktop (ARD)

The script to load the launch file would be easy.

Google has not served me well