Best algorithm for Sort ?

Hi ,
My application involves the large amount of data that needs to be sorted often. Application interacts with the other environment who is
passing large amount of arithmetic results at run time that I need to sort and display on the screen.
Can anybody let me know, which sort algorithm will be best suited for me ? Will it be Bubble sort/Bidirectional Bubble sort/ Quick Sort ?
Thanks in advance.
Warm regards,

Radix sort is always good. Although an optimised radix sort can still only barely beat the quicksort in java.util.Array.sort. And it uses extra memory while suicksort is inmemory. However, if you want to use radix sort you can modify this piece of code to suite your type:
public class WHATEVER{
//rearranges the data in order
public void radixSort(int[] data, int nrData){//We use base 16
if(sorted) return;
//get highest value
int maxValue=0;
for(int i=0; i<nrData; i++) if(data>maxValue) maxValue=data[i];
//initial length about double the average spread
int[][] buckets=new int[16][((nrData>>3)>0?(nrData>>3):1)];
int length[]=new int[16];//A list with the lengths of the lists
int digits=1;//the max digit needed to be considered
while((1<<(digits<<2))<maxValue && digits<8) digits++;
for(int digit=0; digit<digits; digit++){
for(int i=0; i<16; i++) length[i]=0;
for(int i=0; i<nrData; i++){
int index=(data[i]>>(digit<<2))&15;//15 is a mask ...00001111
if(length[index]>=buckets[index].length){
buckets[index]=doubleVector(buckets[index]);
buckets[index][length[index]++]=data[i];
//link the lists back into data
int index=0;
for(int i=0; i<16; i++)
for(int j=0; j<length[i]; j++)
data[index++]=buckets[i][j];
protected int[] resizeVector(int[] vector, int newSize){
int[] newVector=new int[_newSize];
System.arraycopy(_vector,0,newVector,0,(_vector.length<_newSize ? vector.length : newSize));
return newVector;
protected int[] doubleVector(int[] _vector){
return resizeVector(_vector, _vector.length<<1);
Gil

Similar Messages

  • Best algorithm to sort semi-sorted arrays?

    I am trying my hand at the hutter prize (http://prize.hutter1.net/)
    My current compression algorithm sorts an array of Comparable Objects every main cycle.
    -This array of objects can potentically increase by one object per cycle.
    -Each object's comparision value can change per cycle, however its order is mostly kept.
    This means that the over all order of the objects are similar between cycles.
    Is there an sorting algorithm which can take advantage of the semi-sorted state of the array?
    I was using the default Arrays.sort() however it does not seem to make much use of the semi-sorted input array and is too slow for my use.
    In order to speed up the sorting i have relaxed the need to be in strict order. I.e there can be some objects out of order.
    To this end I have developed a BucketSort which i thought should speed up the sorting however it seems to have the opposite effect!
    Is there any reason why this implementation is quite slow? (three times as slow as Array.sort() )
       private static int MAX_BUCKET=65535;
       private static Word[] buckets=new Word[MAX_BUCKET];
       public static void bucketSortReverse (Word[] a, int n)
            int i;
            int count=1;
            int index;
            Word curr;
            // fill up the buckets with the input words
            for (i=0;i<n;i++)
                 curr=a;
              index=(int) (curr.probablility*MAX_BUCKET);
              curr.next=buckets[index];
              buckets[index]=curr;
         // iterate over the buckets and construct the sorted words
         for (i=0;i<MAX_BUCKET;i++)
              curr=buckets[i];
              if (curr!=null)
                   while (curr!=null)
                        a[n-count++]=curr;
                        curr=curr.next;
                   buckets[i]=null;
    NOTE Currently my input Word array contains a maximum of 6000 words.
    Lowering the number of bins reduces the accuraccy of the sort and does not provide much increase in speed :(
    I have found some Open Source code which by default performs very similarly to Arrays.sort in terms of speed and have modified it to be non-strict in its ordering.
    This modified sorting algothim is approximately 15% faster but is still really not fast enough.
    By reducing the strict ordering of the sorting algorithm i have also reduced the level of compression. Ultimately i would like to have a fast sorting algothrim which takes into acount semi-sorted objects with out reducing strictness of the sort.
    Any ideas?

    Tree removal takes O(logn) and insertion takes O(logn). Compare this to an array where potentially a large number of elements need to be shifted O(n).
    Usually it takes hundreds of thousands of elements to notice a difference. So if your data is relatively small, then it may not be worth trying to optimize it.
    test of the parent may need to be performed to determine The balanced binary tree (TreeSet) that comes with the JDK doesn't allow access to the internal structure of the tree, so testing the parent isn't available. Even if it was, it would still take an O(logn) lookup to find the node and get its parent, so it wouldn't be a significant improvement.

  • What is the best way for sorting?

    Hi i have 1000 customers in the database. I need to display them in the combo box. combox is editable. As the user types the letters i need to filter and display the customer names. for example if the user types 'a' in the combox i have to display all the customer names that starts with 'a'. if the customer types 'as' then i have to display only names that start with 'as' in the combo box popup. for every key stroke i have to filter and display the customer names.
    for this there are two approaches:-
    1. for every key stroke go to database and retrieve the sorted results and display them. In this way sorting happens in the database.
    2. pull all the customers into java once, cash them and sort them accordingly based on the key strokes. In this sorting happens in our java code.
    few friends said that going to databse for every key stroke is expensive. I feel pulling all the customers at once and cashing them in java is not a good idea.
    I am really confused. I need an expert suggestion. which way is best? why is it the best way? what are the pros and cons in both the ways. please help me.
    Thanks in advance.

    Thanks ejp but initially if the combo box is not empty. that means if he did not typed any letter i will be displaying all the names.No. That's the mistake. Don't do that. A combobox with 1000 or 5000 items is completely useless.Do it the way I said.
    My problem is if there are 5000 customers then what? will it not create a performance issue.Of course it will. It will also create a major performance issue for the user.
    However you seem to have missed something else. By populating the combobox with anything, you are already running a cache. No two ways about it, and no way to avoid it. So whatever you populate it with, and whenever you do it, all you have to do when the user types another keystroke is filter the combobox model to exclude everything that doesn't match the prefix he has typed. The issue of going back to the database doesn't even arise.

  • Sort algorithm for LARGE amount of data?

    hi,
    i need a sorting scheme for the following situation:
    I have a data file where entries are in chunks of variable length. The size of each
    chunk is defined in the first 5 bytes as a string, so the length can be from
    00001-99999, though it is usually around 1000-3000 bytes long. In reality it is never
    over 10000 bytes, but it is possible for it to be.
    Anyways, I need to sort these files according to the data found in certain
    displacements in these chunks. I will be sorting anywhere from 200,000 to
    100,000,000 at a time. Time is an issue certainly, but if it takes a week to finish that is
    fine, i just need it to work.
    So, my problem is that none of the typical sorts will work for me (bubble, heap) as far
    as i can tell because in those sorts i need to have the data loaded into memory, and
    this much data will overload the system. I have used, in the past, a c method that
    feeds these chunks to the sort function a few at a time, then makes files. Hence, not
    all chunks need to be loaded at once. Does anyone know of any solution to this
    problem? Any sort algorithms or sort classes that can handle this much data? thanks!

    Ever tried the radix sort? it's got linear complexity.
    You can still work a chunk at a time, and simply separate the data into several different "buckets", each one identified by, oh, say, the unicode number for the first character in the chunk.
    You now have several smaller lists to sort, and when you're done, NO MERGING IS NECESSARY. Simply append the lists, because the main sets of lists are already sifted into different "buckets".
    Kinda like this:
    create 256 files, and store in each every record that contains a first character that corresponds to it's ascii value. Then create 256 files for each of the original 256 files, and store in each every recond that contains a second character that correstonds to it's second character.
    etc, etc, etc.
    This is very memery intensive for storage, but in terms of run time complexity, it is linear: You will make an explicit number of passes through the list of data. And, as you go along, the lists get shorter and shorter. So while it appears that you are making 256 ^ (max length of data) passes, you're really only making (max length of data) passes, with some additional overhead of creating extra multiple files.
    For that much data, I would definitely recommend a linear algorithm. Any other sorts would be extremely slow.

  • Write an algorithm to sort an array of integers

    "Write an algorithm to sort an array of integers"
    I was asked this at an interview and required to do it in 5 mins. I don't think you can use sort them by putting them in a collection, i think you need to write an algorithm from scartch. Any idea what the best way to do this would have been?

    Depends what you mean by "best."
    BubbleSort is probably the only one I could write off the top of my head in five minutes, but as sorting routines go for practical use, it sucks. If you know how to write MergeSort or QuickSort or dman near anything off off the top of your head, that would proabably be better.
    No one sorting algorithm is "best" without any context, however.
    If you don't know any sorting algorithms, use google or your data structures and algorithms textbook.

  • Best Practices For Household IOS's/Apple IDs

    Greetings:
    I've been searching support for best practices for sharing primarily apps, music and video among multple iOS's/Apple IDs.  If there is a specific article please point me to it.
    Here is my situation: 
    We currently have 3 iPads (2-kids, 1-dad) in the household and one iTunes account on a win computer.  I previously had all iPads on single Apple ID/credit card and controlled the kids' downloads thru the Apple ID password that I kept secret.  As the kids have grown older, I found myself constantly entering my password as the kids increased there interest in music/apps/video.  I like this approach because all content was shared...I dislike because I was constantly asked to input password for all downloads.
    So, I recently set up an individual account for them with the allowance feature at iTunes that allows them to download content on their own (I set restrictions on their iPads).  Now I have 3 Apple IDs under one household.
    My questions:
    With the 3 Apple IDs, what is the best way to share apps,music, videos among myself and the kids?  Is it multiple accounts on the computer and some sort of sharing? 
    Thanks in advance...

    Hi Bonesaw1962,
    We've had our staff and students run iOS updates OTA via Settings -> Software Update. In the past, we put a DNS block on Apple's update servers to prevent users from updating iOS (like last fall when iOS 7 was first released). By blocking mesu.apple com, the iPads weren't able to check for or install any iOS software updates. We waited until iOS 7.0.3 was released before we removed the block to mesu.apple.com at which point we told users if they wanted to update to iOS 7 they could do so OTA. We used our MDM to run reports periodically to see how many people updated to iOS 7 and how many stayed on iOS 6. As time went on, just about everyone updated on their own.
    If you go this route (depending on the number of devices you have), you may want to take a look at Caching Server 2 to help with the network load https://www.apple.com/osx/server/features/#caching-server . From Apple's website, "When a user on your network downloads new software from Apple, a copy is automatically stored on your server. So the next time other users on your network update or download that same software, they actually access it from inside the network."
    I wish there was a way for MDMs to manage iOS updates, but unfortunately Apple hasn't made this feature available to MDM providers. I've given this feedback to our Apple SE, but haven't heard if it is being considered or not. Keeping fingers crossed.
    Hope this helps. Let us know what you decide on and keep us posted on the progress. Good luck!!
    ~Joe

  • What is teh best solution for my Problem??

    hello everyone
    i'am planing to develop a Patient Management System (PMS)
    since i 'm not that guru in the J technologies i would like you to get me some help with this decision:
    what is the best solution for developeing an intranet "PMS" which should handles data (connection to postgresql) and runs some algorithm (for planing puropose) im background ??
    1 developeing a web based solution (servlet and jsp and and ..)
    2 developeing an application wich will be manging everything ??? (a kind of programm with its own GUI)
    3 you may have an other idea solution and ill be gald for any advices
    ps sorry for my english its not that great ;)

    Web applications are all the rage these days and IMO rightly so as they greatly reduce deployment cost and headaches.
    They do have some drawbacks though which for you might be important.
    I can imagine that sooner or later (probably sooner in my experience) a requirement to interface with hardware installed on the client machines will emerge.
    Whether this is a barcode scanner or a chipcard reader to get client information from some form of card issued to the client, or maybe a label printer to print out labels for medication bottles doesn't matter, you need to access the client machine directly.
    Web applications have great difficulty with that (in fact, it's all but impossible).
    You could go for an applet solution but that's contrived at best and still leaves the same problems.
    So in your situation an old-fashioned client/server application (maybe using web services to communicate with the serverside application) is likely the best longterm solution.
    You'd have the database remote so everyone has access to the same data, being accessed through processes run on the server and called by the clients. These can also do most of the business logic, leaving the clients relatively dumb responsible mainly for data validation and entry and presentation of the results.

  • Networking "best practice" for setting up a farm

    Hi all.
    We would like to set an OracleVM farm, and I have a question about "best practice" for
    configuring the network. Some background:
    - The hardware I have is comprised of machines with 4 gig-eth NICs each.
    - The storage will be coming primarily from a backend NAS appliance (Netapp, FWIW).
    - We have already allocated a separate VLAN for management.
    - We would like to have HA capable VMs using OCFS2 (on top of NFS.)
    I'm trying to decide between 2 possible configurations. The first would keep physical separation
    between the mgt/storage networks and the DomU networks. The second would just trunk
    everything together across all 4 NICs, something like:
    Config 1:
    - eth0 - management/cluster-interconnect
    - eth1 - storage
    - eth2/eth3 => bond0 - 8021q trunked, bonded interfaces for DomUs
    Config 2:
    - eth0/1/2/3 => bond0
    Do people have experience or recommendation about the best configuration?
    I'm attracted to the first option (perhaps naively) because CI/storage would benefit
    from dedicated bandwidth and this configuration might also be more secure.
    Regards,
    Robert.

    user1070509 wrote:
    Option #4 (802.3ad) looks promising, but I don't know if this can be made to work across
    separate switches.It can, if your switches support cross-switch trunking. Essentially, 802.3ad (also known as LACP or EtherChannel on Cisco devices) requires your switch to be properly configured to allow trunking across the interfaces used for the bond. I know that the high-end Cisco and Juniper switches do support LACP across multiple switches. In the Cisco world, this is called MEC (Multichassis EtherChannel).
    If you're using low-end commodity-grade gear, you'll probably need to use active/passive bonds if you want to span switches. Alternatively, you could use one of the balance algorithms for some bandwitch increase. You'd have to run your own testing to determine which algorithm is best suited for your workload.
    The Linux Foundation's Net:Bonding article has some great information on bonding in general, particularly on the various bonding methods for high availability:
    http://www.linuxfoundation.org/en/Net:Bonding

  • Best setup for a non-Mac file server?

    I have a dual xeon server, with a SATA RAID5 I want to use as a file server in a cross-platform environment.
    *What I've tried and the issues...*
    At first I considered using Windows 2003 (Win2k3) but Services for Macintosh (SFM) is an older version of AFP and thus only supports 31 character filenames. With all our Macs supporting SMB/Samba/CIFS and Apple touting that "Macs and PCs can co-exist harmoniously on the same network" I figured I would give that a try.
    SMB doesn't work.
    Sure I can create a connection, but transferring files is a completely different story. I'm trying to backup application and system data, but companies such as Adobe and Apple have named some of their files with special characters that can't be transferred over SMB. I know NTFS doesn't support these characters, but I though a Linux box using SMB would work fine. It doesn't. It's the protocol which keeps me from transferring the data. I end up with the lovely error message of "You cannot copy some of these items to the destination because their names are too long or contain invalid characters for the destination..." (what's sad is, if you google for " because their names are too long or contain invalid characters for the destination" you only get 6 results.)
    So I thought I would give NFS a try. Apple says "Viewed from Mac OS X, [connecting via NFS] is just like connecting to an Apple or Windows server." No. It's not. NFS shares don't even show up in the Finder's Network listing. There are also a pile of other hurdles which are only tackled by savvy, command-line using users.
    So that leaves me with AFP. Win2k3 doesn't support filenames longer than 31 characters, and Win2k8 is dropping SFM altogether. Off to choose a *nix flavor, but that requires Netatalk. It hasn't been updated in years, it has many bad performance reviews... and most distros have removed it. I can download and install it. Oh, but that requires I get the kernel source files. Then I have to create an RPM an that's not working... now I'm several levels deep in trying to figure out how to get Netatalk working and I'm not even sure it will work.
    *What's the best setup for a non-Mac file server?*
    FreeNAS seems promising, but it's in alpha/beta and they have all sorts of warnings regarding potential data loss. Sure there's ExtremeZ-IP, but I really don't want to spend $675 do something Apple claims OS X can already do. I can put just about any non-Mac OS on this thing... what's the best way to set it up so it works?
    Thanks much.

    Rick may be right because although i didnt think of it before i tend to have notoriuosly long classnames for my php classes and i have used samba on occasion (when rsync is out of the question for one reason or another) and never had a problem. I use kubuntu (feisty at the moment )with an ext3 filesystem. if i have a chance this evening ill give it a try and see what happens.
    You could also possibly use FUSE to use an ssh filesystem for the shares... i don tknow how that would figure in your back up though.
    Also if worse comes to worse you could tar or dmg the the necessary files... just some thoughts.
    Ill be interested to know what you end up implementing....
    OH one last thought... Compile Darwin from source and use that as your server

  • Best strategy for variable aggregate custom component in dataTable

    Hey group, I've got a question.
    I'd like to write a custom component to display a series of editable Things in a datatable, but the structure of each Thing will vary depending on what type of Thing it is. So, some Things will display radio button groups (with each radio button selecting a small set of additional input elements, so we have a vertical array radio buttons and beside each radio button, a small number of additional input elements), some will display text-entry fields, and so on.
    I'm wondering what the best strategy for tackling this sort of thing is. I'm sort of thinking I'll need to do something like dynamically add to the component tree in my custom component's encodeBegin(), and purge the extra (sub-) components in encodeEnd().
    Decoding will be a bit of a challenge, maybe.
    Or do I simply instantiate (via constructor calls, not createComponent()) the components I want and explicitly call their encode*() and decode() methods, without adding them to the view tree?
    To add to the fun of all this, I'm only just learning Faces (having gone through the Dudney book, Mastering JSF, and writing some simpler custom components) and I don't have experience with anything other than plain vanilla JSP. (No EJB, no Struts, no Tapestry, no spiffy VisualDevStudioWysiwyg++ [bah humbug, I'm an emacs user]). I'm using JSP 2.0, JSF 1.1_01, JBoss 4.0.1 and JDK 1.4.2. No, I won't upgrade to 1.5 (yet).
    Any hints, pointers to good sample code? I've looked at some of the sample code that came with the RI and I've tried to navigate the JSF Blueprints stuff, but I haven't really found anything on aggregating components into a custom component. Did I miss something obvious?
    If this isn't a good question, please let me know how I can sharpen it up a bit.
    Thanks.
    John.

    Hi,
    We're doing something very similar. I had a look at the Tomahawk Date component, and it seems to dynamically created InputText components in the encodeEnd(). However, it doesn't decode this directly (it only expects a single textual value). I expect you may have to check the request yourself in decode().
    Other ideas would be appreciated, though - I'm still new to JSF.

  • Oracle 11g - Memory used for sorting

    Hi everyone,
    I would like to know how I could analyze memory used for sorting in Oracle 11g. When I run the below query, it returns 1531381.
    select value from v$sysstat where name like 'sorts (memory)';But when I check sort_area_size parameter from v$parameter, it returns 65536. Does it mean my database is using more memory for sorting than sort_area_size. Or is the way I interpret v$sysstat view and sort_area_size wrong? What is the best way to monitor the memory usage for sorting? Thanks in advance.
    Regards,
    K.H
    Edited by: K Hein on Apr 5, 2012 8:16 PM

    check the valuse of pga_aggregate_target
    http://docs.oracle.com/cd/B19306_01/server.102/b14237/initparams157.htm
    Note:
    Oracle does not recommend using the SORT_AREA_SIZE parameter unless the instance is configured with the shared server option. Oracle recommends that you enable automatic sizing of SQL working areas by setting PGA_AGGREGATE_TARGET instead. SORT_AREA_SIZE is retained for backward compatibility.
    What is the best way to monitor the memory usage for sorting? try v$sort_usage
    or v$tempseg_usage
    col sid_serial for a44
    col size for a22
    col SID_SERIAL for a22
    SELECT b.tablespace,
            ROUND(((b.blocks*p.value)/1024/1024),2)||' MB' "SIZE",
            a.sid||','||a.serial# SID_SERIAL,
            a.username,a.osuser,
            a.program
       FROM sys.v_$session a,
            sys.v_$sort_usage b,
            sys.v_$parameter p
      WHERE p.name  = 'db_block_size'
        AND a.saddr = b.session_addr
    ORDER BY b.blocks;

  • Best practice for external but secure access to internal data?

    We need external customers/vendors/partners to access some of our company data (view/add/edit).  It’s not so easy as to segment out those databases/tables/records from other existing (and put separate database(s) in the DMZ where our server is).  Our
    current solution is to have a 1433 hole from web server into our database server.  The user credentials are not in any sort of web.config but rather compiled in our DLLs, and that SQL login has read/write access to a very limited number of databases.
    Our security group says this is still not secure, but how else are we to do it?  Even if a web service, there still has to be a hole in somewhere.  Any standard best practice for this?
    Thanks.

    Security is mainly about mitigation rather than 100% secure, "We have unknown unknowns". The component needs to talk to SQL Server. You could continue to use http to talk to SQL Server, perhaps even get SOAP Transactions working but personally
    I'd have more worries about using such a 'less trodden' path since that is exactly the areas where more security problems are discovered. I don't know about your specific design issues so there might be even more ways to mitigate the risk but in general you're
    using a DMZ as a decent way to mitigate risk. I would recommend asking your security team what they'd deem acceptable.
    http://pauliom.wordpress.com

  • Best practice for managing a Windows 7 deployment with both 32-bit and 64-bit?

    What is the best practice for creating and organizing deployment shares in MDT for a Windows 7 deployment that has mostly 32-bit computers, but a few 64-bit computers as well? Is it better to create a single deployment share for Windows 7 and include both
    versions, or is it better to create two separate deployment shares? And what about 32-bit and 64-bit versions of applications?
    I'm currently leaning towards creating two separate deployment shares, just so that I don't have to keep typing (x86) and (x64) for every application I import, as well as making it easier when choosing applications in the Lite Touch installation. But I know
    each deployment share has the option to create both an x86 and x64 boot image, so that's why I am confused. 

    Supporting two task sequences is way easier than supporting two shares. Two shares means two boot media, or maintaining a method of directing the user to one or the other. Everything needs to be imported or configured twice. Not to mention doubling storage
    space. MDT is designed to have multiple task sequences, why wouldn't you use them?
    Supporting multiple task sequences can be a pain, but not bad once you get a system. Supporting app installs intelligently is a large part of that. We have one folder per app install, with a wrapper vbscript that handles OS detection. If there are separate
    binaries, they are placed in x86 and x64 subfolders. Everything runs from one folder via the same command, "cscript install.vbs". So, import once, assign once, and forget it. Its the same install package we use for Altiris, and we'll be using a Powershell
    version of it when we fully migrate to SCCM.
    Others handle x86 and x64 apps separately, and use the MDT app details to select what platform the app is meant for. I've done that, but we have a template for the vbscript wrapper and its a standard process, I believe its easier. YMMV.
    Once you get your apps into MDT, create bundles. Core build bundle, core deploy bundle, Laptop deploy bundle, etcetera. Now you don't have to assign twenty apps to both task sequences, just one bundle. When you replace one app in the bundle, all TS'es are
    updated automatically. Its kind of the same mentality as active directory. Users, groups and resources = apps, bundles and task sequences.
    If you have separate build and deploy shares in your lab, great. If not, separate your apps into build and deploy folders in your lab MDT share. Use a selection profile to upload only your deploy side to production. In fact I separate everything (except
    drivers) into Build and deploy folders on my lab server. Don't mix build and deploy, and don't mix Lab/QA and production. I also keep a "Retired" folder. When I replace an app, TS, OS, etcetera, I move it to the retired folder and append "RETIRED - " to the
    front of it  so I can instantly spot it if it happens to show up somewhere it shouldn't.
    To me, the biggest "weakness" of MDT is its flexibility. There's literally a dozen different ways to do everything, and there's no fences to keep you on the path. If you don't create some sort of organization for yourself, its very easy to get lost as things
    get complicated. Tossing everything into one giant bucket will have you pulling your hair out.

  • Best-practice for use of object styles to manage image text wrap issues when aiming at both print and EPUB output?

    I have a work-flow question about object styles, text-wrap, and preparing a long document with lots of images for dual print/EPUB output in InDesign CC 2014.
    I am sort of experienced with InDesign but new to EPUB export. I have hundreds of pages and hundreds of images so I'd like to make my EPUB learning curve, in particular, less painful.
    Let me talk you through what I'm planning and you tell me if it's stupid.
    It's kind of a storybook-look I'm going for. Single column of text (6" by 9" page) with lots of small-to-medium images on the page (one or two images per page), and the text flowing around, sometimes right, sometimes left. Sometimes around the bounding box, sometimes following the edges of the images. So in each case I'm looking to tweak image size and placement and wrap settings so that the image is as close to the relevant text as possible and the layout isn't all wonky. Lovely print page the goal. Lots of fussy trade-offs and deciding what looks best. Inevitably, this will entail local overrides of paragraph styles. So what I want to do, I guess, is get the images as closely placed as possible, before I do any of that overriding. Then I divide my production line.
    1) I set aside the uniformly-styled doc for later EPUB export. (This is wise, right? Start for EPUB export with a doc with pristine styles?)
    2) With the EPUB-bound version set aside, I finish preparing the print side, making all my little tweaks. So many pages, so many images. So many little nudges. If I go back and nudge something at the beginning everything shifts a little. It's broken up into lots of separate stories, but still ... there is no way to make this non-tedious. But what is best practice? I'm basically just doing it by hand, eyeballing it and dropping an inline anchor to some close bit of text in case of some storm, i.e. if there's a major text change my image will still be almost where it belongs. Try to get the early bits right so that I don't have to go back and change them and then mess up stuff later. Object styles don't really help me with that. Do they? I haven't found a good use for them at this stage (Obviously if I had to draw a pink line around each image, or whatever, I'd use object styles for that.)
    Now let me shift back to EPUB. Clearly I need object styles to prepare for export. I'm planning to make a left float style and a right float style and a couple of others for other cases. And I'm basically going to go through the whole doc selecting each image and styling it in whatever way seems likeliest. At this point I will change the inline anchors to above line or custom, since I'm told EPUB doesn't like the inline ones.
    I guess maybe it comes down to this. I realize I have to use object styles for images for EPUB, but for print, manual placement - to make it look just right - and an inline anchor seems best? I sort of feel like if I'm going to bother to use object styles for EPUB I should also use them for print, but maybe that's just not necessary? It feels inefficient to make so many inline anchors and then trade them for a custom thing just for EPUB. But two different outputs means two different workflows. Sometimes you just have to do it twice.
    Does this make sense? What am I missing, before I waste dozens of hours doing it wrong?

    I've moved your question to the InDesign EPUB forum for best results.

  • Best practice for invoice posting inSRM

    Dear expert,
    what is the best practice for posting an invoice? Is it in SRM system or MM system? In SRM, the system allows one to use approval procedure for invoice posting; wheras in MM, one cannot use the apporval procedure to post an invoice. similar is the case, in SRM-SUS and MM-SUS scenario?
    I would appreciate if you can feedback on the industry practice.
    thanks and regards,
    Ranjan

    Ranjan,
    As a SAP customer we use invoice entry in ERP using MIRO and FB60 as these are the most efficient for our busines.
    1. Invoice entry using MIRO tcode is faster as it can be done with minimal use of the mouse.  Invoice entry is slower in SRM as browser response and interactions with the backed ERP system slows the systems reponse to the user input.  Repeated use of a mouse in the SRM browser is detrimental to fast input.
    2. Not all types of invoices can be handled in SRM e.g. Invoice without PO.
    3. We process approx 20,000 invoices per month with multiple input operators, SRM could not handle that sort of load.
    4. SRM is really a procurement application and although invoice entry is included it is probably more for users who wish to use SRM in a stand alone scenario.  We use extended classic so all our financial transactions take place in the ERP backend.
    Your choice also depends upon the number and quality of the invoices you plan to process, and the need for the operators to be trained on one or two systems.
    Hope these personal observations assist with your decision
    Regards
    Allen

Maybe you are looking for