Bit shifting tricks and speeding up data structure

I'm pretty new to working directly with bits, but it is a lot of fun. I'm converting a javascript data structure to Flash.
So I'm thinking that Math.floor(uint/32) is the same as uint >> 5, right?
And that uint % 32 is the same as uint & 31 ? Evidently this works for modulos that are powers of 2, what a cool trick.
Using both of those cut the time needed for storing and retrieving data about in half.
But it is still takes about three times longer that just using the native Object. This is in reference to my previous post http://forums.adobe.com/message/5001353#5001353 but that didn't get very far.
So if anybody has any suggestions on how else to speed this up it would be very helpful:
package {
          public class BloomFilter {
                    private var _m:uint;
                    private var _k:int;
                    private var _locations:Vector.<uint>;
                    public var _buckets:Vector.<uint>;
                    public function BloomFilter(m:uint,k:int) {
                              _m=m;
                              _k=k;
                              _locations=new Vector.<uint>  ;
                              _buckets=new Vector.<uint>  ;
                              var n:uint=Math.ceil(m/32);
                              var i:int=-1;
                              while (++i<n) {
                                        _buckets[i]=0;
                    private function hash(v:String) {
                              var i:int=-1;
                              var X:uint;
                              var a,b:uint;
                              a=fnv_1a(v);
                              b=fnv_1a_b(a);
                              X=a%_m;
                              while (++i<_k) {
                                        _locations[i]=X<0? (X+_m) : X;
                                        X=(X+b)%_m;
                    public function add(v:String) {
                              hash(v);
                              var i:int=-1;
                              while (++i<_k) {
                                        _buckets[_locations[i]>>5]|=1<<(_locations[i]&31);
                    public function test(v:String):Boolean {
                              hash(v);
                              var i:int=-1;
                              var b:uint;
                              while (++i<_k) {
                                        b=_locations[i];
                                         if ((_buckets[b>>5] & (1 << (b&31))) === 0) {
                                                  return false;
                              return true;
                    // Fowler-Noll-Vo hash
                    private function fnv_1a(v:String):uint {
                              var n:int=v.length;
                              var a:uint=2166136261;
                              var c,d:uint;
                              var i:int=-1;
                              while (++i<n) {
                                        c=v.charCodeAt(i);
                                        if (d=c&0xff000000) {
                                                  a^=d>>24;
                                                  a+=(a<<1) + (a<<4) + (a<<7) + (a<<8)+ (a<<24);
                                        if (d=c&0xff0000) {
                                                  a^=d>>16;
                                                  a+=(a<<1) + (a<<4) + (a<<7) + (a<<8)+ (a<<24);
                                        if (d=c&0xff00) {
                                                  a^=d>>8;
                                                  a+=(a<<1) + (a<<4) + (a<<7) + (a<<8)+ (a<<24);
                                        a^=c&0xff;
                                        a+=(a<<1) + (a<<4) + (a<<7) + (a<<8)+ (a<<24);
                              a+=a<<13;
                              a^=a>>7;
                              a+=a<<3;
                              a^=a>>17;
                              a+=a<<5;
                              return a&0xffffffff;
                    // One additional iteration of FNV
                    private function fnv_1a_b(a:uint):uint {
                              a+=(a<<1) + (a<<4) + (a<<7) + (a<<8)+ (a<<24);
                              a+=a<<13;
                              a^=a>>7;
                              a+=a<<3;
                              a^=a>>17;
                              a+=a<<5;
                              return a&0xffffffff;

the math shortcuts, as mentioned above, have a greater benefit.  (and thanks.  yes, that's from a book i wrote,
Flash Game Development: In A Social, Mobile and 3D World
Math Class Shortcuts
These methods actually do provide a benefit and that benefit can be significant even without needing millions of operations to realize. They are listed in alphabetical order starting with Math.abs. (See support files/Chapter 07/math_class/Math.abs_v_conditional.fla, support files/Chapter 07/math_class/Math.floor_v_int.fla etc.)
Math.abs
Using
x = (y<0) ? -y: y;
instead of
x = Math.abs(y)
is about twice as fast. Unless you are using millions of Math.abs operations, you should not expect a noticeable benefit from using the inline code. In addition, the inline code is cumbersome.
var xx:int;
var n:int = 10000000;
var n2:int = n/2;
var i:int;
var startTime:int = getTimer();
//// Math.abs duration: 1016
for(i=0;i<n;i++){
       xx = Math.abs(n2-i);
trace("Math.abs duration:",getTimer()-startTime);
// conditional duration: 445
startTime = getTimer();
for(i=0;i<n;i++){
        xx = (n2-i<0) ? i-n2 : n2-i;
trace("conditional duration:",getTimer()-startTime);
Math.ceil and Math.floor
Using
x = int(y);
Instead of
x = Math.floor(y); // y>=0
x = Math.ceil(y); // y<=0
Is about twice as fast. Unless you are using millions of Math.floor operations (with non-negative numbers), you should not expect a noticeable benefit.
var i:int;
var n:int = 10000000;
var xx:int;
var startTime:int = getTimer();
// Math.floor duration: 1105
for(i=0;i<n;i++){
       xx = Math.floor(i/n);
trace("Math.floor duration:",getTimer()-startTime);
// int duration: 479
startTime = getTimer();
for(i=0;i<n;i++){
       xx = int(i/n);
trace("int duration:",getTimer()-startTime);
Math.max
Using
x = (i>j) ? i : j;
instead of
x = Math.max(i,j);
is about twice as fast.
This shortcut is also cumbersome but has the greatest benefit (along with Math.min) of all those listed in this section. Notice the difference in time required to execute the code blocks and how few iterations are needed to demonstrate that difference.
var xx:int;
var n:int = 1000;
var i:int;
var j:int;
var startTime:int;
// Math.max duration: 109
startTime = getTimer();
for(i=n-1;i>=0;i--){
       for(j=n-1;j>-0;j--){
              xx = Math.max(i,j);
trace("Math.max duration:",getTimer()-startTime);
// conditional duration 43
startTime = getTimer();
for(i=n-1;i>=0;i--){
       for(j=n-1;j>-0;j--){
               xx = (i>j) ? i : j;
trace("conditional duration",getTimer()-startTime);
Math.min
Using
x = (i<j) ? i : j;
instead of
x = Math.min(i,j);
is about twice as fast.
This shortcut is also cumbersome but has the greatest benefit (along with Math.max) of all those listed in this section. Notice the difference in time required to execute the code blocks and how few iterations are needed to demonstrate that difference.
var xx:int;
var n:int = 1000;
var i:int;
var j:int;
var startTime:int;
// Duration Math.min 121
startTime = getTimer();
for(i=0;i<n;i++){
       for(j=0;j<n;j++){
              xx = Math.min(i,j);
trace("Duration Math.min",getTimer()-startTime);
// Duration conditional 43
startTime = getTimer();
for(i=0;i<n;i++){
       for(j=0;j<n;j++){
               xx = (i<j) ? i : j;
trace("Duration conditional",getTimer()-startTime);
Math.pow
It is two to three times faster to explicitly multiply a number variable compared to using Math.pow. That benefit even extends a little beyond integer exponents because Math.sqrt(i) is about twice as fast as Math.pow(i,.5).
var i:int;
var n:int = 10000000;
var xx:int;
var startTime:int;
// exp .5: 2020, exp 2: 1533, exp 3: 1617, exp 4: 1427, exp 5: 1381, exp 10: 1391
startTime = getTimer();
for(i=0;i<n;i++){
       xx = Math.pow(i,.5);
trace("Duration Math.pow",getTimer()-startTime);
// exp .5: 1064, exp 2: 427, exp 3: 778, exp 4: 557, exp 5: 501, exp 10: 586
startTime = getTimer();
for(i=0;i<n;i++){
       xx = Math.sqrt(i);
trace("Duration iteration",getTimer()-startTime);

Similar Messages

  • Lock and wait free data structures...???

    Hi - I am developing an application that requires multi-threading. We are testing this on CentOS 5, 64 BIT, running on Intel Quad Core machines, with 8 GB RAM (3 of them). I am using a III party tool to create a datagrid, and have 2 more machines in the federation to monitor performance.
    Java collections/synchronized collections has restriction on multithreading. If thread1 performs puts or removes objects in collection (Tree, Map, List, Set), thread2 cannot iterate. Thread2 can iterate only if it acquires synchronized lock on collection – this implies thread1 has to wait till iteration is over. This introduces latency. If without acquiring lock thread2 does iteration, then “concurrent modification thread exception” arises.
    For real time application like financial markets (multiple thread based application) every microsecond/millisecond matters.
    For workaround at present we have customized sun code by masking “modCount and expectedCount”. This means check for concurrent modification is disabled. But not quite sure this is correct approach. Other option was multiple buffering.
    Other option is lock and waits free data structures – which I am interested.
    Any ideas on this???
    cheers - Murali

    It depends on what is acceptable to you.
    If you are only iterating and not removing any objects through the iterator, then there are two concerns;
    1. Iterator skips some elements.
    2. Iterator iterates to non-existent elements causing NPE.
    You can also copy the datastructure. Then iterate over the copy.
    You can also do "copy on write." This causes a copy only when the datastructure is modified and those iterators already created are not affected. This is the technique I use.
    Eliminating locks is not the objective. Locking is very quick. Its the contention that you want to eliminate. COW can do this nicely in my experience. Depends on your requirements.
    P.S. Try assigning duke dollars to the question and you will probably get more viewers.

  • Some questions on efficient serial read and speeding up data processing

    I have this flow meter that spits out two strings when queried with command "x" : Date:time, and then Meter #1 xxxx.xxxx SCFM . All that the x does is query the meter to display its status. The serial readout from the meter is intended to only duplicate the value present on the little lcd that the meter has. It's not meant for controlling and my discussion with the company was that while not ideal, parsing the string is the only way to get useable info from it. I only need the flow value and there is no way that it will just output that string. So I have it set up to search for the meter name, and if this has a value find the number. Before I did not have the true false case but it meant that the flow would state zero every time that it received the date:time string. My questions are:
    Is this the only way to do this? both in terms of finding the number I need and making sure that it is always updated properly.
    Right now I have a delay in the while loop because if I sample too fast, I oversample the buffer and get no useable string data (get one letter or no value at a time). Is there any way to remove this and have continous sampling?  I thought about reducing the wait time to 25ms, searching for a series of characters like #, 1, and parsing the string character by character, but the vi moves too fast to capture all of the data. If I put in a buffer delay I am right back where I started with the longer delay.
    Is there anything else I can do to make this code more efficient and better sample the flow meters output?
    Attachments:
    Serial Test.vi ‏15 KB

    Does the device send back a termination character such as a line feed or carriage return?  If so, you should be using that to terminate your read after reading a large number of bytes.
    Right now, your Write/Read sequence is in an odd order.  First you check number of bytes, then you write the X, then you read that original number of bytes immediately after sending the x.  Since it was probably 0 at the port when the loop started, you initially read 0 bytes.  Then the next iteration, (assuming your loop rate was slow enough, you'll get bytes as the port based on the X written in the previous iteration.
    You need to write the X, delay a period of time, then do bytes at port (assuming you can't use the termination character, and you have a different number of bytes every iteration that you can't rely on), then read that number of bytes.

  • Relationship between Dynamic Memory Heap and Heap Data Structure

    This question is not strictly related to Java, but rather to programming in general, and I tend to get better answers from this community than any where else.
    Somehow, my school and industry experience have somehow not given me the opportunity to explore and understand heaps (the data structure), so I'm investigating them now, and in particular, I've been looking at applications. I know they can be used for priority queues, heap sorts, and shortest path searches. However, I would have thought that, obviously, there must be some sort of relationship between the heap data structure, and the dynamic memory heap. Otherwise, I can think of no good reason why the dynamic memory heap would be named "heap". Surprisingly, after searching the web for 90 minutes or so, I've seen vague references, but nothing conclusive (trouble seems to be that it's hard to get Google to understand that I'm using the word "heap" in two different contexts, and similarly, it would not likely understand that web authors would use the word in two different contexts).
    The Java Virtual Machine Spec is silent on the subject, as "The Java virtual machine assumes no particular type of automatic storage management system, and the storage management technique may be chosen according to the implementor's system requirements."
    I've seen things like:
    [of dynamic memory] "All the blocks of a particular size are kept in a sorted linked list or tree (I extrapolate that sorted tree could imply heap)"
    [of dynamic memory] "The free and reserved areas of memory are maintained in a data structure similar to binary trees called a heap"
    [of dynamic memory] "This is not related to the heap data structure"
    [of dynamic memory] "Not to be confused with the data structure known as a "heap"
    [of data structure] "Not to be confused with the dynamic memory pool, often known as TheHeap"
    At this point, I've come to surmise that some (but not all) memory management algorithms use heaps to track which (pages? blocks? bytes?) of memory are used, and which are not. However, the point of a heap is to store data so that the max (or min) key is at the root of the heap. But we might want to allocate memory of different sizes at different times, so it wouldn't make sense to key on the amount of available memory in a particular region of the free store.
    I must assume then that there would be a different heap maintained for each size of memory block that can be allocated, and the key must have something to do with the attractiveness of the particular memory block in the heap (perhaps the lowest address, resulting, hopefully, in growing the free store space less often, leaving more space for the stack to grow, or perhaps keyed based on the fragmentation, to hopefully result in less fragmentation, and therefore more efficient use of the memory space, or perhaps based on page boundaries, keeping as much data in the same page as possible, etc).
    So at this point, I have a few questions I've been unable to resolve completely:
    1. Am I correct that the heap was so named because (perhaps at one point in time), a heap is/was commonly used to track the available memory in the free store?
    2. If so, would it be correct that there would be a heap per standard block size?
    3. Also, at what level of granularity would a heap typically be used (memory page, memory blocks, individual words (4-bytes))?
    4. What would be the most likely property one would use as a key. That is, what makes the root item on the heap ideal?
    5. Would a industrial strength system like the jvm use a (perhaps modified or tuned) heap for this sort of task, or would this typically be too naive for an real world solution today?
    Any insight would be awesome!
    Thanks,
    A.

    jschell wrote:
    I think you are not only mixing terms but domains.
    For starters the OS allocs memory. Applications, regardless of language, request memory from the OS and use it in various ways.
    There are many variations of the term "heap" like the following.
    [http://en.wikipedia.org/wiki/Heap_(data_structure)]
    [http://en.wikipedia.org/wiki/Dynamic_memory_allocation]
    A java VM will request memory from the OS (from a 'heap') and use it in its application 'heap' (C/C++) and then create the Java 'heap'. There can be variations of that along the way that can and likely will include variations of how each heap is used, potentially code that creates its own heap, and potentially other allocators which use something which is not a heap.This last part, I find a bit confusing. By "use something which is not a heap", do you mean the heap data structure, or the dynamic memory pool meaning of heap? If the former, then you would be implying that it would be common for a heap data structure to be used to manage the heap dynamic memory pool. If the latter, what would this "something which is not a heap" be? The best definition of "heap" I've found simply states that it is a pool of memory that can be dynamically allocated. If there is some other way of allocating dynamic memory, then it would suggest that the previous definition of "heap" is incomplete.
    >
    So to terms.
    1. Am I correct that the heap was so named because (perhaps at one point in time), a heap is/was commonly used to track the available memory in the free store?Which 'heap'? The VM one? It is probably named that because the implementors of the Sun VM were familar with how C++ and Smalltalk allocated memory.Okay, but that begs the question, was the heap in C++ and/or Smalltalk so named for the above queried reason?
    >
    2. If so, would it be correct that there would be a heap per standard block size?Not sure what you are referring to but probably a detail of the implementation. And since there are different levels the question doesn't mean much.
    However OS allocations are always by block if that helps. After that it requires making the question much, much more specific.
    3. Also, at what level of granularity would a heap typically be used (memory page, memory blocks, individual words (4-bytes))?Again not specific enough. A typical standard implementation of heap could not be at the word level. And it is unlikely, but not impossible, that variations would support word size allocations.
    The VM heap might use word boundaries (but not size), where the application heap certainly does (word boundary.)My understanding of it is that the application would request blocks from the OS, and then something like malloc would manage the memory within the allocated blocks. malloc (or whatever equivalent Java uses) would have to keep track of the memory it has allocated somehow, and I would think it would have to do this at the word level, since it's most commonly going to allocate memory at the word level to be references to other objects, etc.
    So I guess my question here would really be, if the dynamic memory heap is so named because there has been a memory management strategy that relied upon a heap data structure (which I've found no proof, but have found some suggestive literature), then would that probably have applied at the OS Page Fault level, tracking allocated blocks, or would that have applied at the malloc level, allocating individual words as necessary?
    >
    4. What would be the most likely property one would use as a key. That is, what makes the root item on the heap ideal?"Key" is not a term that will apply in this discussion.
    You appear to be referring to strategies for effective allocation of memory such as allocations from different regions by size comparison.
    It is possible that all levels might use such an allocator. General purpose applications do not sort allocations though (as per your one reference that mentions 'key'.) Sorry, I got the term "key" from an article I read regarding heaps, that indicates that a "key" is used to sort the elements, which I guess would be a more generalized way to make a heap than assuming a natural ordering on the elements in the heap. I'm not sure if the terminology is standard.
    >
    5. Would a industrial strength system like the jvm use a (perhaps modified or tuned) heap for this sort of task, or would this typically be too naive for an real world solution today?Again too indefinite. The Sun VM uses a rather complicated allocator, the model for which originated after years of proceeding research certainly in Smalltalk and in Lisp as well, both commercially and academically.
    I am sure the default is rules driven either explicitly or implicitly as well. So it is self tuning.
    There are command line options that allow you to change how it works as well.I guess perhaps I could attempt to clarify my initial question a bit.
    There is a 1:1 correspondence between the runtime stack, and a stack data structure. That is, when you call a function, it pushes a stack frame onto the runtime stack. When you return from a function, it pops a stack frame from the runtime stack. This is almost certainly the reasons the runtime stack is named as it is.
    The question is, is there or has there ever been a 1:1 correspondence between some aspect of the dynamic memory heap or how it is managed, and a heap data structure? If so, it would explain the name, but I'm a bit puzzled as to how a heap data structure would be of assistance in creating or managing the dynamic memory heap. If not, on the other hand, then does anybody know where the name "heap" came from, as it applies to the dynamic memory pool?
    A.

  • How can I set the Lock Model and data structure ?

    Hi ,
    I just have two questions about JE:
    1) Is there some method for me to set the lock mode level , such as record lock, page lock and database lock in JE?
    2) I learned that there are Btree and Hash,etc , data structures , How can I set the data structure when using JE ?
    Thanks in advance !
    Chris

    I think you're confusing our DB (C-based product) with JE. JE does not have lock mode levels, page locks (it does not have pages), or database locks. JE only has the BTREE method, it does not have the HASH method. For JE, please be sure to reference the JE doc page:
    http://www.oracle.com/technology/documentation/berkeley-db/je/index.html
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • CRMXIF_ORDER_SAVE Data structure information

    The BAPI CRMXIF_ORDER_SAVE has one input Parameter of type CRMXIF_BUSTRANS. This paramter is quite a complex data structure made upof many data structures; which themselves are complex and contain more data structures.
    I am a first time user of this BAPI and I calling this BAPI (exposed as an RFC web service) via .net 2.0. I am not able to find an documentation for this BAPI and it data structures. I am looking for an explanation of the data structures and what and how they relate to/in SAP.
    Where can I find such information.
    Any help is appreciated.
    -Jawahar

    hi Jawahar,
    how are you doing ?
    here is a discussion on sdn on the same bapi
    CRMXIF_ORDER_SAVE to create orders
    i am not aware of the internal data structure, but am interested to know the results you get, please update the thread when possible
    with respect,
    amit

  • Source and destination are deep structures.. can't seem to map the detail table

    So, both my source data structure and my destination structure are very similarly built:
    They both have a HEADER and BODY component. The HEADER has the standard AIF fields (MSGGUID, NS, IFNAME, IFVER).
    I have defined the BODY as a deep structure composed of a Header Structure + a Detail Table. Each row in the BODY has a structure with a few header fields, then a table of detail data attached to it.
    In my Structure Mappings, I've created 2 rows:
    The first to map BODY-HEADER to my header structure.
    The second to map BODY-DETAILS to my details table. Here, I've chosen "Indirect Mapping".
    Selecting that row and navigating to "Define Field Mappings", I choose my destination table (DTL) and enter the Sub-table from my source structure.
    At this point, I only have 1 action - to save the data in Ztables. I'm seeing that the header data is passed in fine. But there aren't any detail lines coming through.
    Any ideas?
    thanks alot.
    RP.

    Christoph,
    In your reply, I only have the ability to perform the First Structure Mapping (please see the below screenshots):
    Source Structure; BODY
    Destination Structure: BODY
    Field Mapping:
    1. Field in Dest.Struc=HDR, Sub-Table = SCH_HEADER
    2. Field in Dest.Struc=DTL,  Sub Table = SCH_DETAILS
    I presume I'm following your suggestion, but when I try to create the other two structure mappings, I only have HEADER or BODY as available options to choose from: I've attached screenshots of the F4 dropdown of the Source Structure and also the Destination Structure fields.
    I believe this is because my Interface Definition is defined as a HEADER and BODY:
    Source Data Structure
    Destination Data Structure

  • Dynamic subject based on data structure (JD Edwards)

    In JD EDwards TR 8.98.3.0 it should be possible to create a dynamic email subject based on a data structure that is connected to a report definition. I have managed to create the data strucure with two elements (DOCO and DESC), this data structure is connected to a report definition in which I have stated that the subject must contain the first element (DOCO): Purchase order &1.
    In the report definition I mapped the element DOCO from the data structure to the XML-element that contains the order number.
    Unfortunately the e-mail does contain the statis text "purchase order" but it doesn't contain the order number (DOCO) from the XML-file.
    Can anyone give me a hint for what I have done wrong?

    In JD EDwards TR 8.98.3.0 it should be possible to create a dynamic email subject based on a data structure that is connected to a report definition. I have managed to create the data strucure with two elements (DOCO and DESC), this data structure is connected to a report definition in which I have stated that the subject must contain the first element (DOCO): Purchase order &1.
    In the report definition I mapped the element DOCO from the data structure to the XML-element that contains the order number.
    Unfortunately the e-mail does contain the statis text "purchase order" but it doesn't contain the order number (DOCO) from the XML-file.
    Can anyone give me a hint for what I have done wrong?

  • Modelling complex data structures

    Hello all,
    I'm trying to understand how to model and design a scenario where the data is non-flat (specifically purchase orders).  As far as I understand Duet Enterprise does not handle non-flat structures (without custom coding in SharePoint).
    What are some options that other people have used to address this?
    The two that I thought of are:
    1.  Model the header and line item data structures separately and then somehow link them in SharePoint
    2.  Don't use the external list external content type in SharePoint and develop something custom
    Does anybody else have any other ideas?  Do you have any examples or starting points?
    Thank you.

    You should avoided passing complex data structure across the JNI boundary. It is slow and it is very difficult to get right. Either make your JNI code so simple that its parameters are primitives or very simple objects, or make your Java code so simple ditto.

  • Java data structure

    H!!
    I am looking for a good on line tutorial about
    Java Data structure. please help me.
    peter

    Hi again!
    This is my first time that I want to learn
    about : stack, list, linked list, queue, tree..
    . whit Java.Stack, list, linked list, queue and trees are data structures which are the same independent of the programming language. They are more of a concept.
    The best way to find more information is to google on the structure you want more information on. Here's an explanation on how a linked list works:
    http://encyclopedia.lockergnome.com/s/b/Linked_list
    /Kaj

  • Can I use more than one blue-tooth device at the same time on IPhone 4S? Like a wireless headsets and speed and cadence sensor for cycling computer, receive the data and listen music simultaneously

    Can I use more than one blue-tooth device at the same time on IPhone 4S? Like a wireless headsets and speed and cadence sensor for cycling computer, receive the data and listen music simultaneously

    As long as the profiles are different (ex. HID vs AD2P) you will not have any issues. But say if you try to use 2 keyboards at once, it won't work. Or 2 headsets at once. Your scenario seems fine.

  • What's the easiest way to move app data and data structures to a server?

    Hi guys,
    I've been developing my app locally with Apex 4.2 and Oracle 11g XE on Windows 7. It's getting close to the time to move the app to an Oracle Apex server. I imagine Export/Import is the way to move the app. But what about the app tables and data (those tables/data like "customer" and "account" created specifically for the app)? I've been using a data modeling tool, so I can run a DDL script to create the data structures on the server. What is the easiest way to move the app data to the server? Is there a way to move both structures and data in one process?
    Thanks,
    Kim

    There's probably another way to get here, but, in SQL Developer, on the tree navigation, expand the objects down to your table, right click, then click EXPORT.. there you will see all the options. This is a tedious process and it sucks IMO, but yeah, it works. It sucks mostly because 1) it's one table at a time, 2) if your data model is robust and has constraints, and sequences and triggers, then you'll have to disable them all for the insert, and hope that you can re-enable constraints, etc without a glitch (good luck, unless you have only a handful of tables)
    I prefer using the oracle command line EXP to export an entire schema, then on the target server I use IMP to import the schema. That way, it's near exact. This makes life messy if you develop more than one application in a single schema, and I've felt that pain -- however -- it's a whole lot easier to drop tables and other objects than it is to create them! (thus, even if the process of EXP/IMP moved more than you wanted to "move".. just blow away what you don't want on the target after the fact..)
    You could use oracle's datapump method too.
    Alternatively, what can be done, IF you have access to both servers from your SQL developer instance (or if you can tnsping them both already from the command line, you can use SQL*PLUS), is run a script that will identify your apex apps' objects (usually by prefix to object names, like EBA_PROJ_%, etc) and do all the manual work for you. I've created a script that does exactly this so that I can move data from dev to prod servers over a dblink. It's tricky because of the order that must be executed to disable constraints and then re-enable them, and of course, trickier if you don't consistently prefix ALL of your "application objects"... (tables, views, triggers, sequences, functions, procs, indexes, etc)

  • Differrences between structure and table in data dictionary in ABAP?

    What is the differrences between structure and table in data dictionary in ABAP?
    are they same?

    Tables :
    1. The place where the data is stored so that you can retrieve at any time.
    2. There can be more than one record stored
    Structures :
    1. The data / info stays only during the runtime of the application and will not get stored at all during the run time ....
    2. Only one record can be stored at the runtime .....
    A structure forms the skeleton of the table.
    A structure comprises components i.e., fields. Types are defined for the components A component can refer to an elementary type (via a data element or by directly specifying the data type and length in the structure definition), another structure or a table type. A structure can therefore be nested to any depth
    Tables can be defined independently of the database in the ABAP Dictionary. The fields of the table are defined with their (database-independent) data types and lengths.
    When the table is activated, a physical table definition is created in the database for the table definition stored in the ABAP Dictionary. The table definition is translated from the ABAP Dictionary to a definition of the particular database.

  • Looking for suitable and robust data structure?

    I have an application where i have to give user an option to correlate the
    response returned by a method call with other methods arguments.
    I have provided a jtree struture where user can see methods and their
    responses and can correlate them by selecting appropriate arguments
    where these values could be used.
    I used a data structure to store such relations like
    A hashmap where every key is a unique number representing method number
    and value ia a matrix.
    In each matrix, the first element of every row would be the Response object and
    all remaining elments in the row would be Argument objects. :)
    Now maybe someone would ask, for every method there is always only one return type
    then why such a matrix with Reponse object as first element of each row.
    The reason is that i gave user an option to not only relate response as a whole Object to
    different arguments of different methods but user can select a field of this response object if this
    is a complex type or user can select any element if the response is a Collection object to relate
    with arguments.
    I am not sure whether this structure is more appropriate or i can use more robust
    and memory efficient structure.
    Please give me your useful suggestions.

    J2EER wrote:
    I have an application where i have to give user an option to correlate the
    response returned by a method call with other methods arguments.I really don't understand you.
    I have provided a jtree struture where user can see methods and their
    responses and can correlate them by selecting appropriate arguments
    where these values could be used.Huh?
    I used a data structure to store such relations likeErr, what happened to the rest of your sentence? Or is the next part the rest of it?
    A hashmap where every key is a unique number representing method number
    and value ia a matrix.Where does this matrix come from? In my book, a matrix is a 2 dimensional structure. What do you mean by it?
    In each matrix, the first element of every row would be the Response object and
    all remaining elments in the row would be Argument objects. :)
    Now maybe someone would ask, for every method there is always only one return type
    then why such a matrix with Reponse object as first element of each row.You're still talking about methods? If so, don't all methods have just one return type?
    The reason is that i gave user an option to not only relate response as a whole Object to
    different arguments of different methods but user can select a field of this response object if this
    is a complex type or user can select any element if the response is a Collection object to relate
    with arguments.
    I am not sure whether this structure is more appropriate or i can use more robust
    and memory efficient structure.
    Please give me your useful suggestions.Perhaps you could give a more detailed explanation and more importantly, provide some examples of what you mean.

  • Linked List, Stacks and Other Data Structures in Objective-C 2.0

    I've checked a little throughout documentation that Apple provides for the different frameworks in order to determine if there were ready-made classes for data structures such as linked lists, stacks and so forth but there don't appear to be any available? Is this correct?

    NSArray and NSDictionary are the multi-purpose built-in aggregate types. If you need something else then you can use STL or roll your own.

Maybe you are looking for

  • How do I delete history and bookmarks on iMac?

    On the iPad, I could use Settings to delete history, but there s no such function on iMac.  How do I delete bookmarks and Top Hits and history altogether?

  • Images shrink from Indesign CS4 to PDF

    I design ads at a set size in a frame in Indesign CS4. I just noticed that when I print them to PDF (regardless of the PDF distiller settings), they shrink. I have the print dialog box settings at 100%. Printing to a physical printer does not have th

  • Base Stations regularly stop responding

    This college has 9 Airport Extreme Base Stations. Two of them have the WAN port attached to our ethernet network. One of these is set up as a Main Base Station for a WDS, linking to 2 relay stations and on to the remotes. They all have fixed IP addre

  • How to Create Mapllet in Informatica PowerCenter Designer 9.01

    Hi All, I don't know this is right Platform to ask this question. I wrote a SQL Query and i want to create Mapplet for this query. I don't understand in Mapplet which Tools i should use to apply SQL WHERE conditions, I need some guidelines. If i know

  • PS5: In Raw mode not allowed to create Adjustment Brush adjustments

    I get the following message when I try to use the Adjustment Brush: Unable to create local adjustment. All the local adjustment controls are set to have no effect on the image. How do turn on the local adjustment controls?