state

How do you pass or share variables between django views?

Hi, I'm kind of lost as to how to do this: I have some chained select boxes, with one select box per view. Each choice should be saved so that a query is built up. At the end, the query should be run. But how do you share state in django? I can pass from view to template, but not template to view and not view to view. Or I'm truly ...

The reason for MonadState get and put?

I'm reading the Monads chapter in Real World Haskell (chapter 14). A function is defined as follows: type RandomState a = State StdGen a getRandom :: Random a => RandomState a getRandom = get >>= \gen -> let (val, gen')= random gen in put gen' >> return val I don't really understand the purpose of the get and put funct...

Workflow State not changing in asp.net

hi i m trying to change the state for workflow from one state to another on button click its working fine with windows but not with web application and its instance id does not persist i have used SqlWorkflowPersistenceService also. what can b the solution for this. thanks ...

[Flex] Modify components that is not included in the current state?

In Flex 4, is it possible to modify components that is not include in the current state? For example, I have labelA included in stateA, how do I change the label text in stateB? If I directly change the label text in stateB, I'll get an null reference error message. One workaround is to include labelA in all states, and set it to be inv...

Android -- How to properly handle onPause/onResume methods?

Hello all, I have an app that starts playing sounds and begins/resumes gameplay in the onResume() method, but what I'm noticing is that if my app was the last run application when I put the phone into standby (screen off), and I just press the Menu button to check the time, then the phone starts playing the game and sounds in the backgr...

Load balancing and sessions

Hi there, What is the better approach for load balancing on web servers? My services run in .NET and Mono, so they could be hosted on IIS or Apache2, and the will have to provide SSL connection. I've read two main approaches, store the state in a common server and use sticky sessions, there is any other else? I've read 3 diffent thin...

Managing active state (jQuery)

<ul> <li><a href="#">item 1</a></li> <li><a href="#">item 2</a></li> <li><a href="#">item 3</a></li> </ul> On click, I'd like to addclass active to the parent li element while also removing the active class from any other element which may be active already. Thanks! ...

Designing a state machine in C++

I have a little problem that involves modeling a state machine. I have managed to do a little bit of knowledge engineering and 'reverse engineer' a set of primitive deterministic rules that determine state as well as state transitions. I would like to know what the best practices are regarding: How to rigorously test my states and st...

Problem in JSF2 with client-side state saving and serialization

I have a problem in JSF2 with client side state saving and serialization. I have created a page with a full description and a small class diagram: http://tinyurl.com/jsf2serial. For the client-side state saving I have to implement Serializable at the classes Search, BackingBean and Connection. The exception that was thrown is: java.io...

Winforms Checkbox : CheckState property Indeterminate renders differently

In C# environment, setting a checkbox's CheckState property to Indeterminate displays a "green square" inside the checkbox. In VB environment, this displays as a "grayed out check" (which is less intuitive, even for "dummy" users). How do i make Indeterminate state look like a "green square" in VB.NET ? Btw, i am using VS2008, Winform...

Codeigniter: how to track activity w/o using multiple db rows?

I need to track the completion of tasks for users. I started by having a row called "first_login", "profile_complete", "other_thing_complete", etc... I'd like to combine these all into one row "activity_state". I just don't know how to properly store data in this field, and how to retrieve it. What kind of field should it be, and how...

Saving a list of items in Application State ASP.NET MVC ?

Hi Guys, I'm having a bit of trouble with knowing how I can save items from a list I have in Application state in the global.asax as- Application[""]. My controller basically takes in some user input, I then pass this to another classes Method as parameters it gets added to a list all the time. This data thats getting added to the list...

Using Flex 4 states syntax within MX component

The majority of code in my Flex application runs within flexmdi MDIWindow which extends MX Panel. I would really like to take advantage of the new syntax for managing states in Flex 4. Is it possible to use the new syntax even though the base class is Flex MX? It seems like a lot of work to sparkify flexmdi. thanks! ...

Can Haskell's monads be thought of as using and returning a hidden state parameter?

I don't understand the exact algebra and theory behind Haskell's monads. However, when I think about functional programming in general I get the impression that state would be modelled by taking an initial state and generating a copy of it to represent the next state. This is like when one list is appended to another; neither list gets...

How do I retain the state of a data input screen on a ASP.NET Page using ExtJs Controls

Hi, My Client has an application that is built in ASP.NET (c#) that makes use of a lot of ExtJS controls. I need to enable the application to save every thing on the entry screen to a temporary storage mechanism and when necessary restore it. The scenorio is the user has captured some data to a specific screen but is unable to continu...

Statements and state

Is there any deeper meaning in the fact that the word "statement" starts with the word "state", or is that just a curious coincidence? Note that english is not my native language, so the answer might be obvious to you, but not me ;) ...

setContentView gives an exception

In my android app I set this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN ); Then my touch screen event doesnt’ work any more. Further Explaining, I have a button and onClick it changes the contentView by setContentView(R.layout.choose_play...

Android full Screen flag gives an exception

In my android app I set this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN ); Then my touch screen event doesnt’ work any more. Further Explaining, I have a button and onClick it changes the contentView by setContentView(R.layout.choose_pla...

How do I get state of a outgoing call in android phone?

hi all. I noticed in the class TelephonyManager there are CALL_STATE_IDLE, CALL_STATE_OFFHOOK adn CALL_STATE_RINGING. They seem to be used for incoming calls. What I actually want to do is to be notified when an outgoing call is made, is received, or timed out. How to do that? ...

Using jquery to change checkbox status

Hi everyone! I have a list of items that have checkboxes associated with them, and the items are beneath a list header, which also has a checkbox(for db purposes only) which is actually hidden from view. I need to make it so that if any of the checkboxes beneath the header is checked, then the header checkbox is checked as well. BUT I ...