How to manage game-object script component and values in new updated model in unity

I have a large object that contains so many gameobject (the fbx) and it attached several mono behaviour script with different values assigned publicly in inspector. Now the problem is each time we update the model in project (FBX in project) we have to drag and drop the model/FBX again. It means that we have to attach all the scripts again with the relevant values/Data. I am currently looking for right way to do this job. Currently I place both new and old fbx in the scene and then one by one i copy paste the old object’s script component into new object. Then i delete the old one object/model/fbx.

Note: I have bring the fbx again in hirarachy because sometime the object not properly update in the scene.

Find Integer Values Occurring more than Half of the Time [on hold]

I need help finding an algorithm.

I have been tasked with identifying the integer that accounts for more than half of the values in a given array. Additionally, I have been asked to submit versions of such an algorithm that differ in their complexity. I have initialized a short, test-case array, but am unsure of how to iterate over it in a way that will identify and print a value that accounts for more than half of array a[]’s elements.

What algorithms would identify such an element? It would be nice to include an optimal algorithm, and since I am asked for an algorithm with a different time complexity as well, it would be good to include one non-optimal algorithm.

Passing Function Calls vs. Values as Arguments

I tried writing code for a program that evaluates an inline expression using an operand stack (nstack) and an operator stack (ostack):

#include<stdio.h> #include<stdlib.h> #include<string.h> int nstack[10]; //the operand stack char ostack[10] = "E"; //the operator stack with 'E' as the sentinel int ntop = -1; //top value of operand stack int otop = 0;  //top value of operator stack  //Function Declarations void opush(char op); int npop(); void npush(int a); int opop(); char o; int precedence(char op); void evaluate(); void tokenizer(char c); int result(int j, char o, int i); //Calculates the result of i (o) j  void npush(int a){ //Operand Push     nstack[++ntop] = a; }  int npop(){ //Operand Pop     return nstack[ntop--]; }  int opop(){ //Operator Pop     return ostack[otop--]; }  void opush(char op){ //Operator Push     while (precedence(op) <= precedence(ostack[otop])){             //keep popping the operator(s) and evaluate their results (while the operands are being popped as well) until the condition turns false              int x = npop(); int y = npop(); char o = opop();              // **************LINE 1*******************             npush(result(x, o, y));               *************LINE 2***********************             //npush(result(npop(), opop(), npop()));      }     ostack[++otop] = op;  }  int precedence(char op){ //function 5     if(op == '+' || op == '-')         return 1;     else if (op == '*' || op == '/')         return 2;     else          return 0; //sentinel case }  int result(int x, char o, int y){ //for an operation y op x i.e. reverse order     switch(o){         case '+': return y + x;         case '-': return y - x;         case '*': return y * x;         case '/': return (y / x);     } }  void stackInput(char c){ //Pushes operators to ostack and operands to nstack     int val = c - '0';      //if an integer     if (val >= 0 && val < 10){          npush(val);     }      //else, an operator     else{          opush(c);     } }  void evaluate(){     while(otop!=0){         int x = npop(); int y = npop(); char o = opop();         npush(result(x, o, y));         //npush(result(npop(), opop(), npop()));     } }   void main() {     char expr[10] = "8/1/2";     int i;     for (i = 0; i< strlen(expr); ++i){     stackInput(expr[i]);     } evaluate(); printf("Result = %d", nstack[0]); } 

When I run the code by using function calls as arguments for the function result(), I get a floating point exception. On the other hand, when I save the popped values in separate variables and pass them as arguments to result(), I do get the expected output.

I would appreciate if someone could explain the anomaly. Generally, we would expect the values to be passed in order (which I came to realize doesn’t happen when I passed function calls and tried printing the received values).

Forgive me if this question is off-topic here. I believe it isn’t since the question is about what happens inside during execution.

When I am uploading a Word Document in Document Library – Custom Columns values are getting blank

I have uploaded the Word document on SharePoint Document Library (Modern Site), my Library has following columns:

  • Title

  • ADDS

  • LBB

  • Category

Step 1: After uploading the file for the first time, I have filled the values in these columns on SharePoint.

Step 2: Again, I have uploaded the same file, now above columns values got blank.

Issue with Title > I can understand this…. Title is MS Word property as well and it will be overwritten (As per this – Document Properties not carry to new version).

But why my other custom columns values are getting blank???

Note: This issue is coming only for MS Office files (DOC, PPT, XLS, etc.). However it’s working as expected for other file formats – .pdf, .jpg, .zip, etc

Update multiple choice field values using Flow

Is there any way of removing multiple-choice field values from a specific column using Microsoft flow?

