Adding userGroup to a subsite in SharePoint Online with javascript help

I want to add a group of users to a sharepoint subsite using javascript. I used the following code and he added a group of users to the subsite (ABS). and he also added a group of users to the parent site (OMSTest), which is a collection of root sites. why is that?

function CreateUserGroups(url)  

    var siteUrl = '';
    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");  

    var oMembersGRP = currentWEB.get_siteGroups().add(membersGRP);


    var assignments = currentWEB.get_roleAssignments();
    var roleAssignment = assignments.add(oMembersGRP, collContribute);


    context.load(membershipArray(membershipArray.length - 1));  
    //clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded2), Function.createDelegate(this, this.onQueryFailed2));

        function () {       

            alert("Group Created Successfully");  
        function (sender, args) {             

            alert("Failed to create groups " + args.get_message());              

ios – Adding lives to a game made with fast

I would like to add lives to an exercise game that I do. The declaration and code would be:

We need to add to the game the characteristic of the lives in the game. We will make sure that our character has 3 lives in each game. If we collide, we will start again, but we will deduce a life from the character. So, up to 3 and once we finish our life, the GameOver message will appear. As long as we have lives, the score will increase so that if we collide a first time, we will continue with the same points we had before and so on in each life until the 3 are exhausted .

The code would be as follows:

import SpriteKit
import GameplayKit

class GameScene: SKScene, SKPhysicsContactDelegate {

    enum Colisiones: UInt32 {

    case Pajaro = 1
    case Objeto = 2
    case Brecha = 4


    var gameOver = false

    var pajaro = SKSpriteNode()
    var fondo = SKSpriteNode()
    var tubo1 = SKSpriteNode()
    var tubo2 = SKSpriteNode()
    var puntuacionLabel = SKLabelNode()
    var puntuacion = 0
    var gameOverLabel = SKLabelNode()
    var timer = Timer()
    var play = false

    @objc func  crearTubos(){

        //Añadir Tubos
        let brechaAltura = pajaro.size.height * 4

        //Añadir random a los tubos
        let movimiento = arc4random() % UInt32(self.frame.height / 2)
        let tuboFuera = CGFloat(movimiento) -
        self.frame.height / 4

        //Añadir movimientos a los tubos
        let  moverTubos = SKAction.moveBy(x: -2 * self.frame.width, y: 0, duration: TimeInterval(self.frame.width/100))

        //Añadir Tubo1
        let tubo1Textura = SKTexture(imageNamed: "tubo2.png")
        tubo1 = SKSpriteNode(texture: tubo1Textura)
        tubo1.position = CGPoint(x: self.frame.midX + self.frame.width, y: self.frame.midY + tubo1Textura.size().height/2 + brechaAltura/2 + tuboFuera)
        tubo1.physicsBody = SKPhysicsBody(rectangleOf: tubo1.size)
        tubo1.physicsBody?.isDynamic = false
        tubo1.physicsBody?.collisionBitMask = Colisiones.Objeto.rawValue
        tubo1.physicsBody?.contactTestBitMask = Colisiones.Objeto.rawValue
        tubo1.physicsBody?.categoryBitMask = Colisiones.Objeto.rawValue
        tubo1.zPosition = -1


        //Añadir Tubo2
        let tubo2Textura = SKTexture(imageNamed: "tubo1.png")
        tubo2 = SKSpriteNode(texture: tubo2Textura)
        tubo2.position = CGPoint(x: self.frame.midX + self.frame.width, y: self.frame.midY -
        tubo1Textura.size().height / 2 - brechaAltura / 2 + tuboFuera)
        tubo2.physicsBody = SKPhysicsBody(rectangleOf: tubo2.size)
        tubo2.physicsBody?.isDynamic = false
        tubo2.physicsBody?.collisionBitMask = Colisiones.Objeto.rawValue
        tubo2.physicsBody?.contactTestBitMask = Colisiones.Objeto.rawValue
        tubo2.physicsBody?.categoryBitMask = Colisiones.Objeto.rawValue
        tubo2.zPosition = -1


        //Crear brecha

        let brecha = SKNode()
        brecha.position = CGPoint(x: self.frame.midX + self.frame.width, y: self.frame.midY + tuboFuera)
        brecha.physicsBody = SKPhysicsBody(rectangleOf: CGSize(width: tubo1Textura.size().width, height: brechaAltura))
        brecha.physicsBody!.isDynamic = false
        brecha.physicsBody?.collisionBitMask = Colisiones.Brecha.rawValue
        brecha.physicsBody?.contactTestBitMask = Colisiones.Pajaro.rawValue
        brecha.physicsBody?.categoryBitMask = Colisiones.Brecha.rawValue



    override func didMove(to view: SKView) {

        self.physicsWorld.contactDelegate = self



    func setupGame() {

        // Añadir fondo
        let fondoTextura = SKTexture(imageNamed: "fondo")

        let animacion1 = SKAction.moveBy(x: -fondoTextura.size().width, y: 0, duration:7)
        let animacion2 = SKAction.moveBy(x: fondoTextura.size().width, y: 0, duration: 0)
        let movimientoFondo = SKAction.repeatForever(SKAction.sequence((animacion1, animacion2)))

        var i: CGFloat = 0

        while i < 3 {

            fondo  = SKSpriteNode(texture: fondoTextura)
            fondo.position = CGPoint(x: fondoTextura.size().width *
            i, y: self.frame.midY)
            fondo.size.height = self.frame.height
            fondo.zPosition = -2
            i += 1


        // Añadir pajaro
        let pajaroTextura1 = SKTexture(imageNamed: "pajaro1")
        let pajaroTextura2 = SKTexture(imageNamed: "pajaro2")
        let animacionPajaro = SKAction.animate(with: (pajaroTextura1,
            pajaroTextura2), timePerFrame: 0.1)
        let movimientoPajaro = SKAction.repeatForever(animacionPajaro)

        pajaro = SKSpriteNode(texture: pajaroTextura1)
        pajaro.position = CGPoint(x: self.frame.midX, y: self.frame.midY)
        pajaro.physicsBody = SKPhysicsBody(circleOfRadius:
        pajaro.physicsBody!.isDynamic = false

        //Categorias con las que va a chocar
        pajaro.physicsBody!.collisionBitMask = Colisiones.Pajaro.rawValue
        pajaro.physicsBody!.contactTestBitMask = Colisiones.Objeto.rawValue
        pajaro.physicsBody!.categoryBitMask = Colisiones.Pajaro.rawValue


        //Crear suelo
        let suelo = SKNode()
        suelo.position = CGPoint(x: self.frame.midX, y: -self.frame.height/2)
        suelo.physicsBody = SKPhysicsBody(rectangleOf: CGSize(width: self.frame.width, height: 1))
        suelo.physicsBody?.isDynamic = false
        suelo.physicsBody?.collisionBitMask = Colisiones.Objeto.rawValue
        suelo.physicsBody?.contactTestBitMask = Colisiones.Objeto.rawValue
        suelo.physicsBody?.categoryBitMask = Colisiones.Objeto.rawValue


        //Añadir puntuacion Label
        puntuacionLabel.fontName = "Helvetica"
        puntuacionLabel.fontSize = 40
        puntuacionLabel.text = "0"
        puntuacionLabel.position = CGPoint(x: self.frame.midX, y: self.frame.height / 2 - 110)

        //Contador de vidas


    func didBegin(_ contact: SKPhysicsContact) {

        if !gameOver{

            if contact.bodyA.categoryBitMask == Colisiones.Brecha.rawValue || contact.bodyB.categoryBitMask == Colisiones.Brecha.rawValue {

                puntuacion += 1
                puntuacionLabel.text = String(puntuacion)


                // Añadir game Over label

                gameOverLabel.fontName = "Helvetica"
                gameOverLabel.fontSize = 40
                gameOverLabel.text = "Game Over! Pulsa para comenzar"
                gameOverLabel.position = CGPoint(x: self.frame.midX, y: self.frame.midY)
                self.speed = 0
                gameOver = true
                play = false


    override func touchesBegan(_ touches: Set, with event: UIEvent?) {

        if !gameOver{

            if !play{

            //Añadir repeticion de los tubos

                timer = Timer.scheduledTimer(timeInterval: 3, target: self, selector:
                    #selector(GameScene.crearTubos), userInfo:nil, repeats: true)
                play = true


            pajaro.physicsBody?.velocity = CGVector(dx: 0, dy: 0)
            pajaro.physicsBody?.applyImpulse(CGVector(dx: 0, dy: 70))
            pajaro.physicsBody?.isDynamic = true

        } else {
            puntuacion = 0
            self.speed = 1
            gameOver = false



    override func update(_ currentTime: TimeInterval) {



react – Problem transmitting a value entered in TextField in SPFx and adding it to a SharePoint list

I'm doing a little project there, I want to add tulips to a SharePoint list using SharePoint Framework with React.

I use Textfield and so UI Fabrics and PnPJs to get data from lists and so on. It works well to add hard-coded states when you click the "ADD" button does not work when you try to enter a value from the text field.

Here's what the application looks like now:
enter the description of the image here

Here is the code:


import * as React from 'react';
import styles from './EnfokamTulips.module.scss';
import { IEnfokamTulipsProps } from './IEnfokamTulipsProps';

import AddTulips from './AddTulips'

export default class EnfokamTulips extends React.Component {
  public render(): React.ReactElement {
    return (
); } }


import * as React from 'react';
import { TextField } from 'office-ui-fabric-react/lib/TextField';
import { DefaultButton } from 'office-ui-fabric-react';
import { sp, ItemAddResult } from '@pnp/sp';

export interface IEnfokamTulipsState {
    title: string;
    manufacturingCost: number;

this.state = {
    title: 'book',
    manufacturingCost: 2

function addTulipsToList(event) {

    // get all the items from a list
    sp.web.lists.getByTitle("Tulips")"Title").get().then((items: any()) => {

// add an item to the list
        Manufacturing_x0020_cost: //Internal name of column
        }).then((iar: ItemAddResult) => {

let addTulips = (event) => {
) } export default addTulips;


export interface IEnfokamTulipsProps {
  description: string;

export interface IEnfokamTulipsState {
  title: string;
  manufacturingCost: number;

export interface TulipsLists{
  value: TulipsList();
export interface TulipsList{
  Title: string;
  Manufacturing_x0020_cost: number; 

The only thing that happens when I click on the "Add" button is this:
enter the description of the image here

All data in each column is empty.
What am I doing wrong?
What I want is that no matter what I type in the text fields, I want to pass it and show it in the list when I click on "ADD".

Any help is appreciated.

customization – Adding a file extension to the wp_get_attachment_image_srcset () function

The wp_get_attachment_image_srcset () function provides information about the srcset of an image.

Is it possible to write a seperate function to add an additional extension (.webp)?

Exit the wp_get_attachment_image_srcset () function:

" 768w, 500w"

Output of the new function with the extension ".webp":

" 768w, 500w"

Thank you for your help!

Adding additional IP addresses to AWS Lightsail

Adding additional IP addresses to AWS Lightsail | Talk Web Hosting

& # 39;);
var sidebar_align = & # 39; right & # 39 ;;
var content_container_margin = parseInt (& # 39; 350px & # 39;);
var sidebar_width = parseInt (& # 39; 330px & # 39;)
// ->

  1. Adding additional IP addresses to AWS Lightsail

    How can I add additional IP addresses to my VPS at AWS Lightsail?

Similar wires

  1. answers: 5

    Last post: 10-15-2017, 9:02

  2. answers: 1

    Last post: 02-08-2005, 1:55 p.m.

  3. answers: 1

    Last post: 02-01-2002, 7:36 p.m.

  4. answers: 0

    Last post: 10-02-2001, 7:09 p.m.

  5. answers: 0

    Last post: 10-02-2001, 7:09 p.m.

Authorizations to publish

  • You Maybe not post new discussions
  • You Maybe not post answers
  • You Maybe not post attachments
  • You Maybe not edit your posts

Adding a line to the beginning of a giant text file

I have a very large file (~ 60GB) of text

I want to add a single line at the beginning of the file but I could not open it (yes, because it's very big)

Is there a way to do it on Windows?

SQL Server – Availability Group Notification When Adding a New Database

When a new database is added to the SQL Server AG configuration, a notification email as below is sent to us.

The availability group database "XXXX" changes the roles from "SECONDARY" to "SECONDARY" because the mirroring session or the availability group failed because of role synchronization. It is only an information message.

What is confusing is the sentence

"change the roles of" SECONDARY "to" SECONDARY "…"

  1. Can any one please decode the meaning of it?
  2. Is it normal that a notification of this type be sent when adding new DBs or do I do it wrong or any other problem?

– In thoughts & # 39; …

javascript – Adding an animation to the carousel to scroll from right to left and vice versa

Hello friends developers, I have a carousel similar to bootstrap which contains 4 elements. I detect by JavaScript that I click on the next or back arrow, I hide the last or the first element and leave me visible only in this case. Remaining This would produce the following effect: (1,2,3) … (2,3,4) … (3,4,5) … (4,5,6) … This is achieved by alternating the internal division carousel and using the properties display: block and none. It is also possible that for the value of a variable, I can choose the number of div that I will view. Until now, everything works fine, what I want and what I still need, is to add a transition to drag the divs from right to left and vice versa.

HTML code:

Mi_Carrucel_Datia("mi_carrucel", 3, "boton1", "boton2");
Mi_Carrucel_Datia("mi_carrucel_2", 5, "boton3", "boton4");

function Mi_Carrucel_Datia($var_Carrucel, $var_Visibles, $btn_Atras, $btn_Siguiente) {
  console.log("Objeto: " + $var_Carrucel + " - Cantidad: " + $var_Visibles + " - Boton atras: " + $btn_Atras + " - Boton derecha: " + $btn_Siguiente);
  $ind_Int = 0;
  $var_Movimiento = 100 / $var_Visibles;
  //ocular otros
  $('#' + $var_Carrucel + '>div').each(function() {

    console.log("Div: " + $(this).index());
    if ($(this).index() > $var_Visibles) {
      $(this).css("display", "none");

  $btn_izq = document.getElementById($btn_Siguiente);
  $btn_izq.addEventListener('click', function() {

    console.log("Atras: " + $(this).prop("id") + " - Objeto: " + $var_Carrucel);
    $var_item_Temp = $('#' + $var_Carrucel).children('div :first');
    $('#' + $var_Carrucel).append($var_item_Temp);
    //$('#' + $var_Carrucel).children('div :first').remove();
    $('#' + $var_Carrucel + '>div').each(function() {

      console.log("Div: " + $(this).index());
      if ($(this).index() > $var_Visibles) {
        $(this).css("display", "none");
      } else {
        $(this).css("display", "block");

  }, false);

  $btn_der = document.getElementById($btn_Atras);
  $btn_der.addEventListener('click', function() {
    console.log("Siguiente: " + $(this).prop("id") + " - Objeto: " + $var_Carrucel);
    $var_item_Temp = $('#' + $var_Carrucel).children('div :last');
    $('#' + $var_Carrucel).prepend($var_item_Temp);

    $('#' + $var_Carrucel + '>div').each(function() {

      console.log("Div: " + $(this).index());
      if ($(this).index() > $var_Visibles) {
        $(this).css("display", "none");
      } else {
        $(this).css("display", "block");

  }, false);


My first prison
number 1
number 2
number 3
number 4
<! -
number 5
number 6
number 7
My second prison
number 1
number 2
number 3
number 4
number 5
number 6
number 7

c ++ – Adding a term to the polynomial class, approach with dynamic arrays

I'm trying to program a polynomial class. I am a little stuck on the addition of the coefficient.

class Polynomial
        typedef double value_type;
        typedef std::size_t size_type;
        static const size_type DEFAULT_CAPACITY = 10;

        Polynomial(double a0);
        Polynomial(const Polynomial& source);

        //Assignment operator
        Polynomial& operator=(const Polynomial& source);
        Polynomial& operator=(double a0);

        //Modification func
        void add_to_coef(value_type amount, unsigned int k);
        void assign_coef(value_type new_coeff, unsigned int k);
        void clear();
        void reserve(size_t number);

        //Const funct / getters
        double coefficient(unsigned int k) const;
        unsigned int degree() const;
        unsigned int next_term(unsigned int k) const;

        //eval func
        double eval(value_type x) const;
        double operator()(value_type x) const;

        //arithmetic operators
        Polynomial& add(const Polynomial& p1, const Polynomial& p2);
        Polynomial& subtract(const Polynomial& p1, const Polynomial& p2);
        Polynomial& multiply(const Polynomial& p1, const Polynomial& p2);

        void printPoly(const Polynomial& p, size_type n);

        value_type* _coef;
        size_type size;
        size_type current_degree;

there is the header file. And I would really appreciate if anyone had any suggestions for the Editing Functions section. Thank you!

SQL Server – Adding a Clustered Index to a Heap Table

I noticed that our database contains a few heap tables, all of which have a non-clustered index on the primary key. The largest table contains over 2 million rows, a number of records passed from 663,479 and a page count of 609,028. Also noticed that the records transferred per second are 972 on the server.

From my limited knowledge and a little googling all this seems pretty bad so I am looking to add a clustered index to this table.

  1. Would you agree that this is the right thing to do?
  2. If so, what are the best practices for adding a clustered index to this table?
    Suppose I will have to delete the existing non-clustered index on the primary key (and any foreign keys that reference it), then add the clustered index and re-create the foreign keys? Are there scripts to help you remove and recreate foreign keys, because they are quite numerous?
  3. Would there be an advantage to rebuilding the heap as a short-term solution while waiting for a chance to sort the indexes?

Sorry if I have not provided enough information, let me know if you need to know anything else to be able to help, thank you!

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive New Proxy Lists Every Day Proxies123
Proxy Sites Proxy Tunnels Proxy List Working Proxy Sites Hotproxysite Proxy Sites Proxy Sites Anonymous Proxy Anonymous Proxies Proxy Servers Free Proxies Free Proxy List Proxy List Zoxy Proxy List PR liste all proxy sites More Proxies netgofree netgofree Hide-MyIp - The Best Proxy List American Proxy List Web Proxy Submit Proxies Updated Proxy List Updated Proxy List Bypass Proxy Sites Free Proxies List Evolving Critic Business Web Directory Free Proxy List iShortIt MyProxyList Online Proxies Go Proxies Need Proxies PrivateProxies Proxies4MySchool Proxies4Work Free Proxy List Free Proxy Sites ProxyInside Wiksa Proxy Free Proxy List ProxyNoid Proxy List Free Proxy List Proxy Sites Proxy TopList ProxyVille UK Proxy WebProxy List - Listing the best Web Proxies Free Proxy List SchoolProxiesList Stay Anonymous Proxy List The Power Of Ninja Proxy List UNubstruct Free proxy sites Free proxy sites