firebase – Error during a single update of sitView Flutter

I start to use Flutter and I do a job, I have a page which takes a list of names, just after clicking on an Add button, this button brings you to a screen with all the names ("students") saved, intent and click on a name, this screen will close and the list will update. But I don't get

Here are the codes:

class _ListarAlunosState extends State {


@override 

Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Lista"),  

actions: (


IconButton(
          icon: Icon(Icons.group_add),
          onPressed: () async {
            Navigator.push(
                context,
                MaterialPageRoute(
                    builder: (context) =>
                        AdicionarAlunoScreen(widget.snapshot.documentID)));

          }),
    ),

  ),
  body: FutureBuilder(
      future: Firestore.instance
          .collection("trabalhos")
          .document(widget.snapshot.documentID)
          .collection("alunos")
          .getDocuments(),
      builder: (context, snapshotAluno) {
        if (!snapshotAluno.hasData) {
          return Center(
            child: CircularProgressIndicator(),
          );
        } else {
          return ListView.builder(
              shrinkWrap: true,
              itemCount: snapshotAluno.data.documents.length,
              itemBuilder: (BuildContext context, int index) {
                DocumentSnapshot doc = snapshotAluno.data.documents(index);
                return Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: (
                    IconButton(
                      icon: Icon(Icons.perm_identity),
                      onPressed: () {},
                    ),
                    Text(
                      doc.data("nome"),
                      textAlign: TextAlign.center,
                      style: TextStyle(
                          fontSize: 18.0, fontWeight: FontWeight.bold),
                    ),
                    IconButton(
                      icon: Icon(Icons.delete_forever),
                      onPressed: () {},
                    )
                  ),
                );
              });
        }
      }),
);

}
}

class AdicionarAlunoScreen extends StatelessWidget {  

String id;



AdicionarAlunoScreen(this.id); 

 @override  

Widget build(BuildContext context) {
return Scaffold(
    appBar: AppBar(
    title: Text("Adicionar Aluno"),
),
body: ConsultaAlunos(id),
);

}
}

class ConsultaAlunos extends StatelessWidget {



String nome;


ConsultaAlunos(this.nome);


@override


Widget build(BuildContext context) {
return FutureBuilder(
  future: Firestore.instance.collection("alunos").getDocuments(),
  builder: (context, snapshot) {
    if (!snapshot.hasData) {
      return Center(
        child: CircularProgressIndicator(),
      );
    } else {
      var divideTiles = ListTile.divideTiles(
          tiles: snapshot.data.documents.map((doc) {
            return AlunosTile(doc,nome);
          }).toList(),
          color: Colors.grey(500))
          .toList();

      return ListView(
        children: divideTiles,
      );
    }
  },
);

}
}


class AlunosTile extends StatefulWidget {
final DocumentSnapshot snapshot;
String id;
AlunosTile(this.snapshot,this.id);
@override
_AlunosTileState createState() => _AlunosTileState();
}
class _AlunosTileState extends State {
@override
Widget build(BuildContext context) {
return ListTile(
  title: Text(widget.snapshot.data("nome"),
    style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold),
  ),
leading: Icon(Icons.person_add),
  onTap: (){
    print(widget.snapshot.documentID);
    Firestore.instance.collection("trabalhos").document(widget.id).collection("alunos").add({
      "nome" : widget.snapshot.data("nome")});
  },
   );

}
}


254% profit on #XBT on a single trade! Professional traders trading advice – Advertising, Offers

TopGold Forum is rapidly becoming the number one online finance destination for the Internet.

We are a leading authority and forum destination for professional investors, forex traders, affiliates and individuals who want to make a living online or make more money.

If this is your first visit, be sure to check out the FAQ by clicking on the link above. You must register before you can post: click on the registration link above to continue.

API – One super app or many single use apps

While players like Rappi / Alibaba / Wechat have opted for the super application, that is to say on a single application to host many unrelated services, ecosystems like Google, Amazon, etc. always have multiple single-use apps, like Google Suite apps like messaging, calendar, hangout, meeting, etc. .

What criteria would a product manager consider when deciding to bundle a business application?

that is, you would have a single super app with many SDKs or multiple single use apps linking multiple services via APIs.

Question of probability of single balls in bins

