postgresql – Postgres, returns 0 rows if one row matches the condition, otherwise all rows are returned

I have a table with ten rows. One of the columns is a Boolean. Let's just say, for the sake of reasoning:

email text
is_activated boolean

I want to write a query that returns zero rows if is_activated applies to each of the lines. If none of the lines has is_activated When set to true, I want to return all rows in the table.

How can I do that?

Linux Docker | unknown environment `bash` | Subprocess / usr / bin / dpkg returned an error code (1)

My goal is to get a Docker container up and running with nordvpn installed and connected.

Get Docker Container going

sudo docker pull ubuntu:latest
sudo docker run -it ubuntu bash
// now im in the docker container
apt install update
apt install wget
wget {{nordvpn_link.deb}}
dpkg -i {{nordvpn_link.deb}}
// some errors about dependencies after above command so ...
apt install -f
// then
apt install nordvpn

First big mistake

root@f706a3f4012f:/home# apt install nordvpn
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nordvpn is already the newest version (3.6.0-2).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? (Y/n) 
Setting up nordvpn (3.6.0-2) ...
(ERROR) Unknown environment `bash'
dpkg: error processing package nordvpn (--configure):
installed nordvpn package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I read here to run the following command

dpkg --configure -a
// errors
Setting up nordvpn (3.6.0-2) ...
(ERROR) Unknown environment `bash'
dpkg: error processing package nordvpn (--configure):
installed nordvpn package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:

I'm not sure why this happens with the Docker container as the process went smoothly with my regular Ubuntu desktop installation.

linux error: dpkg returned an error code (1)

Ola, pessoal!

Gostaria de saber se poderiam me ajudar a resolver esse erro:

An installation program for LTS 18.04 was created, which contains the following information:

comando: sudo apt-get install software-properties-common

