sharepoint rest api – How can I triggerSharePoint Page scheduling when setting status and start date doesnt work?

I have written an Approval flow that uses Logic Apps with SharePoint REST to set approved items to “Scheduled” with a pending _PublishStartDate based on a specific date (or published right away if no such date exists). The calls to schedule items are shown below.

Note: I do this in two calls because you cannot set moderation status and date at the same time.

Call 1:

uri: _api/web/lists/getbytitle('Site Pages')/items(19)/validateUpdateListItem

body:

{
  "formValues": (
    {
      "FieldName": "HistoricApproverComment",
      "FieldValue": "Some comment I made"
    },
    {
      "FieldName": "HistoricChangeCategory",
      "FieldValue": "Small changes"
    },
    {
      "FieldName": "Editor",
      "FieldValue": "({ "Key": "i:0#.f|membership|someuser@mytenant.onmicrosoft.com" })"
    },
 {
      "FieldName": "_PublishStartDate",
      "FieldValue": "10/28/2020 11:30 AM"
    }
  )} 

Call 2:

uri: _api/web/lists/getbytitle('Site Pages')/items(19)/validateUpdateListItem

body:

{
  "formValues": (
    {
      "FieldName": "_ModerationStatus",
      "FieldValue": "4"
    } 
  ), "bNewDocumentUpdate": true
}

These calls succeed without any error messages and everything looks just peachy on my site page with the “Scheduled for (day) (date) (time)” label displaying nicely on the page. However, the scheduled publish time passes without the page actually being published (it is still in the “Scheduled” state, with a publish start date in the past).

It doesn’t seem to be a time zone issue, and manually scheduling the item in the UI works as expected.

Any tips on what could be causing the site page to not be picked up by whatever background job is running in SPO? Currently our workaround is to force the approval state (0) if the scheduled time has passed, using another Logic App.

What is the technical difference between transferring from an old phone and an iCloud restore when setting up a new iPhone?

In the past, I don’t think it mattered but in iOS 14 and watchOS 7 I am finding the iCloud backup to be the best option due to a bug or migration failure that I and several others here experienced.

Apple says it’s fine to do an encrypted backup, and that will work, but the unpairing of the watch and validating the backup to iCloud was what helped me restore all my data.

It’s not entirely clear if Apple does some cleaning once the data is in iCloud or if the mechanics of the restore step and the repairing step re-runs a data migration step that fills in the gaps. Presumably, that would also run if you transferred device to device but for some reason Apple only mentions computer and iCloud setup in the support articles and when I talked with support and engineering about my issue before these articles were published.

So far, iCloud has bailed me out three times ( shelf and two friends) and we did make a computer backup, but didn’t try them first. I set up two fast Macs with content caching that saves/serves iCloud data so iCloud restored fly for me and happen faster than a new backup to the same computers over USB. I could see the opposite direction wing much faster for other setups, so my solution might not be optimal for all, but it works well for me.

I would not rely on direct migration to fix this and would do what Apple says, on the original device if possible and work with Apple support if you fail to fix it after one go.

bootcamp – Error while setting up windows in my late 2014 iMac

Boot Camp Assistance is stuck on create a partition? So I used the procedures in this link to try and set up windows in my iMac , but when it reached the part where they asked where do you want install Windows and after I select BOOT CAMP, I got an error – ” We couldn’t create a new partition or locate an existing one.”enter image description here

hooks – Alter a module’s setting

Im using Drupal 7 module Entity Background Image, which at the start of its .module file has a line which applies a Drupal image style to a field like this:

define('EB_IMAGE_STYLE', 'large');

But, I don’t want that ‘large’ style to be used here, and I don’t want to alter the original .module file. So I was thinking I could do a tiny module just to re-define that line, to alter it. But after hours of trying to search for and understand hooks, Im no closer to a solution. Im looking for suggestions or the correct direction to get this done. Thanks

iptables – Setting up SSH tunnel. With one confused configuration

So on the other day I set up a ssh tunnel for connecting my plex server installed on my raspberry pi to my VPS. I looked up an excellent guide, and then one configuration in that guide draws my attention.

So my questions as following:

I just wonder why do I need to set a specific port, which in this case is 32400, to only allow local connections to that port. Is it because of safety reason? I cannot figure it out.

Following info may be helpful.

pi@raspberrypi:~ $ cat /etc/hosts
127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       raspberrypi

