## SharePoint hosted app – valid app package always NO

While publishing a SharePoint hosted app file to the App catalog site it always shows

Valid App Package: No

And App Version is always 1.0.0.0.

I changed the version in `AppManifest.xml` from Visual Studio but still it shows in app catalog site as 1.0.0.0

Is there any way to make valid app package?

## Where and when did “the GM is always right” get codified first?

In a recent answer about GM-ming in D&D, I had to resort to a certain “universal” rule I’m familiar with: “the GM is always right”. Upon this doppelgreener correctly pointed out that it is not universal about all games but a/the core of the D&D mentality. In the chat then kviiri pointed out that “The GM is always right” is actually a pretty crap rule by itself. This “universal rule” also might have other names, like “Golden Rule” or “Rule 0”, but that is not part of the question.1

Now I wonder: Where and when did “The GM is always right” or rather “The GM has the final say in any question” actually got codified in an RPG for the first time?

This is not about when the GM is asked to improvise or to handle something akin to his own GM Fiat; it is about where such a statement was first mentioned in a print product explicitly or implicitly. It has been used in various variants as far as I know, and to various extents. Some examples of these “The GM is always right” statements:

• Hc Svnt Dracones, p5:

The Guide […]They also have the final call on rules disputes and typically control what stays and what goes if something seems out of line.

• Sengoku Revised Edition, p7:

The GM Rules – This is not a democracy. The GM is the boss. You should feel free to ask questions, but when a ruling is made, accept it.

• And in Paranoia 25th Aniversary Edition, p40 (and in this case the emphasis is not added):

GM Rule #1. You are IN CHARGE. You are ALWAYS RIGHT.

We give you these rules as guidance. Use them when you do not know what you’d like to have happen in the game. When you do know, ignore them. We have tried to make the rules as helpful and powerful as we can, but if you don’t like a rule, the rule is wrong. Good rules help a lot but bad rules were made to be broken, tortured, lobotomised and summarily executed. Dice are handy for giving players the illusion they control their destiny. This is valuable but roll your dice out of the players’ sight, behind a screen. If a die roll gives you a result you don’t like, the die is wrong. Change the result to the number you want. You can dock the die credits or beat it up, though in our experience this has little effect.

1 – I am fully aware that both Golden Rule and Rule 0 sometimes refer to “GM is right” and sometimes to “Have fun”.

## Is it always possible to retrieve data from a rewritable CD? And using partitioning and formatting discuss their forensic implications

Is it possible to retrieve data from a rewritable CD? Using partitioning and formatting discuss their forensic implications.

## current user is always is administrator on a SharePoint App

I have tried following solution to check the current user’s permissions on the current host web in a SharePoint hosted app, however the user is always administrator.

``function sharePointReady() {      hostweburl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));      appweburl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));       context = new SP.ClientContext.get_current();       hostWebContext = new SP.AppContextSite(context, hostweburl);       currentWeb = hostWebContext.get_web();      user = hostWebContext.get_web().get_currentUser();      context.load(user);      context.load(currentWeb, 'EffectiveBasePermissions');        context.executeQueryAsync(onAppReadySuccess, onAppReadyFailed); }  function onAppReadySuccess() {       alert(currentWeb.get_effectiveBasePermissions().has(SP.PermissionKind.fullMask)); } ``

## Should a retail web-site always return the same items for identical searches made by different users?

We supply a large number of products for purchase through our web-site. There is a new initiative to apply a third-party AI product to hijack searches to return products based on both the search term and predictions from browsing history and other people’s search history with successfully processed sales. If I now search for a keyword, I will get a different set of products returned than if someone else searches for the same thing. If I pass an URL of my search to a friend to compare the products, we will have different lists, so cannot discuss. The list, I find, changes day-to-day, on my own machine due to the AI’s suggestions.

Is this a design “no-no”?

Should the AI be solely used for recommendations and not for the core search results?

Is there any guideline to cite that makes suggestions on this?

I have also put this on: Software Recommendations

## Does a type-1 automaton always have to terminate?

For push-down automata it seems obvious to me that a program must always terminate (given the input is finite), because for each input symbol they advance until eventually they run out of symbols and then terminate.

The opposite is true for Turing machines as they read their input from the tape and are able to alter the position in the input string.

