7 – How to exclude a user previously referenced in a field (user reference) from a Views block listing the users?

Using Drupal 7.69

I created a view block to list all the users in a group, based on a taxonomy field as a context filter (the content type of the group and the users share the same taxonomy field).

This block is displayed on the group page.

A user is the leader of the group and is referenced in a user reference field in the group content type.

This leader is listed in the block.

Now I have to exclude the leader from the block, since he is displayed in another block of the group page.

How to build the Views block so that this referenced user does not appear in the list of users when viewing the group page?

Thank you for all the advice.

Remove the host previously added with –add-host from the docker container running

I have already started a container using docker run --add-host myserver:123.45.67.89 --name my-container

Now i want to update THIS container, so that I remove "myserver" from the container hosts file.

How do I do this?

I basically need docker service update --host-rm for a container and not a service …. Since I haven't put my stuff in a service.

Ideas?

When should I run my database migrations on a multi-server php application deployment that uses a legacy database that previously had no migration?

I have a multi-server php laravel application running behind a load balancer and I deploy the code using aws codebuild and codepipeline. The approach is to deploy my application one server at a time.

In addition, the application uses a postgresql database which was generated manually without any kind of migration script. Therefore, I have introduced a database migration scheme.

The production pipeline is as follows:

  1. Get the main branch code. (Master is the industry)
  2. Install the dependencies and run the tests.
  3. Deploy to servers, one at a time.

So I want to add the database migration step but I don't know where this step should be performed. Should it be run before deployment to servers or during server deployment once the code has been successfully deployed to a server?

Since the schema previously had no migration script, I want to make sure that no data corruption will occur during deployment and that downtime will be as minimal as possible.

iphone – Can I re-download the Songs of Innocence download I previously had without an Apple Music subscription?

I used to have the U2 album, Songs of Innocence on my phone, which was a free download from Apple in 2014 (which was slightly controversial at the time) 39; time).

I can't see it on my iPhone X, running 13.3 in Apple Music App under music or purchases. I also can't see it in the iTunes app under Downloads or purchases on my phone.

The instructions on Apple's website, from the linked help page, state that activating Apple Music is a prerequisite for downloading it. I have not activated Apple Music.

It came out before Apple Music. I don't understand why it would be associated with it.

Additionally, I can see the Songs of Innocence album on my phone using iMazing under Music, as if it were to be downloaded from the Cloud.

enter description of image here

My question is: Can I re-download the Songs of Innocence download I previously had without an Apple Music subscription?

Lightroom: Combination of raw and jpeg files previously imported to become a single raw + jpeg file

For Adobe Lightroom to combine a single jpeg image and raw files, the names must be the same. This is usually the case outside of the camera. In my case, I imported these files a while ago and the jpeg and raw file of the same image had different names.

So I just renamed all the images, jpeg and raw, using the naming scheme YearMonthDayHourMinuteSecond. Deleted them from the catalog, then re-imported them making sure that in preferences, the option "Treat JPEG files alongside raw files as separate photos" is not checked. I now have what I want, a single raw file + JPEG for each image in Lightroom.

Confidentiality – How to securely delete httpOnly cookies previously used for connection?

I am using Angular 8 with Node.js (Express.js) to create a connection system. It must be secure. I installed cookies using httpOnly:true, which contains a JWT token and must be deleted by the server side, as httpOnly cookies can only be deleted by the user manually (not an option) or by the web server.

How can I accomplish this successfully? Should I somehow redirect to a page that deletes cookies by clicking on logout? A proof of concept would be great.

box2d – LibGDX error "EXCEPTION_ACCESS_VIOLATION" when recreating the previously deleted Box2DLights indicator

I just installed the Box2DLights dependency for LibGDX and I added a cave with 2 ConeLights inside. The first time I return to the cave, everything works as expected. Then when I get out of the cave, I make sure to dispose() all the lights. Then, if I re-enter the cave and try to create the same 2 ConeLights, this gives me this exception with a big error log (PasteBin added at the bottom of this post). If i don't dispose() the lights at the exit of the cave, it will not break the second time, but it will keep adding lights and it will become more and more bright and it is bad for the performance. No matter if I use a PointLight or a ConeLight, the same exception will occur.

Whenever a card change occurs, destroyLighting() so what loadLighting() for the new card is called. The error occurs when a ConeLight is created, the second time when you enter the cave (4th line in the loadLighting () method)

loadLighting ():

for(MapObject o : lightingObjects) {
      EllipseMapObject circleMapObject = (EllipseMapObject) o;
      Ellipse ellipse = circleMapObject.getEllipse();
      Light light = new ConeLight(rayHandler, 60, new Color(255,225,166,1), 100, ellipse.x, ellipse.y, 90, 90);
      light.setSoftnessLength(0);
      lights.add(light);
}

destroyLighting ():

for(Light light : lights) light.dispose();
lights.clear();

The error log:
https://pastebin.com/1v36aNPg

python – Very slow performances evaluating the previously calculated gradient function