unity – What are the dangers of setting rigidbody velocity directly for movement and what are the alternatives

I’m playing around with Unity, trying to make a neat 3rd person platformer movement system using rigidbodies so that I may in the future implement things like pushing boxes/physics objects, grappling hooks, etc… as well as I’m not really knowledgeable in terms of math and physics to be able to code them from scratch using CharacterController

What I’ve done is I’ve implemented some basic movement by setting velocity directly

Vector2 input = GetInput();
bool hasInput = Mathf.Abs(input.x) > float.Epsilon || Mathf.Abs(input.y) > float.Epsilon;
bool isDashing = dashCounter > 0f;
if (hasInput && !isDashing)
{
    Vector3 direction = GetDirection(); // get camera direction scaled by forward & right vectors
    transform.localRotation = Quaternion.LookRotation(direction);

    UpdateTargetSpeed(input); // update target speed based on movement direction
    Vector3 movementVector = new Vector3(input.x * TargetSpeed, 0f, input.y * TargetSpeed); // add speed to input vector
    movementVector = transform.localRotation * movementVector; // rotate the vector to where the character is facing
    movementVector = Vector3.ClampMagnitude(movementVector, TargetSpeed); // clamp magnitude to avoid faster speed on diagonals            

    body.velocity = new Vector3(movementVector.x, Velocity.y, movementVector.z);
}

And I’m also projecting velocity on ground normal for slopes so that the character doesn’t fly off when moving down slopes

if (wasPreviouslyGrounded && !jumping && groundCheck.CanStick)
{
    float slopeAngle = Mathf.Abs(Vector3.Angle(groundCheck.StickyContactNormal, Vector3.up));                
    if (slopeAngle < 85f)
    {
        body.velocity = Vector3.ProjectOnPlane(Velocity, groundCheck.StickyContactNormal);
    }
}

I have implemented jumping and dashing using AddForce

body.AddForce(0f, movementSettings.JumpForce, 0f, ForceMode.Impulse);

This all works okay but everywhere I looked people are always claiming that setting velocity directly is a bad practice and should be avoided. I’ve seen suggestions to use AddForce instead, but I haven’t been able to get the same movement with it, no matter which force mode I used. I am also lost on how to control the amount of force I’m giving to the body during continuous movement. The thing I did is to check the magnitude of body’s current velocity and if it’s at or above the target speed then forgo applying the force but that just makes the body continuously accelerate and decelerate giving off jittery movement

if (body.velocity.sqrMagnitude < TargetSpeed * TargetSpeed)
{
    body.AddForce(force, ForceMode.VelocityChange);
}

Can anyone ELI5 me the answers to the following questions:

  1. Why exactly is setting velocity directly a “bad practice”?
  2. What is the preferred alternative?
  3. How can I get snappy and responsive movement without setting the velocity directly?
  4. How can I accomplish sticking to the ground when going down slopes without projecting and setting the velocity directly?

Not showing amazon echo dot as output or input device in ubuntu sound setting after connecting through bluetooth

Though bluetooth pairing is successfull with Amazon Echo dot 3rd gen from Ubuntu 18.04.4 LTS( Echo says Now connected to <my machine's name>), The device is not listed in the sound setting as input/output device, So the problem is ,sound is coming from the inbuilt speaker and not from the echo device.

Things that I’ve already tried

  • connecting/disconnecting device multiple times
  • bluetooth pairing while laptop is playing some music(on youtube)

not really sure which command / logs to be checked for this issue. Please suggest.

plugins – WordPress error: Options page Setting_ not found in the allowed options list

I don’t really know what to do now. :/ I tryed this:

add_action( 'admin_init', 'Setting_' );

And this is my strings and form setup:

function Setting_() {
    register_setting( 'options', 'My_plugin_header_logo' );
    register_setting( 'options', 'My_plugin_links_facebook' );
    register_setting( 'options', 'My_plugin_links_youtube' );
    register_setting( 'options', 'My_plugin_links_email' );
    register_setting( 'options', 'My_plugin_links_instagram' );
}

<form method="post" action="options.php">
 <input type="hidden" value="/wp-admin/options.php?page=my_plugin" name="_wp_http_referer">
   <p class="submit">
     <input id="submit" class="button button-primary" type="submit" name="submit" value="Save!"></p>
            </form>

Thnaks for any help!

Setting up a quadratic equation

Need help setting up the equation.

enter image description here