the python wifi module does not return all wireless networks as a normal user

Running python as root returns all wireless networks, but as a normal user it only returns the 2.4GHz network;

upsscan@orangepi3:~/bin$ ls /sys/class/net
eth0  lo  wlan0
upsscan@orangepi3:~/bin$ python
Python 2.7.16 (default, Oct 10 2019, 22:02:15) 
(GCC 8.3.0) on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wifi
>>> wifi.Cell.all ('wlan0')
(Cell(ssid=rozsasnet))
>>> 
upsscan@orangepi3:~/bin$ sudo python
Python 2.7.16 (default, Oct 10 2019, 22:02:15) 
(GCC 8.3.0) on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import wifi
>>> wifi.Cell.all ('wlan0')
(Cell(ssid=rozsasnet), Cell(ssid=rozsasnet_5G))
>>> 
upsscan@orangepi3:~/bin$

One of them is 2.4GHz and the other is 5GHz.
Why does wifi.Cell.all (& # 39; wlan0 & # 39;) only return a Wi-Fi network as a normal user?
How can I get all wireless networks as a regular user?

Health,

Oracle: What question could you return to customers, phones and contract time, that is, according to the following example?

TO ()
SELECT C.NM_CLIE, T.NR_TELE, ROUND ((SYSDATE – T.DT_CADASTRO)) || & # 39; YEARS & # 39 ;. Like the time

CUSTOMERS C,

 TELEFONES T 

WHERE C.ID_CLIE = T.ID_CLIE

B ()

SELECT C.NM_CLIE, T.NR_TELE, ROUND ((SYSDATE – T.DT_CADASTRO) / 365.25) || & # 39; YEARS & # 39 ;. Like the time

CUSTOMERS C,

 TELEFONES T 

WHERE C.ID_CLIE = T.ID_CLIE

C ()

SELECT C.NM_CLIE, T.NR_TELE, ROUND ((SYSDATE – T.DT_CADASTRO) * 365.25) || & # 39; YEARS & # 39 ;. Like the time

CUSTOMERS C,

 TELEFONES T 

WHERE C.ID_CLIE = T.ID_CLIE

D () SELECT C.NM_CLIE, T.NR_TELE, ROUND ((SYSDATE / T.DT_CADASTRO) * 365.25) || & # 39; YEARS & # 39 ;. Like the time

CUSTOMERS C,

 TELEFONES T 

WHERE C.ID_CLIE = T.ID_CLIE

AND () SELECT C.NM_CLIE, T.NR_TELE, ROUND ((SYSDATE + T.DT_CADASTRO) * 365.25) || & # 39; YEARS & # 39 ;. Like the time

CUSTOMERS C,

 TELEFONES T 

WHERE C.ID_CLIE = T.ID_CLIE

F () None of the above.

insert image description here

How to return a boolean without overwriting it?

I have a 'problem' and it is the following I am receiving in my method a parameter with a value null, this value null it comes as if it were a string 'null', what I have tried to do is the following script

$ data ['preg_associated_service'] [$ i] == "null"? null:
  $ data ['associated_service_service'] [$ i]

my doubt is generated in the following, how to say that I return $data['preg_servicio_asociado'][$i]
no need to assign it in the else,
Will this be possible?

I appreciate the interest

Microsoft Excel – How to return the most recent year of a data table

I have a variety of orders and I just need to show the most recent year that a person has ordered. I have tried to chain some functions together, but that has not worked.

=IF(OR(C3>0,G3>0,P3>0),G2,"")AND(if(OR(D3>0,H3>0,K3>0,Q3>0),H2,"")and(IF(OR(E3>0,I3>0,L3>0,R3>0),I2,"")))

I'm not sure if there is a simpler way to say if cells xyz> 0, then g, but if abc> 0, then d.

I have also included a photo of the data set.

Data set

architecture – Does it return the result on the same line, without defining an intermediate variable, pattern or anti-pattern?

I have not found discussion on this subject. If there is an earlier discussion here where this topic has been discussed, please link it and I will close my question.

Two examples:

function random(number) {
  return Math.floor(Math.random() * number)
}

and the second:

function random(number) {
  const result = Math.floor(Math.random() * number)
  return result
}
  • The first one is definitely shorter, but if you need to stop and see the return value, you must modify the code.

  • You can see the return value from the point where random(...) The function is invoked, but the internal implementation at this point will be hidden from us, and you will have to make many context changes.

Considering both points, I would say that the first example is an antipatron, but people continue to use it. What am i missing?

United States – Visa with extended stay for 2 weeks in 1994, can I return as a tourist?

As the topic suggests that I exceeded a work visa to the USA. UU. In 1994, the exact stay would have been less than 2 weeks, I have not re-entered since, however, I am thinking of returning this year for a 2-week vacation.

At that time, my daughter was 5 years old and was on my passport and visa. When she returned to visit the United States in 2009, she was arrested in immigration. He didn't refuse, just asked a couple of questions and then continued. Since then, he has requested a repair number and has been several times without problems.

I have read a lot about a 10-year ban. Is this added automatically? That is to say. Will I have served mine now? I understand that you only begin to accumulate those 10 years from the age of 18, so my daughter was arrested?

If I am more than 10 years old, can I request ESTA and answer no to the question "have you stayed"?

Is there any way to really verify my status in your system?

Thank you

sql: group by correct return name for a maximum value in another field

Sorry for the badly titled question but I have the following sample data:

Account ID     Name     Order Value
1122           John      2000
1122           Dave      1500

For many thousands of accounts (in my learning example). What I am trying to do is group by account ID to return the maximum order value of each account, but I'm also interested in who placed that order for each account ID.

I am doing it as follows:

SELECT Data.(Account ID), min(Data.Name), max(Data.(Order Value))

group by Data.(Account ID)

However, this returns to Dave (due to the min () function), against the value of the Order of 2000, where I would like to see John's name. How can I get the name associated with the maximum order value for each account?

usa – Can I buy a one-way ticket to come to the UK? Or do I need to show a return ticket to enter?

I am an American who wants to come to the UK to discern if my boyfriend and I want to continue our dates and possibly get married in the future (not necessarily this trip). If I buy a one-way ticket, will I be denied entry? I am allowed to stay up to 6 months alone with my passport, but I wanted to make sure that was the case. I already have a place to stay, and I do not plan to work for the time I will be in the UK. I just don't know when I will return (within the 6 month period). Suggestions?

ubuntu – Redis 5.0.7 causes the test to return errors | Large active defragmentation and Slave keys should be able to synchronize

I am trying to install Redis, but when I run make test returns the following errors.

(err): Slave should be able to synchronize with the master in tests/integration/replication-psync.tcl
Replication not started.

...

(err): Active defrag big keys in tests/unit/memefficiency.tcl
Expected condition '$max_latency <= 120' to be true (838 <= 120)

...

!!! WARNING The following tests failed:

*** (err): Slave should be able to synchronize with the master in tests/integration/replication-psync.tcl
Replication not started.
*** (err): Slave should be able to synchronize with the master in tests/integration/replication-psync.tcl
Replication not started.
*** (err): Active defrag big keys in tests/unit/memefficiency.tcl
Expected condition '$max_latency <= 120' to be true (838 <= 120)
Cleanup: may take some time... OK
Makefile:262: recipe for target 'test' failed
make(1): *** (test) Error 1
make(1): Leaving directory '/var/www/redis/redis-5.0.7/src'
Makefile:6: recipe for target 'test' failed
make: *** (test) Error 2


I solved some other errors and warnings using:

  • vm.overcommit_memory=1 Y net.core.somaxconn=65535 in /etc/sysctl.conf
  • An exchange file
  • task set -c 0 make test
  • I never miss> / sys / kernel / mm / transparent_hugepage / enabled

But none of them corrected all errors.

object-oriented – python – the class does not return the expected result. I am using a function and a class

I am trying to pass 2 values ​​of a function to the class and get a result of the class. For example, if I send the value "dog", I should get the result as "dog runs" as a result returned. I need help with the code.

class secrets:
    def __init__(self,which,why):
        self.which=which
        self.why=why

    def mixed(self,which, why):
        which=("dog", "cat", "bird", "crow")
        why=("runs","jumps", "flies", "talks")
        if ("dog" in which):
            message=("dog"+ " " +why(0))
            print(message)
            return(message)
        else:
            print("dog not found")
            return(message)

asecret=secrets("which","why")
amessage=asecret.mixed("dog","dontknow")