Add JavaScript to every page of particular site-collection in SharePoint Online

I have seen This Post, It works for me but I want to add Javascript code to all SharePoint sites of particular site Collection. Is it possible add Javascript code to all the sites and sub-site of the particular site-collection?

FYI

I’m using SharePoint Online. To add Javascript code into Current Site, I have used UserCustomActions to add Javascript code in all the Pages of the current SharePoint site.

Do Stephen Wolfram and Gerard ‘t Hooft propose that literally every Cellular Automata is a universe?

Both Stephen Wolfram and nobel laureate Gerard ‘t Hooft think that the universe is a Cellular Automata.

As far as I know, ‘t Hooft developped a series of frameworks to build different models of Cellular Automata and Wolfram also proposed a framework where network nodes could produce different Cellular Automata universes.

Both of them proposed specific models of Cellular Automata to describe our universe (or rather they are working in a Cellular Automata description that can be applied entirely to our universe), but since they proposed a framework to create different Cellular Automata models, this makes me think that these authors think that literally every type of Cellular Automata correspond to a universe.

For example, apparently Stephen Wolfram in his book “A New Kind Of Science”, chapter 9, he defines a series of network nodes that could be capable of reproducing all models of cellular automata. But I am not sure about this and I would need someone that knows better this field to confirm this to me

So, does anyone here know of this is correct? Does anyone here know these works well enough to tell me if these physicists think that every Cellular Automata model corresponds to a universe?

How to balance one Long Rest every 24 hours

Coming from this question: Typically, how many combat encounters should a low-level party have before they are expected to take a long rest?

I realized even while using published adventure modules that set encounter-pacing and encounter-difficulty in a dungeon or ‘scenario’ of several encounters in a row, nowhere does the adventure say “This might be a good time for a long rest.”

The rules say a creature can only benefit from one Long Rest per 24 hour period – preferably at the end of an adventuring ‘day’ (these often happen at night or in places where the time of day is not relevant).

Let us take the Dragon Hatchery from Hoard of the Dragon Queen for example. There are 10+ rooms with about 1 encounter per room and there is potential for roaming monsters to find the party. It is my assumption that this entire map is meant to be run-through in one go between the Long Rest they took yesterday and the Long Rest they will take the night after clearing the Hatchery. Yet after 5 – 6 combats in, they have already used up their resources.

If the intended frequency is obviously one Long Rest per day, then why am I finding the group almost always needs a long rest several hours before the rules say that they can benefit from one?

Can we find every 216 digit number combination? [on hold]

This question popped to my head when I watched Pi where the mathematican told the Jews “Didnt you calculate every 216 digit number allready?”

So I want to find every possible 216 digit number possible.

Here is an example

001234686486484642341234567876345675433586484545856856752856846845685468523253523253253623547568768786858866567895445665446654600912323131231547568568568823568658561223133257857857131233118765432100542533525223552000 

What I want.

A computer that finds 216 digit numbers and puts them on hard storage.

How long would it take with todays computers like IBM Summit? How much storage would be required to store all these numbers? And also how much data storage would be needed to store all these numbers with an index system? Like Index No 547 is

235346098435790863409863405364908736409364235253348902340983548796439082409348974369807324354364398706430253435354925364545685634754865498769675222321214241526343987230544533604234234236409340983543534460534523253532 

Add a new column to a dataframe with the percentage of every value of this dataframe

I have the dataframe below and I would to add a new column with the percentage of every value of this dataframe. Something like:

name<-c("asdad","dssdd") number<-c(5,5) df<-data.frame(name,number)  for (i in 1:nrow(df)){ percentage<-df[i,1]/sum(df$  number) }  new<-cbind(df, percentage) 

but I get NAs instead of percentages.

How to get every element from JSONArray

Here is the JSONArray

{      "states":[         {            "state":"Andhra Pradesh",          "districts":[               "Anantapur",             "Chittoor",             "East Godavari",             "Guntur",             "Krishna",             "Kurnool",             "Nellore",             "Prakasam",             "Srikakulam",             "Visakhapatnam",             "Vizianagaram",             "West Godavari",             "YSR Kadapa"          ]       } } 

I want to get all the elements from “districts” array and add them into a ArrayList.

String jsonFileContent = loadJSONFromAsset();         try {             JSONObject jsonObjectStates = new JSONObject(jsonFileContent);             JSONArray jsonArray = jsonObjectStates.getJSONArray("states");             for ( int i=stateno; i<=stateno; i++){                 JSONObject jsonArrayJSONObject = jsonArray.getJSONObject(i);                 JSONArray jsonArrayCities = jsonArrayJSONObject.getJSONArray("districts");                  for(String s: jsonArrayCities)                    Log.e("Here", jsonArrayCities.toString());              }         } catch (JSONException e) {             e.printStackTrace();         } 

I get the Whole array of cities in the jsonArrayCities object.

What i want to do is to get every single city as a element and add it to ArrayList.