sharepoint online – How to wait until a file is checked in in Power Automate

I’m in the process of migrating my 2010 Designer Workflows to Power Automate. In the past we’ve had issues when an InfoPath form has been edited and saved but not yet checked in, the SPD workflow tries to run against that file, and throws an error. Two questions: is this still an issue with Power Automate Flows, and if so, how can you tell Power Automate to wait until the file is checked in? I know how to test IF the file is checked in, but how would you construct the Wait Until loop? (Yes, yes, I know- get rid of InfoPath… but that’s not going to happen until after the workflows are migrated – we have about 500 to rebuild, and three months to do it).

WordPress Woocommerce plugin to extract info in a custom uploaded file?

I am searching a plugin to my wordpress than can make this:

I created a variable product that allow upload a PDF file. I want calculate a unitary price for each page of this pdf file but I don’t find any plugin that add this feature to modify the product price.

Somebody knows some plugins to Woocommerce (or other shop plugins) that can make this possible?

Thanks a lot for all the help.

PDF file page numbering consist with PDF document

I’m looking at a PDF file I have. (A textbook from my prof. in PDF version).

When I’m on page “vii” in the textbook, then every PDF Viewer software will tell me that I’m on page 7.

Is it possible to use Adobe Acrobat DC such that these two things a consistent with each other?
If Adobe Acrobat DC can’t be used then what can I else do ?
I have PDF Inspector by PSPDFKIT. But I do not know any PDF syntax, so I would need some help with that.

“Class Not Found” in HTML Form Target PHP File that contains the class

How do I make the HTML form’s action target file ‘aware’ of classes that WordPress has already loaded?

File A -> Creates a WordPress shortcode that inserts a form that has ‘File B’ as the target.
File B goes to process the submitted data, but throws “Class Not Found” whenever I try to instantiate an object of the class that contains the function responsible for processing the data.

Code:

File A Psudeocode (works)

add_action('plugin_loaded',array('wordpress_plugin_bootstrap','load'),5);
class wordpress_plugin_bootstrap{

   public static function load() {
     //check for required class
     require_once('FileB.php'); //contains the class 'PluginClass'
     //register the class 
   }

}

function class_instance_getter(){
    return PluginClass::get_instance():
}

function create_html_form($atts){
//creates and returns the form with action attribute set to 'FileB.php'
}
add_shortcode('ju_lee_do_the_thing','create_html_form');

File B Pseudocode

REQUIREDCLASS::include_addon_framework();

class PluginClass extends OtherClass {

        //init stuff

        private static $_instance = null;

        public static function get_instance(){
            if ( self::$_instance == null){
                 self::$_instance = new PluginClass();
            }
            return self::$_instance;
        }

        public function init(){
            parent::init();
            add_action('wp_loaded',array($this,'handle_form')); //me, trying desperately to get this thing to hold it's fire until everything is loaded
        }

        public static function handle_form($postArray){
            //do stuff with the data using the REQUIREDCLASS
        }
    
} // End of class code

$obj = new PluginClass; // Blows up here
$obj->handle_form($_POST);

Error

Fatal error: Uncaught Error: Class ‘PluginClass’ not found in /../../FileB.php on line (‘blows up here’)

It dawned on me that when execution ‘drops in’ to the HTML form action target file (whether that’s in FileB or elsewhere) it doesn’t ‘know’ what WordPress has (or hasn’t) loaded; I can observe everything loading and registering correctly by debugging FileA on a page refresh.

So the questions become these:

Do I need to do something to make WP ‘aware’ of my action target file?

Should I actually be re-loading everything I need upon code entry of
my target action file? Even if that means reloading an entire WP
plugin (this seems wrong to me)?

While were on the subject…a HTML form action target is kind of
acting like a callback handler (once the user hits submit, dial this
number sort of thing), but it isn’t technically – so what is it? This
will greatly inform my Google searching.
Also, I’ve tried moving all of the form_handler code to another file (uh…’FileC’ ) which sort of works in that I can actually get into the handler code which works great until I need to reference the REQUIREDCLASS…then it just blows up there instead.

I think I’m about 20 hours in, give or take, in trying to figure this out. Feel free to light up the comments with ‘Stuff about PHP and/or WP I really ought to research’.

Also – a HUGE thank you to anyone that can offer guidance on this. I feel like a cat in a laser pointer store.

finder – How do I transfer all the contents of a file based on a criteria to another folder?

I solved it by writing a python script. Was just looking to see if Finder had any builtin functionality to do it.

EDIT: Added in the code!

import shutil
import os 
import time 
import sys
import concurrent.futures

path_HDD = "/Volumes/HDD/frames/"
path_10 = "/Volumes/HDD/frames_final/10"
path_0 = "/Volumes/HDD/frames_final/0"
path_5 = "/Volumes/HDD/frames_final/5"

