screen – Transparency on widgets without native support

Is it technically possible (preferably without root) to create an application or a parameter allowing you to modify the transparency of arbitrary widgets?

Many widgets have this feature / setting, but far too many do not include a lot of Google stocks.

When editing in the block editor, the article / article is placed under the floating widgets

When editing in the block editor, the article / article is placed under the floating widgets and I can not edit the part of the article located behind the widget in the ################################################################################# Block editor. I enclose a screenshot for better understanding.image of the block editor, here the message grid widgets are at the top of the diagram in the article

widgets – an eventON plugin An AJAX call causes the crash of a website

The eventON event listing plugin causes the closure of our website when the month changes. The browser indicates that it is trying to load the site, but nothing ever shows up. The plugin is inserted using this shortcode: [add_eventon_list show_limit="yes" event_count="10" hide_past="yes" event_type="1082" accord="yes" ]. The AJAX request via WordPress returns a 200 response; the script seems to have worked. The URL of the AJAX function seems to be the cause of the problem. I have reviewed the plugin registry and located the script code, but nothing stands out for me. No other JavaScript error is displayed in the console.

Website: https://www.todayville.com

wp_register_script ('evcal_ajax_handle', $ eventon-> assets_path. 'js / eventon_script.js', array ('jquery'), $ eventon-> version, true) ;
wp_localize_script (
& # 39; & # 39 ;, evcal_ajax_handle
& # 39; & # 39 ;, the_ajax_script
board (
& # 39; ajaxurl & # 39; => admin_url ('admin-ajax.php'),
& # 39; postnonce & # 39; => wp_create_nonce (& # 39; eventon_nonce & # 39;)
)
)

Firefox console:

I understand that this may be a mixed content issue because our website is HTTPS, but other child sites using the same code via WP Network on the same domain will work without errors. I do not know why browsers use an IP address to load jQuery via a PHP script.

Chrome console:

  • Uncaught SyntaxError: Invalid or unexpected token

How to create my own widgets in WordPress?