Read package lists … Done
Create the dependency tree
Reading status information … Done
The following packages were installed automatically and are no longer required:
amd64-microcode intel-microcode iucode-tool linux-headers-5.0.0-37
linux-image-generic-hwe-18.04 thermald
Please use "sudo apt autoremove" to remove them.
The following additional packages are installed:
Python3 software properties software properties GTK
The following packages are updated:
Python3 Software Properties Software Properties Common
Software Features-gtk
3 updated, 0 reinstalled, 0 removed and 2 not updated.
1 partially installed or removed.
It is necessary to include 96.3 kb in the archives.
After this process, 0 o additional storage space is used.
Do you want to continue? (We)
Received from: 1 bionic-updates / main amd64 software-properties-common all (10.0 kB)
Received from: 2 bionic-updates / main amd64 software-properties-gtk all (62.7 kB)
Received from: 3 bionic-updates / main amd64 python3-software-properties all (23.6 kB)
96.3 kb received in 0s (253 kb / s)
(Read database … 190376 files and directories already installed.)
Preparation for unpacking … / software-properties-common_0. …
Unzip software properties-common ( to ( …
Preparation for unpacking … / software-properties-gtk_0. …
Unpack software-properties-gtk ( on ( …
Preparation for unpacking … / python3-software-properties_0. …
Python3-software-properties ( will be unpacked on ( …
Configuration of linux-image-5.0.0-37-generic (5.0.0-37.40 ~ 18.04.1) …
Parameterization of python3 software properties ( …
General configuration of the software properties ( …
Configuration of software properties-gtk ( …
Processing delayed actions ("triggers") for shared mime information (1.9-2) …
Editing delayed actions ("triggers") for Gnome menus (3.13.3-11ubuntu1.1) …
Processing delayed actions ("triggers") for dbus (1.12.2-1ubuntu1.1) …
Editing delayed actions ("triggers") for the Hicolor icon theme (0.17-2) …
Processing delayed actions ("triggers") to support MIME (3.60ubuntu1) …
Editing delayed actions ("triggers") for desktop file uses (0.23-1ubuntu3.18.04.2) …
Processing delayed actions ("triggers") for libglib2.0-0: amd64 (2.56.4-0ubuntu0.18.04.4) …
Processing delayed actions ("triggers") for man-db (2.8.3-2ubuntu0.1) …
Processing delayed actions ("triggers") for linux-image-5.0.0-37-generic (5.0.0-37.40 ~ 18.04.1) …
* dkms: Run the automatic installation service for Kernel 5.0.0-37-generic
Error! The file dkms.conf could not be found.
The file does not exist.
run-parts: /etc/kernel/postinst.d/dkms ended with return code 4
dpkg: Error processing package linux-image-5.0.0-37-generic (–configure):
The subprocess of the installed Linux Image 5.0.0-37 generic package after installing the script returned error completion status 1
Errors occurred during execution:
Linux image-5.0.0-37-generic
E: Subprocess / usr / bin / dpkg returned an error code (1)

& # 39; & # 39; & # 39;

I'm hindering the installation of new software for my PC. O que devo fazer para solucionar o problema?

Obrigada desde yes!

java – Call array returned by a method

I have this method where I want to use the returned array, but it gives me an error:

 public static int() validarRespuestas (String() preguntas, String() nombres, String()() matrizNotas){

        int aciertos=0, fallos=0;
        for (int fil = 0; fil < nombres.length; fil++) {
            for (int col = 0; col < matrizNotas(0).length; col++)  {
                if (matrizNotas(fil)(col).equals(preguntas(col))){
                else {

        System.out.println("Los aciertos son: "+aciertos);
        System.out.println("Los fallos son: "+fallos);
        int() resultado = {aciertos, fallos}; 

        return resultado;

public static void main(String() args){
int() val=validarRespuestas();

He tells me this by using the array returned by the method.

method validate Answers in the Tests class cannot be applied to certain types.
Required: String (), String (), String () ()
Found: no arguments
reason: actual and formal argument lists differ in length

How can a single compound type be returned from a plpgsql function without explicitly repeating the parts of the compound type as OUT parameters?

I hunted online and through documentation, but that a lot of A more common use seems to be returning a SETOF of a certain row type, not just a single row.

The following use case is trivial for illustration, as I am just trying to determine if this is possible in plpgsql and to understand the syntax to be used if it is. (Just as the Postgresql documentation contains examples of functions for returning a static set of fixed values, the point here is not the use case, but the syntax.)

With this table:

create table my_table (f1 int primary key, f2 text, f3 real, f4 text, f5 bool);

The following function can be created:

create function my_func1(f1_to_look_up int) returns my_table
language sql
as $$ select * from my_table where f1 = f1_to_look_up $$;

This can also be done in plpgsql with explicit out parameters (and with f1 expressly stated in the where Clause to avoid ambiguity):

create function my_func2(f1_to_look_up int, out f1 int, out f2 text, out f3 real, out f4 text, out f5 bool)
language plpgsql
as $$
  select * into strict f1, f2, f3, f4, f5
    from my_table where my_table.f1 = f1_to_look_up;

Is there any way to do the same in plpgsql without having to repeat the definition of? my_table to list all OUT parameters?

sharepoint online – If you query a single line of text that was filed with CAML, all elements are returned

I have a list in the SharePoint Online site collection. The list contains a field with the name Processed This is a single line of text, and only one element has a value in this field, while the other has no values.

I am writing this CAL query to get the individual article:

List oList = context.Site.RootWeb.Lists.GetByTitle(listname);
                CamlQuery camlQuery2 = new CamlQuery();
                camlQuery2.ViewXml = "" +
                    "Not Processed";

                ListItemCollection collListItem2 = oList.GetItems(camlQuery2);
                foreach (ListItem li in collListItem2)

However, this CAML returned all items, even though one item has the correct value while the other field is empty / null.

Any advice on how to solve this problem?

sharepoint online – SPFX: How to create a tag with the photo BLOB returned by MSGraph photo / $ value

I'm creating some custom who's who web parts.

After getting the user information with MSGraphClient / users API, I try to get and display the photo for each employee. It is difficult for me to create a day with the information returned by /users/$value.

I have tried different approaches, but none have been successful. Let me share one thing so you understand what I want to achieve:

  .then((client: MSGraphClient): void => {
    client.api('/users/$value').get((error, response: any, rawResponse?: any) => {
      const blobUrl = window.URL.createObjectURL(rawResponse.body);
      document.getElementById("myPhoto").setAttribute("src", blobUrl);

Apparently my HTML has an – img id = "myPhoto" tag.
If possible, I want to avoid using React and Persona View.

Any thoughts?

magento2 – Magento 2: The command returned a non-zero exit code during the transmission in the marketplace

Change the mode and skip the compilation:

php magento deploy:mode:set production --skip-compilation

php magento setup:static-content:deploy en_GB

Magento's default locale is en_US, so you need to define your language.

If this fails, make sure that / var and pub / have the correct permissions

Your PHP may be exhausted, so increasing the limit in php.ini should help, but skipping compilation and compiling after the switch is a good solution.

Also make sure that a valid topic is selected in your store. You may be using a topic that does not exist in the system.

7 – How are only the last 90 rows returned?

I have a custom content type and I add a node through Rules & Cron every day. This node has many fields with only numeric values ​​and I display them through the chart module. I just need to display the last 90 nodes (last 3 months), and sort by post date in descending order, which means "Today Node" must be the last line. How can I do this?

EDIT: based on a comment from Leymannx, I edit my question, no, this is not possible in the views ui. When I sort my nodes in ascending order by post day (this is the type I need) I get the first 90 rows I need the last 90 rows sorted in ascending order by post day. This setting in the ui view is therefore "contradictory".

A possible solution could be that I sort my view by post date in descending order to get the last 90 lines, and in a Cusmom module reverse sorting in ascending order, is that possible?