Give me some suggestion in this case.

In my application. My database table have one year data about how many hours I watch TV in random day( which means I only count the hour and date when I watched TV and store the hours and date in database). I wanna get the data of the average hours each week during the whole year.
So, now I have data of certain date(eg: 20/04/2007) and hours(3 hours watching TV), and I have one year such kind of data. How can I get each week average hours I watched TV during one year?? Give me some algorithm or suggestion please, thanks.
Message was edited by:
Mellon

Ok, I make the question clear. For example, if I assume each year have 48 weeks. In my database, I have the date,hour pair data, only the date which I watched TV will store in database. What I want is for each week, sum the hours in each day which will get the total hours of that week, than divided by 7 which will get the average hour in that week.
Now, I want to get 48 such kind of average values which represent the weekly average hour in the year.
Again, the database only hold the data of the date, and the hour refer to the date. If I did not watch TV , there will no data in database for that day.
My question is how to get those 48 weekly average values according to the database structure. Thanks.
Message was edited by:
Mellon
Message was edited by:
Mellon
Message was edited by:
Mellon
null

Similar Messages

  • GIVE ME SOME SUGGESTIONS ON THIS OBJECT

    There is a requirement to move the Sales Order information associated with the third party Sales orders, mainly Customer PO number to the Purchase Orders. The information need to be stored in the PO idoc. We are not planning to store this information anywhere in the PO.

    Hi,
    Please use a informative subject in future.
    and Donot use CAPS in Subject Line.
    Read the Rules of engagements before posting.
    Regards
    Sandipan

  • Please give me some suggestions..

    Hi everyone,
    Please give me  some suggestions on the process that i am doing.
    I have to send some data daily in a flat file to a third party vendor.
    The data that i am extracting to a flat file comes from "differnt tables".
    I have a PL/SQL proc which does all the logic and extract to a flat file.
    As per third party vendor requirement we have to send one full file
    (all the data in our database or tables) and after that changes only file
    (records that got modified and New Records).we have Date_modified column
    in every table to see whether that records got modified or not.
    we need something to track what records we are sending
    they dont want to depend only on that "date_modified" column.
    they want to create a separate table to keep track all records that we are
    sending to vendor.
    Process:
    First day: Insert all the records to a ---> log table(for tracking) with
               SEND_REC = 'Y' (there is a column "SEND_REC" that says whether
               to send that record or not) ----> send all the records from the
               log table that has SEND_REC is "Y"
    second day: compare the existing records with log table records --->if
                there is any change update the log table
                and for new records insert into log table --->
                send the records from log table that has "SEND_REC" is
                "Y"
    thrid day:  same as second day..
    Is there any better way to do it? Please post how do you handle this type
    of scenarios ?
    Thanks

    Some thing you can achive with Merge
    merge into ..
    using(select blah blah from xxxx
    minus
    select blah blah from yyyy)
    on(----)
    when matched then
    update set
    when not matched then
    insert ....;Assmuing this will give you difference between your records
    select blah blah from xxxx
    minus
    select blah blah from yyyyEdited by: user5495111 on Aug 6, 2009 7:06 AM

  • Please give me some suggestion!

    I want to concentrate on programming and network, and my university provides the following paper, so can you give me some suggestion, show me what paper should I choose?
    1. Advanced Data Communications
    The application of OSI data communication systems. Topics covered include: the OSI layered model, ASN 1 and object modelling, OSI control, mail systems, directory systems, OSI applications
    2. Advanced Database Systems
    An in-depth examination of the technical aspects of database systems providing the essential foundation for a career in database systems. The emphasis will be to keep abreast with available database technology approaches and techniques in industrial and commercial information systems.
    3. Software Engineering
    Software Engineering is a discipline that integrates methods, tools and procedures for the development of computer systems. The course addresses a range of software development paradigms and processes and assesses these models against the broad array of tasks needed to develop and maintain information systems. Emphasis is on the IEEE standards to develop effective information systems.
    4. Computer Organisation
    The functioning and organisation of modern computer systems. Architecture of computers and computer systems. Processor organisation and implementation. Data representation and instruction formats, microprogramming, input/output systems, virtual memory and hierarchical memory systems.
    5. Data Communications Fundamentals
    The structure of data communications and networks, particularly the lower levels of the communications architecture hierarchy. The OSI communications model, data transmission and coding, link-level protocols, local area networks, wide area networks and internetworking, transport protocols, introduction to ISDN, BISDN, Frame Relay.
    6. Algorithmics
    Further development of problem-solving and algorithm design methods, including: induction, divide-and-conquer, dynamic programming, greedy algorithms and graph algorithms. New topics such as: proof of correctness, amortised complexity, complexity lower bounds, decision trees, backtracking, branch-and-bound, probabilistic algorithms, advanced information structures and NP-completeness.
    7. Language Implementation
    The compilation and interpretation of computer languages, lexical analysis, top-down and bottom-up parsing, interpreters, procedure call conventions, symbol table analysis, code generation for control structures and expressions, attribute grammars
    8. Distributed Objects and Algorithms
    This course gives an appreciation of modern client-server development, based on distributed objects and their integration with databases and the Web. A comparative study of relevant technologies such as RMI, CORBA and DCOM.
    9. Operating Systems
    What is an operating system? Operating system principles: concurrent processes, processor management, memory management, disk management, management of other peripherals, computer security. Interacting with people: system implementation and job control languages.
    10. Mathematical Foundations of Computer Science
    The aim is to create a mathematical model for computers and computation, and to derive results about what can and cannot be computed. The course deals with idealised computers (automata) which operate on idealised inputs and outputs (formal languages).
    11. Functional and Logic Programming
    A practical introduction to programming in functional and logic programming languages. In particular, the course introduces a declarative style of programming, in which the emphasis is placed more on what a programme achieves than how it is to achieve it.
    12. Introduction to Artificial Intelligence
    An introduction to artificial intelligence (AI). AI is concerned with the construction of computer systems that perform tasks usually thought to require intelligence, such as playing chess or diagnosing an illness. The course introduces the basic concepts of AI, as well as a number of advanced topics.
    13. Graphics and Graphical User Interface Programming
    Fundamentals of 2D computer graphics: physical and virtual graphical I/O devices, graphical toolkits, transformations, algorithms. An introduction to 3D graphics: projection, transformations, visible-surface determination. Advanced GUI programming. Building software components. Software engineering.
    pick maximun 7 papaer from the above. could you order your suggestion from move favourite to less?
    Thank you for you time.

    Hi
    Please do not poast such kind of request at this site.
    Anyway it should be
    8
    9
    7
    6
    5
    2
    1
    You can change the order but the subject for relevance is as mentioned.
    Bye

  • Hello! i am new to Macbook pro, i have recently transferred my data from my Pc to Mac, i can not open .exe file. Please give me any suggestion regarding this!

    hello! i am new to Macbook pro, i have recently transferred my data from my Pc to Mac, i can not open .exe file. Please give me any suggestion regarding this!
    I have using Mac OS 10.9.2

    Try running it through WineSkin or CrossOver Mac, or installing Windows through VirtualBox, Parallels Desktop, VMware Fusion, Boot Camp, or similar software.
    (106527)

  • Give me some suggestions about enterprise websites

    Recent very distressed and hope everybody can give me some advice sincerely. When you look at these websites at first sight,Can you give the first feeling?Theses websites involves in different industries,such as hardware industry,chemical industry, rubber industry, construction industry and so on!Each websites I will give you some keywords.The keywords in hardware industry are marine hardware, trailer parts, wrouht iron, scaffold, sand casting, hand tools and so on!Chemical industry:swimming pool chemical, ammonium nitrate, sea sault.Rubber industry:rubber seal.Consruction industry:granite countertops, paint tools,  storage bin.If you have any Suggestions, please don't hesitate to give me some Suggestions.Thanks!

    The decision of whether to use CLDC or CDC is made for you by the device you are programming for. If you want to write an application for a particular smartphone then you have to find out what configuration it is running and as far as I know all smartphones (no matter how powerful) will be running CLDC. The CDC is aimed at things like set-top boxes for televisions and other such devices that run from mains power for example.
    Within CLDC there are 2 versions, 1.0 and 1.1 and again the choice of which one to use comes from the device you are aiming for. The same for MIDP, which has version 1.0 and 2.0. As an example I am developing an application for a Nokia N95 and I know from the phone documentation that it is running CLDC 1.1 and MIDP 2.0.
    I've never looked at CDC to be able to tell you the differences but if you are starting development of a mobile phone application then you will want to look at CLDC/MIDP and you should never have to worry about getting it to work on a CDC emulator because you will never need to do that.

  • Need some suggestions on this error message

    Hi Squiggly Team,
    Could you please give me some hit on this error message?
    Error: null cannot be parsed to a squiggly dictionary
    at com.adobe.linguistics.spelling.core.utils::SquigglyDictionaryLoader/loadDictionaryComplet e()[C:\p4_garuda1890_ugoyal-xp\esg\squiggly\main\AdobeSpellingEngine\src\com\adobe\linguis tics\spelling\core\utils\SquigglyDictionaryLoader.as:167]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at com.adobe.linguistics.spelling.core.utils::DictionaryLoader/handleComplete()[C:\p4_garuda 1890_ugoyal-xp\esg\squiggly\main\AdobeSpellingEngine\src\com\adobe\linguistics\spelling\co re\utils\DictionaryLoader.as:85]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    Thanks a lot.
    Jing

    Hi Utsav,
    I am using the Squiggly prerelease 6 and the default dictionary include in the SquigglySDK ( src/dictionaries/en_US ).
    This error message does not always happen, very ccasionally.
    Cheers,
    Jing

  • TS1398 I can not turn on wi fi in i phone 4s so please give me some suggestion to start my wifi

    I can not turn on wi fi in i phone 4s so please give me some suggestion to start my wifi

    http://support.apple.com/kb/TS1398

  • Hey guyz my ipod touch 4g is not green battery symbol while charging or syncing on home screen nor it get charge?? plz give me some suggestion

    hey guyz my ipod touch 4g is not green battery symbol while charging or syncing on home screen nor it get charge?? plz give me some suggestion

    no buddy,  when my i pod touch 4 is off  i press its power button then it display a black screen in which there is an empty battery with red marking in side   an,,
    when i connect it with usb cable which i got with i pod touch....then itlike this in picture.. but after some time it get start to home screen with 20 % battery ..and no charging take place and no syncing take ....nor i tunes find it

  • Hello Experts please give some suggestions in this code

    Hello Experts . Please give suggestions in changing the below code to increase the performance . Thanks in advance for all your suggestions...
    PARAMETERS   : Pr_WERKS LIKE EKPO-WERKS OBLIGATORY,
                   Pr_EINDT LIKE EKET-EINDT OBLIGATORY.
    SELECT-OPTIONS : S_LIFNR FOR  EKKO-LIFNR MATCHCODE
                                    OBJECT KRED OBLIGATORY.
    DATA: BEGIN OF SELEC OCCURS 10,
            SIGN(1),
            OPTION(2),
            LOW  LIKE p_eindt,
            HIGH LIKE p_eindt,
         END   OF SELEC.
    SELEC-SIGN = 'I'.
    SELEC-OPTION = 'BT'.
    SELEC-LOW = pr_eindt.
    SELEC-HIGH = pr_eindt + 31.
    SELECT * FROM EKET WHERE EINDT IN SELEC.
        CHECK EKET-MENGE NE 0.
        SELECT * FROM EKPO WHERE EBELN = EKET-EBELN AND
                                 EBELP = EKET-EBELP AND
                                 WERKS = Pr_WERKS.
          SELECT * FROM EKKO WHERE EBELN = EKET-EBELN AND
                                   LIFNR IN S_LIFNR AND
                                   BSTYP = 'L' AND
                                   FRGKE = 'R'.
            SELECT SINGLE * FROM MAKT WHERE MATNR = EKPO-MATNR AND
                                            SPRAS = 'EN'.
            SELECT SINGLE * FROM LFA1 WHERE LIFNR = EKKO-LIFNR.
            EXTRACT DETAIL.
          ENDSELECT.
        ENDSELECT.
      ENDSELECT.

    Ways of Performance Tuning
    1.     Selection Criteria
    2.     Select Statements
    •     Select Queries
    •     SQL Interface
    •     Aggregate Functions
    •     For all Entries
    Select Over more than one internal table
    Selection Criteria
    1.     Restrict the data to the selection criteria itself, rather than filtering it out using the ABAP code using CHECK statement. 
    2.     Select with selection list.
    SELECT * FROM SBOOK INTO SBOOK_WA.
      CHECK: SBOOK_WA-CARRID = 'LH' AND
             SBOOK_WA-CONNID = '0400'.
    ENDSELECT.
    The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list
    SELECT  CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
      WHERE SBOOK_WA-CARRID = 'LH' AND
                  SBOOK_WA-CONNID = '0400'.
    Select Statements   Select Queries
    1.     Avoid nested selects
    SELECT * FROM EKKO INTO EKKO_WA.
      SELECT * FROM EKAN INTO EKAN_WA
          WHERE EBELN = EKKO_WA-EBELN.
      ENDSELECT.
    ENDSELECT.
    The above code can be much more optimized by the code written below.
    SELECT PF1 PF2 FF3 FF4 INTO TABLE ITAB
        FROM EKKO AS P INNER JOIN EKAN AS F
          ON PEBELN = FEBELN.
    Note: A simple SELECT loop is a single database access whose result is passed to the ABAP program line by line. Nested SELECT loops mean that the number of accesses in the inner loop is multiplied by the number of accesses in the outer loop. One should therefore use nested SELECT loops only if the selection in the outer loop contains very few lines or the outer loop is a SELECT SINGLE statement.
    2.     Select all the records in a single shot using into table clause of select statement rather than to use Append statements.
    SELECT * FROM SBOOK INTO SBOOK_WA.
      CHECK: SBOOK_WA-CARRID = 'LH' AND
             SBOOK_WA-CONNID = '0400'.
    ENDSELECT.
    The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list and puts the data in one shot using into table
    SELECT  CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
      WHERE SBOOK_WA-CARRID = 'LH' AND
                  SBOOK_WA-CONNID = '0400'.
    3.     When a base table has multiple indices, the where clause should be in the order of the index, either a primary or a secondary index.
    To choose an index, the optimizer checks the field names specified in the where clause and then uses an index that has the same order of the fields. In certain scenarios, it is advisable to check whether a new index can speed up the performance of a program. This will come handy in programs that access data from the finance tables.
    4.     For testing existence, use Select.. Up to 1 rows statement instead of a Select-Endselect-loop with an Exit. 
    SELECT * FROM SBOOK INTO SBOOK_WA
      UP TO 1 ROWS
      WHERE CARRID = 'LH'.
    ENDSELECT.
    The above code is more optimized as compared to the code mentioned below for testing existence of a record.
    SELECT * FROM SBOOK INTO SBOOK_WA
        WHERE CARRID = 'LH'.
      EXIT.
    ENDSELECT.
    5.     Use Select Single if all primary key fields are supplied in the Where condition .
    If all primary key fields are supplied in the Where conditions you can even use Select Single.
    Select Single requires one communication with the database system, whereas Select-Endselect needs two.
    Select Statements SQL Interface
    1.     Use column updates instead of single-row updates
    to update your database tables.
    SELECT * FROM SFLIGHT INTO SFLIGHT_WA.
      SFLIGHT_WA-SEATSOCC =
        SFLIGHT_WA-SEATSOCC - 1.
      UPDATE SFLIGHT FROM SFLIGHT_WA.
    ENDSELECT.
    The above mentioned code can be more optimized by using the following code
    UPDATE SFLIGHT
           SET SEATSOCC = SEATSOCC - 1.
    2.     For all frequently used Select statements, try to use an index.
    SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA
      WHERE CARRID = 'LH'
        AND CONNID = '0400'.
    ENDSELECT.
    The above mentioned code can be more optimized by using the following code
    SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA
      WHERE MANDT IN ( SELECT MANDT FROM T000 )
        AND CARRID = 'LH'
        AND CONNID = '0400'.
    ENDSELECT.
    3.     Using buffered tables improves the performance considerably.
    Bypassing the buffer increases the network considerably
    SELECT SINGLE * FROM T100 INTO T100_WA
      BYPASSING BUFFER
      WHERE     SPRSL = 'D'
            AND ARBGB = '00'
            AND MSGNR = '999'.
    The above mentioned code can be more optimized by using the following code
    SELECT SINGLE * FROM T100  INTO T100_WA
      WHERE     SPRSL = 'D'
            AND ARBGB = '00'
            AND MSGNR = '999'.
    Select Statements  Aggregate Functions
    •     If you want to find the maximum, minimum, sum and average value or the count of a database column, use a select list with aggregate functions instead of computing the aggregates yourself.
    Some of the Aggregate functions allowed in SAP are  MAX, MIN, AVG, SUM, COUNT, COUNT( * )
    Consider the following extract.
                Maxno = 0.
                Select * from zflight where airln = ‘LF’ and cntry = ‘IN’.
                 Check zflight-fligh > maxno.
                 Maxno = zflight-fligh.
                Endselect.
    The  above mentioned code can be much more optimized by using the following code.
    Select max( fligh ) from zflight into maxno where airln = ‘LF’ and cntry = ‘IN’.
    Select Statements  For All Entries
    •     The for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number of entries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are executed to limit the length of the WHERE clause.
         The plus
    •     Large amount of data
    •     Mixing processing and reading of data
    •     Fast internal reprocessing of data
    •     Fast
         The Minus
    •     Difficult to program/understand
    •     Memory could be critical (use FREE or PACKAGE size)
    Points to be must considered FOR ALL ENTRIES
    •     Check that data is present in the driver table
    •     Sorting the driver table
    •     Removing duplicates from the driver table
    Consider the following piece of extract
              Loop at int_cntry.
      Select single * from zfligh into int_fligh
      where cntry = int_cntry-cntry.
      Append int_fligh.
                          Endloop.
    The above mentioned can be more optimized by using the following code.
    Sort int_cntry by cntry.
    Delete adjacent duplicates from int_cntry.
    If NOT int_cntry[] is INITIAL.
                Select * from zfligh appending table int_fligh
                For all entries in int_cntry
                Where cntry = int_cntry-cntry.
    Endif.
    Select Statements Select Over more than one Internal table
    1.     Its better to use a views instead of nested Select statements.
    SELECT * FROM DD01L INTO DD01L_WA
      WHERE DOMNAME LIKE 'CHAR%'
            AND AS4LOCAL = 'A'.
      SELECT SINGLE * FROM DD01T INTO DD01T_WA
        WHERE   DOMNAME    = DD01L_WA-DOMNAME
            AND AS4LOCAL   = 'A'
            AND AS4VERS    = DD01L_WA-AS4VERS
            AND DDLANGUAGE = SY-LANGU.
    ENDSELECT.
    The above code can be more optimized by extracting all the data from view DD01V_WA
    SELECT * FROM DD01V INTO  DD01V_WA
      WHERE DOMNAME LIKE 'CHAR%'
            AND DDLANGUAGE = SY-LANGU.
    ENDSELECT
    2.     To read data from several logically connected tables use a join instead of nested Select statements. Joins are preferred only if all the primary key are available in WHERE clause for the tables that are joined. If the primary keys are not provided in join the Joining of tables itself takes time.
    SELECT * FROM EKKO INTO EKKO_WA.
      SELECT * FROM EKAN INTO EKAN_WA
          WHERE EBELN = EKKO_WA-EBELN.
      ENDSELECT.
    ENDSELECT.
    The above code can be much more optimized by the code written below.
    SELECT PF1 PF2 FF3 FF4 INTO TABLE ITAB
        FROM EKKO AS P INNER JOIN EKAN AS F
          ON PEBELN = FEBELN.
    3.     Instead of using nested Select loops it is often better to use subqueries.
    SELECT * FROM SPFLI
      INTO TABLE T_SPFLI
      WHERE CITYFROM = 'FRANKFURT'
        AND CITYTO = 'NEW YORK'.
    SELECT * FROM SFLIGHT AS F
        INTO SFLIGHT_WA
        FOR ALL ENTRIES IN T_SPFLI
        WHERE SEATSOCC < F~SEATSMAX
          AND CARRID = T_SPFLI-CARRID
          AND CONNID = T_SPFLI-CONNID
          AND FLDATE BETWEEN '19990101' AND '19990331'.
    ENDSELECT.
    The above mentioned code can be even more optimized by using subqueries instead of for all entries.
    SELECT * FROM SFLIGHT AS F INTO SFLIGHT_WA
        WHERE SEATSOCC < F~SEATSMAX
          AND EXISTS ( SELECT * FROM SPFLI
                         WHERE CARRID = F~CARRID
                           AND CONNID = F~CONNID
                           AND CITYFROM = 'FRANKFURT'
                           AND CITYTO = 'NEW YORK' )
          AND FLDATE BETWEEN '19990101' AND '19990331'.
    ENDSELECT.
    1.     Table operations should be done using explicit work areas rather than via header lines.
    READ TABLE ITAB INTO WA WITH KEY K = 'X‘ BINARY SEARCH.
    IS MUCH FASTER THAN USING
    READ TABLE ITAB INTO WA WITH KEY K = 'X'.
    If TAB has n entries, linear search runs in O( n ) time, whereas binary search takes only O( log2( n ) ).
    2.     Always try to use binary search instead of linear search. But don’t forget to sort your internal table before that.
    READ TABLE ITAB INTO WA WITH KEY K = 'X'. IS FASTER THAN USING
    READ TABLE ITAB INTO WA WITH KEY (NAME) = 'X'.
    3.     A dynamic key access is slower than a static one, since the key specification must be evaluated at runtime.
    4.     A binary search using secondary index takes considerably less time.
    5.     LOOP ... WHERE is faster than LOOP/CHECK because LOOP ... WHERE evaluates the specified condition internally.
    LOOP AT ITAB INTO WA WHERE K = 'X'.
    ENDLOOP.
    The above code is much faster than using
    LOOP AT ITAB INTO WA.
      CHECK WA-K = 'X'.
    ENDLOOP.
    6.     Modifying selected components using “ MODIFY itab …TRANSPORTING f1 f2.. “ accelerates the task of updating  a line of an internal table.
    WA-DATE = SY-DATUM.
    MODIFY ITAB FROM WA INDEX 1 TRANSPORTING DATE.
    The above code is more optimized as compared to
    WA-DATE = SY-DATUM.
    MODIFY ITAB FROM WA INDEX 1.
    7.     Accessing the table entries directly in a "LOOP ... ASSIGNING ..." accelerates the task of updating a set of lines of an internal table considerably
    Modifying selected components only makes the program faster as compared to Modifying all lines completely.
    e.g,
    LOOP AT ITAB ASSIGNING <WA>.
      I = SY-TABIX MOD 2.
      IF I = 0.
        <WA>-FLAG = 'X'.
      ENDIF.
    ENDLOOP.
    The above code works faster as compared to
    LOOP AT ITAB INTO WA.
      I = SY-TABIX MOD 2.
      IF I = 0.
        WA-FLAG = 'X'.
        MODIFY ITAB FROM WA.
      ENDIF.
    ENDLOOP.
    8.    If collect semantics is required, it is always better to use to COLLECT rather than READ BINARY and then ADD.
    LOOP AT ITAB1 INTO WA1.
      READ TABLE ITAB2 INTO WA2 WITH KEY K = WA1-K BINARY SEARCH.
      IF SY-SUBRC = 0.
        ADD: WA1-VAL1 TO WA2-VAL1,
             WA1-VAL2 TO WA2-VAL2.
        MODIFY ITAB2 FROM WA2 INDEX SY-TABIX TRANSPORTING VAL1 VAL2.
      ELSE.
        INSERT WA1 INTO ITAB2 INDEX SY-TABIX.
      ENDIF.
    ENDLOOP.
    The above code uses BINARY SEARCH for collect semantics. READ BINARY runs in O( log2(n) ) time. The above piece of code can be more optimized by
    LOOP AT ITAB1 INTO WA.
      COLLECT WA INTO ITAB2.
    ENDLOOP.
    SORT ITAB2 BY K.
    COLLECT, however, uses a hash algorithm and is therefore independent
    of the number of entries (i.e. O(1)) .
    9.    "APPEND LINES OF itab1 TO itab2" accelerates the task of appending a table to another table considerably as compared to “ LOOP-APPEND-ENDLOOP.”
    APPEND LINES OF ITAB1 TO ITAB2.
    This is more optimized as compared to
    LOOP AT ITAB1 INTO WA.
      APPEND WA TO ITAB2.
    ENDLOOP.
    10.   “DELETE ADJACENT DUPLICATES“ accelerates the task of deleting duplicate entries considerably as compared to “ READ-LOOP-DELETE-ENDLOOP”.
    DELETE ADJACENT DUPLICATES FROM ITAB COMPARING K.
    This is much more optimized as compared to
    READ TABLE ITAB INDEX 1 INTO PREV_LINE.
    LOOP AT ITAB FROM 2 INTO WA.
      IF WA = PREV_LINE.
        DELETE ITAB.
      ELSE.
        PREV_LINE = WA.
      ENDIF.
    ENDLOOP.
    11.   "DELETE itab FROM ... TO ..." accelerates the task of deleting a sequence of lines considerably as compared to “  DO -DELETE-ENDDO”.
    DELETE ITAB FROM 450 TO 550.
    This is much more optimized as compared to
    DO 101 TIMES.
      DELETE ITAB INDEX 450.
    ENDDO.
    12.   Copying internal tables by using “ITAB2[ ] = ITAB1[ ]” as compared to “LOOP-APPEND-ENDLOOP”.
    ITAB2[] = ITAB1[].
    This is much more optimized as compared to
    REFRESH ITAB2.
    LOOP AT ITAB1 INTO WA.
      APPEND WA TO ITAB2.
    ENDLOOP.
    13.   Specify the sort key as restrictively as possible to run the program faster.
    “SORT ITAB BY K.” makes the program runs faster as compared to “SORT ITAB.”
    Internal Tables         contd…
    Hashed and Sorted tables
    1.     For single read access hashed tables are more optimized as compared to sorted tables.
    2.      For partial sequential access sorted tables are more optimized as compared to hashed tables
    Hashed And Sorted Tables
    Point # 1
    Consider the following example where HTAB is a hashed table and STAB is a sorted table
    DO 250 TIMES.
      N = 4 * SY-INDEX.
      READ TABLE HTAB INTO WA WITH TABLE KEY K = N.
      IF SY-SUBRC = 0.
      ENDIF.
    ENDDO.
    This runs faster for single read access as compared to the following same code for sorted table
    DO 250 TIMES.
      N = 4 * SY-INDEX.
      READ TABLE STAB INTO WA WITH TABLE KEY K = N.
      IF SY-SUBRC = 0.
      ENDIF.
    ENDDO.
    Point # 2
    Similarly for Partial Sequential access the STAB runs faster as compared to HTAB
    LOOP AT STAB INTO WA WHERE K = SUBKEY.
    ENDLOOP.
    This runs faster as compared to
    LOOP AT HTAB INTO WA WHERE K = SUBKEY.
    ENDLOOP.

  • Can you give me some suggestions for encryption decryption

    ok i've written my own encryption decryption techniqu can you suggest me some better methods
    Attachments:
    EncrypDecrypt2.vi ‏59 KB

    karthik9 wrote:
    Not to publish ... this is very simple ... i just want to know should i improve this or scrap this
    You haven't replied but I guess I haven't answered your question either...
    Sure it works but from a LV programming standpoint it is very redundant and Rube Goldberg like.
    IMHO you should scrap what you have or at least clean it up.
    I am a long ways from being a LV expert but there are the things that pop right out at me when I see your code.
    You use identical code in three places, make it a sub-vi.
    Why start with a constant of -1 and increment it once inside your for-loop? This value will always be 0. 
    Don't use array size to set the number of iterations of your for-loop then use the iteration counter to index an array inside the loop, use auto indexing. 
    Your block diagram is sloppy and hard to follow.

  • I want to play some shooting online game. Give me some suggestion :D

    Hi there,
    I just bought a MSI Gaming series computer recently. Can anyone suggest me any online shooting game for me??? Thank you so much!!!

    Hi,
    If you wanna get into FPS (first person shooter) games, then you really should take a look at the game that made FPS a top shelf hit --- Counter Strike. There are a number of games to go off from there, but in the gaming mecca of greatness there is no other game that even closely compares when it comes to the legacy of CS. This is based on the fact that the game has been around for 16 years now and still garners a huge following. It was the first ultra realistic shooter of its kind. It is addictive because it can be played in short segments as quickly as five minutes from bootup to first round or as long as you feel playing round after round. In the early games you will find out how poorly lacking your fps skills are against even moderately skilled players, and frightfully so when you face off against the relatively skilled. If it is your misfortunate to go against a pro, you will think it’s more reminiscent of Resident Evil facing off against Nemesis. This really lays out the ground work for you learning how to play these types of games, and if you stick with it, you’ll be getting better and better in no time. I honestly can’t recommend another game that will train you and entertain you so much in a single sitting. The only warning I have for you is set yourself some time limits or you will find out like many that have come before you that 5 minutes can easily become 5 hours.

  • Give me your Suggestion for this Online Banking EJB

    Dear Friends,
    i am developing online banking project,using J2EE server
    In this just checking the customer transaction status only
    that is status of(withdraw,loan,account info).
    In this what type of enterprise bean is needed ?
    my idea is Session bean is selected,in this i am selecting
    stateless session bean
    I have doubt in this selection,this is correct or not ?
    i am not select Entity bean becaues i am not stored any information
    to the database.
    But i am stored only new User Registration Page,for this purpose
    Entity bean is necessary or not ?
    In this Project Entity bean and Session bean both used is correct ya ?
    Give me your valuable suggestion to me

    You will need both session bean and entity bean. You might be able skip entity bean depends how you retrieve the status information. The web tier will call the remote interface of the session bean. The session bean has the business logic (in another word functions). The entity beans deal with the data storage. The session bean will interact with the entity beans through their local interface assuming they are in the same container. Never interact between web tier and entity bean directly. It is also not recommended to make database call from web tier either.

  • I've downloaded movies to my itunes but once they are finished they completely disappear. Also today I opened my itunes and over half of my music and movies that actually show up are gone. Can anyone give me some advice on this problem?

    I have downloaded movies through itunes until the latest version came out. Now the movies will download and then disappear. Everything is up to date so I'm not sure what is wrong. Also I opened my itunes today and over half of my music is missing along with several of the movies that do play. Luckily I have all my music saved, but the movies are completely gone. Does anyone have some ideas that could help me?

    There's a whole lot to read in your post, and frankly I have not read it all.
    Having said that, this troubleshooting guide should help:
    http://support.apple.com/kb/TS1538
    In particular, pay attention to the mobile device support sections near the bottom, assuming you have already done the items above it.

  • Can you give me some suggestions

    My purpose is to design file monitor tool
    Now I can get the hash value for every file and put the filename and hash value into MS access database.
    If the content of file modifyed, the hash value have been changed. So I can know whether the file have been modified by md5 value.
    Considering security, whether I should encrypt the hash value

    THANKS silk.m
    yes, it's running locally to prevent local users from
    modying files.
    Can you descibe the system-wide hooks ,etc more
    detailly. Well, on windows you can redirect calls to certain API's. Say, for opening a file.
    If me (joe hacker) wants to modify filea.txt I can write a hook that looks for a call to open this file, and instead of giving you that file back, you will get backup-filea.txtSo to you, these files will be the same (cause I just copied it and renamed it), but I have silently modified the real file and am doing naughty things with it :)
    Basically - you need to lockdown the computer, and really try hard to prevent users from installing things on it.
    Also, you should definately first determine who your attacker is (i.e: threat model) because if it's just the secretary of the company there is less risk (though still some risk).
    Good luck.

Maybe you are looking for