macos – How do I reset ios simulator in the given image back to original even after any number of rotations? Basically how to reset it back to normal

enter image description here

rotated simulator pic which has to be reset to normal. If it is in normal state then it turns left or right after my code gets called. How do i write an applescript to always reset it.

Below is my code for rotating it:

tell application "System Events"
      if menu bar item "Hardware" of menu bar 1 of application process "Simulator" exists then
        click menu item "Rotate Left" of menu 1 of menu bar item "Hardware" of menu bar 1 of application process "Simulator"
      else
        click menu item "Rotate Left" of menu 1 of menu bar item "Device" of menu bar 1 of application process "Simulator"
      end if
    end tell

Get original text of Common Creteria protection profile

In translated from english profile combined from couple of profiles(i found that one is Protection Profile for Application Software v1.2 of NIAP) I have something like "TOE security functions must provide for the preliminary initialization of variables and data structures when allocating RAM."
Could anyone tell me where can i find original text of this? With evaluation if possible.

Users are saving over a fillable template and wrecking the original

We have a template that users need to modify and return as an attachment but they are modifying the original and saving it which then leaves their info for the next user. How do we stop this? They do need to complete the form (so it can’t be read only) – but not save back over the original.

Thanks in anticipation

dnd 5e – Can the original form of a familiar be detected by Truesight?

Further to the question “How to determine if an animal is a familiar or a regular beast?”,
can the original form of a familiar be detected by Truesight?

PHB pg 185 includes the following in the description of Truesight:

“perceives the original form of a shapechanger or a creature that is
transformed by magic.”

PHB pg 240 includes the following in the description of the Find Familiar spell:

Appearing in an unoccupied space within range, the familiar has the
statistics of the chosen form, though it is a celestial, fey, or fiend
(your choice) instead of a beast.”

Where it gets more complicated is that also in the description of the Find Familiar spell, it indicates:

You gain the services of a familiar, a spirit that takes an animal
form you choose

I found this question “Is a soul or spirit a creature?” regarding creatures and spirits, but I don’t believe the answer addresses whether a spirit is a creature.

I also found this question “What exactly is a fey fiend celestial spirit?” regarding spirits, but again I don’t believe it addresses whether a spirit is a creature (although it is very long so I may have missed something).

However, MM pg 279 includes this in the description of the Specter (Wights and Wraiths also have references to being spirits):

A specter is the angry, unfettered spirit of a humanoid

Accordingly, has the celestial, fey or fiend been “transformed by magic”, and is its spirit a “creature”, such that its original form would be apparent to someone with Truesight?

When bitcoin forks, how do they decide which fork gets the original name?

One might think that the network maintaining the same consensus rules would be considered the original, and the project introducing a consensus rule change and thus creating a new network would be considered the derivative, but you’ve already pointed out an exception to that rule with the ETH DAO fork. Various arguments can be made why one or the other network should have been named ETH in that case. Similarly, with Bitcoin and Bitcoin Cash, proponents of Bitcoin Cash had attempted to claim the name Bitcoin for their own network.

Looking at a few fork events, the rule seems to rather be that the dominant fork gets to keep the name. However, it might not be obvious prior to a split which project will end up being recognized by the majority. In the advent of the Bitcoin Cash fork and the Segwit2x fork attempt, futures markets gave some indication how the public valued each proposal. Yet, in the end, it’s an emergent social phenomenon. Whatever “everyone” ends up calling Bitcoin is Bitcoin.

where on earth – Can an original of “The Great Wave off Kanagawa” be viewed in Japan?

According to the Wikipedia article for “The Great Wave off Kanagawa”, copies are stored in various places around the world.

There are various copies of this work throughout the world. The Metropolitan Museum of Art in New York,(30) the British Museum in London,1 the collection of Claude Monet in Giverny, France,(31) the Sackler Gallery,(32) the Guimet Museum(26) and the National Library of France(33) are some of the places where this work is on exposition. A collection of woodblock Thirty-six Views of Mount Fuji prints, contained in the wellness spa of the Costa Concordia was lost during the collision of the ship on January 13, 2012.(34)

Some private collections also have a copy, as is the case of the Gale collection in the USA.

This article (accessed May 14 2014) does not list one place I would expect – Japan! Is it possible to view this woodcut in Japan, or are all of the copies overseas?

