0
голосов
2ответов
147 просмотров

Saving the State of a System

A very flowery title indeed. I have a PHP web application that is in the form of a web based wizard. A user can run through the wizard and select options, run process (DB queries) etc. They can go backwards and forwards and run process again and again. I am trying to work out how to best save t...

0
голосов
2ответов
3282 просмотров

ASP.NET GridView with LinqDataSource: Remember Sorting, Paging and WhereParameters state

I'm using a standard GridView with a LinqDataSource. The user can sort and page through the grid using the stock standard stuff. Searching criteria (WhereParameters) can also be used to filter the results. This works great, but the state is obviously lost whenever navigating away from the page. ...

2
голосов
2ответов
962 просмотров

HttpApplicationState - Why does Race condition exist if it is thread safe?

I just read an article that describes how HttpApplicationState has AcquireRead() / AcquireWrite() functions to manage concurrent access. It continues to explain, that in some conditions however we need to use an explict Lock() and Unlock() on the Application object to avoid a Race condition. I ...

1
голосов
1ответов
1278 просмотров

Entity Framework caching under ASP.Net

I was trying to find out which Entity Framework objects, if any, remain live after the end of an HTTP request that is being handled by ASP .Net? i.e. Does an ASP .Net application benefit from any of the Entity Framework caching mechanisms across different requests? This article describes the op...

0
голосов
2ответов
186 просмотров

Wildcard for PyGTK States

How do I combine: button.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("Green")) button.modify_bg(gtk.STATE_ACTIVE, gtk.gdk.color_parse("Green")) button.modify_bg(gtk.STATE_SELECTED, gtk.gdk.color_parse("Green")) etc. Into a one-liner wildcard covering all of the possible states (See Doc)

0
голосов
1ответов
1691 просмотров

Saving form elements properties to XML (Save control state)

I have been using in some projects a xml library for my settings saving, how it worked was like this : saveSettings(Control control, XmlConfig config, string controlName) It would then search all the controls inside that one (recursively), calling itself each time it found a new control, etc, ...

0
голосов
3ответов
455 просмотров

How to pass global values around (singleton vs. ???)

I've inherited a project that stores various parameters either in a config file, the registry and a database. Whoever needs one of these parameters just reads (and in some cases writes) it directly from the store. This, or course, is stupid, so my first thought was to refactor the existing code s...

2
голосов
1ответов
419 просмотров

Best way to persist state with Tomcat/Scala?

What's the best way to persist user state with Tomcat/Scala? My first thought is to keep account information on the session at all times and redirect the user to a login page if there's no information on the session for the account. Is this a viable model, or is there a smarter way of persisting ...

0
голосов
2ответов
700 просмотров

UITabBarController not loading "More" views at applicationDidFinishLaunching

I'm trying to restore the state of my multi-tabbed iPhone application. There are more than 5 tabs, each with it's own navigation controller. On applicationDidFinishLaunching, I determine which was the last tab the user was on and set it with myTabController.selectedIndex = persistedTabIndex; I...

0
голосов
1ответов
890 просмотров

Ideas for populating input checkboxes from database and maintaining state during postback

I have an asp.net page that uses a stringbuilder to output a client side checkbox for each record in my database. I need to check whether the checkbox should be on, depending upon a bool in the db and on postback maintain the state of all the checkboxes. Can anyone suggest a good approach to th...

2
голосов
3ответов
3107 просмотров

How to save and load a C++ application state in a modular way

I have a distributed C++ application, which is composed of 4 processes spread on 2 machines. One of the applications serves as "control center" for the rest of the applications. I want to be able to save the current state to a file and load it again later. What exactly is a "state" is defined s...

0
голосов
5ответов
1623 просмотров

Best way to share data between .NET application instance?

I have create WCF Service (host on Windows Service) on load balance server. Each of this service instance maintain list of current user. E.g. Instance A has user A001, A002, A005, instance B has user A003, A004, A008 and so on. On each service has interface that use to get user list, I expect th...

0
голосов
1ответов
246 просмотров

Synchronizing online game state via AJAX or RPC

