User Profile

Collapse

Profile Sidebar

Collapse
kirara
kirara
Last Activity: Mar 8 '08, 01:37 AM
Joined: Dec 16 '06
Location: UAE
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • kirara
    replied to Javascript multiple quiz with a timer
    here my thoughts:

    //array of questions
    q = new Array()

    //array of answers
    a = new Array()
    //submitedAnswers
    aS = new Array()

    //timelimit of each question
    timeL = 20;

    //score
    score =0;
    // function to calculate the time
    function time(){
    }

    //function to check the submited answers against the a array
    ...
    See more | Go to post

    Leave a comment:


  • kirara
    started a topic Javascript multiple quiz with a timer

    Javascript multiple quiz with a timer

    Hi,

    I am new to javascript and I want to construct a quiz with five questions, and for each question there is a 3 choises, the user can only choose one answer (radio buttons) and for question there is only a 20 second to answer it before moving to the next question.

    my question is, how can I add a timer for each question and move to the next question when the time is 0,

    please I'll appreciate any help...
    See more | Go to post

  • kirara
    replied to RMI compiling error
    in Java
    I have a question, I am not sure but is rmiregistry for one machine should be the same as another one (I mean the classpath)?

    I use this code to in the Host class to lookup the Registrar remote object of the other machine:

    ri = (RegistrarInter face) Naming.lookup ("//" + args[0] + "/Registrar");
    where args[0] is the IP of the other machine>>>shoul d I specify the path
    See more | Go to post

    Leave a comment:


  • kirara
    replied to RMI compiling error
    in Java
    hi again I appreciate your replies,

    I have runned the server side first(Controlle r class) then the client(Host class)
    the stubs of the host class are found and the controller is working fine,
    BUT the host class give me this exception:
    Exception in thread "main" java.rmi.NotBou ndException: Registrar
    at sun.rmi.registr y.RegistryImpl. lookup(Registry Impl.java:106)
    at sun.rmi.registr y.RegistryImpl_ Skel.dispatch(U nknown...
    See more | Go to post

    Leave a comment:


  • kirara
    replied to RMI compiling error
    in Java
    this is what I have done:
    shell1:
    ran the rmiregistry on all the machines
    shell2:
    ran the rmic for Report and Runn
    shell3:
    ran the host class
    but now I have another exception:

    Exception in thread "main" java.rmi.Connec tException: Connection refused to host: 10.70.50.99; nested exception is:
    java.net.Connec tException: Connection refused
    at sun.rmi.transpo rt.tcp.TCPEndpo int.newSocket(T CPEndpoint.java :574)...
    See more | Go to post

    Leave a comment:


  • kirara
    replied to RMI compiling error
    in Java
    they are in same path as the Host class, but is there a way for me to check it?
    See more | Go to post

    Leave a comment:


  • kirara
    replied to RMI compiling error
    in Java
    I can see the the Runn_Stub.class and the Report_stub.cla ss
    but still the host class give me the same exceptions, does have to do with loading these stubs?
    See more | Go to post

    Leave a comment:


  • kirara
    replied to RMI compiling error
    in Java
    I have runned the rmic for both the Runn and the Report classes, and then I runned the Host class that uses those two but I am still getting the same
    error...any thoughts?
    See more | Go to post

    Leave a comment:


  • kirara
    started a topic RMI compiling error
    in Java

    RMI compiling error

    Hello,

    I am new to rmi and linux enviroment, I have been trying to test this code (java) on uinx where there
    are three machines:
    -One as a Controller
    -an execution host
    - a submitter

    I do the following to run them:
    - type "make" in all the machines to compile the all the java classes along with the remote objects.
    - then run rmiregistry on all the machines
    ...
    See more | Go to post

  • kirara
    replied to modify a Round Robin algorithm to a Best-Fit
    in Java
    that's exactly my question how to select the best fit and remove it from the collection(shor ten the orginal list), can you please be more specific I don't need codes just how the algorithm can be implemented
    thanks in advance

    note: when you said point me to a tutorial you meant I should read a tutorial or I should give you one?? (I didn't understand) :)...
    See more | Go to post

    Leave a comment:


  • kirara
    started a topic modify a Round Robin algorithm to a Best-Fit
    in Java

    modify a Round Robin algorithm to a Best-Fit

    Hi all,
    I am trying to develop a mechanism to know which machine can handle a user job (by providing his Requirements) for now I wrote this method but it is a Round robin, I am trying to modify it to a best-fit algorithm can anybody give me tips about how should I begin?

    Code:
      public static String canDo(Resources userReq,Hashtable hash){
                    //getResourceInfo() is a method that store the machine name
    ...
    See more | Go to post

  • kirara
    replied to getting the last record using timestamp
    THANKS ALOT you are Awesome

    my tables don't have an OIDs, but I tried the following and its great because it gives an accurate records without any duplication:


    thanks again i'll try it with the whole database...
    See more | Go to post

    Leave a comment:


  • kirara
    replied to getting the last record using timestamp
    Thanks for the reply
    I will try it and back for feedback
    See more | Go to post

    Leave a comment:


  • kirara
    replied to getting the last record using timestamp
    I see what do you mean, becuase it returned more than one query, but I found this querry in this site http://developer.postg resql.org/pgdocs/postgres/sql-altertable.html :
    "To change an integer column containing UNIX timestamps to timestamp with time zone via a USING clause":
    Code:
    ALTER TABLE foo
        ALTER COLUMN foo_timestamp TYPE timestamp with time zone
        USING
            timestamp with time zone 'epoch' +
    ...
    See more | Go to post

    Leave a comment:


  • kirara
    replied to getting the last record using timestamp
    thanks it worked really fine



    it is a UNIX time, but can't I use the MAX function with UNIX time, and I can't add anything to this table because it handled by another program...
    See more | Go to post

    Leave a comment:


  • kirara
    started a topic getting the last record using timestamp

    getting the last record using timestamp

    hi all,
    I have a table common_memory_4 _memory it has five columns which are: freememory
    usedmemory, totalmemory, sourcekey(machi ne IP(name)) and the timestamp
    i want to get the newest record for a specific machine using the timestamp column

    sample:
    174156;"machine 2";116620026 0
    173776;"machine 2";116620032 0
    161704;"machine 3";116620038 0
    163704;"machine 1";116620044 0...
    See more | Go to post
No activity results to display
Show More
Working...