Load image library – Reset or modify selected file

Using this Load-Image library here, what is the correct way to reset or modify the selected image. In my example, if I select an image and then change it, I end up with previews of the two images, need to reset the canvas? … Thanks in advance ….




Loading image test




read the first line of a file, given the file path in BASH

You can do the following:

var = $ (cat /x/y/z/file.txt)

The above command will print the file and assign the output to the var variable.

Another thing you can do if you want to explicitly enter only the first line:

var = $ (head -1 /x/y/z/file.txt)

dom – I removed PHP and reinstall it now under the upcoming error / Cannot find the file ini.php

enter description of image hereFatal error: error not caught: class "DOMDocument" not found in /var/www/html/magento211/vendor/magento/framework/Config/Dom.php:384
Stack trace:

1: https://i.stack.imgur.com/Cu7H7.png (I can find the php / 7.1 / apache2 / php.ini file or the php / 7.1 / cli / php.ini file for anyone which version of php
(2)enter description of image here also when i run sudo apt-get install php7.1-xml at the end of the next error coming

is it possible to delete a file from the system folder without being root?

I found this file: /system/recovery-from-boot.p and I read that this prevented me from entering recovery mode, but since I am not root , I can't find a way to delete it or rename it … a suggestion, please?

powershell – Assign multiple words as input to a CSV file without quotes

I am running the script below to add users to the SharePoint group in SPO sites:

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
$users= "" 
$users = import-csv D:User.csv
foreach ($user in $users)
{
$groupname=$user.group
Add-SPOUser -Site $user.SiteURL -LoginName $user.UserEmailAddress -Group $groupname
Write-host "User added:" $user.SiteURL $groupname $user.UserEmailAddress
}

The entry, namely UserEmailAddress, SiteURL and Group, is extracted from a csv file.

This script works very well if the group name is a single word without spaces like Approvers, SiteOwners but if the group name has 2 or more words with spaces between them, the script displays the error "The group cannot be found "

I understood the problem and tried different approaches to solve it, but nothing works.

Theme – Upgrade to Drupal 8, custom theme using no referenced CSS file

I update a theme from Drupal 7 to Drupal 8. I reference .css files in mytheme.library.yml which do not seem to be attracted to the site.

I watched online and even copied coding examples and replaced the names appropriately. However, I don't see their application or reference to a .css file, in the source code or the development tools.

If these files appear to be correct, then any direction to what could be causing this will be appreciated. If these are permissions, let me know which permissions SHOULD be!

I have cleared the cache hundreds of times after each change, and I am using incognito mode, so I know that this is not a browser or site caching issue .

Thank you.

Content of sites / all / themes / mytheme / mytheme.info.yml

name: MyTheme
type: theme
description: My theme.
core: 8.x
base theme: bootstrap
logo: logo.png

regions:

  navigation: 'Navigation'
  header: 'Top Bar'
  highlighted: 'Highlighted'
  help: 'Help'
  content: 'Content'
  sub_content: 'Sub-content'
  sidebar_first: 'Primary'
  sidebar_second: 'Secondary'
  footer: 'Footer'
  page_top: 'Page top'
  page_bottom: 'Page bottom'
  footer_firstcolumn: 'Footer first column'
  footer_secondcolumn: 'Footer second column'

libraries:
  - mytheme/global-assets

Content of sites / all / themes / mytheme / mytheme.library.yml

global-assets:
  version: VERSION
  css:
    theme:
      css/main.css: {}
      css/bootstrap.css: {}
  js:
    js/main.js: {}
    js/bootstrap.min.js: {}
    js/enquire.min.js: {}
    js/jquery.main.js: {}

Any help or guidance would be appreciated.

Thank you

How to use if elif and else in python to perform an action to create a new json file each month, the first day of each month?

I am new to python and I need your help!

I have a python script that stores a row of data every minute for every day and every month of the year. However, since there is so much data stored per day, the json file ends up with 518,400 lines of data per year, with a size of 67 MB.

I need to make a script that performs an action to create a new json file every first day of every month of the year, therefore it will not accumulate all of the data for the year ; year in a single file, which will result in a json file for January, February, March … December.

The first idea I had was to use if elif and else in python, but I don't know how to do it.

Does anyone know how I can do this?

email – Removing HTML code from a converted text file

I need help with a flow that converts the body of an email to text. The feed I created works as follows:

  1. the email arrives in a shared mailbox
  2. an item in a Sharepoint list is created
  3. the body of the email is converted to text
  4. the converted text becomes an attachment to the created item

The problem is that when I open the newly created text file, it is displayed in html.

I have tried various steps in the workflow to remove the HTML or convert it to PDF, but so far no success. I was hoping it could be done out of the box.

Any suggestion?

part 1 of the stream
part 2 of the stream

Can you "withdraw your application to enter the United States without leaving a permanent black mark on your file, even in air travel?

To my knowledge, thanks to the uncomfortably lax US privacy laws, immigration officials are allowed to ask you to let them search your phone. If you have unlocked fingerprints, they can just force you, but if it's a password, you can refuse. Naturally, if you refuse, you will probably not be admitted. Is it possible to go back without having a permanent black mark on your file? For example. pay for your own plane tickets and go home without a technical refusal there? Or will you have to accept your phone search if you want to have a chance to return to the United States (or even in the other five eyes)?

How to get the path of a file?

I am trying to get the path to a file from an open file dialog.
In other words, I have a file called hello.txt. I want to get your way (C: /users/currentUser/Desktop/hola.txt).
How can I get this way?