state

Save and restore applications and layout

I'm looking for ways to reduce the wasted time spent to open all the applications needed, position windows, open urls/files/change directories/etc. before actual coding starts. In the perfect world there would be 2 buttons marked 'SAVE STATE' and 'RESTORE STATE' per 'project'. The kind of feature you find in some games. I'm on a mac an...

rails workflow gem method missing error state machine

Hi, I am having a bit of trouble with the 'workflow' gem, namely, the transitions aren't working. What I am trying to do is very basic, I have a 'read/unread' state for messages between users, the transition is triggered when the user goes to a 'show' page for that specific message. However, I can't seem to get the transition to wor...

Social Networking Style Notifications System in Rails

Hi, I am building a social network from the ground up in rails and I am wanting to set up a face-book style notification system for displaying new messages, friend requests, etc... in a visual appealing and UI friendly manner. What's the best way to go about this? I am thinking of using acts_as_state_machine but it seems a bit out of da...

Addclass to link in jquery.

I have made a menu that gets subpages with ajax and it works as it should. And now I would like to add a class to the link that was clicked, so I can display an active state on that link? This is what I have: $(document).ready(function(){ loadPage(); }); function loadPage(url) { //loads the menu $('#guiden...

Navigating through multiple activities.

I have 2 Activities A and B. Now these are my objectives. When I'm in B and if I press the Home button, the state of the Activity should be saved. (No problem with this.) When I start B from A after step 1 a new instance of B should be created (i.e) Previous state should be discarded. But in Step 2 the state of B still prevails. How ...

HttpContext.Current.Application during load balancing

I wanted to understand the behavior of HttpContext.Current.Application during the load balancing. I have read that session can be stored in disk hence can be retrieved from different servers. Is this true for HttpContext.Current.Application also. Does the key\data stored in one machine is accessible in other different machine too? Ple...

How save add items on memory after close app ?

Why my add items dont save on memory? When I back to RootViewController my list disappear, What happened ? Code for add and work fine... - (IBAction) addButtonPressed: (id)sender { NSLog(@"Add button pressed!"); addPosto *addposto = [[addPosto alloc] initWithNibName:@"postoDictionary" bundle:nil]; UINavigationController *addNavCon ...

Haskell and State

Haskell is a pure functional programming language. My question is: What are the advantages and disadvantages of using Haskell to solve problems involving lots of state, for example GUI programming or game programming? Also a secondary question: what methods are there to handle state in a functional way? Thanks in advance. ...

How to restore state after calling another activity ?

My android app is simple : a single activity contains a webview which shows user my website,in it I have a link which when user clicks on it ,the default sms program will be called. That all works well,but when I return from the sms ,It restarts the program(call the onCreate() method ) instead of returning to the origin state , how can ...

Method return status: bool, string, const... (PHP)

Hi all! This question: http://stackoverflow.com/questions/356248/best-way-to-return-status-flag-and-message-from-a-method-in-java is similar to mine, however I would do it in PHP, not Java (which could make a slight difference here). The problem: There's a method that can have either a successful outcome (this may change to be more su...

Is it possible to create a custom state for use in a StateListDrawable?

They have states for things like pressed, focused, disabled, but is it possible to create custom states so it could reflect some of my own custom criteria? For example, say you have a list of names. Some people fall into a certain category that should be visually represented differently. These people's rows would then have a different ...

How can I write a state monad that does error handling as well?

Hi, I need to write a state monad that can also support error handling. I was thinking of using the Either monad for this purpose because it can also provide details about what caused the error. I found a definition for a state monad using the Maybe monad however I am unable to modify it to use Either, instead of Maybe. Here's the code:...