persistent

Stateful tail (only shows the new lines from the last execution)

I want to be able to see how many lines were added to a file since the last quering without reading the whole file again. Something like : ptail my_file | fgrep "[ERROR]" | wc -l A solution in simple Perl would be prefered, since I don't have an easy access to a compiler. ...

Need to generate a Persistent Transient Failure

Update: A 4.x.x vs a 5.x.x became the least of my worries when I discovered that not all mail servers return errors according to the "standard". I'm opting to handle all types of returned mail as failures now but I'm leaving this question here in case it gets an answer and helps someone else. I've been tasked with writing a program to r...

The route addition failed: Cannot create a file when that file already exists.

I get this error when using c:>route add <route_and_interface_here> This happens on a RRAS server that has a PPTP site-to-site VPN setup with demand-dialing static route. This route shows in RRAS routing table but does not show in c:>route print table which might be the first source of the problem. Anyone seen this before? Anyone with ...

Are hundreds/thousands of tcp sockets reasonable with memcached?

I'm using Merb::Cache for storing txt/xml and have noticed that the longer I leave my merbs running the larger the amount of open tcp sockets I have open -- I believe this is causing some major performance problems. lsof | grep 11211 | wc -l 494 merb 27206 root 71u IPv4 13759908 TCP localhost.local...

appengine - java persistent

I have 3 class with relation: Member 1-n Tracker Link 1-n Tracker with owned one-to-many bidirectional relationship @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Member { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent(ma...

Persistent connections to memcached in PHP

In our current use of memcached, we are running into problems in a high volume server because so much time is used setting up and tearing down connections to our memcache server. Would using persistent connections to memcached help alleviate this problem? Also, what is the preferred way to connect and use persistent memcahced connectio...

Django persistent database connection.

Hi folks, I'm using django with apache and mod_wsgi and PostgreSQL (all on same host), and I need to handle a lot of simple dynamic page requests (hundreds per second). I faced with problem that the bottleneck is that a django don't have persistent database connection and reconnects on each requests (that takes near 5ms). While doing a...

Python: Persistent shell variables in subprocess

I'm trying to execute a series of commands using Pythons subprocess module, however I need to set shell variables with export before running them. Of course the shell doesn't seem to be persistent so when I run a command later those shell variables are lost. Is there any way to go about this? I could create a /bin/sh process, but how wo...

Java NIO framework for filesystems instead of networks?

There are several high quality frameworks that hide the complexity of NIO based network programming (mina, netty, grizzly, etc.). Are there similar frameworks that simplify NIO based file-system programming? For example, as a learning exercise, I would like to implement a disk backed Map based on this (awesome!) article: http://www.jav...

Is there any way to have persistent (regardless of how small) client-side storage via the web?

Okay, since none of you guys like my question, let me rephrase it. User logs into an HTML form. With JavaScript, their password is hashed locally (salted too). The server knows what the password + salt should be, user is already registered, blahblahblah. Now the user requests a page. The server sends a random ID to the user. When t...

HTTP persistent connection vs TCP socket connection

From this article on Wikipedia: Keepalive messages were not officially supported in HTTP 1.0. In HTTP 1.1 all connections are considered persistent, unless declared otherwise. Does this mean that using this mechanism I can actually simulate a TCP socket connection? Using this can I make a Server "push" data to a clie...

What exactly does a "persistent connection" mean?

I read about "HTTP persistent connection" but somehow I don't seem to understand what does persistent mean in this context. Could you'll elaborate? ...

Recommend a fast & scalable persistent Map - Java

I need a disk backed Map structure to use in a Java app. It must have the following criteria: Capable of storing millions of records (even billions) Fast lookup - the majority of operations on the Map will simply to see if a key already exists. This, and 1 above are the most important criteria. There should be an effective in memory ca...

drupal persistent login, why use?

Why do i have to use some persistent-login module to make my users login into Drupal 6 for longer period of time. Why changing php.ini or settings.php doesnt works ? from a "webtools" I see my cookies being expired in next day, but after few hours it happend to log me out. This is like spontagenious action, no pattern to follow / predi...

How to persisting objects in Windows XP / Delphi 7?

Possible Duplicate: Persistent Objects in Windows XP/Delphi 7 Hi every body: I am deployment an Alarm System, and I have to registered alarms in a database. What happens if the connection to the database is broken?? I think to persist objects is a good idea: persist all alarms and when connection is restablished, register the pe...

Setting persistent cookie from Java doesn't work in IE.

All, Although I see related topics on the forum, but I don't see a clear solution on this issue. I am trying to set a javax.servlet.http.Cookie with an expiration time (so that it persists across browser sessions). Code: public void respond(HttpServletRequest req, HttpServletResponse resp) { int expiration = 3600; Cookie cookie = new...

Long Lived Persistent TCP Connection on the Android

I've read some articles on the web and some questions on StackOverFlow, but no one seems to have a definite answer over a) If google uses Long Lived TCP connections for Gmail, Mail etc, and b) If using it in a custom app will drain battery life , and if so roughly how much? ...

Persistent Qt Local Socket IPC

I'm developing an application that uses IPC between a local server and a client application. There is nothing particular to it, as it's structured like the Qt documentation and examples. The problem is that the client sends packets frequently and connecting/disconnecting from the server local socket (named pipe on NT) is very slow. So w...

Persistent Store data lost after session terminates in Blackberry application

Hi , I am using persistent stores to store data in a Blackberry application. While I create objects and store it in persistent store in same session data is saved properly. But the data is not recovered from store in next session. How do I fix this? My code is as follows: static TrialStore ts = new TrialStore(); static Vector data= n...

Locking a single NSPersistentDocument

My application currently uses CoreData as a backend to store to a single SQL data file stored in ~/Library/Application Support/MYAPP/MyDataFile.sqlite. I know it's an unusual situation, but what is the best way to "lock" this file so that if the user decides (for whatever silly reason) to run a second copy of my app, Core Data won't frea...