python – Default List Parameter doesn’t Reset

Consider the following code:

def f(a=()):
  print(a)
  a += (1)

f()
f()
f()

which outputs

()
(1)
(1,1)

This behavior seems peculiar. Shouldn’t the parameter a be reset to () each time the function runs?
When the parameter is an integer I get the expected behavior:

def f(a=1):
  print(a)
  a += 1

f()
f()
f()

outputs

1
1
1

I realize lists are mutable and integers aren’t, but I can’t figure out if that would matter here.
Thank you.

apache – doesn’t reload httpd.conf in Amazon Linux

I am in trouble… Apache in EC2 does not work well.

$ sudo systemctl restart httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

so I t checked the status.

$ systemctl status httpd.service

status is here

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─php-fpm.conf
   Active: failed (Result: exit-code) since  2021-05-10
     Docs: man:httpd.service(8)
  Process: 2971 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 2971 (code=exited, status=1/FAILURE)
   Status: "Reading configuration..."

 5月 10 13:00:00 ip-xxx-xx-xx-xx.ap-northeast-1.compute.internal httpd(2971): AH00112: Warning: DocumentRoot (/var/www/stackflow/public) does not exist

I noticed
DocumentRoot (/var/www/stackflow/public) is wrong path…

I modified

/etc/httpd/conf/httpd.conf

<Directory "/var/www/stackoverflow/public">
    AllowOverride all
   #Require all denied
    Require all granted
</Directory>

DocumentRoot "/var/www/html"
$ sudo systemctl reload httpd.service
Job for httpd.service invalid.

changes seems not be reflected.

views – Group node from OG membership doesn’t work

I want to create some views to display Group information on Group content pages. E.g. Display contact info from the group in a block/pane in the sidebar.

I did this before, by using the default OG Content view and add the relations.

  1. I add the relationship OG membership: Group Node from OG membership, and sets its relation to (OG membership from node)
  2. Set the contextual filter to provide a default value (Current OG group from context) and keep relation set to the default OG membership from Node.
  3. Add fields and set their relation to Group node from OG Membership.

This isn’t working though, it gives no results when viewing on Groupcontent-pages. It gives only results when viewing the Grouppage itself. I do not know why this is not working the way it should. As I recall I never had this problem before.

I used Organic Groups 7.x-2.7 with Panopoly 7.x-1.30. I have this on 2 separate installs (one on Acquia site, and one in my VM). The VM has only Panopoly and OG (and dependencys) installed as extra so it’s almost vanilla.

I have enabled OG Context of course.

How can I solve this? Without these views it’s a pain for the user to see in which groupcontext they are browsing.

EDIT:
I installed a vanilla drupal (Not Panopoly). Installed OG + dependencys.
Then I created an empty view and added the following:
1. Relationship: OG membership: OG membership from Node group (required)
2. Contextual: (OG membership from node group) OG membership: Og membership ID
and Current OG group from context

This works! However, this doesn’t work in Panopoly… Is this the new way to work with OG and Groupinfo on groupcontent pages?

The SQL-querys views does are exactly the same. Though on Panopoly there are no results. On Vanilla Drupal there is.
How can I debug this?

WordPress doesn’t send a notification email when submitting a comment using REST API

When I submit a comment on the WordPress website, it sends me a notification email.
but when I submit a comment through REST API, WordPress doesn’t send me a notification email.
What should I do to make WordPress send a notification email when I submit a comment with REST API?

plugins – XML export doesn’t export all data (Elementor Pro)

I’m building a theme with Elementor PRO and I want to make the demo content importable via “One Click Demo Import” plugin when someone uses my theme.

However, when I’m exporting the data from the development server into xml file via Tools -> Export -> All content, not all data from the database is exported into the xml file. E.g. not all records from wp_postmeta table meta_key="_elementor_page_settings" (which store Elemetor’s global Site Colors and Fonts) are present in the xml file. There are ~500 rows in the database, but only ~15 are exported into the XML file. This results in Elementor Site Settings not transferred correctly to other sites.

What may be the reason for not all data being exported or what’s the correct way to configure Elementor export/import for a new theme demo content?

Thanks in advance!

unity – My Raycast2D doesn’t go where I want and it doesn’t return a GameObject

I want my Objects to teleport when they hit a wall. For that, I want to shoot a Ray backwards and teleport it to where the ray hits the wall, but whatever I try, it always teleports to the centre of the scene and the ray hit doesn’t return a GameObject. This version I tried runs on OnTriggerEnter2D:

RaycastHit2D hit = Physics2D.Raycast(transform.position, -transform.up, 300);
Debug.DrawLine(transform.position, hit.point);
transform.position = hit.point; 

I tried some other variations too. If you have any idea, please let me know.

ln opening channels – Lightning bumpfee completes but doesnt create a new transaction. Instead it waits in “pending sweeps”

I had a Lightning channel open transaction pending for 24 hours due to a low fee.

So I issued a bumpfee for the output index like so:

lncli wallet bumpfee --sat_per_byte <new_fee> <txid>:<output index>

This completed with a return value of 0.

However a new transaction was never created.

Instead there is an output in the command:

lncli wallet pendingsweeps

where I see the <new_fee> specified and the “outpoint” being the txid:output_index value

So what do I need to do to complete this CPFP operation?

Why doesn’t my YouTube channel have the option "Advanced Channel Settings" in YouTube Studio but my friend’s channel has it?

My channel is missing the feature "Advanced channel settings" in YouTube Studio?

YouTube Studio > Settings > Channel > Advanced Settings > Other Settings > Advanced channel settings

Setting is available here

Setting isn't available here

Monetization has currently been disabled because of some reused videos. Could that be the reason?

Bug – Arc.io doesn’t work on the LITE Theme | Forum Promotion

Bizdustry – Business & Economics

Bizdustry is a make money forum where members can talk about business, economics, finances, budgeting, investing and anything Crypto related. Members earn 0.01$ for every message they publish and 1$ for each member that is referred to the forum. We strive to provide the best quality content and…

Gmail – Storage amount doesn’t update

I deleted many messages from Gmail, about 1.5 GB. But the total google storage value (the one at the bottom of the page) has not been updated.

Messages have been deleted via IMAP with Outlook. Trash is empty.

Can you help me in solving this issue?