Db writer? how many?

Hi, in my dataware house environment i have some i/o questions.
AWR reports:
In the Load profile Redo size is the first.
Other wait events is db file sequential read, db file scattered read and log file parallel write.
dbwr_io_slaves=0 and db_writer_processes=1
The machine is IBM with 8 processors.
What can i check for I/O Bottleneck?

davyp74 wrote:
Hi, i've removed the multiplexed redologs.
the database is not in archive log mode, and it's a 10.2.0.4.
The log file group (4 groups) now is with only one member of 500mb (instead 2 of 250mb).Why?, I don't think anyone was recommending this having multiplexed redo logs on the smae disk might possibly cause longer write times as the logs are written to two places on the same round brown spinning thing but the correct course of action is to add a second set of disks/LUNS whatever the underlying storage is rather than removing the multiplexing completely.
Are you using ASM or filesystem stroage? does your chosen filesystem support async and direct IO?

Similar Messages

  • Until how many lines can we  write java file

    in java file, how many lines can I write?
    Manybe It will depend on file system such as window, unix file system.
    but, I don't know the exact size.
    please let me know how many lines I can wirte in java file of window and unix file system.
    thank you in advance.

    A class and method implementation in source lines of code (sans comments and white space) should be as large as necessary, but no larger. Good design principals tend to drive towards smaller peices, but there is no one right size size limit.
    Personally, I suspect any method that has over 50 lines of code as being too large and probably refactorable. I also suspect any single class (or for that matter .java file) with more than 50 methods or more than 2000 lines of code as being too large and probably refactorable. But sometimes we might really need a 500 line method or an 8000 line, 200 method class. Maybe its a performance thing. Maybe it is just that complicated and too hard to break up. I doubt it occurs frequently, but I won't be shocked when I see it.
    Sometimes GUI classes (Swing and AWT) get really huge. Sometimes this is due to code generation, sometimes its just being sloppy. It pays to know the difference.
    But the Java langauge sets reasonable (if not overly generous) limits on bytecode and constant pool sizes If the Java compiler begins to complain that something you have built is is too large, face it, it probably is. It's like running into scope nesting or nested name (class in a class in a class...) size limits - usually not a good sign for the structure of your code.
    Chuck

  • How many users can connect to a shared drive on a non-server workstation?

    How many users can connect to a shared drive on a non-server workstation? We're waiting for our server to arrive and in the interum we're using a Pegasus 2 R6 attached to an iMac running Mavericks as our fileserver. It's been sketchy, the connection to the server being dropped once in a while or the inability to mount the drive after a week of success. The Pegasus we're using now will be attached to a server once it arrives. For now I need to figure what's coausing trouble before I commit to this being our main storage as planned. The data is backed up every night so I'm not worried, its the usability issues. 5-7 people are mounting this drive and opening/saving at the same time. Is there a limit to Maverick's fileserving ability that may be causing this? Understandable if so.

    The file server in the client version of OS X has a default limit of 10 simultaneous connections. That limit can be raised by installing OS X Server, or lowered by setting a hidden preference. Assuming you've done neither, you may be able to solve the problem temporarily by stopping and restarting file sharing in the Sharing preference pane, or permanently by setting another hidden preference on the server to break idle connections quickly.
    defaults write /Library/Preferences/com.apple.AppleFileServer idleDisconnectOnOff -bool YES
    Stop and restart file sharing. To reverse the change, run this command in the same way:
    defaults write /Library/Preferences/com.apple.AppleFileServer idleDisconnectOnOff -bool NO
    Credit for this solution to ASC member suter:
    this file server will not allow any additional users to log on

  • How many folio can I share with a Id CS6 license ?

    Hi, as it's write in the Adobe In Design sale sheet you can :
    InDesign CS5 and CS5.5 customers can now:
    Create an unlimited number of .folio files in InDesign
    Preview them on Adobe Content Viewer  – including interactivity – to see how they will render when published to a tablet device
    Share them with colleagues or clients on a 1:1 basis via the Adobe Content Viewer
    But How many folio is allowed to share in 1:1 mode ? In my case I would like to share 3 different folio with 14 peoples. I have a valid licence with creative cloud, and I tought that the DPS single edition was include on it ?
    Any Adobe member can answer to this ?
    Many thanks
    Benoit

    You can share as many as you want. DPS SE will be included with CC “at a future date.”
    Bob

  • How many cpus on server are allocated to client

    hello,
    its not an issue rather doubt which is hunting me from last 2-3 days.
    My 10gR2 Oracle database running on
    Widows server 2008 R2 Enterprise
    Processor ----> intel Xeon cpu [email protected] GHz (4 processor)
    RAM------>8GB
    its a dedicated server.
    Actually i was going through the AWR report whn one of the client came to me with slow database performance during some time interval.
    when i had a look at the Top 5 Timed Events in Report it showed me the
    Sql*net message from client      834.35si told them to run their query so that i can have trace of that.
    then time event showed me something nearer to above and our database was taking only 15 sec to carry out the task.
    i told them that
    "you application/client is taking 834 sec to tell our database to do something.But once the database got your application's request to carry out something, the database is taking only 15 sec to provide you with the result"
    so they asked me to justify that the problem is with application side/machine side.
    After digging in a lot on the internet ground, chatting with my colleges on cell phone and running through many threads specially Asktom.oracle.com, i got really confused.
    They came up with varied opinions which kept me thinking again & again over the same thing.
    In one of his(Thomas kyte) thread the discussion was as follows.
    The output of tkprof when the developers run the same program on their PC shows a big difference in
    SQL*Net message from client.
    The SQL*Net message from client from my tkprof is almost 4-5 times theirs.
    Could you please advise what might be the cause of that?
    Thanks
    Followup   August 25, 2009 - 9am Central time zone:
    that could mean.....
    your machine is slow (their desktop cpus blow your server cpus away) as much as anything.
    since their code is not instrumented, try SQL*Net trace (with TIMESTAMPS) can be helpful to check out the time in the network between the client and server. See Note 16658.1 - see if you experience radically different response times on the various machines.
    4 stars   August 25, 2009 - 2pm Central time zone
    Bookmark | Bottom | Top
    Reviewer: Jaklin Ekdawi
    My Database server is T5120 with 4 core 1.2 GHz Ultra SPARC T2 processor (from O/S it is seen as 32
    CPU * 1.2 GHz).
    Their PC has 2 CPU * 4 Ghz.
    Based on the above, How come their PC is more powerful than my server?
    The ASH Report for the execution period of the program shows ¿CPU + Wait for CPU¿ is the top event,
    however, tkprof shows ¿SQL*Net from client¿ is the top event waited on.
    Top User Events
    Event        Event Class    % Activity    Avg Active Sessions
    CPU + Wait for CPU     CPU             81.66        0.14
    log file sync             Commit             5.92        0.01
    db file scattered read     User I/O     2.37        0.00
    Can you please explain why there is a difference between tkprof and ASH report?
    Thank You
    Followup   August 25, 2009 - 8pm Central time zone:
    I only care about a single cpu, your client program is not using more than one.
    I often downloaded stuff from my big bad sparc to my desktop because my desktop was many times faster than the sparc.
    look further down in the ash report - sqlnet message from client is an idle wait, we tend to ignore it as it is the time we spent WAITING FOR THE CLIENT.
    Their pc looks a lot faster than your server since you are only using a single cpu - your client is not multi-process. It only uses a single cpu.
    4 stars   August 25, 2009 - 2pm Central time zone
    Bookmark | Bottom | Top
    Reviewer: Jaklin Ekdawi
    Sorry, I forgot to say that during the execution time the cpu on the server was 98-99% idle based
    on (using top and sar).
    Thanks
    Followup   August 25, 2009 - 8pm Central time zone:
    I agree, because you could not use 31 out of 32 cpus, I would expect it to be almost idle.
    97% idle would mean a single cpu was 100% used. So, it sounds like you were using almost 100% of that single cpu you had access to.
    and it isn't as fast as their pc.
    4 stars   August 25, 2009 - 10pm Central time zone
    Bookmark | Bottom | Top
    Reviewer: Jaklin Ekdawi
    The tkprof from the developer's PC is below
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse      122      0.39       0.68          0        403          0           0
    Execute    122      0.00       0.00          0          0          0           0
    Fetch      396      0.09       0.11          0      25354          0         274
    total      640      0.48       0.80          0      25757          0         274
    Misses in library cache during parse: 122
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                     763        0.00          0.00
      SQL*Net message from client                   763       14.71        312.91
      SQL*Net more data to client                   122        0.00          0.00
    The tkprof for the running the same process on Solaris DB Server
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse      124      0.06       0.03          0          0          0           0
    Execute    124      0.04       0.01          0          0          0           0
    Fetch      400      0.07       0.10          0        802          0         276
    total      648      0.17       0.15          0        802          0         276
    Misses in library cache during parse: 1
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                     774        0.00          0.00
      SQL*Net message from client                   774       43.65        964.23
    - On Solaris DB server, the CPU is 0.17, however, "SQL*Net message from client" is 964.23.
    - On the developer¿s PC, the CPU is 0.48, however, "SQL*Net message from client" is 312.91.
    Based on that, how I can approve it is CPU issue?
    Followup   August 26, 2009 - 7pm Central time zone:
    how about this.
    have the developers write something that mimics what they do without the database in it. Same sorts of loops and processing they do in the code in the client.
    run it on their machine
    run it on yours
    You'll find your big bad server has cpu's that are extremely slow compared to the desktop machine.
    Hence - the time spent waiting for sqlnet message from client is - time spent in YOUR client on YOUR server processing the data returned from the database.
    saying "the cpu 0.17 on one and 0.48 on the other" is meaningless, they are completely different cpus with completely different performance characteristics.
    And that you have 32 of them - no use to you, you use one..
    It looks like your server is about 2-3 times slower then their test machine.
    5 stars SQL*Net Message from client may not be an issue from the app   May 28, 2010 - 8am Central time zone
    Bookmark | Bottom | Top
    Reviewer: Thierry B from Paris, France
    Hi,
    I just read your post as I experienced the exact same problem. I found something that fixed this
    problem for me, my sqlnet.ora contained that line after an oracle upgrade:
    TRACE_LEVEL_CLIENT=16
    I don't know how it came there. But it was the cause of my problem (too long idle time). I simply
    removed it and no more wait events.
    I hope it can be of any help for anyone.
    Followup   May 28, 2010 - 8am Central time zone:
    that is a client side issue though, isn't it. It is an application side issue, not a database side issue.
    5 stars   April 15, 2011 - 10am Central time zone
    Bookmark | Bottom | Top
    Reviewer: A reader in this thread Tom insisted that the client has access to only 1 CPU on the server even though the questioner told him that his machine is having around 32 CPU'S.
    so this thread was the source of my confusion.
    i kept asking myself "if the client application has access to one cpu out of 32 cpu's on the server on which the database server is running,then What is the use of multiprocessor? my oracle/client application has access to only one cpu on the server(like Tom said), what other 31 cpu's on the server machine are upto?if one cpu is getting exhausted by the client Application request, then what the other processor are doing ? are they not meant for load balancing?"
    when i had a chat on cell phone with my colleagues regarding the oracle access to the cpu's on the server, then they told me that if there are more number of cpu's then the the response time would be fast cause workload is divided among the multiple processor to carry out the task in parallel.
    Again i got confused with the deferring opinion..
    so just want to have clarification on
    * how many processes do i have access to on server machine where my oracle is installed?*
    how many processes do the client applicaiton S/W/client machine have access to out of 32 processors?
    is workload devided among the cpus on the server ,in case of huge request from the client application?
    thanks & i hope my doubt would be cleared

    Look at it in basic terms (forgetting for the moment about Oracle and SQL*Net and specific s/w itself).
    A process is loaded into memory. This process contains machine code instructions. How many CPUs can execute these instructions?
    Only 1.
    Simplistically. The process has a single execution pointer and set of CPU registers. A single CPU executes the instruction (as indicated by the execution pointer). The registers are used and updated.
    The same CPU may not be used each time around. So a single process can during its lifetime, be executed by a number of CPUs. But a single CPU at a time.
    A process can thread. This basically means that a second copy of the execution pointer and registers set are created. Each such copy will be executed by by a single CPU at a time.
    An Oracle client is serviced by an Oracle server process (either dedicated or shared). On Linux/Unix systems, this will be a unique physical process. On Windows, it will be a unique thread.
    This process is executed by a single CPU. Thus that client is serviced by a single CPU.
    This changes when Oracle can use parallel processing and there are PX slave processes available. In that case, the client is serviced by a single process - but that process has in turn enlisted the assistance of helper processes. Thus the client is now serviced by multiple processes (or threads on Windows) and thus by multiple CPUs.
    However, it is not that simple either. It is "cheaper" for the kernel to run threads on the same CPU than on different CPUs. The reason is the same memory is used by both and access to that memory by different CPUs is more complex (and thus more expensive and slower) than from the same CPU.
    So depending on a number of factors, that client may still be serviced by a single CPU despite the fact that PX slaves are used. And from a client process perspective, this does not really matter. The crux of the issue in this regard is the CPU utilisation/footprint of that client process on the server.
    If the clock time for a client process says "+running for 60s+" and the server says "+CPU time is 10s+", you cannot say that the process was not serviced by multiple CPUs. You do not know whether than 10s CPU time was for 5 processes each spending 2s to service that client.
    However, when the server says "+CPU time is 70s+" - a longer period that the wall clock time of the client, then it is reasonable to assume that multiple server processes (and thus CPUs) are servicing that client process.
    As for exactly how many CPUs are in fact used by the server? That has no real bearing on this. It does not change client-server behaviour.
    Even Oracle does not know and does not care which CPU is servicing it. The correct piece of s/w to deal with that, is the kernel. Yes, you can bind a thread or process to a specific server CPU, but the reasons for this is quite technical and is always an exception. Let the kernel deal with which CPU to use. It is of no concern to the server s/w (like Oracle), and even less to the client process being serviced by that server s/w.

  • How many keys can be pressed at once

    i want to play an online rhythm music game.. which would require the pressing of more than one key at one time.. so I wish to know how many keys can be pressed at once without the computer hanging or the keyboard jamming?
    I'm using a Macbook, 2.0ghz, Black with 1 gig ram. Thanks.

    By and large the keyboard does what the programmer of the software tells it to do - part of the programming is to address the input/output devices required by the application. By the same token the programmer can't require you to use keystrokes that can't be addressed through the OS involved.
    It doesn't make much sense for someone to write software that can't be used.
    Regards |:>)
    Bob J.

  • How many apps can be open at one time?

    My friend did not know how to close apps. I showed her and was shocked at how many she had open at one time. Everything since she got her ipad over a year ago. She must have had 30 games, pictures, internet, lists, contacts, mail, video, everything was open.
    It made me curious if there is a maximum number that can be open at one time, and if at some point will they automatically close themselves?
    Thanks

    Open apps consume almost no resources, unless they run background refresh. Once they have been inactive for a while, iOS writes the current state back to storage, to free up RAM for other processes. You can see this when some apps, particularly big heavy games like Infinity Blade, relaunch from the starting splash screens instead of taking up precisely where they were left.
    It's still good practice to close down stuff every so often, but not necessary, as you've discovered.

  • How many users/ schemas can we create in an oracle database?

    How many users can we create in an oracle database? Or how many users can oracle handle?
    Problem-
    I have to store information of ontologies (I will use countries instead) in db.
    I have to store information regarding countries.
    I have 13 tables in all to maintain for each country.
    Now there are two approaches:
    1) keep only 13 tables. Have an extra column in each table to indicate that a particular
    row stores information for which country.
    2) create a new user/ schema for each country. So we can get rid of the extra column
    needed in 1st approach.
    I have used the second approach. This is because number of entries in each table for a
    given country will be large.
    So initially when the s/w is installed I create a central-user. Each time data for new
    country has to be entered central-user creates a user/ schema, and creates tables for
    this user/ schema. The central user can access the tables of all the countries by
    country_name.table_name. By this approach I believe searching would be easy.
    If there is any flaw in my approach kindly mention it.
    Thank you

    There is no (practical at least) limit to the number of users & schemas you can have in Oracle.
    Your approach, however, is not going to scale nearly as well as the first option you outlined (adding a column). You are going to end up caching every possible variation of the various queries you're going to be executing because you will be referring to so many different tables, which is going to mean that you are doing a lot more work to parsing statements and generally churning through the shared pool. If you create enough users, you're liable to start hitting ORA-04030 errors because your shared pool is so fragmented.
    Additionally, you're likely going to end up with a whole lot of dynamically generated SQL to accommodate new schemas getting added over time which is going to cause you even more pain. Figuring out dynamically what table to join in is a heck of a lot more difficult for the programmer to write and for the database to handle than simply passing in a different country code.
    If you're concerned about having too much data, you can have your cake and eat it to by adding the country column and partitioning the tables based on country.
    Justin
    One other item I forgot to mention is maintainability. Having dozens or hundreds of "identical" schemas makes maintenance a huge pain because something like adding a new column now requires dozens or hundreds of separate DDL statements. You're almost guaranteed that some schema isn't going to be in sync-- it's going to miss a column or miss an index, etc.
    Message was edited by:
    Justin Cave

  • How many columns a sql selects

    I need to find out how many columns are in a sql statement like below:
    sql = "select id, decode(description,'','No decription', description), comment from my_table";
    The sql string is build dynamically so I don't know it when I write the code. I need to know before I do
    call rs.next(), because I need to set up the table header so I need to know how many columns the sql is selecting.
    Thanks inadvance.
    Botao

    You can use the interface ResultSetMetaData,below are some methods of it.
    int getColumnCount()
    Returns the number of columns in this ResultSet object.
    String getColumnName(int column)
    Get the designated column's name.
    int getColumnType(int column)
    Retrieves the designated column's SQL type.
    for more infomation ,you can refer to JDBC Online Document.

  • How to check a single method is overriden in how many subclasses in ABAP.

    Hi Experts,
    I have a global superclass which had benn inherited by many other global subclasses. Is there any way to find out quickly (may be in a table ) in how many subclasses a particular method of the superclass is overriden?

    Hi Manuish,
    You can use the class CL_OO_CLASS to achieve the above, below is a sample code.
    DATA: lcl_oo_class TYPE REF TO cl_oo_class,
          lw_seoredef  TYPE seoredef.
    TRY.
        CREATE OBJECT lcl_oo_class
          EXPORTING
            clsname = 'Y_TEST_CHEN_CLASS_SUB1'.
      CATCH cx_class_not_existent .
    ENDTRY.
    WRITE: 'Class', '                              ', 'Refclass', '                         ', 'Over written method', /.
    LOOP AT lcl_oo_class->redefinitions INTO lw_seoredef.
      WRITE: lw_seoredef-clsname,'         ',
             lw_seoredef-refclsname,'         ',
             lw_seoredef-mtdname,'         ', /.
    ENDLOOP.
    Alternatively you can look up the table "SEOREDEF" directly.
    Regards,
    Chen
    Edited by: Chen K V on May 4, 2011 12:37 PM

  • My e mail  functionality doesnt work any longer on my 3gs phone. has worked perfectly for 18 months...now i just get a blank screen when i click on the mail icon...it still tells me how many mails I have waiting on the icon...any ideas?

    my mail has been working perfectly on my 3gs iphone. I can now longer access the mail after tapping on the mail icon. All i get is a blank screen with a reload icon and a write icon at the bottom, neither of which responds when touched. The icon continues to tell me how many mails I have in my inbox and continues to update.
    Any ideas?
    am on version 4.3.4 operating system.
    Thanks

    I have tried that also, but its still doing the same thing

  • How many images per sec can I get from ImageIO.read(url) ??????

    Hello,
    In my program I read images from a url...I'm wondering how many images I can get with ImageIO.read(url) per second..
    Hereby is the code that I'm using:
    import java.awt.*; //Contains all of the classes for creating user interfaces and for painting graphics and images
    import java.awt.event.*;//Provides interfaces and classes for dealing with different types of events fired by AWT components
    import java.awt.image.*;//Provides classes for creating and modifying images
    import java.io.*;//Provides for system input and output through data streams, serialization and the file system
    import java.net.URL;
    import javax.imageio.*;//The main package of the Java Image I/O API.
    import javax.swing.*;//Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
    import java.text.*;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    public class getPic extends Component{
    private BufferedImage img;
        static int n=0;
        private URL url;
        private DateFormat dateFormat;
        private Date date;
        private String s;
        private String str1= ".jpeg";
        private String str2="C:\\Users\\";
        private String str3;
        private String str4;
          public getPic() {
         try {
                  url = new URL("http://"); //a url that gives a real-time image
                  img = ImageIO.read(url);
                } catch (IOException e) {
               System.err.println("Unable to read file");
    public void savePic(){
    try{
    n++;
    str3=str2.concat(Integer.toString(n-1));
                        str4=str3.concat(str1);
                        ImageIO.write(img, "jpeg" , new File(str4));
                    } catch(IOException e) {
                      System.err.println("Unable to output results");
    @Override
        public Dimension getPreferredSize() {
            if (img == null) {
               return new Dimension(100,100);
            } else {
               return new Dimension(img.getWidth(), img.getHeight());
        @Override
          public void paint(Graphics g) {  //http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Paint.html
            g.drawImage(img, 10, 10, null);//http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Graphics.html
        public static void main(String[] args) throws IOException {
           JFrame f = new JFrame(" Image without processing!!");
           f.addWindowListener(new WindowAdapter(){//http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/WindowListener.html
                @Override
                    public void windowClosing(WindowEvent e) {
                        System.exit(0);
        int i=0;
        for( ; ; ){
            i++;
            getPic pi = new getPic();
            pi.savePic();
            f.add(pi);
            f.pack();  //Causes this Window to be sized to fit the preferred size and layouts of its subcomponents.
            f.setVisible(true);
         try
            Thread.sleep(1000);
            }catch (InterruptedException ie)
            System.out.println(ie.getMessage());
    }Thank you in advance for your answers
    Joan

    Finally I solved my problem(getting as many images as possible from a url infinitely) using the above code:
    import java.net.*;
    import java.io.*;
    public class UserApplication {
        private static int n=0;
        String url;
      public void UserApplication(){
        public static void main(String[] args) throws Exception {
            UserApplication app= new UserApplication();
            for(;;){
            app.urlStr();
        private void urlStr(){
            try{
                url= "http://mplamplampla/frame.php/";
                HttpURLConnection con=(HttpURLConnection) ((new URL(url).openConnection()));
                BufferedOutputStream out = new BufferedOutputStream( new FileOutputStream("C:\\Users\\mpla\\Desktop\\" + n + ".jpeg"));
                con.setDoInput(true);
                con.setDoOutput(false);
                con.setRequestMethod("GET");
                BufferedInputStream in = new BufferedInputStream(con.getInputStream());
                int bt = 0;
                byte[] buffer = new byte[4096];
                while ((bt = in.read(buffer, 0, 4096)) > -1) {
                  out.write(buffer, 0, bt);
                in.close();
                out.close();
                System.out.println("Image " + n + " saved");
                n++;
                } catch (Exception e) {e.printStackTrace();}
    }

  • How do I keep track of how many times a method is called inside anthr clas?

    I am writing code for a program that solves a Knight's Tour. A Knight's Tour is a path a Knight Chess piece can take around the board starting at any spot, touching every square once, and only once. I have to write 2 classes and one is provided. The provided class is encrypted and written by our professor. All I know that it does is simulates the game using the two classes I write and provides a print out and prompts to ask the user which square they want to move to next.
    The square class I have to write consists of a constructor that makes a square object that keeps track of its color (white/black) and its status (whether it has been visited, is occupied by the knight, or is free and has not be visited).
    The GameBoard class I have to write is what I am having problems with. I am writing a method that determines how many squares have been visited. The previous mentioned class that my professor wrote for me contains a method moveKnight();. The way the program works is that every time moveKnight() is called a square's status is changed to occupied and therefore visited later. moveKnight() will only work if the move requested by the user is a valid move.
    SO! My main problem (sorry for all the explaining, just trying to give you all the information) is that I don't know how to keep track of how many times moveKnight() is called by the program. If i can figure this out it should be simple. I'm new to java but i believe...
    if(moveKnight() is called)
    {count++;} //count is a member variable already initialized
    return count;
    the moveKnight() is called section within the if() statement is what I am unclear how to do. Please help.
    Thanks, Veritas

    in your case you want 'count' to be a class attribute rather than a local variable. But yes, incrementing it each time that the method is called will serve your purpose.

  • In the Code Modus how I see how many characters I typed in ?

    Hello from Munich Germany,
    How can I have with Dreamweaver CS3 Windows Version
    In the Editor Code-Modus – when I write characters from
    left to right – that Dreamweaver COUNT ME the number of
    characters.
    Therefore I was using Microsoft Expression Web as Software.
    It did show me the number of Lines + the Number of
    characters.
    I miss in the Dreamweaver CS3 a modus, that he shows me by
    typing the characters, how many they are.
    Has somebody of you a Solution for me ?
    Regards

    Hi,
    Thanks, this is what I came up with:
    st05,
    check SQL Trace, Activate Trace
    Now, in Rsa1
    on Cube, Cube1,
    Manage, Performance tab, Check Statistics
    Again, back to st05
    Deactivate Trace
    then click on Displace Trace
    Now, in the trace display, after scanning through  the output,
    “ … how do I see the SELECT statements that the "Check Statistics" command executes …”
    I will appreciate your help.

  • Having issues finding out how many bytes are sent/recieved from a socket.

    Hello everyone.
    I've searched the forums and also google and it seems I can't find a way to figure out how many bytes are sent from a socket and then how many bytes are read in from a socket.
    My server program accepts a string (an event) and I parse that string up, gathering the relevant information and I need to send it to another server for more processing.
    Inside my server program after receiving the data ( a string) I then open another port and send it off to the other server. But I would like to know how many bytes I send from my server to the other server via the client socket.
    So at the end of the connection I can compare the lengths to make sure, I sent as many bytes as the server on the other end received.
    Here's my run() function in my server program (my server is multi threaded, so on each new client connection it spawns a new thread and does the following):
    NOTE: this line is where it sends the string to the other server:
    //sending the string version of the message object to the
                        //output server
                        out.println(msg.toString());
    //SERVER
    public class MultiThreadServer implements Runnable {
         Socket csocket;
         MultiThreadServer(Socket csocket) {
              this.csocket = csocket;
         public void run() {
              //setting up sockets
              Socket outputServ = null;
              //create a message database to store events
              MessageDB testDB = new MessageDB();
              try {
                   //setting up channel to recieve events from the omnibus server
                   BufferedReader in = new BufferedReader(new InputStreamReader(
                             csocket.getInputStream()));
                   //This socket will be used to send events to the z/OS reciever
                   //we will need a new socket each time because this is a multi-threaded
                   //server thus, the  z/OS reciever (outputServ) will need to be
                   //multi threaded to handle all the output.
                   outputServ = new Socket("localhost", 1234);
                   //Setting up channel to send data to outputserv
                   PrintWriter out = new PrintWriter(new OutputStreamWriter(outputServ
                             .getOutputStream()));
                   String input;
                   //accepting events from omnibus server and storing them
                   //in a string for later processing.
                   while ((input = in.readLine()) != null) {
                        //accepting and printing out events from omnibus server
                        //also printing out connected client information
                        System.out.println("Event from: "
                                  + csocket.getInetAddress().getHostName() + "-> "
                                  + input + "\n");
                        System.out.println("Waiting for data...");
                        //---------putting string into a message object-------------///
                        // creating a scanner to parse
                        Scanner scanner = new Scanner(input);
                        Scanner scannerPop = new Scanner(input);
                        //Creating a new message to hold information
                        Message msg = new Message();                    
                        //place Scanner object here:
                        MessageParser.printTokens(scanner);
                        MessageParser.populateMessage(scannerPop, msg, input);
                        //calculating the length of the message once its populated with data
                        int length = msg.toString().length();
                        msg.SizeOfPacket = length;
                        //Printing test message
                        System.out.println("-------PRINTING MESSAGE BEFORE INSERT IN DB------\n");
                        System.out.println(msg.toString());
                        System.out.println("----------END PRINT----------\n");
                        //adding message to database
                        testDB.add(msg);
                        System.out.println("-------Accessing data from Map----\n");
                        testDB.print();
                        //---------------End of putting string into a message object----//
                        //sending the string version of the message object to the
                        //output server
                        out.println(msg.toString());
                        System.out.println("Waiting for data...");
                        out.flush();
                   //cleaning up
                   System.out.println("Connection closed by client.");
                   in.close();
                   out.close();
                   outputServ.close();
                   csocket.close();
              catch (SocketException e) {
                   System.err.println("Socket error: " + e);
              catch (UnknownHostException e) {
                   System.out.println("Unknown host: " + e);
              } catch (IOException e) {
                   System.out.println("IOException: " + e);
    }Heres the other server that is accepting the string:
    public class MultiThreadServer implements Runnable {
         Socket csocket;
         MultiThreadServer(Socket csocket) {
              this.csocket = csocket;
         public void run() {
              try {
                   //setting up channel to recieve events from the parser server
                   BufferedReader in = new BufferedReader(new InputStreamReader(
                             csocket.getInputStream()));
                   String input;
                   while ((input = in.readLine()) != null) {
                        //accepting and printing out events from omnibus server
                        //also printing out connected client information
                        System.out.println("Event from: "
                                  + csocket.getInetAddress().getHostName() + "-> "
                                  + input + "\n");
    System.out.println("Lenght of the string was: " + input.length());
                        System.out.println("Waiting for data...");
                   //cleaning up
                   System.out.println("Connection closed by client.");
                   in.close();
                   csocket.close();
              } catch (IOException e) {
                   System.out.println(e);
                   e.printStackTrace();
    }Here's an example of the program works right now:
    Someone sends me a string such as this:
    Enter port to run server on:
    5656
    Listening on : ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=5656]
    Waiting for client connection...
    Socket[addr=/127.0.0.1,port=4919,localport=5656] connected.
    hostname: localhost
    Ip address: 127.0.0.1:5656
    Waiting for data...
    Event from: localhost-> UPDATE: "@busch2.raleigh.ibm.com->NmosPingFail1",424,"9.27.132.139","","Omnibus","Precision Monitor Probe","Precision Monitor","@busch2.raleigh.ibm.com->NmosPingFail",5,"Ping fail for 9.27.132.139: ICMP reply timed out",07/05/07 12:29:12,07/03/07 18:02:31,07/05/07 12:29:09,07/05/07 12:29:09,0,1,194,8000,0,"",65534,0,0,0,"NmosPingFail",0,0,0,"","",0,0,"",0,"0",120,1,"9.27.132.139","","","","dyn9027132107.raleigh.ibm.com","","","",0,0,"","","NCOMS",424,""
    Now my program makes it all nice and filters out the junk and resends the new string to the other server running here:
    Enter port to run server on:
    1234
    Listening on : ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=1234]
    Waiting for client connection...
    Socket[addr=/127.0.0.1,port=4920,localport=1234] connected.
    Parser client connected.
    hostname: localhost
    Ip address: 127.0.0.1:1234
    Event from: localhost-> PacketType: UPDATE , SizeOfPacket: 577 , PacketID: 1, Identifer: UPDATE: "@busch2.raleigh.ibm.com->NmosPingFail1" , Serial: 424 , Node: "9.27.132.139" , NodeAlias: "" , Manager: "Omnibus" , Agent: "Precision Monitor Probe" , AlertGroup: "Precision Monitor" , AlertKey: "@busch2.raleigh.ibm.com->NmosPingFail" , Severity: 5 , Summary: "Ping fail for 9.27.132.139: ICMP reply timed out",StateChange: 07/05/07 12:29:12 , FirstOccurance: 07/03/07 18:02:31 , LastOccurance: 07/05/07 12:29:09 , InternalLast: 07/05/07 12:29:09 , EventId: "NmosPingFail" , LocalNodeAlias: "9.27.132.139"
    Lenght of the string was: 579
    The length of the final string I sent is 577 by using the string.length() function, but when I re-read the length after the send 2 more bytes got added, and now the length is 579.
    I tested it for several cases and in all cases its adding 2 extra bytes.
    Anyways, I think this is a bad solution to my problem but is the only one I could think of.
    Any help would be great!

    (a) You are counting characters, not bytes, and you aren't counting the line terminators that are appended by println() and removed by readLine().
    (b) You don't need to do any of this. TCP doesn't lose data. If the receiver manages get as far as reading the line terminator when reading a line, the line will be complete. Otherwise it will get an exception.
    (c) You are assuming that the original input and the result of message.toString() after constructing a Message from 'input' are the same but there is no evidence to this effect in the code you've posted. Clearly this assumption is what is at fault.
    (d) If you really want to count bytes, write yourself a FilterInputStream and a FilterOutputStream and wrap them around the socket streams before decorating them with the readers you are using. Have these classes count the bytes going past.
    (e) Don't use PrintWriter or PrintStream on socket streams unless you like exceptions being ignored. Judging by your desire to count characters, you shouldn't like this at all. Use BufferedWriter's methods to write strings and line terminators.

  • XmlDataProvider .... is gone completely in my Xaml file. Why? How many different ways to deal with xml data source through WPF

    I followed a procedure described in a book.
    1. insert "Inventory.xml" file to a project "WpfXmlDataBinding" .
    2. add the XML data source through the data panel of "blend for 2013", named it "InventoryXmlDataStore" and store it in the current document.
    3. dragged and droppped the nodes from the Data panel onto the artboard.
    Then I checked my Xaml file against the one provided by the book
    Xaml file by the book:
    <Window.Resources>
    <!-- This part is missing in my xaml file --><XmlDataProvider x:Key="InventoryDataSource"
    Source="\Inventory.xml"
    d:IsDataSource="True"/>
    <!-- This part is missing in my xaml file -->
    <DataTemplate x:Key="ProductTemplate">
    <StackPanel>
    <TextBlock Text="{Binding XPath=@ProductID}"/>
    <TextBlock Text="{Binding XPath=Cost}"/>
    <TextBlock Text="{Binding XPath=Description}"/>
    <CheckBox IsChecked="{Binding XPath=HotItem}"/>
    <TextBlock Text="{Binding XPath=Name}"/>
    </StackPanel>
    </DataTemplate>
    </Window.Resources>
    <Grid>
    <ListBox HorizontalAlignment="Left"
    ItemTemplate="{DynamicResource ProductTemplate}"
    ItemsSource="{Binding XPath=/Inventory/Product}"
    Margin="89,65,0,77" Width="200"/>
    </Grid>
    my Xaml file:
    <Window x:Class="WpfXmlDataBinding.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="922" Width="874">
    <Window.Resources>
    <DataTemplate x:Key="ProductTemplate">
    <StackPanel>
    <TextBlock Text="{Binding XPath=@ProductID}"/>
    <TextBlock Text="{Binding XPath=Cost}"/>
    <TextBlock Text="{Binding XPath=Description}"/>
    <CheckBox IsChecked="{Binding XPath=HotItem}"/>
    <TextBlock Text="{Binding XPath=Name}"/>
    </StackPanel>
    </DataTemplate>
    </Window.Resources>
    <Grid DataContext="{Binding Source={StaticResource InventoryXmlDataStore}}">
    <ListBox HorizontalAlignment="Left" Height="370"
    ItemTemplate="{DynamicResource ProductTemplate}"
    ItemsSource="{Binding XPath=/Inventory/Product}"
    Margin="65,55,0,0" VerticalAlignment="Top" Width="270"/>     
        </Grid>
    </Window>
    All looks quite the same except the <XmlDataProvider ....> part under <Window.Resources>, which is gone completely in my Xaml file.
    1, Why?
    2, How many different ways to deal with xml data source through WPF?
    Thanks, guys.
    (ps My "WpfXmlDataBinding" runs without problem through.)

    Never do yourself down Richard.
    Leave that to other people.
    It's quite common for smart developers to think they're not as good as they are.
    I coach a fair bit and it's a surprisingly common feeling.
    And to repeat.
    Never use anything ends .. provider.  They're for trivial demo apps.  Transform xml into objects and use them.  Write it back as xml.  Preferably, use a database.
    You want to read a little mvvm theory first.
    http://en.wikipedia.org/wiki/Model_View_ViewModel
    Whatever you do, don't read Josh Smiths explanation.  I used to recommend it but it confuses the heck out newbies. Leave that until later.
    Laurent Bugnion did a great presentation at mix10.  Unfortunately that doesn't seem to be working on the MS site, but I have a copy.  Download and watch:
    http://1drv.ms/1IYxl3z
    I'm writing an article at the moment which is aimed at beginners.
    http://social.technet.microsoft.com/wiki/contents/articles/30564.wpf-uneventful-mvvm.aspx
    The sample is just a collection of techniques really.
    I have a sample which involves no real data but is intended to illustrate some aspects of how viewmodels "do stuff" and how you use datatemplates to generate UI.
    I can't remember if I recommended it previously to you:
    https://gallery.technet.microsoft.com/WPF-Dialler-simulator-d782db17
    And I have working samples which are aimed at illustrating line of business architecture.  This is an incomplete step by step series but I  think more than enough to chew on once you've done the previous stuff.
    http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
    The write up for step2 is work in progress.
    https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

Maybe you are looking for

  • How do I get Facetime to connect on my Macbook Pro?

    Hi guys, For some reason Facetime is not connecting to anyone anymore. I cannot receive incoming calls and when I dial out, it just rings and rings and other party will tell me that they are not getting anything from me. I've read the Facetime Troubl

  • VM's state Off-Critical

    Hello, I have an issue with my Hyper-V lab. I have disconnected my hard drives from the motherboard due to some other issues I had at the time, and now, after reconnecting the drives to the mobo, powering on the station and launching Hyper-V, all my

  • Can I use OIM as a basic EAI tool ?

    Hello, I am in OIM product evaluation phase. I have a very basic question. OIM is an User Provisioning tool. However, can I also provision other LDAP objects. To clarify further, say I have a custom object called "Entitlement" which stores entitlemen

  • MySQL has stopped loading on start-up with 10.4.4?

    What it says on the label... Attempted access to my test phpshop using MySQL gave 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'. MySQL is 4.0.0.18 Bob TI PB G4, 667   Mac OS X (10.4.4)  

  • IPod Touch will not register

    Synchs fine, etc... but every time I plug it in this morning, it wants to register it. I plug in my AppleID, it accepts it, fills in my info (if you put in the wrong password, it tells you so), it then asks if you want to get the free video sample, a