Linear bounded automata are basically Turing machines that have to operate on a bounded range on the tape. As far as I can see, that doesn’t prevent you from writing a program for such a machine that just toggles between two states infinitely and thus never terminates.

Is this assumption correct? And can we infer anything about the language an automaton is able to accept from the property if it must terminate eventually? I’m a bit confused about the fact that type-1 languages are a subset of the decidable languages, where the decidable languages require an always halting Turing machine, but I can’t find any such restriction for linear bounded automata.

## Is the Kleene star of an intersection always equal to the intersection of kleene stars?

I know that the Kleene star of an intersection contained in the intersection of Kleene stars, but are they necessarily equal?

For example, given two formal languages, A and B, does (A*∩B*) equal to (A∩B)*?

## Consider vectorization and list comprehension, is the time complexity always the same regardless which implementation is being used?

I am learning this post

Fast computation of nearest neighbors is an active area of research in machine learning. The most naive neighbor search implementation involves the brute-force computation of distances between all pairs of points in the dataset: for N samples in D dimensions, this approach scales as $$O[D N^2]$$.

Consider knn on iris dataset, which has 150 samples of 4 dimensions.

Here are 2 pieces of Python3 code.

code_1: vectorization

``(np.sqrt(np.sum(X*X,axis=1)[:, np.newaxis] - 2*np.dot(X,Y.T)               + np.sum(Y*Y,axis=1)[np.newaxis, :])).reshape((-1,)) ``

code_2: list comprehension

``[np.sqrt((X[0]-Y[0])**2 + (X[1]-Y[1])**2 +     (X[2]-Y[2])**2 + (X[3]-Y[3])**2) for Y in trainData] ``

Is the computational complexity always $$O[D N^2]$$ regardless which implementation is being used?

## PeoplePicker always inserts 1st person selected instead of array of each person selected

I’m trying build an array named visitorsIDs[] to get the values for a PeoplePicker in SharePoint API, but no matter who I pick in the peoplePicker, the id’s that are sent are always the id’s of the 1st person selected in the people picker. Any ideas what I’m doing wrong? I appreciate any help/suggestions…

``function resolvePeoplePickers() {   var peoplePicker = this.SPClientPeoplePicker.SPClientPeoplePickerDict.peoplePicker_TopSpan;  this.SPClientPeoplePicker.SPClientPeoplePickerDict.peoplePicker_TopSpan.OnUserResolvedClientScript = function (peoplePickerId, selectedUsersInfo) {  // Get information about all users.             var users = peoplePicker.GetAllUserInfo();             var userInfo = '';             for (var i = 0; i < users.length; i++) {                 var user = users[i];                 for (var userProperty in user) {                     userInfo += userProperty + ':  ' + user[userProperty] + '<br>';                 }             }             debugger;              var userloginbase = users[0].Key;             var userlogin = userloginbase.split("\");              var context = SP.ClientContext.get_current();             var newUser = context.get_web().ensureUser(xxxxxxx\' + userlogin[1]);             context.load(newUser);             context.executeQueryAsync(function () {                 //alert(newUser.get_title());             },                  function (sender, args) {                     //alert(args.get_message());                 });                 // pause for a second to let the async ensure user complete.                 setTimeout(function() {                       for (var i = 0; i < users.length; i++) {                          getAssignedToUserIdByEmail(users[0].EntityData.Email);                          visitorIDs.push(ResolvedToUser.Id);                      }                  }, 100);          };  ``

Adding this after my original post:

``function getAssignedToUserIdByEmail(email) {          \$  .ajax({             url: _spPageContextInfo.webAbsoluteUrl + '/_api/web/siteusers/getByEmail(%27' + encodeURIComponent(email) +  '%27)',             type: "GET",             async: false,             headers: {                 "accept": "application/json;odata=verbose",                 "content-type": "application/json;odata=verbose",                 "X-RequestDigest": \$  ("#__REQUESTDIGEST").val()             },             success: (function (data) {                 debugger;                 if (data.d && data.d.LoginName) {                     //alert(data.d.Id);                     ResolvedToUser = data.d;                 }             }),             error: (function (e) {                 alert("Something wrong happened. ");             })         });     }  ``