I'm trying to achieve optimization using a substitution model instead of the actual function and for that I need the gradient of my LSTM model compared to the input. In this case, I have 3 features that vary over time. The LSTM calculates from the initial value of these 3 characteristics the following 100 time steps, the jacobian matrix thus having the form 100x3x3. It turns out that my code to evaluate the gradient is slower (235 seconds per iteration) than the code that computes the gradient function (18 seconds per iteration). Could you help me speed up the gradient assessment so that I can perform an optimization using the evaluation function? I will be happy to provide the data and the complete code if necessary. The codes for both functions are below:

def get_grad_func(model,n_feat,n_output):
grad_func1=()
grad_func2=()
grad_func3=()
grad_func=()
for i in range(n_output):
    start_time = datetime.datetime.now()    
    print('Calculating dx'+str(i+1)+'/dx0')
    grad_func1.append(tf.gradients(model.output(:,i,0), model.input))
    grad_func2.append(tf.gradients(model.output(:,i,1), model.input))
    grad_func3.append(tf.gradients(model.output(:,i,2), model.input))   
    end_time = datetime.datetime.now()
    diff = (end_time - start_time).total_seconds()
    print(diff)
grad_func1= tf.reshape(grad_func1,(n_output,1,n_feat))    
output1=tf.stack(grad_func1)   
grad_func2= tf.reshape(grad_func2,(n_output,1,n_feat))       
output2=tf.stack(grad_func2) 
grad_func3= tf.reshape(grad_func3,(n_output,1,n_feat))  
output3=tf.stack(grad_func3) 
grad_func.append(output1)
grad_func.append(output2)
grad_func.append(output3)
return grad_func


def eval_grad(model,x0,n_feat,n_output,sess,grad_func):
jacobian_matrix = ()
for i in range(n_output):
    print('Calculating dx'+str(i+1)+'/dx0')
    start_time = datetime.datetime.now()
    for n in range(n_feat):
        for m in range(n_feat):
            gradients = sess.run(grad_func(n)(i,:,m), feed_dict={model.input: x0})
            jacobian_matrix.append(gradients)        
    end_time = datetime.datetime.now()
    diff = (end_time - start_time).total_seconds()
    print("time")
    print(diff)
J_matrix=zeros((n_output,n_feat,n_feat))
count=0
for i in range(n_output):
    for j in range(n_feat):
        J_matrix(i,j,:)=jacobian_matrix(count:count+n_feat)
        count=count+n_feat
return J_matrix

python – Very slow performances evaluating the previously calculated gradient function

I'm trying to achieve optimization using a substitution model instead of the actual function and for that I need the gradient of my LSTM model compared to the input. In this case, I have 3 features that vary over time. The LSTM calculates from the initial value of these 3 characteristics the following 100 time steps, the jacobian matrix thus having the form 100x3x3. It turns out that my code to evaluate the gradient is slower (235 seconds per iteration) than the code that computes the gradient function (18 seconds per iteration). Could you help me speed up the gradient assessment so that I can perform an optimization using the evaluation function? I will be happy to provide the data and the complete code if necessary. The codes for both functions are below:

def get_grad_func(model,n_feat,n_output):
grad_func1=()
grad_func2=()
grad_func3=()
grad_func=()
for i in range(n_output):
    start_time = datetime.datetime.now()    
    print('Calculating dx'+str(i+1)+'/dx0')
    grad_func1.append(tf.gradients(model.output(:,i,0), model.input))
    grad_func2.append(tf.gradients(model.output(:,i,1), model.input))
    grad_func3.append(tf.gradients(model.output(:,i,2), model.input))   
    end_time = datetime.datetime.now()
    diff = (end_time - start_time).total_seconds()
    print(diff)
grad_func1= tf.reshape(grad_func1,(n_output,1,n_feat))    
output1=tf.stack(grad_func1)   
grad_func2= tf.reshape(grad_func2,(n_output,1,n_feat))       
output2=tf.stack(grad_func2) 
grad_func3= tf.reshape(grad_func3,(n_output,1,n_feat))  
output3=tf.stack(grad_func3) 
grad_func.append(output1)
grad_func.append(output2)
grad_func.append(output3)
return grad_func


def eval_grad(model,x0,n_feat,n_output,sess,grad_func):
jacobian_matrix = ()
for i in range(n_output):
    print('Calculating dx'+str(i+1)+'/dx0')
    start_time = datetime.datetime.now()
    for n in range(n_feat):
        for m in range(n_feat):
            gradients = sess.run(grad_func(n)(i,:,m), feed_dict={model.input: x0})
            jacobian_matrix.append(gradients)        
    end_time = datetime.datetime.now()
    diff = (end_time - start_time).total_seconds()
    print("time")
    print(diff)
J_matrix=zeros((n_output,n_feat,n_feat))
count=0
for i in range(n_output):
    for j in range(n_feat):
        J_matrix(i,j,:)=jacobian_matrix(count:count+n_feat)
        count=count+n_feat
return J_matrix