Adding userGroup to subsite in sharepoint online using javascript

I want to add a user group to sharepoint subsite using javascript. I have used follwing code and it added a user group to subsite(ABS). and it also added user group to the parent site(OMSTest) which is a root sitecollection. why is that?

function CreateUserGroups(url)   {        var siteUrl = 'https://xxxx.sharepoint.com/sites/OMSTest/ABS';     var context = new SP.ClientContext(siteUrl);     var currentWEB = context.get_web();          var membersGRP = new SP.GroupCreationInformation();        var membershipArray = [];       var collContribute = SP.RoleDefinitionBindingCollection.newObject(context);      var rdContribute = currentWEB.get_roleDefinitions().getByName("Contribute");       collContribute.add(rdContribute);         membersGRP.set_title("GROUPP1");       membersGRP.set_description("GROUPP1");       var oMembersGRP = currentWEB.get_siteGroups().add(membersGRP);      oMembersGRP.set_allowMembersEditMembership(false);     oMembersGRP.set_onlyAllowMembersViewMembership(false);        var assignments = currentWEB.get_roleAssignments();     var roleAssignment = assignments.add(oMembersGRP, collContribute);        oMembersGRP.update();       membershipArray.push(oMembersGRP);               context.load(membershipArray[membershipArray.length - 1]);       //clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded2), Function.createDelegate(this, this.onQueryFailed2));      context.executeQueryAsync(           function () {                     alert("Group Created Successfully");           },           function (sender, args) {                           alert("Failed to create groups " + args.get_message());                       }); } 

Overflow when adding multiple binary numbers

Perform the following binary operation assuming our resultant has a maximum of 8 bits: 00110110 + 01111001 – 00001100 Was there an overflow, a signed overflow, or no overflow? (a signed overflow occurs when a carry changes the sign bit. An overflow occurs when a carry goes beyond the available bits to store the result.) I was wondering how the computer works when adding multiple binary numbers and if the number is represented by 8-bits, will it be signed binary numbers or…?

Adding a search function to a lookup column?

Situation:

  • I have a list and a library.

  • The list has a lookup column that allows you to choose multiple documents from the library.

Problem:

  • The library has several hundred documents, so it’s very difficult to find the right document(s) to add to the list item.

Is there any way I can implement a search function above the list of documents so the list filters dynamically as I start typing the beginning of the document reference?

I have yet to find a proper solution to this problem and I need to avoid using SharePoint Designer for maintenance reasons if at all possible.

Is adding a prefix to an API token lowering it’s security

When creating API tokens, one can pick any format one likes. Many people choose to use SHA1/SHA256 of random bytes or just random characters.

I’m wondering how much of a security issue is to prefix the API key with a prefix “leaking” it’s use-case?

E.g. if I were to use SHA1 tokens I could do:

'myproj-refresh-'+sha1(random_bytes()). So that the resulting token will be myproj-refresh-123456789321654987abcd.

This allows me to

  1. detect the API key in code (and invalidate it)
  2. minimize the number of false-positives of such token

What I’m worried about is that if it leaks, it’s not just a random number, that can be anything, but rather a thing that has an obvious meaning. It’s a refresh token for “my project”.

Do you think it’s a viable trade-off or should it be prevented?

adding a sanskrit keyboard using the setxkbmap command in terminal?

I’m trying to find an efficient way to type the correct roman transliteration of Sanskrit characters. This is done using a special keyboard that allows one to type diacritic marks in unicode. Standard diacritic marks for Sanskrit are available in unicode. I can type this very efficiently on OSX on my Macintosh with no problems, using a keyboard called “Easy Unicode” created by Toshiya Unebe. There have been attempts made to mimic this for linux, as for example at https://garudam.info/sanskrit-transliteration-keyboard-on-linux/, but I have found that this code doesn’t work. There is an IAST unicode keyboard available for use with Ibus, but it’s quite buggy and seems to cause conflicts. I’ve tried a number of solutions over the years, looking for a good option. This is important to me since I am responsible for editing and translating books in Sanskrit and Bengali. There are keyboard options available for natively inputting these languages, but I have always found the best option inputting in Roman transliteration as above-mentioned. I want to be able to switch back and forth between an English and Romanized Sanskrit transliteration keyboard. I’ve also tried FCITx and different m17n but it seems to crash and/or create conflicts with Ibus. Thanks a lot for any suggestions.

Installing GalliumOS kernel, adding repo seems to fail

I’m a newbie to the Linux world, and trying to get a nice linux install on my Chromebook Pixel. This, it turns out, is not easy.

I’ve been trying to follow this guide:

How to install GalliumOS Kernel onto ubuntu installation Acer Chromebook 14

But when I get to the un-elaborated step “Add the GalliumOS repo”, I run:

sudo add-apt-repository "http://apt.galliumos.org/" 

I get

E: The repository ‘apt.galliumos.org bionic Release’ does not have a Release file. N: Updating from such a repository can’t be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

And then there is no /etc/apt/sources.list.d/galliumos.list to edit. I try to create a new one, but it wont let me place any files in that folder, and wont let me grant myself permission in it.

What am I doing wrong, here?

Adding a many to many relationship, and having a form input data into two lists

I’m building a form for a Marketing Event list. The list would track name/type/location/date etc of the event and also those people associated with it (for example recipients or attendees) These people would be pulled from an existing contacts list, selected by whoever is entering the data for the marketing event.

I want to create a separate table to join so I can create a many to many relationship (I understand this is possible through Parent/Child links?) There would be the Marketing Events table, the Contacts table, and an intermediate table that consists of a foreign key-type relationship to each.

Here’s where it gets tricky; for the user entering the marketing event, I’d love for them to be able to filter contacts based on criteria (ex. a column having a certain value) then be able to have this filtered list input into the intermediate table. For example, if the filter comes up with five people that fit the criteria, add those five people to the intermediate table, using the name from contacts and the event name from marketing events.

Failing that, I’d at least like to implement something in the form to choose multiple contacts and add them to the list. Of course, this also means the form would be inputting into two lists, unless I had two seperate forms.

Hopefully this makes sense. Is this possible in Sharepoint? Is it all a pipe dream?

Adding choice to field associated to Content Type

I have the following script :

$  site = new-object Microsoft.SharePoint.SPSite("http://TEST123") $  web = $  site.OpenWeb() $  ct=$  web.ContentTypes["MyCT"]   $  field = $  ct.Fields.GetFieldByInternalName("AddTESTColumn")                             $  ct.FieldLinks[$  field.id].DisplayName ="AddTESTColumn"      $  ct.Update(); 

I have used the above to update the display name of a column that is associated to CT.

But now I want to update a choice field column so will be adding a new choice “away” to the current choices tried to use the choices.add but keep getting error message