def move(path):
    for root, files, directory in os.walk(path, topdown=False):
            if(len(root) == 36 or len(root) == 37):
                if(len(root) == 36 and int(root(-1)) == 0):
                    for r, d, f in os.walk(root, topdown=False):
                        for fi in f:
                            file_path = os.path.join(r, fi)
                            try:
                                shutil.copy(file_path, path_0)
                            except OSError as error:
                                print(error)
                                break
                elif(len(root) == 36 and int(root(-1)) == 5):
                    for r, d, f in os.walk(root, topdown=False):
                        for fi in f:
                            file_path = os.path.join(r, fi)
                            try:
                                shutil.copy(file_path, path_5)
                            except OSError as error:
                                print(error)
                                break
                elif(len(root) == 37 and int(root(-2:)) == 10):
                    for r, d, f in os.walk(root, topdown=False):
                        for fi in f:
                            file_path = os.path.join(r, fi)
                            try:
                                shutil.copy(file_path, path_10)
                            except OSError as error:
                                print(error)
                                break
    print("DONE")
    sys.exit(0)


if __name__ == "__main__":
    try :
        with concurrent.futures.ProcessPoolExecutor():
            move(path_HDD)
    except OSError as error:
        print(error)


filesystems – CENTOS 7.2 + installing docker on OS with XFS file system

We have 12 machines with CentOS 7 servers ( VM servers ) where the root file system is XFS (created with ftype=0, default CentOS setting at the time the system was installed).

And we want to install on each VM server docker service

Unfortunately, the Docker overlay2 storage driver requires that file system to have been created with ftype=1:

One option to change the ftype to 1 is to do the following steps

  1. Boot into CentOS-7-x86_64-LiveGNOME-1804.iso.
  2. Open a terminal and sudo -s.
  3. Scan for LVM volumes: vgscan
  4. Change into the appropriate volume group (centos in my case): vgchange -ay centos
  5. Scan for the logical volumes in that group: lvscan
  6. Create a mount point for the root FS: mkdir /mnt/root
  7. Mount the logical volume corresponding to the root FS: mount /dev/centos/root /mnt/root
  8. Dump to remote host: xfsdump -J – /mnt/root | ssh ‘cat >/data/rootfs.dump’
  9. Unmount the root FS: umount /mnt/root
  10. Recreate the root FS: mkfs.xfs -f -n ftype=1 /dev/centos/root
  11. Mount the recreated root FS: mount /dev/centos/root /mnt/root
  12. Restore from remote host: ssh ‘cat /data/rootfs.dump’ | xfsrestore -J – /mnt/root
  13. Reboot. Everything should be as it was before, except xfs_info / should now show ftype=1.

But we want to know what the other alternative for steps 1-13 , because steps 1-13 required downtime on the servers

Is any other approach to change the ftype to 1 ?

For example maybe by adding additional disk to the OS and create xfs file system with ftype=1

file system – How to get UNC path of folder on phone?

When I plug my (Android 9) phone into my (Windows 10) PC, it appears in the Windows filesystem within This PC and has a (virtual) folder within it called Internal shared storage, with various folders within.

I can copy files/folders to/from there no problem. But if I want to use an application that references a folder (e.g. WinMerge, to check that the files I copied have actually all been copied), when I select the folder on the phone, it gives an error: “Folder Selection. File not found. Check the filename and try again.” If I try and copy the path of the phone’s folder from Windows File Explorer, I simply get This PC(phone)Internal shared storage(folder) which is obviously not a UNC path that any application or the system would recognize (and isn’t).

There must be some UNC representation of the path to a folder on the phone (which Windows uses internally), and a means of determining it. What is it?

An alternative approach would be if there was a way of cajoling Windows to create a ‘mapped drive’ for the phone, in the same way as would happen when plugging in a USB stick (or an older phone or camera). Suggestions in this department also welcome.

ubuntu – how to make an sql file copied to the server work

I am trying to create a login page on my ubuntu server.
I have Apache2, php, and mysql installed and running.
I downloaded a sample PHP MySQL Login System including a users.sql file.
Is there a way to make this file work with MySQL or is it necessary to generate a new file?
If so, how..? Here is the code from the users.sql file.

-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 28, 2017 at 02:20 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `demo`
--

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Thanks for help and suggestions.

links – How to add an exiting linked OneNote file as a tab in Teams?

I setup a Microsoft Teams page with a tab that has a OneNote file. I need to create 6 more Teams, with completely different users, but they’ll also need to see this OneNote file. That way, if I edit the OneNote document in one Team, changes are made across all Teams. When I click “+” to add a tab, and choose the OneNote app, it doesn’t give me an option to choose an exiting file. How can I setup multiple Microsoft Teams to point to a single OneNote file?

windows 10 keeps turning off file and printer sharing

I have a home office setup with a laptop, desktop, plus my wife’s desktop. All are using Windows 10 2004. All are on one LAN (Private network), plus of course access to the internet through an Asus router.

I can access files just fine from the laptop, and between the two desktop machines, but if I try to access files sitting on either desktop from the laptop, I get errors!

The laptop can see the two desktops from the view provided by the Network desktop icon. If you try to click one you get the \NAME is not accessible. You might not have permissions to use this network resource.

If I try net use, I get
System error 67 has occurred.
The network name cannot be found.
even though the desktops have directories that can be shared.

On the laptop, if I go to Network and Sharing Center, Change advanced sharing settings, I find Turn off file and printer sharing is enabled. If I click Turn on file and printer sharing, hit Save changes, then reenter the same dialog, they are again turned off!

I even have turned off Windows Defender Firewall for Private networks on the laptop!

The laptop is using Windows Defender Antivirus, which is the only other place I can conceive of the problem is arising. I mean, what else could be turning File and printer sharing off every time I enable it?

More importantly, how can I enable this capability? Thank you!