Why not a parallel control structure?

I often come across the need to run several identical and independent operations at the same time. I almost always end up doing them sequentially instead because I can use a for loop for this. It would be a great asset to parallel programming if there was a "for loop" like structure that ran all iterations at the same time (multithreaded, reentrant support, of course). One could then send a command and wait for a response on several instruments at once (in parallel) without having to spend as much time waiting sequentially for each to complete. The input tunnels could be arrays in which the number of elements determined the number of simultaneous panes running each with its own member of the array. The iteration terminal could output
a sequential number for each logically parallel pane as well. For debug the user could have a way to select which pane to view as all would be running. The output tunnels could also be arrays. Each pane would operate independently from all the others. I think that this is a very useful suggestion and should be incorporated into the product even though it is less intuitive than the other control structures. It provides a capability that currently is hard to attain (though not impossible) but often useful in constructing time efficient hardware control.

> I have raised this with NI about two years ago
> thinking that it would not require a huge architectural change but
> rather a compiler addition only but it has yet to surface in the last
> three releases.
Adding a structure like this would be a decent amount of work. It would
be yet another way of specifying parallel diagrams. I'm not saying that
LV will never add a structure to make something like this easier, but it
is more than ajust a compiler tweak. In the meantime, try something
like the following.
Place your code to do instrument control in a VI.
Make the VI reentrant.
Decide how many parallel tasks you want to carry out. Yes, this is
static, but there are real limits to how many of these that can be
carried out anyway.
So something like two or four is probably a good
start. Four threads is how many threads LV now spins up for the
standard execution system by default in LV7 so that seems like a good
number.
In your For loop, place N of the reentrant subVIs, index out the
elements and pass them to the subVI.
Make sure the subVI tests for a refnum of not a refnum so that you can
handle indexing past the array.
This pattern, especially with a diagram comment, should make it pretty
obvious that you have unrolled the loop and should make it pretty easy
to change the unrolling number.
Greg McKaskle

