counter

jquery plugin issues with counting chars when returns are used

I have a problem with jquery.charcounter.js its not counting returns as /r/n its counting them as 1 char instead of 3 or 4 here is the code is there a way around it if (el.val().length > max) { el.val(el.val().substring(0, max)); if (settings.pulse && !p) { pulse(container, true); ...

C#: How to count the data sent or received by my PC (all processes/programs)?

Hello. I need to count the amount (in B/kB/MB/whatever) of data sent and received by my PC, by every running program/process. Let's say I click "Start counting" and I get the sum of everything sent/received by my browser, FTP client, system actualizations etc. etc. from that moment til I shoose "Stop". To make it simplier, I want to ...

Latex: page n of m for \frontmatter and page n of m for \mainmatter

I am working on a book in latex, which uses the \frontmatter, \mainmatter, and \backmatter commands from the book class. I am also using lastpage which gives me page n of m for the pages counted in the \mainmatter. How would I get the n of m page count for the \frontmatter using roman numerals? ...

RESTful view counter

I would like to count the access to a resource, but HTTP GET should not modify a resource. The counter should be displayed with the resource. A similar case would be to store the last access. What is the REST way to realize a view counter? ...

PHP page counter, Database driven VS File .. which one better?

as the title of the question suggests, my question is simple, which one is better in terms of performance knowing that i'm on a linux shared hosting, siteground.. i'm capable of coding both, i actually coded a one that updates the DB, but from reading around some people suggested to insert and not to update.. any feed back is much apprec...

Linq to xml and counters across multiple projections

Similar to this question: http://stackoverflow.com/questions/372945/linq-iterators-selecting-and-projection I'm wanting to use a counter or incrementing variable in a projection - however I'm wanting to use the same counter across multiple projections. I'm constructing an xml document using a number of projections based on different da...

Searching for a good PHP based Web Counter

hi, I am running a php based web application and within that application I am using bbclone to count visitors and site activity. Unfortunately it doesn't work that nice as expected because bbclone counts a lot of robots and therefor my statistic is not that accurate as it should be. So do you know any good php based web application cou...

I can't figure out why this fps counter is inaccurate.

I'm trying to track frames per second in my game. I don't want the fps to show as an average. I want to see how the frame rate is affected when I push keys and add models etc. So I am using a variable to store the current time and previous time, and when they differ by 1 second, then I update the fps. My problem is that it is showing ...

Is there a C# token counter?

I want to have a programming competition with a friend of mine in C# and the competition will be to write with the fewest number of C# tokens. I have seen C++ token counting programs around but is there one for C#? Or would there be something in System.Reflection? Additionally, if anyone has links to token counters for other languages, f...

How to get the Apple Javascript Split Flap Counter to run on a local machine

I am captivated by the split-flap animation on Apple's 10 billion song download page: http://www.apple.com/itunes/10-billion-song-countdown/ however, I have not been able to replicate it on my own machine. I have downloaded the script and what I believe is the appropriate css, but the page only displays 3 images of the number 0. Has anyo...

Increment ID Number (JS)

I'm using jQuery Selectbox plugin which has this function: function setupContainer(options) { var container = document.createElement("div"); $container = $(container); $container.attr('id', elm_id+'_container'); $container.addClass(options.containerClass); return $container; } ... it applies the same ID name to al...

Find absolute position of xml tag with XSLT

I have this XML document where I want to modify using XSLT to a different format. The problem I'm currently facing is finding the absolute position of a tag relative to root and not to the parent. For instance take the following example: <book> <section> <chapter> </chapter> </section> </book> <book> <section> <ch...

Non-linear counter

So I have a counter. It is supposed to calculate the current amount of something. To calculate this, I know the start date, and start amount, and the amount to increment the counter by each second. Easy peasy. The tricky part is that the growth is not quite linear. Every day, the increment amount increases by a set amount. I need to recr...

ifconfig packet count

Hi, if I type ifconfig i get packet for Tx and RX ... where exactly the piece of code to increment this counter? Is it in the network driver itself? or in the kernel ? If possible please provide lxr link of the counter variable used. Thx ! ...

I've got to update a column in one SQL table with a counter stored in another table, and update that table too

I'm using SQL server 2005 (for testing) & 2007 (for production). I have to add a unique record ID to all the records in my table, in an existing column, using a "last record ID" column from another table. So, I'm going to do some sort of UPDATE of my table, but I have to get the "last record ID" from the other table, increment it, upd...

Counter in VXML

I'm sorry that this is probably a really basic question but I'm just beginning to program. Basically I need to increment a counter in VXML. I've declared the counter as: and in an IF statement I've incremented by doing this: the second assign tag increments the counter. Thank you I have recognised a school Is that concept cor...

To find an execution line-counter for Java IDE

Is there any plugin to some IDE that show the number of times a line is run in the code? Eclipse's ECLemma does not seem to have a setting to show execution times at the left-hand-side bar, like in the service WebCat. ...

Timer\Counter in C for rate calculation?

Need a running (moving, rolling) average algorithm to calculate the 5-minute average bits that are passed in. All I have to work with is an accumulative value for the bits that are passed in. For example: I start with 0 bits, 5 minutes later, I have 10 bits, so my average is 10 bits. 5 minutes later, I have 15 bits, so now my averag...

best way for jsp visitor hit counters

what is the best way for creating a jsp visitor hit counters? is it better to use txt file and save the hit value into a file, or create a table in database??? or use session/cookie to count the users whom have visited the website? ...

jQuery counter to count up to a target number

I'm trying to find out if anyone knows about an already existing jQuery plugin that will count up to a target number at a specified speed. For example, take a look at Google's number of MB of free storage on the Gmail homepage, under the heading that reads "Lots of space". It has a starting number in a <span> tag, and slowly counts upwa...