The logic behind the columns is given below. Once A is completed, move to B and once B is completed, move to C and once C is completed, move to D which works perfectly, however, how can I block the last column B if the user has chosen blocked?

Using the formula below, the user can change the last flow “completed” into “to do” and modify the previous states. However in my requirement, once the last step has been chosen as “blocked” I want to disable the user to change it back into “to do” and modify the previously completed states.

=AND(OR([B]="to do"; [A]="completed");  OR([C]="to do";[B]="completed");  OR([D]="to do";[C]="blocked");  O([D]<>"")) 

As an alternative, I’m thinking of triggering a flow such as if the user chooses blocked, remove all other multiple-choice values except blocked so user will not be able to change it into “to do” in order to make modifications to the previous states so it will be automatically locked.

Thanks.

How to distribute values evenly when having several independent variables?

I am doing a research study with teens. Previously, I have already recruited and studied, let’s say, 11 teens (with various ages, gender, and ethnicity). Additionally, I am planning to recruit 10 teens. However, I need to try to go for diversity which means I need to distribute those 10 participants I want to recruit more or less evenly considering their gender, age, and ethnicity and based on the teens I have already studied. Is there any statistical methods that I can apply in this case?

How do you populate people picker column data with multiple values using email via JavaScript?

I’m using SharePoint 2013, my people picker column is set to accept multiple values.

I am able to post to a list item and add a single person to the column using the following method:

function updatePeopleColumn(listName, itemID) {     var siteUrl = _spPageContextInfo.webServerRelativeUrl,         clientContext = new SP.ClientContext(siteUrl),         currentWeb = clientContext.get_web(),         oList = currentWeb.get_lists().getByTitle(listName),         userObj = currentWeb.get_siteUsers().getByEmail('email@ddress.com');      this.oListItem = oList.getItemById(itemID);      oListItem.set_item('People', userObj);      oListItem.update();      clientContext.load(oListItem);     clientContext.executeQueryAsync(Function.createDelegate(this, this.onPeopleQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); }  function onPeopleQuerySucceeded(sender, args) {     console.log('Person added to People.', sender, args); }  function onQueryFailed(sender, args) {     console.log('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace()); }  updatePeopleColumn('ListName', 99999); 

What I have not been able to do is gather multiple people using currentWeb.get_siteUsers().getByEmail(’email@ddress.com’), adding those to an array and passing that value to the column, like so:

function updatePeopleColumn(listName, itemID, emailAddresses) {         var siteUrl = _spPageContextInfo.webServerRelativeUrl,             clientContext = new SP.ClientContext(siteUrl),             currentWeb = clientContext.get_web(),             oList = currentWeb.get_lists().getByTitle(listName),             users = [],             i;          for (i = 0; i < emailAddresses.length; i++) {             var userObj = currentWeb.get_siteUsers().getByEmail(emailAddresses[i]);              users.push(userObj);         }          this.oListItem = oList.getItemById(itemID);          oListItem.set_item('People', users);          oListItem.update();          clientContext.load(oListItem);         clientContext.executeQueryAsync(Function.createDelegate(this, this.onPeopleQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));     }      function onPeopleQuerySucceeded(sender, args) {         console.log('People added to People.', sender, args);     }      function onQueryFailed(sender, args) {         console.log('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());     } updatePeopleColumn('ListName', 99999, ['email@ddress.com', 'email2@ddress.com']); 

So how do I pass multiple values to the people column using emails?

How to propagate values into wiki pages

We are using SP2016 on-premise. Our users would like to use wiki page library to build some report pages. It is good because wiki pages are easily modify, they can insert a table or add some cells whatever they want.

One of the requirement is we have stored some information in another list in the same site. How can we propagate the values from the list on the wiki page? We can insert the list as a webpart. However the format is not flexible.

For example, the list contain the start date and end date of a task. After propagate to the wiki page, user can modify the value and save the wiki page, without modify the actual list.

How can we do it? We can apply powershell, workflow or page layout solution. (we have tried create a custom page layout, the problem is end users are not free to modify the format)

How to propagate values into wiki pages

We are using SP2016 on-premise. Our users would like to use wiki page library to build some report pages. It is good because wiki pages are easily modify, they can insert a table or add some cells whatever they want.

One of the requirement is we have stored some information in another list in the same site. How can we propagate the values from the list on the wiki page? We can insert the list as a webpart. However the format is not flexible.

For example, the list contain the start date and end date of a task. After propagate to the wiki page, user can modify the value and save the wiki page, without modify the actual list.

How can we do it? We can apply powershell, workflow or page layout solution. (we have tried create a custom page layout, the problem is end users are not free to modify the format)