I'm trying to find a way to synchronize game state in a browser based game. I've been using Google Web Toolkit, but I think my question pertains to any AJAX or RPC framework. As for my "game": think chess, but where you need to move the chess pieces in real time; if player 1 moves (drags and dro...

1
голосов
3ответов
3731 просмотров

c# Implement IHttpModule or IHttpHandler for IRequiresSessionState

Hi how do I set up an http handler so I can manipulate IRequiresSessionState? I need to change when I can access session state. There is a stackoverflow question that takes me 90% of the way there, I am just too green in c# to know how to actually implement it and get it to work. If one of you...

7
голосов
4ответов
5389 просмотров

State vs. Behavior

Sometimes objects consist of pure data. Such objects have fields, accessors, and virtually no other methods. Sometimes objects consist of pure behavior. They have other objects representing their state, or data is passed as method parameters. Usually such objects represent algorithms or some kin...

2
голосов
3ответов
5139 просмотров

Remembering a jQuery draggable tool palette position between page refreshes

I have a tool palette which shows up when an admin user is logged in to a site. The palette is draggable (via jQueryUI.draggable) and I would like it to remember the position between pages/refreshes... Is there a standard way of doing this, or a plug-in I should be using, or do I need to roll my ...

4
голосов
2ответов
4084 просмотров

How to get Javascript cookie to remember DIV state?

I've got a test site here (still in development) and I'm trying to get the little notification at the top to stay hidden once you click close. Currently my script is like this: <style type="text/css"> <!-- .hide { display:none; } .show { display:block; } --> </style> <scrip...

6
голосов
3ответов
26608 просмотров

jQuery "active" class assignment

All I am trying to accomplish is to be able to have an unordered list of links in which one is clicked, the parent list item is assigned the class "active." Once another link is clicked within that list, it checked to see if "active" is assigned, remove it from that list item, and add it to the m...

0
голосов
3ответов
1665 просмотров

How can I create a Mouse Hover State on Silverlight for a Stack Panel?

I am trying to create a mouse hover state which it changes its opacity when a mouse is over the stack panel. I have created the state, and created a mouse_enter event for the stack panel, and on the code behind cs file, I have the following code on Mouse_Enter event. MouseOver.Begin(); Where M...

3
голосов
2ответов
1962 просмотров

Gridview loses ItemTemplate after columns are removed

I'm trying to bind a datatable to a gridview where I've removed some of the autogenerated columns in the code behind. I've got two template columns and it seems that when I alter the gridview in code behind and remove the non-templated columns that the templates loose the controls that are in th...

2
голосов
4ответов
190 просмотров

Is it bad to model a web user control as a state machine?

We're designing a web user control, which does some different things. It gets events from inside it or outside it, and the response to these events depend on the state of this control. We're thinking of modeling as a state machine, but we think it might be too geeky or hard for someone else to u...

0
голосов
1ответов
1320 просмотров

How to create a stateful XML WebService in asp.net?

Without getting into the 'Stateful services are bad' discussion... How do you create one? From the lack of helpful search results.. it seems either I'm searching for the wrong terms or it is being actively discouraged. The best link i could find was this one on MSDN To give a brief context of w...

0
голосов
1ответов
162 просмотров

ASP.NET Application object loses values

I have a webpage with 1 label and 2 buttons. One button does a postback generates a random squence of numbers, saves it to the Application object, and calls a method which gets the list from the Application object and writes them to the label. The other obutton just calls the method which gets th...

12
голосов
4ответов
2245 просмотров

What are the best resources for learning how to avoid side effects and state in OOP?

I've been playing with functional programming lately and there are pretty good treatments on the topic of side effects, why they should be contained, etc. In projects where OOP is used, I'm looking for some resources which lay out some strategies for minimizing side effect and/or state. A good ...

13
голосов
5ответов
13742 просмотров

In what scenario is stateful better than stateless for the web?

I have always advocated the stateless web, but would like to know what the advocates of the stateful web are saying. Do you have any situation where stateful is more appropriate than stateless?

2
голосов
5ответов
8226 просмотров

iPhone app: SDK 3.0 : Button Selected State: Can't get working!

Trying to do simple button functionality. Button A. It has 3 states: default, highlighted, selected. Should UNSELECT when clicked again. For the life of me, I can't even get a simple 3 state functionality established. Highlight (on press) appears built in (goes to "stock" blue). I"ve used But...

15
голосов
4ответов
2590 просмотров

ASP.NET State Management in appropriate situations

There are 6 techniques to manage states in ASP.NET 3.5 (as far as I know). (1) View State (2) Cross Page Posting (3) Query String (4) Session State (5) Application State (6) Cookies Can anyone give me some appropriate examples of situations where I should use these techniques? For example: (...

2
голосов
2ответов
1030 просмотров

Keeping state with remote EJBs and Web Services

I have a web-based application which makes use of remote EJBs for its business logic. Some of these EJBs are also exposed as Web Services. I need to keep a small state for some of these calls in order to allow subsequent calls to function correctly. Which of the following would you recommend? S...

2
голосов
8ответов
3013 просмотров

C # / объектно-ориентированный дизайн - поддержание допустимого состояния объекта

Следует ли при разработке класса включать логику для поддержания допустимого состояния в класс или вне его? То есть должны ли свойства вызывать исключения при недопустимых состояниях (т. Е. Значение вне диапазона и т. Д.), Или эта проверка должна выполняться при создании / изменении экземпляра к...

0
голосов
1ответов
140 просмотров

Как я могу создать новое СОСТОЯНИЕ в кнопке во Flash CS3?

Я пытаюсь создать новое состояние для кнопки, например, когда я убираю указатель мыши из области нажатия, и при этом запускается небольшой фрагмент ролика. Как я могу это сделать? Мне, наверное, нужно какое-то конкретное название для этого состояния, например Hit или Over, верно?