state

How to design this particular finite state machine?

Hey peeps, I am trying to get my head around how to design the following system, which I think can be defined as a finite state machine: Say we have a pile of 16 building blocks (towers, walls, gates) together forming a castle. The player can drag the blocks to 16 places on a floorplan and if done right they will see the whole castle....

How to design a "web spider" with state in Haskell?

I am learning Haskell after years of OOP. I am writing a dumb web spider with few functions and state. I am not sure how to do it right in FP world. In OOP world this spider could be designed like this (by usage): Browser b = new Browser() b.goto(“http://www.google.com/”) String firstLink = b.getLinks()[0] b.goto(firstLink) print(b....

What Happen If ViewState Disabled

I have a large application which Just afew Pages of that uses ViewState. I want to know whats happen if I Disable ViewState in MasterPages and enable it in pages which really using it. ViewState Contents are too large in my application and cause to in crease page size. I want to reduce page size with disabling ViewState, Is it a good s...

ASP.net Application State

I can store Session State in "InProc" or State Server or Sql Server. If i maintain Application State where do objects are getting physically stored? ...

android:state_enabled missing/not working??

I do not have the property android:state_enabled for any of the controls. Typing it manually doesn't work either. I can only use the deprecated android:enabled. I have the latest everything. ...

PHP accelerators and static fields.

Hi all! I would like to know about static (class) field representation within PHP interpreter. For example, when you load a class in Java, static fields will be associated with that Class object; that means two applications running same JVM (and same classloader) will have some kind of shared global variable ;) I'm just wondering, if ...

Possible to change component on state change - Flex

I've got a whole bunch of data being displayed in different Labels, now I'm adding an edit state. I'd like all the labels to "transform" into TextInputs. I was just wondering if it possible to uses states to change into something like this ...

Android save Checkbox State in ListView with Cursor Adapter

I cant find a way to save the checkbox state when using a Cursor adapter. Everything else works fine but if i click on a checkbox it is repeated when it is recycled. Ive seen examples using array adapters but because of my lack of experience im finding it hard to translate it into using a cursor adapter. Could someone give me an example ...

Any math approaches to state management of complex objects?

I usually use ASP.net web forms for GUI, maybe one of most "stateful" technologies. But it applies to any technology which has states. Sometimes forms are tricky and complex, with >30 elements and > 3 states of each element. Intuitive way of designing such a form usually works for 90%. Other 10% usually find testers or end-users:). The...

Android: What happens to my activity in case of incoming phone call?

I want to know that what will happen to my activity incase of an incoming phone call? Will the state of my activity be saved or I have to explicitly save it? Another question is that will the activity resume after the call is disconnected? Please help..! ...

What is the opposite of JAXB? i.e. generating XML FROM classes?

I am currently designing a solution to a problem I have. I need to dynamically generate an XML file on the fly using Java objects, in the same way JAXB generates Java classes from XML files, however the opposite direction. Is there something out there already like this? Alternatively, a way in which one could 'save' a state of java clas...

WPF Storyboard GetCurrentState

Hi, I am trying to detect when a storyboard is still active, still has an effect on a property(ie completed by still has a hold on the dependecy property it is animating). Completed="DeviceExplorer_Completed"> Duration="0:0:0.5"> In code I do Storyboard aStoryBoard = this.Resources["openDeviceExplorer"] as Storyboard; ...

[IE] Remove the complete styling of an HTML button/submit

Is there a way of completely removing the styling of a button in Internet Explorer? I use a css sprite for my button, and everything looks ok. But when I click the button, it moves to the top a little, it makes it look out of shape. Is there a css click state, or mousedown? I don't know what triggers that state. I know it's not a real...

Techniques for sharing a value among classes in a program

I'm using Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\MyProgram" As the path to store several files used by my program. I'd like to avoid pasting the same snippet of code all over the my applcation. I need to ensure that: The path cannot be accidentally changed once its been set The classes that ...

Why do my buttons stay pressed?

In my activity I respond to an onClick() by replacing the current view with a new one (setContentView()). For some reason when I do this and then go back to the original view later the button I originally pressed still looks like it is pressed. If you 'refresh' it somehow (e.g. scroll over it with the trackball) then it reverts to the u...

Saving State of Objects in GXT

Is there a way to store the state of objects in GXT? That is, having a dynamically configurable GUI built in GXT, you can add your own widgets 'on-the-fly' in any order you like - with your own custom everything. Is there a way to save the state of all the objects, so one can load the profile back at a later date? EDIT: Or is there an...

Clone a lua state

Recently, I have encountered many difficulties when I was developing using C++ and Lua. My situation is: for some reason, there can be thousands of Lua-states in my C++ program. But these states should be same just after initialization. Of course, I can do luaL_loadlibs() and lua_loadfile() for each state, but that is pretty heavy(in fac...

Keep EntityObject from changing into Added state (Entity Framework)

Stupid question maybe, yet still. public class Foo : EntityObject { public Bar Bar { get; set; } // navigation property } public class Bar : EntityObject { // whatever } // code var myFoo = Foo.Create(); // detached state after this line var myBar = LoadMyBarFromDatabase(); // Bar comes from DB myFoo.Bar = myBar; // myFoo.Enti...

Generating classes based on boost state machines

Hello, I am developing a network based server which can potentially have 100s of states and actions/events. So far I have managed with simple switch statements but now feel a need for a state machine which I can configure externally by text/xml file. What is your suggestion for existing C++ state machine which allows me to configure ...

MS Dynamic CRM 4.0 serviceappointment closed state javascript event

Hi, I need to do the following: In Crm, you have serviceappointments (serviceactivities). 1 appointment can have a state, ( like arrived, pending, closed, ... ). When i save the form (onsave event), It should catch if the form is putted closed state and then it should do something. I can get the state easily: alert(crmForm.all.statu...