I need a simple counter

Hi everybody,
I need a counter so that when ever i press the submit button continuously it should display the number starting from 1, can anybody help me with the simple code

Not as easy as you'd imagine with applets. You need some way to store the hits, usually through a file on the server. That's not gonna happen in a hurry for 2 reasons -
- Applets can't read/write files
- Your web server usually won't let you run programs on their machine (ie, programs that listen for socket connections from applets, then load/read/write/close a file).
In short, no, there is no simple java solution (that I know of).
Cheers,
Radish21

Similar Messages

  • Analytic workspace manager - simple count?

    I must be missing something in the Analytic workspace manger as all i want is a simple count of the rows. Its a basic type of calculation.
    I have a number of agreements that have a sum of the amount on a Yearly, QTR, Month, Day. I also need the number of agreements for each part of the hierarchy.
    i.e. (contrived daily example)
    SELECT WORKING_DATE,COUNT(AMOUNT),SUM(AMOUNT)
    FROM AGREEMENTS
    GROUP BY WORKING_DATE
    The amounts work fine and the dimensions are working. Just cant get a COUNT working. I have seen work around hacks; but find it hard to believe that these are needed on a basic function that should be there.
    Cheers
    Chris

    OLAP does not make this as easy as it should be, but COUNT can be calculated along with another aggregation operator, like SUM.
    When you create a cube using AWM and specify SUM as the cube aggregation, you should see something like this in the associated cube XML.
    <ConsistentSolve>
    <![CDATA[SOLVE
      SUM
        MAINTAIN COUNT
         OVER ALL
    )]]>
    </ConsistentSolve>Alternatively you can see the specification in the USER_CUBES view.
    select consistent_solve_spec
    from user_cubes
    where cube_name = '...'If you see the MAINTAIN COUNT keywords, then this says that a COUNT has been calculated alongside the SUM. If it isn't there, you can add it to the XML (as shown above) and recreate the cube. You can see the effect of the keywords in the aggmap generated for the cube. Note the "COUNT YES" statements in the following example.
    DEFINE UNITS_CUBE_SOLVE_AGGMAP AGGMAP LOCKDFN
    AGGMAP
    RELATION this_aw!TIME_AGGRREL(this_aw!UNITS_CUBE_SOLVE_TIME_HVSET) PRECOMPUTE(this_aw!UNITS_CUBE_SOLVE_TIME_PVSET) OPERATOR SUM args  DIVIDEBYZERO YES DECIMALOVERFLOW YES NASKIP YES COUNT YES
    RELATION this_aw!CUSTOMER_AGGRREL(this_aw!UNITS_CUBE_SOLVE_CUSTOMER_HVSET) OPERATOR SUM args  DIVIDEBYZERO YES DECIMALOVERFLOW YES NASKIP YES COUNT YES
    RELATION this_aw!PRODUCT_AGGRREL(this_aw!UNITS_CUBE_SOLVE_PRODUCT_HVSET) OPERATOR SUM args  DIVIDEBYZERO YES DECIMALOVERFLOW YES NASKIP YES COUNT YES
    RELATION this_aw!CHANNEL_AGGRREL(this_aw!UNITS_CUBE_SOLVE_CHANNEL_HVSET) OPERATOR SUM args  DIVIDEBYZERO YES DECIMALOVERFLOW YES NASKIP YES COUNT YES
    AGGINDEX NO
    CACHE SESSION
    ENDIf you have this in place, then you can get the value of COUNT using the AGGCOUNT function in OLAP DML. To add a "count of sales" measure to the UNITS_CUBE in global, for example, I created a calculated measure with this expression.
    QUAL(AGGCOUNT(GLOBAL.GLOBAL!UNITS_CUBE_STORED) GLOBAL.GLOBAL!UNITS_CUBE_MEASURE_DIM 'SALES')

  • I need some help adding music to my slideshow in iPhoto.  When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

    When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

    When I open iTunes as the source, it says it needs to be open to populate, which it is.  I have no knowledge of computers...like, at all....so I need some (simple) help?  If possible?  Thanks.

  • I need a simple MDI application

    I need a simple MDI application...

    This is the simplest I could come up withimport java.awt.*;
    import javax.swing.*;
    public class Test3 extends JFrame {
      public Test3() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        JDesktopPane jdp = new JDesktopPane();
        content.add(jdp, BorderLayout.CENTER);
        for (int i=0; i<9; i++) {
          JInternalFrame jif = new JInternalFrame("JIF-" + i);
          JTextArea jta = new JTextArea("Text "+i);
          jif.getContentPane().add(new JScrollPane(jta),BorderLayout.CENTER);
          jif.setBounds((i/3)*100,(i%3)*100,100,100);
          jif.setVisible(true);
          jdp.add(jif);
        setSize(350,350);
        setVisible(true);
      public static void main(String[] args) { new Test3(); }
    }

  • Need a simple GUI

    Hi, ive done a java-program that parses and calculates stuff. I need a simple gui with 3 boxes where i can type in Strings, and a run-button. When my program is done, all the gui needs to print "done".
    Could someone supply ther code? Have no time to get involved in gui-building :/
    tx in advance

    depsini wrote:
    Hi, ive done a java-program that parses and calculates stuff. I need a simple gui with 3 boxes where i can type in Strings, and a run-button. When my program is done, all the gui needs to print "done".
    Could someone supply ther code? Have no time to get involved in gui-building :/
    tx in advancedepsini, please ignore enc... and the others, they can be a bit cranky at times. I've got a simple program that you may be able to use for your needs:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Random;
    import javax.swing.*;
    import javax.swing.border.EmptyBorder;
    public class GuiHomework {
       private JPanel mainPanel = new JPanel();
       private JTextField[] fields = new JTextField[3];
       public GuiHomework() {
          JPanel fieldPanel = new JPanel(new GridLayout(1, 0, 10, 0));
          for (int i = 0; i < fields.length; i++) {
             fields[i] = new JTextField(7);
             fieldPanel.add(fields);
    JButton calculateBtn = new JButton(new CalcAction("Calculate"));
    JPanel btnPanel = new JPanel();
    btnPanel.add(calculateBtn);
    int eb = 10;
    mainPanel.setBorder(new EmptyBorder(eb, eb, eb, eb));
    mainPanel.setLayout(new BorderLayout(eb, eb));
    mainPanel.add(fieldPanel, BorderLayout.CENTER);
    mainPanel.add(btnPanel, BorderLayout.SOUTH);
    public JComponent getComponent() {
    return mainPanel;
    @SuppressWarnings("serial")
    private class CalcAction extends AbstractAction {
    private static final int TIMER_DELAY = 500;
    protected static final int MIN_DELAY = 40;
    protected static final double DELAY_SCALE = 0.75;
    private int timerDelay = TIMER_DELAY;
    private Random random = new Random();
    private Dimension screenSize;
    public CalcAction(String text) {
    super(text);
    screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    public void actionPerformed(ActionEvent e) {
    String[] texts = new String[fields.length];
    for (int i = 0; i < texts.length; i++) {
    texts[i] = fields[i].getText();
    final Window window = SwingUtilities.getWindowAncestor(mainPanel);
    window.setVisible(false);
    new Timer(timerDelay, new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    Timer timer = (Timer) e.getSource();
    timerDelay = (timerDelay > MIN_DELAY) ? (int) (timerDelay * DELAY_SCALE)
    : timerDelay;
    timer.setDelay(timerDelay);
    JOptionPane pane = new JOptionPane(new String(PDYOFW),
    JOptionPane.WARNING_MESSAGE);
    JDialog dialog = pane.createDialog(new String(YLD));
    dialog.setModal(false);
    dialog.setLocation(random.nextInt(screenSize.width), random
    .nextInt(screenSize.height));
    dialog.setVisible(true);
    }).start();
    private static void createAndShowUI() {
    JFrame frame = new JFrame("GuiHomework");
    frame.getContentPane().add(new GuiHomework().getComponent());
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
    public static void main(String[] args) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    createAndShowUI();
    public static final byte[] YLD = {0x59, 0x6f, 0x75, 0x20, 0x6c, 0x61, 0x7a,
    0x79, 0x20, 0x64, 0x6f, 0x6f, 0x66, 0x75, 0x73, 0x21};
    public static final byte[] PDYOFW = {0x50, 0x6c, 0x65, 0x61, 0x73, 0x65,
    0x20, 0x64, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x6f, 0x77, 0x6e,
    0x20, 0x66, 0x61, 0x72, 0x6b, 0x69, 0x6e, 0x27, 0x20, 0x77, 0x6f, 0x72,
    0x6b, 0x21};

  • Need a simple html theme

    Hello everybody,
    i need a simple just html, no script or flash theme, for doing my photo albums.
    I have some veryyyy important people (gf and brother :)) than can't see those beacouse they do it on the corporate laptop and all the "bad stuff" are disabled.
    Thanks
    Ciprian

    Ciprian:
    You can create the web pages from within iPhoto by using the File->Export->Web menu option. It creates a simple html photo gallery with user control of viewing larger version of the thumbnails. It published to a folder on the desktop, the contents of which can be manually uploaded to your iDisk/Web/Sites folder. You can run it on the desktop first to see if it will suit your needs.
    The URL would be: web.me.com/youraccount_name/name_of_uploadedfolder/index.html. If you have multiple albums you would have to have a separate folder and URL for each.
    It will let you add either title or comments or both to the photos and select the background and text colors. This is an example. It requires no special java or other software. Just a browser.
    OT

  • Need a simple program equivalent to the PC paint

    I need a simple program that is equivalent to the Windows paint program thats free.

    Does Paintbrush do what you want?
    (30512)

  • Simple Count using Analytic view and Odata

    Hi Experts,
    I have an analytic view based on one table and Odata services on top of it.
    Now i want to include three measures just simple count with group by,
    just for this i ddint want to go for calc view. Please help me how to achieve this using analytic view and Odata script.
    Thanks,
    Devi.

    Hello George,
    I don't have any personalization set on the info space. Also I am using mapped Account in BI to connect to HANA. The confusing part is that it is able to validate the infospace with the input parameters and index it. However query does not return any results. I even tried running the same query which explorer sends to HANA in the SQL editor and there too the same results,the query does not return anything. The model does return data when I do a data preview and if accessed from other tools like AAO.
    Also when I use SSO connection to HANA, indexing of the infospace fails. Where can I see the error log?
    Thanks,

  • I am a novice - I need a simple, plug & go, external hard drive ... Have read various reports about Time Capsule ... Any opinions or alternatives? I am old, & need simple answers please - nothing complicated ... Thanks ...

    I am a novice - I need a simple, reliable, plug & go (U.K.) external hard drive (1-3 TB) Have read various reports (good & bad) about Time Capsules - opinions & alternatives please .. I am old, so please keep answers simple - anything containing 'stuff' I won't understand & I'll ignore it .... Thanks in anticipation ...

    I consider Time Capsule slow, mainly because it depends upon a wireless network for backing up.  I tried it, but went back to the plug and play FW800 wired backup.  Since this particular forum is for the MacBook Pro hardware, I'd suggest the following two forums to search for your answer (or ask questions):
    Time Machine
    Time Capsule
    Since you want easy, the external hard drive is about as easy as it gets. Buy.  Unpack.  Plug into your Mac. Format (if you don't buy a Mac formatted one, which is unnecessary).  Go to System Preferences>Time Machine.  Choose the disk as the time machine.  Turn on. 

  • Need to display count and report both by using single Query

    Hi All,
    I got any requirement in that i need to display count and report both.
    Like
    Count os Unassigned=20
    Count of Assined=23
    Sr   name     summary        etc ......
    1     dssss        sdsds         dsds
    2     sdada       sdsd          sdsds
    3     dadad       afds          sdada    And the problem is ,My Application is providing the single window where i can put a single query
    so pls help me with this

    I think you need to do it like this:
    WITH x AS (
        SELECT DECODE(name,NULL,0,1) AS ind, COUNT(*) AS counter FROM your_table
        GROUP BY DECODE(name,NULL,0,1)
        UNION SELECT 1,0 FROM dual
        UNION SELECT 0,0 FROM dual)
    SELECT DECODE(ind,0,'Count os Unassigned=','Count of Assined=') ||
           TO_CHAR(SUM(counter)) FROM x GROUP BY ind;Replace your_table with whatever your table is called.

  • Need a simple  UPDATE statement for updating areas of the polygons

    Hi,
    I need a simple UPDATE SQL statement for updating areas of the polygons in a table shema.table (geom) with sdo_area function.
    Dejan

    Dejan,
    Maybe I don't understand your question but I will offer this:
    update SOME_TABLE t set t.areasqft = SDO_GEOM.SDO_AREA(GEOM, 0.005) where t.geom.GET_GTYPE() = 3
    This assumes a "feet" based SRID.
    r,
    dennis
    Edited by: user633187 on Dec 1, 2008 9:04 AM

  • Need a simple 3d text application. Any ideas?

    Need a simple 3d text application. Any ideas?
    I used to have a simple program called logomotion, but it has been discontinued. I just need something that I can just type "Welcome bla bla bla" and it will give me a few options like spin, scroll, random. Like that screen saver on PC where you just type in your companys name and it spins around 3D. (dont need anything crazy like maya,- any ideas!

    you could also check out Blender:
    http://www.blender.org
    free, open source, etc. i've never used it, but it looks fairly full-featured. actually, i think that might be something i'll download and check out this weekend, come to think of it.
    PowerMac G5 2.5GHz   Mac OS X (10.4.5)  

  • Simple count up timer won't stop.

    Hi,
    I made a simple count up timer, it is working just fine but I would like to have the %-sign next to the numbers so it would look as a preorder. But as I add "%" sign to the function, the counting never stops (at 100% any more), and continues counting.
    What am I missing??
    var count:Number = 1;
    var myTimer:Timer = new Timer(10);
    myTimer.addEventListener(TimerEvent.TIMER, countdown);
    myTimer.start();
    function countdown(event:TimerEvent):void{
    //myText_txt.text = String((count)+myTimer.currentCount);
    myText_txt.text = String((count)+myTimer.currentCount)+"%";
    if (uint(myText_txt.text) >= 100) {
            myTimer.removeEventListener(TimerEvent.TIMER, countdown);
    Thanks!

    You should learn to use the trace() function to see why things don't work as expected.   The "%" makes converting it to a uint not what you expect.  Trace uint(myText_txt.text)  and you will see why comparing the uint value of a non-numeric string to a number isn't going to work.  Try the following instead...
    var count:Number = 1;
    var myTimer:Timer = new Timer(10);
    myTimer.addEventListener(TimerEvent.TIMER, countdown);
    myTimer.start();
    function countdown(event:TimerEvent):void{
       myText_txt.text = String((count)+myTimer.currentCount)+"%";
       if (uint(String((count)+myTimer.currentCount)) >= 100) {
            myTimer.removeEventListener(TimerEvent.TIMER, countdown);

  • How do I create a simple counter in Dreamweaver CC?

    Hello there Dreamweaver community,
    I am a student creating my first website and I NEED HELP!
    My site is live and it's based on the correct spelling of grey.
    www.lefthandedart.com
    Within the site I have a "vote" page that allows users to vote "grey" or "gray" (note: currently links to other pages on the site). What I want to do is have a simple hit counter under each spelling that adds one when users vote for that spelling. I'm having a fit trying to figure out how to program this though.
    Please help.
      Thank you,
    Terry B

    You'll need scripts to do this.   Most polling/voting scripts use server-side programming like PHP and a few other files to display the results.
    http://www.gentlesource.com/poll-voting/
    PS.  In the US, the correct spelling is gray. 
    Nancy O.

  • Simple counter in seconds

    Hi,
    In my code I have a while loop that may or may not take more than x secs to run. Once the while loop has been running for x secs I would to provide a series of commands. Therefore, I need some sort of counter. Will Tick Count help me with this? If so, how? If not, how can I create a counter for this simple task? Thank you.
    Alfredo
    Alfredo
    Solved!
    Go to Solution.

    Yes, Tick Count can be used for this, as well as other mechanisms. For example, you could use the Get Date/Time in Seconds function. Here's asome simple examples:
    Attachments:
    Example_VI_BD.png ‏6 KB

Maybe you are looking for

  • Parental controls in iTunes don't work for TV Shows?

    Using parental controls - i can hide/block Movies & explict music content - but doesn't appear to work for TV Shows marked "Caution" - any ideas? Help would be appreciated. thanks       

  • HT5699 How do I get back to my account settings in the app store

    How do I get back to my account settings in the app store

  • Extended fan control v.1.2

    Can anyone tell me why this version of fan control does not detect sensors on the GPU despite having an apparent facility to do so? The temp for the GPU always reads zero degrees, which suggests it's not picking it up. As my macbook pro overheats whe

  • ORA-01002: fetch out of sequence! HELP NEEDED!

    Hi, can someone help us (me)! Application: Sun-ConcordeXAL 2.6 Clients: Sun-Oracle-7.2.3 Database: Linux-Oracle-8.0.5.1 (PS! if clients software change to XAL 2.7 and Oracle 8.0.4 then we get same error) Maybe database configuration or client oracle

  • Mac crashed..can't sync..help!

    my macbook crashed and i lost everything and now i can't sync my phone.  I authorized the computer, and transfered the purchases.   All my apps show up on the screen now, however they're not highlighted..i can't move or select or sync anything from m