great wave

edit: See answers below but there is an idea that there is no “original” because it’s a woodcut, the same way there is no “original” of a photograph because you can print many copies from a negative.

How to keep track of original property of object in C#?

So iam trying to make a Dhond’t Polling system . This explains what i am trying to make : https://www.bbc.co.uk/news/uk-politics-27187434 (pretty quick read) However I cant find a way in c# to be able to keep track of the original object property value while also being able to change the value after doing calculations on it.I am happy for anyone to tell me a different way of approaching this if I’ve done it wrong, I am very new to c#.

MAIN

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace Voting_System
{
    class Program
    {  
        static void Main(string() args)
        {
            // Establish the file path 
            string filepath = @"C:UsersmatheOneDriveDocumentsAll AssignmentsVoting Systeminputdata.txt";

            // Store values in a list of string
            List<string> file = File.ReadAllLines(filepath).ToList();

            // Puts each party into a list of Party and display Name + Votes
            List<Party> partys = new List<Party>();
            foreach (string line in file)
            {
                string() items = line.Split(',');
                Party p = new Party(items(0), Convert.ToInt32(items(1)));
                partys.Add(p);
            }

            // Ask user for thresh hold and also calculate total votes
            Console.WriteLine("What is the threshold for partys (%) ?");
            double threshold = Convert.ToDouble(Console.ReadLine());

            // Find total votes
            int totalVotes = 0;
            foreach (Party p in partys)
            {
                totalVotes += p.Votes;
            }
            Console.WriteLine($"nTotal No of votes combined for all partys 2020 : {totalVotes}");

            // Displays percent of votes for each party 
            foreach (Party p in partys)
            {
                if (p.PercentOfVotes(totalVotes) > threshold)
                {
                    Console.WriteLine(p);
                    Console.WriteLine(p.PercentOfVotes(totalVotes));
                }
            }
            
            // Finds party with highest votes
            Party biggestVotes = partys.Aggregate((v1,v2) => v1.Votes > v2.Votes ? v1 : v2);
            Console.WriteLine(biggestVotes);
            biggestVotes.Seats = 1;
            

            // Keeps console open
            Console.ReadLine();
        }
        
    }
}

PARTY CLASS

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Voting_System
{
    class Party
    {
        // properties for each party
        public string Name { get; set; }
        public int Votes { get; set; }
        public int Seats { get; set; }

        // Constructor for party class 
        public Party (string name,int votes,int seats=0)
        {
            Name = name;
            Votes = votes;
            Seats = seats;
        }

        // Returns percentage of votes for your party
        public double PercentOfVotes(double totalVotes) => (Votes / totalVotes) * 100;

        // When ever you print the object of this class return this
        public override string ToString()
        {
            return $"Name-{Name} Votes-{Votes} Seats-{Seats}";
        }

    }
}

VALUES IN THE DATA FILE

Brexit Party,452321,BP1,BP2,BP3,BP4,BP5;
Liberal Democrats,203989,LD1,LD2,LD3,LD4,LD5;
Labour,164682,LAB1,LAB2,LAB3,LAB4,LAB5;
Conservative,126138,CON1,CON2,CON3,CON4,CON5;
Green,124630,GR1,GR2,GR3,GR4,GR5;
UKIP,58198,UKP1,UKP2,UKP3,UKP4,UKP5;
Change UK,41117,CUK1,CUK2,CUK3,CUK4,CUK5;
Independent Network,7641,INET1,INET2,INET3,INET4,INET5;
Independent,4511,IND1;

20.04 – How can I view images smaller than the typical thumbnail size at their original size?

I’m using 20.04 and I’ve noticed something that I really don’t like about it: in Pictures, small images such as pixel art or icons are scaled-up as thumbnails. This is annoying because I remember using an older version of Ubuntu and it never had that issue: when the images were the same size as the thumbnails or smaller, they would render in the file manager at their actual size i.e. each pixel of the image would be shown as a pixel on screen. I don’t like having small pictures scaled-up and all blurry: it looks awful, and I actually find that images used as icons (like the ones used with html files so that your page has a tiny image on its tab) are actually harder to see correctly when they are scaled-up because aside from blur, you’re also looking at anti-aliasing at a scale where it doesn’t work.

