encryption – gpg stopped decrypting a symmetrically encrypted file

Just yesterday I decrypted this same file using a key that I have written down, but today every time I try the same key gpg returns:

gpg: decryption failed: Bad session key

I suspect that either I was typing something wrong every time I decrypted this file and didn’t notice or there’s something wrong with the characters that are being entered by my keyboard.

I used gpg -c <file_name>

Also, gpg says it is AES256.CFB encrypted data, although I don’t remember seeing this CFB anytime I decrypted something in this computer, although I might be mistaken, neither did I set this option when encrypting.

I am using Manjaro 20.2.1 and gpg 2.2.25 with libgcrypt 1.8.7

Can anyone help me?

scripting – Problem with getJSON to get a Json file from URL link

I am having trouble to read file from URL. I am trying to read data from JSON files
This one is working:
$.getJSON(‘https://raw.githubusercontent.com/ahammoudi/jason_data/master/data.jason’, function(data){}

This second one is NOT working:
$.getJSON(‘https://www.ranchosantiagoadulted.com/AEBGPDF/2021_Jan/data.jason’, function(data){}

Both of the files are same format. I can open both of the file on Chrome or file Firefox. I think there is something wrong with the url?
Thank you,
Jade

user accounts – With Sharepoint hosted Excel file I’m getting the error message “trouble signing in” when trying “Open in Desktop App”

I’m unable to Open any Excel files on my Desktop Excel App from Sharepoint “Open in App” or Excel online “Open in Desktop App”.

I’m able to log into my company’s Sharepoint, and Office365 with my business credentials using my company login, which for the sake of argument I’ll call Frank@mycompany.com. I have an old personal hotmail account that I use on my desktop, Frank****@hotmail.com. And I have Excel Professional 2010 Desktop installed.

When I try to open an excel file from Sharepoint on my desktop with “Open in App” or “Open in Desktop App”, I get the sign in error as pictured below. Where even though signed in as Frank@mycompany.com Excel is stating that User acccount Frank**@hotmail.com** does not exist in tenant ‘Mycompany’.

I’m using a newly installed Edge browser that doesn’t have me signed in on anything with my personal email, Frank**@hotmail.com**, so where is Excell getting Frank**@hotmail.com**, and why does it think I should be singing in with that, instead of opening it and singing in with my company credentials, Frank@mycompany.com?

Excel does explicately ask for a sign in, it just does this automatically. Also, I can download the Excel file from Sharepoint or Excel online and open it with my desktop Excel with no problems.

Anyways, I appreciate the help.

enter image description here

8 – Cannot upload file of type image

I am experiencing a really strange behavior I have never seen before with Drupal. I am able to upload files of every type but not images. The files system is public. The problem appears on the local test server and on the live server.

Error message:
The image upload widget shows the standard error box logging:
**The file xyz.jpg could not be uploaded.

  • This value should not be null**

This issue appears on the whole site on every image of the file field widget within the backend.
Even the file upload for Drupal’s “File Archive” does just work with every other file type than ‘jpg’, ‘jpeg’, ‘gif’, ‘png’ file types.

The issue appeared after updating to the “web/” file structure while also updating the core to 8.8. I tried to update to 8.9.12 including every module installed but the error when trying to upload a file stays.

I rechecked all the settings regarding “tmp folder” and also tested the folder access rights (chown, chmod). It is set to 777.

I updated the database (drush updb) and also rebuild the cache (drush cr).

No PHP error log is created (not in Drupals Watchdog or the apache log).

I am sure that it is not a configuration issue as I am able to upload files that are not image files without problems. Another interesting bit is that when uploading a file it is actually created in the final sites/default/files location. The file also has the correct owner and access rights.

I could not find a related issue when researching nor I am able to come up with another idea. I even tried to change the file system to private, created new entities with image or file fields and tried different image upload widgets – nothing seems to work.

Any help is greatly appreciated.

output formatting – Writing mathematical expression in a file

I am trying to write a mathematical expression as variable = expression in the output file.

The current method that I am doing is through WriteString as

expr = -((a*b*y^2*(-1 + z)*z*(1 + a*b + z))/(1 + a*b)^2) +
        (z*(1 + a*b - a*b*z + (z + a*b*z)^2))/(1 + a*b)^2 -
        (y*z*((-1 + z)^2 + a*b*(2 - 3*z + z^2) + a^2*b^2*(1 - z + z^2)))/(1 + a*b)^2
expression = CForm(expr) /. {Power->pow};
(*expression = CForm(HornerForm(expr)) /. {Power->pow};*)
str=OpenWrite("output.hh");
WriteString(str," double variable = ", expression,";");
(*WriteString(str," double variable = ", ExportString(expression,"Text"));*)
Close(str);

The output is

 cat output.hh
 double variable = -(a*b*(-1 + z)*z*(1 + a*b + z)*pow(1 + a*b,-2)*pow(y,2)) - y*z*pow(1 + a*b,-2)*(pow(-1 + z,2) + a*b*(2 - 3*z + pow(z,2)) + pow(a,2)*pow(b,2)*(1 - z + pow(z,2))) + z*pow(1 + a*b,-2)*(1 + a*b - a*b*z + pow(z + a*b*z,2));

I want to break the line as the original expr (or after some user-specified column say 80) i.e.

 double variable = -(a*b*(-1 + z)*z*(1 + a*b + z)*pow(1 + a*b,-2)*pow(y,2)) -
                   y*z*pow(1 + a*b,-2)*(pow(-1 + z,2) + a*b*(2 - 3*z + pow(z,2)) + pow(a,2)*pow(b,2)*(1 - z + pow(z,2))) + 
                   z*pow(1 + a*b,-2)*(1 + a*b - a*b*z + pow(z + a*b*z,2));

Although this might not lead to optimized expression for numerical evaluation, however it is wanted as beautification.
Also how should one optimize expression for further processing to other languages. Any suggestion? Experimental`OptimizeExpression and HornerForm are some options. Any other recommendation? MathCode is much costly 😀

automation – How to delete the fist line in the file using lua script?

I just started learning script lua. I have a .txt file with the format “user | pass”. how to get “user” and “pass” on the first line and delete them from that file.
This is my command but I can only read the contents of one line, but I can’t separate “user” and “pass”

io.input("/var/mobile/Library/AutoTouch/Scripts/account.txt")
t = {}
for i = 1, math.huge do
    local s = io.read()
if s == nil then
break
end
    t(#t + 1) = s
end

i = 1, #t do
    alert(t(i));
end

partitioning – Change and increase default swap file location

Good day!

Would like to change my VM Ubuntu Desktop Server 20.04 swap file location and increase it to certain degree, if possible 100GB of swap?

Is there a way to connect my VM (virtualbox) ubuntu to another drive that is connected to my computer?

C drive – 120GB SSD (Windows 10)
D drive – 120GB SSD (Assigned for my VM (ubuntu))
E drive – 3TB HDD (only connected to Windows 10)

Want to assign the swap file to E drive.

Is the .flac audio file format supported by WordPress?

Yes, the flac audio format is supported. See the doc block for the function wp_get_mime_types() (and other mentions).

/**
 * Retrieve list of mime types and file extensions.
 *
 * @since 3.5.0
 * @since 4.2.0 Support was added for GIMP (.xcf) files.
 * @since 4.9.2 Support was added for Flac (.flac) files.
 * @since 4.9.6 Support was added for AAC (.aac) files.
 *
 * @return string() Array of mime types keyed by the file extension regex corresponding to those types.
 */
function wp_get_mime_types() {

Whether the visitor’s browser supports it is a completely different question and not in WordPress’ hands.