state

Accessing OpenGL state variables in Cg

I need to access the OpenGL state variables (such as the MVP matrices) in my Cg shader program. I'm passing these values to my Cg shader program manually using calls such as cgGLSetStateMatrixParameter() in my C/C++ code. Is there an easier way to do this? ...

What kind of problems are state machines good for?

What kind of programming problems are state machines most suited for? I have read about parsers being implemented using state machines, but would like to find out about problems that scream out to be implemented as a state machine. ...

How can I avoid global state?

So, I was reading the Google testing blog, and it says that global state is bad and makes it hard to write tests. I believe it--my code is difficult to test right now. So how do I avoid global state? The biggest things I use global state (as I understand it) for is managing key pieces of information between our development, acceptance...

comparison of ways to maintain state

There are various ways to maintain user state using in web development. These are the ones that I can think of right now: Query String Cookies Form Methods (Get and Post) Viewstate (ASP.NET only I guess) Session (InProc Web server) Session (Dedicated web server) Session (Database) Local Persistence (Google Gears) (thanks Steve Moyer) ...

Web Dev - Where to store state of a shopping-cart-like object?

You're building a web application. You need to store the state for a shopping cart like object during a user's session. Some notes: This is not exactly a shopping cart, but more like an itinerary that the user is building... but we'll use the word cart for now b/c ppl relate to it. You do not care about "abandoned" carts Once a cart i...

Do I have to use Viewstate in ASP.NET

I am moving from classic ASP to ASP.NET and have encountered what many of you already know as "viewstate". I might be jumping the gun with my assumption, but it looks highly cumbersome. I have developed many ASP forms in the past and never had issues with keeping state. Is there another way OR am I going to have to learn this Viewstat...

How would I go about taking a snapshot of a process to preserve its state for future investigation? Is this possible?

Whether this is possible I don't know, but it would mighty useful! I have a process that fails periodically (running in Windows 2000). I then have just one chance to react to it before having to restart it and painfully wait for it to fail again. I didn't write the process so don't have the source to debug. The failure is seemingly rand...

State and time transending logic and program flow?

Wondering if it would ever be useful to index every possible state of an application using some reference keys... Meaning, say we have a program that starts, has only so many possible outcomes, say 8. but if each outcome is attained through stepping through many more logic states, and in between each branch is considered to be a state ...

Storing the state of a complex object with Memento pattern (and Command)

Hello, I'm working on a small UML editor project, in Java, that I started a couple of months ago. After a few weeks, I got a working copy for a UML class diagram editor. But now, I'm redesigning it completely to support other types of diagrams, such a sequence, state, class, etc. This is done by implementing a graph construction framew...

ASP.NET Session State Server - Saving Unserialized Data

As you know, in ASP.NET, you can store session data in one of following three modes: InProc Session State SQL Server For InProc mode, you can store any kind of data objects even it's not serializable. However, in Session State and SQL Server modes, you can only store serialized data. In my project, I have a ready made portal which...

What are good ways to design or diagram state?

The issue that prompted me to ask this is a web form that was not persisting data the way I expected it to. That's vague, but the point is, what do you like to do to model state, flow of data, and so forth? ...

Better way to extend restful_authentication AASM states

I recently had to extend the aasm states for the latest version of restful_authentication (github) in one of my apps. I removed the "include Authorization::AasmRoles", copied the existing states and events from the plugin and made the changes necessary to support an additional "published" state on my account model. Does anyone have a cl...

Saving And Loading CollapsiblePanelExtender Control State Over Postback

I'm using asp.net/c# and have a number of Collapsible Panel Extenders that have been dynamically created when the page loads. The controls are within an update panel that updates every 5 seconds. The problem I have is whenever the update panel updates the state of the controls is reset. For example the Collapsible Panel Extender start li...

Good way to maintain ASP.NET Panel states?

I'm creating a multi-part web form in ASP.NET that uses Panels for the different steps, making only the Panel for the current step visible. On Step 1, I have a drop-down list that uses a Javascript function to reconfigure some of the fields in the same Panel via "onchange". Obviously, since the client-side script is only affecting the D...

Best way to load an application like it was in its previous state when it was terminated

I would like to learn the best practices in reloading the application state, such that when my app is started, it should automatically load the "correct" view/subview when it is opened again. In my particular case, my app has a bunch of view controllers, each taking care of a UITableView. I would like for my app to "jump" to the correct...

ASP.net session state service information

Hi all, Where can you get information on the ASP.NET State Service e.g. how it works, performance, behaviour characteristics etc. Have looked on internet but cant find in depth information or an article dedicated to the subject. Thanks ...

ASP.net session state service information

Hi all, Where can you get information on the ASP.NET State Service e.g. how it works, performance, behaviour characteristics etc. Have looked on internet but cant find in depth information or an article dedicated to the subject. Thanks ...

Why does mx:states have trouble being resolved to a component implementation?

Every now and then I get an error when I set up states in an MXML file. The error I get says that mx:states could not be resolved to a component implementation. I read, at the following url, that this issue is caused by extending components - that somehow throws off the compiler's ability to resolve mx:states. I don't see why this sho...

Save entire desktop state?

I'd love to have a utility that would save and restore my current desktop state, much like sessions in Firefox. At best, it would freeze every application's state, open window positions, etc. and provide a scriptable interface to restore them at any time, just as you'd left them. More realistically, I could make a list of what applicat...

How to tell if system state is idle asleep etc in vb6

I'm attempting to make my own instant messenger and want the user to go into idle/away mode if the computer hasn't been used in so long. Does anyone have a great idea on how to do this? ...