Is there a way of configuring nautilus so that the thumbnails can be made from larger images scaled-down, but small images are not scaled-up? Or alternatively, if there isn’t a way of configuring nautilus to do this, is there another file manager where there is?

applications – Null image on firebase storage. How to save it original?

I have tried to solve an issue on my app but I couldn’t find a solution. I want the app to upload the images on Firebase Storage after the post is clicked. The problem is that when I click post the images are uploaded as .null and I can’t add them as posts on my app here is a photo of Firebase Storage:

enter image description here

Here is the code of PostsActivity:

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import android.app.ProgressDialog;
import android.content.ContentResolver;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.webkit.MimeTypeMap;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.example.selfcial.R;
import com.google.android.gms.tasks.Continuation;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.StorageTask;
import com.theartofdev.edmodo.cropper.CropImage;

import java.util.HashMap;

public class PostActivity extends AppCompatActivity {

    
    Uri imageUri;
    String myUrl;
    StorageTask uploadTask;
    StorageReference storageReference;

    ImageView close, image_added;
    TextView post;
    EditText description;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_post);

        close = findViewById(R.id.close);
        image_added = findViewById(R.id.image_added);
        post = findViewById(R.id.postPhoto);
        description = findViewById(R.id.description);


        storageReference = FirebaseStorage.getInstance().getReference("posts");

        close.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(PostActivity.this, MainActivity.class);
                startActivity(intent);
                finish();
            }
        });


        post.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                uploadImage();
            }
        });


        CropImage.activity()
                .setAspectRatio(1, 1)
                .start(PostActivity.this);

    }


    private String getFileExtension(Uri uri) {
        ContentResolver contentResolver = this.getContentResolver();
        MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();

        return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(uri));
    }


    private void uploadImage() {
        ProgressDialog progressDialog = new ProgressDialog(this);
        progressDialog.setMessage("Posting please wait..");
        progressDialog.show();


        if (imageUri != null) {
            StorageReference fileReference = storageReference.child(System.currentTimeMillis()
            + "." + getFileExtension(imageUri));

            uploadTask = fileReference.putFile(imageUri);
            uploadTask.continueWithTask(new Continuation() {
                @Override
                public Object then(@NonNull Task task) throws Exception {
                    if (task.isSuccessful()) {
                        throw task.getException();
                    }

                    return fileReference.getDownloadUrl();
                }
            }).addOnCompleteListener(new OnCompleteListener<Uri>() {
                @Override
                public void onComplete(@NonNull Task<Uri> task) {
                    if (task.isSuccessful()) {
                        Uri downloadUri = task.getResult();
                        myUrl = downloadUri.toString();

                        DatabaseReference reference = FirebaseDatabase.getInstance().getReference("posts");

                        String postId = reference.push().getKey();

                        HashMap<String, Object> hashMap = new HashMap<>();
                        hashMap.put("postId", postId);
                        hashMap.put("postImage", myUrl);
                        hashMap.put("description", description.getText().toString());
                        hashMap.put("publisher", FirebaseAuth.getInstance().getCurrentUser().getUid());

                        reference.child(postId).setValue(hashMap);

                        progressDialog.dismiss();

                        startActivity(new Intent(PostActivity.this, MainActivity.class));
                        finish();
                    }else {
                        Toast.makeText(PostActivity.this, "Failed.", Toast.LENGTH_SHORT).show();
                    }
                }
            }).addOnFailureListener(new OnFailureListener() {
                @Override
                public void onFailure(@NonNull Exception e) {
                    Toast.makeText(PostActivity.this, ""+e.getMessage(), Toast.LENGTH_SHORT).show();
                }
            });
        }else {
            Toast.makeText(this, "No image selected.", Toast.LENGTH_SHORT).show();
        }
    }



    @Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE && resultCode == RESULT_OK) {
            CropImage.ActivityResult result = CropImage.getActivityResult(data);
            imageUri = result.getUri();

            image_added.setImageURI(imageUri);
        }else {
            Toast.makeText(this, "Something gone wrong", Toast.LENGTH_SHORT).show();
            startActivity(new Intent(PostActivity.this, MainActivity.class));
        }
    }
}

I thought that I have to initialize Uri inside onCreate method but nothing changed. What should it be? It shows on a Toas Failled and then Throw a null exception.