I found the question I ask here (balls in the bins, probability that exactly two bins are empty) and here (probability that exactly k bins are empty, given m balls and n bins?), However I do not not really understand the answers (especially the Sterling number), so I'm asking too. What is the probability that after throwing m balls in n squares, where the throws are independent, exactly 2 (or k) squares are empty?

I thought it would be

(n choose k) * (n-k / n) ^ m

If it is wrong, why? And what would be the solution?

Multifactor – Should all MFAs be on a single authentication node?

All of the multifactor authentication mechanisms (MFA) that I have seen have been installed on the same "authentication node". What I mean by that is that only one service (say, an authentication web page or VPN access) was doing all of the MFA checks in one place (to take the same examples: the web page goes through a login-password – OTP cycle, the VPN checks the login, password and a certificate).

Ultimately, the objective of the MFA system is to ensure that, in order to access a given service, more than one authentication mechanism is required.

Are there any fundamental reasons why these checks are not distributed among the authentication nodes?

Let's take for example a messaging system which is guaranteed be accessible only from a given network. To access this network, a device must present an individual certificate issued by the user (to a NAC for example). Or another similar combination of 2+ factors, on different systems closely linked together.
Is it acceptable in this case to say that "access to email is protected by an MFA"?

If this is not the case, is this a problem:

  • with naming naming ("because the books / standards say MFA is all on one system") → it would be boring and maybe a formal problem, but not a security risk
  • of a technical nature (as in "it's not sure because …") → it would be the real showstopper

php – mPDF – PHP71 Identical files 1 single function

mPDF – PHP71 Identical files Only one works Linux Locaweb hosting.

The file works fine, however when you rename the file, the new file with identical content does not work.
I have already checked on Google and I have not found a solution.

Error:
Warning: require_once (mpdf60 / Mpdf.php): failure to open the stream: no such file or directory in /home/storage/b/0b/e4/xxxxx/public_html/xxxx/rel_pdf_contas.php on the line 5

Fatal error: require_once (): Failed to open required & # 39; mpdf60 / Mpdf.php & # 39; (include_path = & # 39;.: / Usr / share / pear71: / usr / share / php71 & # 39;) in / home / storage / b / 0b / e4 / xxxxx / public_html / xxxx / rel_pdf_contas.php on the line 5

CONTENT OF THE FILE:

@session_start();