Similar Messages

  • Pse give me the document on control structures

    any body have document on control structures pse send me
    (at new,at end,on change of,at start ,at last)

    If it is control break statements.... then here is the types and explanation
    1. AT NEW f.
    2. AT END OF f.
    3. AT FIRST.
    4. AT LAST.
    Effect
    In a LOOP which processes a dataset created with EXTRACT , you can use special control structures for control break processing. All these structures begin with AT and end with ENDAT . The sequence of statements which lies between them is then executed if a control break occurs.
    You can use these key words for control break processing with extract datasets only if the active LOOP statement is proceesing an extract dataset.
    The control level structure with extract datasets is dynamic. It corresponds exactly to the sort key of the extract dataset, i.e. to the order of fields in the field group HEADER by which the extract dataset was sorted .
    At the start of a new control level (i.e. immediately after AT ), the following occurs in the output area of the current LOOP statement:
    All default key fields (on the right) are filled with "*" after the current control level key.
    All other fields (on the right) are set to their initial values after the current control level key.
    Between AT and ENDAT , you can use SUM to insert the appropriate control totals in the number fields (see also ABAP/4 number types ) of the LOOP output area (on the right) after the current control level key. Summing is supported both at the beginning of a control level ( AT FIRST , AT NEW f ) and also the end of a control level ( AT END OF f , AT LAST ).
    At the end of the control level processing (i.e. after ENDAT ), the old contents of the LOOP output area are restored.
    Notes
    When calculating totals, you must ensure that the totals are inserted into the same sub-fields of the LOOP output area as those where the single values otherwise occur. If there is an overflow, processing terminates with a runtime error.
    If an internal table is processed only in a restricted form (using the additions FROM , TO and/or WHERE with the LOOP statement), you should not use the control structures for control level processing because the interaction of a restricted LOOP with the AT statement is currenly not properly defined.
    With LOOP s on extracts, there are also special control break control structures you can use.
    Note
    Runtime errors
    SUM_OVERFLOW : Overflow when calculating totals with SUM .
    Variant 1
    AT NEW f.
    Variant 2
    AT END OF f.
    Effect
    f is a sub-field of an internal table processed with LOOP . The sequence of statements which follow it is executed if the sub-field f or a sub-field in the current LOOP line defined (on the left) before f has a differnt value than in the preceding ( AT NEW ) or subsequent ( AT END OF ) table line.
    Example
    DATA: BEGIN OF COMPANIES OCCURS 20,
    NAME(30),
    PRODUCT(20),
    SALES TYPE I,
    END OF COMPANIES.
    LOOP AT COMPANIES.
    AT NEW NAME.
    NEW-PAGE.
    WRITE / COMPANIES-NAME.
    ENDAT.
    WRITE: / COMPANIES-PRODUCT, COMPANIES-SALES.
    AT END OF NAME.
    SUM.
    WRITE: / COMPANIES-NAME, COMPANIES-SALES.
    ENDAT.
    ENDLOOP.
    The AT statements refer to the field COMPANIES-NAME .
    Notes
    If a control break criterion is not known until runtime, you can use AT NEW (name) or AT END OF (name) to specify it dynamically as the contents of the field name . If name is blank at runtime, the control break criterion is ignored and the sequence of statements is not executed. If name contains an invalid component name, a runtime error occurs.
    By defining an offset and/or length, you can further restrict control break criteria - regardless of whether they are specified statically or dynamically.
    A field symbol pointing to the LOOP output area can also be used as a dynamic control break criterion. If the field symbol does not point to the LOOP output area, a runtime error occurs.
    Note
    Runtime errors
    AT_BAD_PARTIAL_FIELD_ACCESS : Invalid sub-field access when dynamically specifying the control break criterion.
    AT_ITAB_FIELD_INVALID : When dynamically specifying the control break criterion via a field symbol, the field symbol does not point to the LOOP output area.
    ITAB_ILLEGAL_COMPONENT : When dynamically specifying the control break criterion via (name) the field name does not contain a valid sub-field name.
    Variant 3
    AT FIRST.
    Variant 4
    AT LAST.
    Effect
    Executes the appropriate sequence of statements once during the first ( AT FIRST ) or last ( AT LAST ) loop pass.
    Example
    DATA: BEGIN OF COMPANIES OCCURS 20,
    NAME(30),
    PRODUCT(20),
    SALES TYPE I,
    END OF COMPANIES.
    LOOP AT COMPANIES.
    AT FIRST.
    SUM.
    WRITE: 'Sum of all SALES:',
    55 COMPANIES-SALES.
    ENDAT.
    WRITE: / COMPANIES-NAME, COMPANIES-PRODUCT,
    55 COMPANIES-SALES.
    ENDLOOP.
    ON CHANGE OF f.
    Executes the processing block enclosed by the "ON CHANGE OF f" and "ENDON" statements whenever the contents of the field f change (control break processing).
    Normally, you use the statement to manipulate database fields during GET events or SELECT/ENDSELECT processing.
    ON CHANGE OF is unsuitable for recognizing control levels in loops of this type because it always creates a global auxiliary field which is used to check for changes. This global auxiliary field is only changed in the relevant ON CHANGE OF statement. It is not reset when the processing enters loops or subroutines, so unwanted effects can occur if the loop or subroutine is executed again. Also, since it is set to its initial value when created (like any other field), any ON CHANGE OF processing will be executed after the first test, unless the contents of the field concerned happen to be identical to the initial value.
    DATA T100_WA TYPE T100.
    SELECT * FROM T100
    INTO T100_WA
    WHERE SPRSL = SY-LANGU AND
    MSGNR < '
    ORDER BY PRIMARY KEY.
    ON CHANGE OF T100_WA-ARBGB.
    ULINE.
    WRITE: / '**', T100_WA-ARBGB, '**'.
    ENDON.
    WRITE: / T100_WA-MSGNR, T100_WA-TEXT.
    ENDSELECT.
    Displays all messages with their numbers in the logon language, provided the number is less than '010'.
    Each time the message class changes, it is output.
    AT END OF f.
    f is a sub-field of an internal table or extract dataset (EXTRACT) which is being processed with LOOP, i.e. the variants 1 and 2 only make sense within a LOOP.
    Both "AT NEW f." and "AT END OF f. " introduce processing blocks which are concluded by " ENDAT.".
    These processing blocks are processed whenever the contents of a field f or a sub-field defined before f change as a result of processing with LOOP. "AT NEW f." begins a new group of (table) lines with the same contents as the field f while "AT END OF f." concludes such a group.
    Within the AT ... ENDAT processing of internal tables, all argument fields following f are filled with "*".
    Examples
    1. AT for sub-fields of an internal table
    DATA: BEGIN OF COMPANIES OCCURS 20,
    NAME(30),
    PRODUCT(20),
    SALES TYPE I,
    END OF COMPANIES.
    LOOP AT COMPANIES.
    AT NEW NAME.
    NEW-PAGE.
    WRITE / COMPANIES-NAME.
    ENDAT.
    WRITE: / COMPANIES-PRODUCT, COMPANIES-SALES.
    AT END OF NAME.
    SUM.
    WRITE: / COMPANIES-NAME, COMPANIES-SALES.
    ENDAT.
    ENDLOOP.
    The AT statements refer to the field COMPANIES-NAME.

  • HT201317 Using icloud to back up photos and shared photostream, why not updating?

    I've been manually backing up my camera roll on my windows 7 pc the old fashioned way (copying files through windows explorer) for some time, and have my pc as a whole backed up on a cloud product.
    I have this week however learned about icloud and the ability to back up the shared streams I'm subscribed to. I therefore installed icloud control panel and watched my family's streams appear in My Pictures.
    However, one shared stream did not transfer completely - there are 18 of my mum's pictures missing - and My Photo Stream has only transferred 70.
    Know there's a 30 day limit so given that is the first backup, it may not back up all 1000 as the earlier ones are older than 30 days, but the selection making up to 70 aren't the most recent as showing on my iPhone, so its no that. I took a whole lot together last weekend, one is on there but not the rest (for example).
    I can back up manually to get a complete set of my own photos but think I must be doing something wrong if it's missing some.
    I did go out after backing up first time, did I interrupt it , which is why there are only 70?  How do I restart it? - given that it didn't finish first backup.
    Also, I got home tonight, and the ones I've taken today have not transferred over.
    Is there something I'm supposed to do to trigger a backup? ( both to finish first back up, and to backup new ones too)
    Given that I'm using icloud more as a way of getting my photos and shared streams onto my pc, rather than backing up in icloud (as I have my own cloud too), what settings should I have on my iPhone, and what settings on iTunes?
    At the moment on iPhone In settings/icloud/storage &amp; backup, I have icloud backup turned on.
    In iTunes, on the summary page for my iPhone (when plugged in) under Backups, I have 'iCloud' option ticked. Rather than 'this computer', when I change to 'this computer', the icloud setting on my iPhone gets turned to 'off'. I did hit the 'back up now' under 'manually back up and restore' in case that triggered it, and its showing a back up date and time of last night when I did this - but My Photo Stream is still at 70 - not complete transfer, or new ones - and mum's 18 still missing.
    Same page in iTunes, under 'Option' I have both 'sync over wifi' and 'manually manage music and videos' checked.
    I'm sure I'm overlooking something simple, any ideas?
    Thanks!

    Right, they're slowly reappearing. And My Photo Stream is updating this time too.
    So, is it signing in and out that did this? Is this what's supposed to happen?
    I should have said, I was looking for a way to back shared streams as we all have each others streams on our iOS devices and its filling up our storage, so we want to start deleting from the beginning, but not til we've backed up.
    However, if icloud works by constantly removing and rebacking up from what is on the device then, then this isn't the right solution for us, as it would remove the complete stream and back up a smaller stream after we've started deleting...
    Did i do something wrong here, was this supposed to happen?
    What should I have done?
    How do I stop this happening again?? I'm clearly not using icloud control properly!

  • "Receiver port not valid in control record"...idoc error

    Hi,
    The new materials are sent to SAP via a text file which is placed in the application server which EDI uses to populate the Idoc segments and creates the material master.
    Recently we upgraded from SAP 4.6 C to ERP 5.0.
    After upgrading we are getting a message as Port(HPLED) invalid in control record.
    I get an error message as  "receiver port HPLED  not valid in control record"...
    It is not able to find  the receiver port & hence cannot create the MM.
    We checked all the config and compared with Test and production and we could not find any noticable change.
    Did anyone come across any infor on this?
    Your valubale reply is really very important for me.
    Pls reply.
    Regards,
    Pri

    Hey Ramesh,
    I've already done the WE57 setting.
    You see the WE57 setting is always done on the reciever side and not on the sender side (There is no harm but it is not what SAP recomends) The Linking on the sender side is done in the Partner Profile, where we give the extension name.
    For the reciever this Partner profile setting of extension is not there therefore we need to go to WE57 and do it.
    I've done all the config and have tried all the things in both the systems but somehow nothing is working.
    That is why I asked that in my Inbound FM which is IDOC_INPUT_HRMD do I need to popluate one of it Parameters or fields where I mention the Extension name and all.
    Yesterday however I found an SAP NOTE (105148) which tells me that my naming convention of the Extension is wrong. I have made ZHRMD_A07 extending standard IDOC tupe HRMD_A07, actually it should be ZRMD_A07. Again this is speculative I need to try this out. But I do know that SAP has various checks which checks all the naming convention and all. I'll try this out and hopefully it might work.
    In the meantime any other suggestions are most invited. I am using Message type HRMD_A and using IDOC type HRM_A07
    Regards
    Abhishek Sahi

  • ORA-19571: archived-log recid 118360 stamp not found in control file - help

    Hi
    Every backup I do I am getting an error like below at the bottom :, every backup I do, it's complaaining about DIFFERENT archive log.
    ORA-19571: archived-log recid 118360 stamp 705446770 not found in control file.
    I have set keep control file info to 14 days, my retention is 7 days in RMAN, so I don't know why it's complaining, below is the full log.
    It seeems to be having problems with archive logs that have just been generated while it's doing the backup I think??
    channel d3: specifying archive log(s) in backup set
    input archive log thread=1 sequence=705 recid=124248 stamp=707103829
    input archive log thread=1 sequence=706 recid=124249 stamp=707103830
    input archive log thread=1 sequence=707 recid=124250 stamp=707103831
    input archive log thread=1 sequence=708 recid=124251 stamp=707103831
    input archive log thread=1 sequence=709 recid=124252 stamp=707103832
    input archive log thread=1 sequence=710 recid=124253 stamp=707103832
    input archive log thread=1 sequence=711 recid=124254 stamp=707103833
    input archive log thread=1 sequence=712 recid=124255 stamp=707103833
    input archive log thread=1 sequence=713 recid=124256 stamp=707103834
    input archive log thread=1 sequence=714 recid=124257 stamp=707103835
    input archive log thread=1 sequence=715 recid=124258 stamp=707103835
    input archive log thread=1 sequence=716 recid=124259 stamp=707103836
    input archive log thread=1 sequence=717 recid=124260 stamp=707103836
    input archive log thread=1 sequence=718 recid=124261 stamp=707103837
    input archive log thread=1 sequence=719 recid=124262 stamp=707103837
    input archive log thread=1 sequence=720 recid=124263 stamp=707103838
    input archive log thread=1 sequence=721 recid=124264 stamp=707103838
    input archive log thread=1 sequence=722 recid=124265 stamp=707103839
    input archive log thread=1 sequence=723 recid=124266 stamp=707103840
    input archive log thread=1 sequence=724 recid=124267 stamp=707103840
    input archive log thread=1 sequence=725 recid=124268 stamp=707103841
    input archive log thread=1 sequence=726 recid=124269 stamp=707103841
    RMAN-03009: failure of backup command on d3 channel at 01/01/2010 02:11:33
    ORA-19571: archived-log recid 118360 stamp 705446770 not found in control file
    continuing other job steps, job failed will not be re-run
    channel d6: starting compressed archive log backupset
    channel d6: specifying archive log(s) in backup set
    input archive log thread=1 sequence=641 recid=124034 stamp=707077994
    input archive log thread=1 sequence=642 recid=124035 stamp=707077994
    ...

    It's a rac, so shall I restart one instance at a time?? Or the whole thing? I am using an recovery catalog, so should I be connected to the recovery catalog Or control file to do a cross check backup, also when it's doing the backup do u recon it can't fing archivelog in controlfile file as it's not done a resync, should I force it to do a resync after a backup then backup the archive logs??? I really don't want to bounce the db as it's 24/7

  • Windows 98 not  showing JEditorPane control

    hi,
    i am new to java. I installed j2se sdk 1.4.2_07 version in my windows 98 os.
    and set the class path to c:\j2se sdk 1.4.2_07\bin in the AUTOEXEC.bat file itself
    My friend gave one program(swing application) to run which contain JEditorPane control. It is not displayed in the windows98 but it was developed in win2000prof OS.
    Why it is not displaying this control?
    Is any other thing needed to run the java program
    and I saw that some thing JRE in this web site. wht is that? Do i have to install that too in my system?
    Please give me a solution
    Thank you in advance for reply
    Regards,
    Mahendranath

    Freddy,
    You didn't have the CDDB, ASIO stuff because you probably hadn't installed Creative software like PlayCenter, the SurroundMixer, etc.
    Thanks for the complements, but I've noticed intelligent life on this board. Some of those are forced to offer basic advice that doesn't include 3rd party programs that can help since they are Creative employees.
    It sounds like you got Windows to install whatever vxd drivers you have through the inf file using Device Manager. Regardless, it also sounds like you have analog speakers but the driver might be set to digital output only. This is a setting normally accessible from Creative's SurroundMixer, which you don't have I guess. The inf might have been written to make that setting by default unless changed during the install by selecting a specific speaker set, which was not available to you since you're not using a setup file to install the driver.
    It's possible you don't have the correct drivers for your model card. You managed to install the vxd version of what you've got, but the driver itself might not have the correct files to run your hardware properly.
    You might want to bite the bullit and call Creative's customer service and order the proper installation cd for your card. An option to consider if you get that and find it still only starts its support with 98 2nd edition is to find (ebay, searching) someone who'll sell you the old, discontinued Microsoft Windows 98 Second Edition Update cd. It originally sold for $20 and would update an existing 98 st edition system to 98 2nd edition. The only difference between it and the full $00 98 Upgrade cd was you couldn't do a fresh install with it. You needed 98 st edition actually installed first.
    Before that, you can try driverguide.com and see if someone posted something there that might work.
    Good Luck.

  • Why not reporting on DSO is better than Cube,DSO is more denormalized?

    Hi,
    As it is said that for better reporting response, all dataware house solution are denormalized. Normalized tables take more time in executing report.
    Then why not reporting on DSO is better than Cube?
    Cube is said to have multidimensional structure. But DSO has more denormalized data than cube.
    Please correct me..." Cube is not completely denormalized". It has links between fact table and dimension tables.
    Thanks !!

    Cube reporting is the part of standrad datawarehousing design. Please read kimballs DWH books for more details.
    Please help us keep the forums clean and open useful information only.
    For more information search on help.sap.com and you will get lots of material on this topic.
    Regards.
    Den
    Edited by: Dennis on Nov 2, 2010 10:57 PM

  • Why not my laptop can't to pronounce the sound,but flash player can?

    why not my laptop can't to pronounce the sound,but flash player can?
    my app VLC can't make sound,but firefox by flash player can make sound ~~
    sorry  my english not wil   *_*!
    #lsmod | grep "snd_.*"                                      [0]
    snd_hda_codec_hdmi     24487  1
    snd_hda_codec_conexant    47158  1
    snd_hda_intel          26180  0
    snd_hda_codec          98033  3 snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_hda_intel
    snd_hwdep               6300  1 snd_hda_codec
    snd_pcm                75167  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
    snd_page_alloc          7217  2 snd_pcm,snd_hda_intel
    snd_timer              18934  1 snd_pcm
    snd                    59989  7 snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_pcm,snd_hda_codec,snd_hda_intel
    #alsamixer                                                  [0]
    cannot open mixer: 无效的参数

    VLC plugs directly into pulseaudio, while the firefox flash plugin uses ALSA to play sound.  Do you have the pulseaudio-alsa package installed?
    I have had a similar problem before.  Sound would occasionally be controlled by ALSA and occasionally be controlled by pulse (the pulseaudio-alsa package did nothing).  As far as symptoms, sometimes other applications would not produce sound while a flash video was playing and vice versa.  Ultimately, I just removed everything pulse/ALSA-related, deleted (and backed up) my configuration files, and installed all related packages anew.  It works now.  I still don't really know what the problem was.

  • Why not leave remote app for 4.2.1?

    Hi there, with my family i own 3 ipod touches, 3 shuffles, and two iphones. I own two houses where i have set up a central computer to run itunes with airport expresses all over my houses to control speakers and music through the "remote" app. I am heavily invested in apple products and apps. My use of apple technology for our media enjoyment is truly great and never ceases to amaze guests. I LOVE "remote" and airport.
    Since i have had to restore all my ipods for various reasons, i am now no longer able to download the remote app since apple only supports iOS 5 or later. They have instantly rendered my whole apple setup useless. This is extremely disapointing and they are basically telling me that my purchase of their hardware was a mistake and that they only care about people who purchase new things. Which is a great reason not to purchase new things from them.
    What i don't understand is why they simply can't put a version of remote in the app store for iOS 4.2.1. You obviously have it, so why not just put it there?????
    So little effort to leave 4.2.1 apps in the store. They could even create a special section based on iOS.
    Now they are forcing me to consider alternative solutions, of which there are many. I simply would never have bothered to do this before since i was so satisfied with apple products. They are literally forcing me to look at alternatives and this is a failure on their part from a business and marketing perspective. 
    Now i will most likely go from an evangelizer of apple products to a hater. It is simply disrespectful how theyare treating people with old products...

    Interesting. It really boggles me why they would do this. Seems it would be easy to seperate the app store into pre and post 4.3?
    The devices i have work perfectly fine and do everything i need them to. I don't want to buy new devices. It is an awful stance to take and i find it very insulting. Is this not a big issue with users out there? Or is everyone just buying new stuff all the time?

  • Why jvm maintains string pool only for string objects why not for other objects?

    why jvm maintains string pool only for string objects why not for other objects? why there is no pool for other objects? what is the specialty of string?

    rp0428 wrote:
    You might be aware of the fact that String is an immutable object, which means string object once created cannot be manipulated or modified. If we are going for such operation then we will be creating a new string out of that operation.
    It's a JVM design-time decision or rather better memory management. In programming it's quite a common case that we will define string with same values multiple times and having a pool to hold these data will be much efficient. Multiple references from program point/ refer to same object/ value.
    Please refer these links
    What is Java String Pool? | JournalDev
    Why String is Immutable in Java ? | Javalobby
    Sorry but you are spreading FALSE information. Also, that first article is WRONG - just as OP was wrong.
    This is NO SUCH THING as a 'string pool' in Java. There is a CONSTANT pool and that pool can include STRING CONSTANTS.
    It has NOTHING to do with immutability - it has to do with CONSTANTS.
    Just because a string is immutable does NOT mean it is a CONSTANT. And just because two strings have the exact same sequence of characters does NOT mean they use values from the constant pool.
    On the other hand class String offers the .intern() method to ensure that there is only one instance of class String for a certain sequence of characters, and the JVM calls it implicitly for literal strings and compile time string concatination results.
    Chapter 3. Lexical Structure
    In that sense the OPs question is valid, although the OP uses wrong wording.
    And the question is: what makes class Strings special so that it offers interning while other basic types don't.
    I don't know the answer.
    But in my opinion this is because of the hybrid nature of strings.
    In Java we have primitive types (int, float, double...) and Object types (Integer, Float, Double).
    The primitive types are consessons to C developers. Without primitive types you could not write simple equiations or comparisons (a = 2+3; if (a==5) ...). [autoboxing has not been there from the beginning...]
    The String class is different, almost something of both. You create String literals as you do with primitives (String a = "aString") and you can concatinate strings with the '+' operator. Nevertheless each string is an object.
    It should be common knowledge that strings should not be compared with '==' but because of the interning functionality this works surprisingly often.
    Since strings are so easy to create and each string is an object the lack ot the interning functionality would cause heavy memory consumption. Just look at your code how often you use the same string literal within your program.
    The memory problem is less important for other object types. Either because you create less equal objects of them or the benefit of pointing to the same object is less (eg. because the memory foot print of the individual objects is almost the same as the memory footpint of the references to it needed anyway).
    These are my personal thoughts.
    Hope this helps.
    bye
    TPD

  • Why not use interfaces for constants?

    Hi,
    I have been getting conflicting views about why not use interfaces for constants?
    Can anyone shed some light on it?
    Piyush

    How so?
    If the constants are only used in a single classhow
    does it help to put them in a separate structute?
    (Ignoring the a type safe enumeration of course.)Well, mainly for readability. Suppose that you have a
    web application which has a servlet class
    "RedirectServlet", which takes a variable to redirect
    to a given JSP file. In the JSP files, you want to
    create forms which take this servlet as their action.
    You could of course put all these "redirect"
    constants in the RedirectServlet itself, but then
    it's kind of weird that you have to import a
    servlet in your jsp file to include these constants
    and to be able to write
    <form action="servlet/RedirectServlet?key=<%=
    RedirectServlet.HOMEPAGE %>> or so.
    Instead, you could create an interface called
    "RedirectConstants", and then your servlet
    RedirectServlet could implement this interface. Then
    your JSP can also access these constants via this
    interface.
    But then again, this is merely a matter of style, I
    fully agree that there is never a real _need_ to put
    constants in a separate structure if they're only used
    in a single class.Are you claiming that your example above is a single class?

  • Why not build same function in Itunes as Spotify offers ..? I Would definitely buy me access on site.. :-)

    why not build same function in Itunes as Spotify offers ..? I Would definitely buy me access on site.. :-)

    Spotify has a completely different legal and contractual structure, oriented towards subscription services. You never, ever, own the music you hear on Spotify, and both artists and labels are compensated at a minuscule fraction of the quantity they receive when you buy music from the iTunes store. It is not clear that the Spotify model will remain sustainable over time, as artists/labels have little incentive other than promotion to post their work there.
    Apple would have to determine that such an arrangement was worthwhile to them (and you, and all the other parties) before they went that route. Technically, it is not hard for them.

  • Why not have the concept of pointer,operator overloading  in java

    May you find a solution on why not have the concept of pointer,opterator overloading,virtual function and destructor in java

    Why oh why oh why oh why oh why oh why oh why oh why
    oh why oh why oh why oh why oh why oh why oh why oh
    why oh why oh why oh why oh why oh why oh why oh why
    oh why oh why oh why oh why oh why oh why oh why oh
    why oh why oh why oh why oh why oh why oh why oh why
    oh why oh why oh why oh why oh why oh why oh why oh
    why oh why oh why oh why oh why oh why oh why oh why
    oh why oh why oh why oh why oh why oh why oh why oh
    why oh why oh why oh why oh why oh why oh why oh why
    oh why oh why oh why oh why oh why oh why oh why oh
    why oh why oh why oh why oh why oh why does Java not
    have power steering??
    Please explain conceptIn the 2012 model year, Java will be redesigned with Power Steering, Electronic Stability Control, and integrated Blue Tooth.
    For the OP, just learn C/C++ and then you can have all the fun you want with pointers.

  • Embedding Fonts - Why not?

    We are really excited about the news of iBooks Author, since we are graphic designers who run a large font website. The bad news, iBooks doesn't support embedding fonts in the iBook format. Why not? (http://support.apple.com/kb/HT5072) - The only work around seems to be if you publish in PDF format, but of course that limits things. Various foundries and font sites offer licenses for eBooks, so iBooks should support this, it's an important aspect to the book design and communication abilities..
    Please fix this in the next update? Pretty please....?

    > The bad news, iBooks doesn't support embedding fonts in the iBook format. Why not? ... The only work around seems to be if you publish in PDF format
    In the ISO 8879 SGML family of which ePub and HTML are implementations the author inserts character information and content information considering the logical reading order. Appearance and geometry is not defined early binding by the author, but late binding by the audience. Because Apple controls the configuration of the obligatory CMAP Character Map in the SFNT Spline Font files available for rendering appearance, the author is guaranteed that the character information will map as intended in whatever appearance the audience chooses. This is *not* the case with glyph encoding and character substitution, whether in Adobe Type 1 font program dictionary format or in Adobe and Heidelberg SFNT Spline Font files which should have been sold with character encoding and glyph substitution, but which were in fact sold with glyph encoding and character substitution. Essentially, Apple is doing in the iBook Store what Microsoft did in Word 1992, that is, supporting obligatory CMAP shaping only for character-glyph mapping, and supporting system supplied SFNT Spline Font files for appearance approximation over third party selectable font files (whose character-glyph mapping may be completely off the wall).
    There is the additional problem that adding logical reading order to PDF in order that it may reflow for PDA Personal Digital Assistants with different geometries is as complex, if not more so, than doing the same for a model for document markup that was designed for defining reading order. PostScript and PDF were designed for defining layout rendering order, not for defining logical reading order.
    Hope this helps,
    /hh

  • Why not introduce a "but" condition?

    Hi,
    why not introduce a "but" condition into the Java language?
    Here's an example:
    if(earth.isUnderAttack()){
    ���go to 10
    }but if(earth.getAttack().getAttacker().equals("alien") && earth.getStatus().equals("nice place")){
    ���go to 20
    }else{
    ���go to 30
    Doesn't it look nicer, rather then doing it like this?
    if(earth.isUnderAttack()){
    ���if(earth.getAttack().getAttacker().equals("alien") && earth.getStatus().equals("nice place")){
    �������go to 20
    ���}else{
    �������go to 10
    ���}
    }else{
    ���go to 30
    Cheers,
    Alexander H�glind
    [email protected]

    ok... I'll try to explain it on more time...
    If the first "if" condition is true AND the "but if" condition is true then excecute "but if". But if the first "if" condition is true and the "but if" condition is false then excecute the first "if".
    If the first "if" condition is false, then we don�t have to test the "but if" condition.
    At the momement the only way to do that is like this:
    if (isTrue){
    if(isTrue)
    doCommand(2)
    else
    doComand(1)
    My idea is this:
    if(isTrue)
    doCommand(1)
    but if(isTrue)
    doCommand(2)
    Remember, this is only an idea I got when I was programming and the code was hard to read.
    shrink_laureate said something about Perl having it implemented in some kind of way. If they have, then for sure there�s a reason, don�t you think....?
    And you should also be careful to imply that there is some universal idea of how programming code should look like. And for whatever it�s worth saying it... don�t you think that Java or C etc. is reflecting the structure of the language that you speak more than assembly does?
    Alexander H�glind
    [email protected]

Maybe you are looking for

  • Alert mail configuration for backup / Oracle database

    Hello All, I am trying to configure alert mail for successful backup in the system and i have did with most of the configurations. The steps are as follows: Configured mail in 000 client and also assigned mail id for a user Configured the method CCMS

  • Mac book wont install software updates

    mac book wont install software updates

  • Outlook 2013: can't open inline attachments

    Hi, a colleague of mine has in Inbox an email with inline attachments that I can see in the body of the message: He said he could open these attachments with Outlook 2007. A few days ago we upgraded to Outlook 2013 and now he can't open them. A secur

  • SQL_TEXT and Bind Value

    Hi everybody I'm looking for the SYS objects that contain SQL_TEXT binded parameters value. e.g. : In SQL Statement > SELECT * FROM MyTab where ThisColumn = :1 I'm looking for value of ':1' ! Regards. AL

  • XML Conversion (what is behind the scene)

    hi friends im new to xml, i just know that we get a structured tag text file which is called xml file. i have come to know conversion utility of fmb files to xml and vice versa by using iff2xml90 and ifxml2f90, i used both of them and done successful