Questions tagged [stateful]

A stateful app is one that stores information about what has happened or changed since it started running

A stateful app is one that stores information about what has happened or changed since it started running. Any public info about what "mode" it is in, or how many records is has processed, or whatever, makes it stateful.

489 questions
12
votes
2 answers

Force rebuild of a stateful child widget in flutter

Let's suppose that I have a Main screen (stateful widget) where there is a variable count as state. In this Main screen there is a button and another stateful widget (let's call this MyListWidget. MyListWidget initialize it's own widgets in the…
Damien
  • 921
  • 4
  • 13
  • 31
11
votes
1 answer

What is a stateful transducer?

In the Clojure Core documentation for the 1.7 release - the following functions dedupe disj! dissoc! filter keep map random-sample remove replace take-while Have the following text in their API description Returns a transducer when no collection…
hawkeye
  • 34,745
  • 30
  • 150
  • 304
10
votes
3 answers

Flutter performance of StatefulWidget and StatelessWidget

I use a lot StatelessWidgets when I have to create "templates" of widgets that are used multiple times inside my app because the docs say so: Stateless widget are useful when the part of the user interface you are describing does not depend on…
Raffaele Rossi
  • 2,997
  • 4
  • 31
  • 62
10
votes
2 answers

Java stream operation fusion and stateful intermediate operations

I have been trying to understand and showcase how Java streams implement a type of loop fusion under the hood, so that several operations can be fused into a single pass. This first example here: Stream.of("The", "cat", "sat", "on", "the", "mat") …
Tranquility
  • 3,061
  • 5
  • 23
  • 37
9
votes
2 answers

Are WCF services stateless by default?

I've got a simple WCF service that lets clients/consumer applications log in by providing a username and password. If both the username and password are correct, the WCF service provides the client with a GUID. The GUID and the username are then…
rafale
  • 1,704
  • 6
  • 29
  • 43
9
votes
5 answers

Correct usage of Stateful Beans with Servlets

We currently have a Stateful bean that is injected into a Servlet. The problem is that sometimes we get a Caused by: javax.ejb.ConcurrentAccessException: SessionBean is executing another request. [session-key: 7d90c02200a81f-752fe1cd-1] when…
Burmudar
  • 263
  • 5
  • 14
9
votes
2 answers

Can I assume allocators don't hold their memory pool directly (and can therefore be copied)?

I'm writing a container and would like to permit the user to use custom allocators, but I can't tell if I should pass allocators around by reference or by value. Is it guaranteed (or at least, a reasonable assumption to make) that an allocator…
user541686
  • 205,094
  • 128
  • 528
  • 886
8
votes
3 answers

Why is it bad programming to use a stateful webservice and why would it be allowed?

I have a need for a stateful webservice in our organization. However, everywhere I read online says that building a stateful webservice is bad programming but nothing ever says why. I guess I don't understand what is so bad about it. I also don't…
Justin Balvanz
  • 1,186
  • 3
  • 12
  • 19
8
votes
3 answers

advantages of stateful programming?

i was wondering about the benefits of stateless programming, and found someone who shared my question: Advantages of stateless programming? as i read through the answers though, it made me curious about the converse question. what are the…
8
votes
1 answer

UnimplementedError (FLUTTER)

I'm super new at coding with Flutter and following this course that let's me create stateful widget. The problem is when I do, I get this throw UnimplementedError(); It should return to null. I have no clue what I'm doing wrong. my code: import…
Soun
  • 83
  • 1
  • 1
  • 3
8
votes
0 answers

In what situations react creates a new instance of a component?

TL;DR: Can I trust the reconciliation algorithm not to re-instantiate my stateful component simply because the change in Virtual DOM was too complicted to keep track of it? I believe, that React.Component instances are created and destroyed by React…
qbolec
  • 5,374
  • 2
  • 35
  • 44
8
votes
3 answers

Horizontal scaling of JSF 2.0 application

Given that JavaServer Faces is inherently stateful on the server side, what methods are recommended for horizontally scaling a JSF 2.0 application? If an application runs multiple JSF servers, I can imagine the following scenarios: Sticky Sessions:…
7
votes
1 answer

Flutter Stateful Widget set constructor default values

I have tried to create a custom stateful widget. But I can't find any reference on how to set default values on a constructor. As an example: class CustomWidget extends StatefulWidget { final String buttonText; final Function onPressed; …
RP Noeth
  • 73
  • 1
  • 4
7
votes
1 answer

How can I use a stateful LSTM model to predict without specifying the same batch_size as I trained it?

I tried to set stateful=True to train my LSTM model and it worked. But I have to reshape my input to the same batch_size that I set for the first layer, which is a must for stateful RNN, or I will get an error: InvalidArgumentError: Invalid input_h…
Andy
  • 73
  • 3
7
votes
1 answer

How to pass data by reference to stateful widget? I want to change a variable inside a stateful widget and update original variable

I want to pass data to a stateful widget, change the data inside the widget and also have it updated in the original location. I want to avoid global variables and I am wondering if I can pass a variable to a stateful widget by reference. Here is…
tmaihoff
  • 2,867
  • 1
  • 18
  • 40
1
2
3
32 33