ini_set ("display_errors", 1);
error_report (E_ALL | E_STRICT);
require_once & # 39; mpdf60 / Mpdf.php & # 39 ;;
ob_start ();
require_once (& # 39; Connections / jpcon.php & # 39;);
require_once & # 39; txt_func.php & # 39 ;;
setlocale (LC_TIME, "Portuguese");
mysqli_select_db ($ jpcon, $ database_jpcon);
$ mtipo = $ _POST (& # 39; type & # 39;);
$ minicio = fdatae ($ _ POST (& # 39; start & # 39;));
$ mfim = fdatae ($ _ POST (& # 39; end & # 39;));
$ mcodigo = trim ($ _ POST (& # 39; code & # 39;));
$ mstatus = trim ($ _ POST (& # 39; status & # 39;));
$ mopera = trim ($ _ POST (& # 39; opera & # 39;));
$ rel_titulo = "Statement of accounts";

// start the search
if (isset ($ _ POST (& # 39; type & # 39;))))
{
if ($ _ POST (& # 39; type & # 39;) == & # 39; cl & # 39;)
{
// $ qmtipo = "codtec";
if ($ mopera == & # 39; t & # 39;)
{
$ vopera = & # 39; & # 39 ;;
} else {
$ vopera = "AND operator = & # 39;". $ mopera. "& # 39;";
}
$ sbusca = "SELECT * FROM tcontalote WHERE cod_tech = & # 39;". $ mcodigo. "& # 39; AND active = & # 39; 0 & # 39;". $ vopera;
$ qbusca = mysqli_query ($ jpcon, $ sbusca) or die (mysqli_error ());
$ nbusca = mysqli_num_rows ($ qbusca);
$ dbusca = mysqli_fetch_array ($ qbusca);
} else {
// $ qmtipo = "contaconta";
$ sctbusca = "SELECT * FROM tcontaitem WHERE contaconta = & # 39;". $ mcodigo. "& # 39; AND mesref BETWEEN & # 39;". $ minicio. "& # 39; AND & # 39;". $ mfim. "& # 39;";
$ qctbusca = mysqli_query ($ jpcon, $ sctbusca) or die (mysqli_error ());
$ nctbusca = mysqli_num_rows ($ qctbusca);
$ dctbusca = mysqli_fetch_array ($ qctbusca);
}
}
if ($ _ POST (& # 39; type & # 39;) == & # 39; cl & # 39;)
{
$ rel_dado = "Client:". $ mcodigo. "Period". $ _ POST (& # 39; start & # 39;). "AT". $ _ POST (& # 39; fin & # 39;);
} else {
$ sope = mysqli_query ($ jpcon, "SELECT tcontaitem.contaconta, tcontalote.operadora, toperadora.o_desc
DE (check INNER JOIN tcontalote
ON tcontaitem.contaconta = tcontalote.conta)
INNER JOIN toperadora ON tcontalote.operadora = toperadora.o_id
OERE ((tcontaitem.contaconta) = & # 39; ". $ Mcodigo." & # 39;) ") Or die (mysqli_error ());
$ xope = mysqli_fetch_array ($ sope);
$ rel_dado = "Account:". $ mcodigo. "Operator:". $ Xope (& # 39; operator & # 39;). "". $ Xope (& # 39; o_desc & # 39;). "Customer:". $ Dctbusca (& # 39; codtec & # 39;). "Period". $ _ POST (& # 39; start & # 39;). " at ". $ _ POST (& # 39; end & # 39;);
}

Rel Rep TechnnoCORP

.impamb {
font family: Verdana, Genève, sans-serif;
font weight: bold;
font size: 24px;
color: # 000;
}
.linhabase {
border-bottom-width: 1.50 px;
border-bottom-style: solid;
border-bottom-color: # 000;
}
.impoborda {
border: 1.75px solid # 000;
font family: Verdana, Genève, sans-serif;
font size: 14px;
}
.FonteDestaque {
font size: 18;
font weight: bold;
font family: Verdana, Genève, sans-serif;
color: # 000;
}
.fontedestaque2 {
font size: 16px;
color: #FFF;
font weight: bold;
font family: Verdana, Genève, sans-serif;
}
.White20Bold {
font size: 20px;
color: #FFF;
font weight: bold;
font family: Verdana, Genève, sans-serif;
}
.White24Bold {
font size: 24px;
color: #FFF;
font weight: bold;
font family: Verdana, Genève, sans-serif;
}
.fontedestaque3 {
font size: 12px;
color: # 000;
font family: Verdana, Genève, sans-serif;
}
.impamb2 {
font family: Verdana, Genève, sans-serif;
font size: 14px;
}
.fontemini {
font size: 10px;
color: # 000;
font family: Verdana, Genève, sans-serif;
}
.normal14 {
font size: 16px;
color: # 000;
font family: Verdana, Genève, sans-serif;
}
.normal11 {
font size: 11px;
color: # 000;
font family: Verdana, Genève, sans-serif;
}
.bold16 {
font size: 16px;
color: # 000;
font weight: bold;
font family: Verdana, Genève, sans-serif;
}
.normal18 {
font size: 18px;
color: # 000;
font family: Verdana, Genève, sans-serif;
}

ACCOUNT: – Operator:

Status
Expiry.
Checked
Old vr
Vr Offered
Real VR
Vr Paid
Chargeback VR
Ref.
Vr Eco

Period: Note:


  
Status Vencimento. Conferido Vr Antigo Vr Ofertado Vr Real Vr Pago Vr Estorno Ref Vr Eco
Periodo: Nota: 

       

Version of the administration system xxxx-
Development xxx@gmail.com (32) 6773 ”;

$ rodape = utf8_encode ($ rodape);

$ topo = & # 39;

Telecom solutions
CNPJ: – IE:
Tel: (32) 8204 Whatsapp: (32) 8980 e-mail: suporte@xxxx.com

Pag {PAGENO} / {nb}
Issued on & # 39; .date (& # 39; j-m-Y H: m & # 39;). & # 39;


"

$ topo = utf8_encode ($ topo);

$ mpdf = new mPDF (& # 39; & # 39 ;, & # 39; A4-P & # 39 ;, 7, & # 39; & # 39 ;, 10,10,35,5);
$ mpdf-> SetHTMLHeader ($ topo, & # 39; O & # 39 ;, true);
$ npag = $ mpdf -> {nb};
$ mpdf-> SetHTMLFooter ($ footer);
$ mpdf-> WriteHTML ($ html);

$ mpdf-> Exit (& # 39; relatorio_orcamento.pdf & # 39 ;, I);

exit ();
?>

asp.net mvc – How to use several models in a single view?

i tried adding two references in one view but it can't work
@model MaltipaleModel.test1
@model MaltipaleMode.test2
if we enter two time references, an error occurs
how to link several modes in single view.

amazon web services – Failure to run multiple Rails apps with Unicorn + Nginx on a single AWS EC2 instance

I know this problem has been discussed many times but I have been unlucky and have been unable to resolve the problem.

I go run multiple Rails applications sure AWS EC2 instance with Unicorn and Nginx.

I could run an application on rails mydomain.com

The project will therefore mydomain.com/app1 and mydomain.com/app2

The projects are in / home / ubuntu / work / app1 and / home / ubuntu / work / app2

/ etc / nginx / sites-available / default

upstream app1 {
 server unix:/home/ubuntu/work/app1/shared/sockets/unicorn.sock fail_timeout=0;
}
upstream app2 {
 server unix:/home/ubuntu/work/app2/shared/sockets/unicorn.sock fail_timeout=0;
}
server {
 listen 80;
 server_name localhost;
 root /home/ubuntu/work;
 access_log /home/ubuntu/work/log/nginx.access.log;
 error_log /home/ubuntu/work/log/nginx.error.log;

location /app1/ {
 root /home/ubuntu/work/app1/public;
 rewrite ^/app1/(.*)$ /$1 break;
 try_files /app1/$uri/index.html /app1/$uri.html /app1/$uri @app1;
}
location /app2/ {
 root /home/ubuntu/work/app2/public;
 rewrite ^/app2/(.*)$ /$1 break;
 try_files /app2/$uri/index.html /app2/$uri.html /app2/$uri @app2;
}

location @app1 {
 proxy_pass http://app1;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header Host $http_host;
 proxy_redirect off;
}
location @app2 {
 proxy_pass http://app2;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_set_header Host $http_host;
 proxy_redirect off;
}

 error_page 500 502 503 504 /500.html;
 client_max_body_size 4G;
 keepalive_timeout 10;
}

Can someone help me?

python 3.x – Given an array, find the integer that appears an odd number of times. There will always be a single integer that appears an odd number of times

def find_it(seq):
    counter = {}

    for num in seq:
        if num in counter:
            counter(num)+=1
        else:
            counter(num) = 1


    for k in counter:
        if counter(k) % 2 != 0:
            return counter(k)

    print(counter)



test.assert_equals(find_it((20,1,-1,2,-2,3,3,5,5,1,2,4,20,4,-1,-2,5)), 5)
test.assert_equals(find_it((1,1,2,-2,5,2,4,4,-1,-2,5)), -1); 
test.assert_equals(find_it((20,1,1,2,2,3,3,5,5,4,20,4,5)), 5);
test.assert_equals(find_it((10)), 10);
test.assert_equals(find_it((1,1,1,1,1,1,10,1,1,1,1)), 10);
test.assert_equals(find_it((5,4,3,2,1,5,4,3,2,10,10)), 1);

So he wants me to know which integer appears an odd number of times in a list, so I created a dictionary and counted the values ​​of the number of times it was counted and I all noted, but the only thing i need to do is print the key & # 39; 5 & # 39; which has been counted 3 times but I don't know how to return it. I am a beginner, so I may be overestimating this problem and I am sure there is an easier way to solve this problem, but I would also like to know how to solve this problem than I have . Thank you!

What are the means of the single & # 039; | & # 039; operator in PHP?

Hi!
What are the means of the single & # 039; | & # 039; operator in PHP? How can I use this operator? I looked at php.net, but I couldn't find out more about this operator.

I ask operator SINGLE (|), NOT operator DOUBLE (||).

Thank you.