function wp_load_widget () {
register_widget (& # 39; wp_widget & # 39;)
}
add_action (& # 39; widgets_init & # 39; wp_load_widget & # 39;);

The wp_widget class extends WP_Widget {

__construct () function
parent :: __ construct ("wp_widget", __ ("Widget WPBeginner", "wp_widget_domain"), array ("description" => __ (& # 39; WPBeginner Tutorial-based widget example & # 39; wp_widget_domain & # 39;),)
)
}

python – Value of variable sharing, returned by a function, between classes or widgets of Kivy

Evenings or evenings For several days, I racked my brains in search of a way to solve this problem. I have seen Kivy's documentation, video tutorials and blogs with examples, but I can not find a way to solve the problem.

The problem is that I have two widgets:
– One with buttons to perform a series of functions
– Other where to display information

The widget that displays the buttons performs only a small scan of IP addresses connected to one network, another to start an MQTT server and another to shut down the server. => [Buscar dispositivos — Conectar — Desconectar]

In the widget in which the information is displayed, the idea is that at the beginning, when you run the code, it is empty, but when you click the button that searches the available IPs, all the Available IPs will appear in the empty space. button for each IP. Better explain me with a small example:

Empty the information widget >> Press the "Search for devices" button >> Analyze and get the available IP addresses >> Get the IP address 111.111.1.000 – 111.111.1.001 – 111.111.1.002 >> In the information widget, you will find 3 buttons, one for each IP address.

Then on each button with its IP address, when you press the login button, you have to edit the text with the other information that would be returned to each device connected to the MQTT server, and then pressing each button would change the screen and would display more information, etc. things, but that's another problem.

So, how can I make sure that by calling the function searched by IP, from the login button of a widget, I return the information to another widget?

I leave the code that I have up to here both .Py and .KV.

py

import the package kivy # general to create the interface

since kivy.app import App # Functions to implement our window or application
from kivy.uix.boxlayout import BoxLayout # Functions to implement a base layer on which elements will be placed
from kivy.uix.anchorlayout import AnchorLayout # Functions to place items in specific places in the presentation
from kivy.uix.gridlayout import GridLayout # Functions for organizing elements in tables
from kivy.uix.button import Button # Functions to manage buttons
from kivy.uix.listview import ListItemButton # Functions to manage lists
from kivy.clock Import Clock # Needed to update items
from kivy.event import EventDispatcher # Needed to create properties and events
from kivy.properties import ListProperty # Import properties from the Kivy list
since kivy.config import Config # for the necessary configurations

import os # Package required for features requiring operating system resources
to Import the Subprocess # Package Needed to Create and Call System Threads

# Screen size settings
Config.set ('graphics', 'width', 1024)
Config.set ('graphics', 'height', 600)
# The buttons, widgets, layout and others are all widgets

list_ip = []   # Empty variable


class functions ():
def ping_scan (self, * arg): # Function to detect devices on the network. With arg, the arguments are introduced
# which will not be taken into account later
ip_list = []
        with open (os.devnull, "wb") as limbo: # devnull is like a bottomless pit from which nothing can be recovered
# and eliminate the error per screen when running
for n in the range (0, 10 + 1): # The + 1 is added to reach the maximum limit entered
ip = "192.168.1. {0}". format (n)
res = subprocess.Popen (['ping', '-n', '1', '-w', '200', ip], stdout = limbo, stderr = limbo) .wait ()
if res:
print ("INACTIVE =>" + ip)
if not:
print ("ACTIVA =>" + ip)
ip_list.append (ip)
return ip_list


class Container (BoxLayout): # We create a Container class that inherits BoxLayout functions
def __init __ (auto):
super (Container, self) .__ init __ () # With super, all properties of the container are inherited. C & # 39;
# needed to add new properties

self.BB = button_box () # Box instance for buttons
self.IB = info_box () # Instanciación a caja for more information
self.LB = logo_box () # Instanciación a caja para logo

self.add_widget (self.BB) # Add the box to the layout
self.BB.add_widget (self.LB) # Add the logo box in the button area
self.add_widget (self.IB) # Add Info Box


class button_box (BoxLayout): # LayOut to add buttons

def __init __ (auto):
# nonlocal list_ip # We make this nonlocal value
super (button_box, self) .__ init __ ()
self.buscar = Button (text = "Search for devices") # Create a button to search for devices
self.con = Button (text = "Connect") # Creates a button to connect to devices
self.desc = Button (text = "Disconnect") # Create a button to disconnect devices
self.add_widget (self.buscar) # Add the search button to LayOut
self.add_widget (self.con) # Add the button to connect to LayOut
self.add_widget (self.desc) # Add logout button to LayOut
list_ip = self.buscar.bind (on_press = functions.ping_scan) # on_press adds arguments to the function. You need to add * arg to
# function. With the on_press function, we detect if a button has been pressed and act if the
# condition


class info_box (BoxLayout): # LayOut to add device information

def __init __ (auto):
super (info_box, auto) .__ init __ ()
#lista_ip = ['0', '1', '2', '3']
        if len (list_ip)! = 0:
for i in the range (len (list_ip)):
self.add_widget (Button (text = ip_list[i]))
if not:
print ("No IP")


class logo_box (AnchorLayout): # LayOut to add the program logo in a corner
No


class interfazApp (App): # Creation of the application as such. It must have the same name as the .kv file
title = & # 39; Control Center & # 39; # Name of the program

def build (self): # Function to start our application
return container ()


if __name__ == "__main__": # Required, not necessary, for Android and Kivy, it is a convention.
interfaceApp (). run ()

I think it goes without saying that the ping_ip function is responsible for pinging all available IP addresses on the network. Whoever does it between 0 and 10 is simply for simplicity when doing the tests, the range and I will modify it in the final version.

.kv

:
orientation: verticale vertical & # 39;
spacing: 10
# spacing is the space between the widgets
upholstery: 10
# padding is the space between the edge of the window and the content => iz - a - de - ab => List for different
canvas:
# The instructions on the canvas are graphical instructions for customizing widgets.
Color:
rgb: 0, 0, 0
# These are values ​​in both for one. With rgba we add the alpha
Rectangle:
size: self.size
pos: self.pos
# self refers to the widget or maximum layout next to the indentation
# In this case, same size and same position as Container

:
# By default, BoxLayouts are oriented horizontally
spacing: 10
upholstery: 10
size_hint: 1, none
# Disable relative size in X and Y
# width: 650
height: 50
canvas:
Color:
#rgb: 0.78, 0.78, 0.78
rgb: 0.65, 0.65, 0.65
Rectangle:
size: self.size
pos: self.pos

:
orientation: verticale vertical & # 39;
spacing: 10
upholstery: 10
canvas:
Color:
rgba: 1, 1, 1, 0.25
Rectangle:
size: self.size
pos: self.pos
# Label:
# markup: True
# text: "[ref=prueba]hi world[/ref]"
# # In order for the item in the list to have an invisible button, you must add [ref=referencia]Text[/ref]
# # With on_ref_press, we do this by clicking on the reference created in the previous line of code, something is executed
# on_ref_press: print ("Hello holita")

:
spacing: 2
upholstery: 5
size_hint: None, None
width: 40
height: 32
canvas:
Rectangle:
source: & # 39; UNIT_n.png & # 39;
size: self.size
pos: self.pos

I imagine that all I want to do, is with properties and it's easier than it looks, but I do not know how to do it. I would also like, if possible, to tell me if there is an error or something that could be done more simply.

I think nothing escapes to indicate, but to miss something, let me know and I'll give you the information that might be missing.

I thank you in advance.
Greetings

android – What technology is used in hi's advertising widgets?

Hello, I wanted to create an advertising system in Android widgets. The operator does it in the wifis of the public every 15 minutes. Does anyone know how this is created? How to superimpose a banner or mini video on other applications?

What are the Cms widgets in the Magento admin panel?

What is the CMS widgets in the admin panel of magento?

widgets – Global $ wpdb does not show the correct data with the function call

I have a code that shows the last 3 pages updated recently or post.

This code works perfectly when I add it to the theme file sidebar.php.

get_results ("SELECT ID, post_title FROM $ wpdb-
> posts WHERE post_status = & publish; AND (post_type = & # 39; OR) post_type =
& # 39; post & # 39;) AND post_modified_gmt < '$today' ORDER BY post_modified_gmt DESC 
 LIMIT $count")):
 ?>
 

Should a site be drupal to use drupal widgets?

I have a site made to measure and that is not in drupal, but I need some drupal features for my site, can I do it without hosting on the site? drupal platform?
the site is getintopc ..

algorithm – PHP – Pack widgets in the smallest number of boxes, plus minimum order quantity

Here is the problem:

A company provides widgets in a set of pack sizes:

Customers can order an unlimited number of widgets, but the following rules apply:

  • Only whole packets can be sent and …
  • No more widgets than needed should be sent and …
  • The least possible package must be sent

Some examples showing the number of widgets ordered and the quantities and sizes of packaging required to correctly fill the order:

  • 1 (1 x 250)
  • 251 (1 x 500)
  • 501 (1 x 500 and 1 x 250)
  • 12001 (2 x 5000 and 1 x 2000 and 1 x 250)

I've looked at some algorithms (greedy change, LAFF, etc.) because they seem to provide similar solutions, but do not seem to see how to adapt them to the above.

For example:

countCurrency function ($ amount)
{
$ notes = array (5000, 2000, 1000, 500,
250);
$ noteCounter = array (0, 0, 0, 0, 0);

// count the notes
for ($ i = 0; $ i < 5; $i++)  
    { 
        if ($amount >= $ notes[$i])
{
$ noteCounter[$i] = intval ($ amount /
$ notes[$i])
$ amount = $ amount -
$ noteCounter[$i] *
$ notes[$i];
}
}
// print notes
echo ("Currency Count ->". " n");
for ($ i = 0; $ i <5; $ i ++)
{
if ($ noteCounter[$i] ! = 0)
{
echo ($ notes[$i] . "".
$ noteCounter[$i] . " not");
}
}
}

$ amount = 12001;
countCurrency ($ amount);