New to java looking for help.

I m using mysql n linux RH 8.my data is like this as shown below
Ticketing(my table name)
=======================
remarks(Field name)
Now what I m looking for is I retrieve the value from remarks and that
value I want to scroll below the web page.I manage to retrieve the value but don't know how to scroll below the web page plz help .
Thanx in advance

You could use a classic javascript for this. There are lots of javascript forums on the net, they could help you out. The main problem is that you have to put your DB password in the script. This is not a very safe solution.
If your web server supports JSP, use it. It's nice, easy and server side :)
http://java.sun.com/products/jsp/
Maybe writing an applet is the easiest solution. This way you have the best control on what is painted on screen and, more importantly, you don't have to show your passwords.
http://java.sun.com/docs/books/tutorial/applet/index.html

Similar Messages

  • New Mac user looking for help with Finder, Preview, Keyboard, & Dock

    So about a month ago I switched over from a lifelong Windows user to a brand new MacBook Pro, and while I am adjusting pretty well, there are still some things that I haven't quite figured out.
    First up on the list is Finder! I like my files to be arranged just like how they are in Windows Explorer--folders first alphabetically, then files alphabetically. I've managed to acquire this setting by messing around with the "clean up by" and "arrange by" functions but I don't really know the specific combination. Most of the time these preferences are saved and set as the defaults under "View Options" but every once in a while it resets and I have to tinker around with the settings all over again. Does anyone know of a way to fix this? It's only happened twice so far, but I'd rather not have it happen again. Also, occasionally when I delete an item, there is a blank space left where the icon was instead of all the files following it bumping up a space. Any quick fixes for this bug?
    Next up is Preview. Again, I like the Windows Way and I like to be able to browse between the files in a folder while using Preview/Windows Photo Viewer. I know that there is a way to browse between files if you select the whole folder and stick it in Preview, but is there a way to achieve the same result without having to do that? An app or "extension" of some sort that adds arrows in to browse between photos? I've had no luck finding anything other than the aforementioned option. Is there a good free alternative to Preview that will function similarly with the browse between photos option?
    One of my favorite things about my new Mac is the backlit keyboard function. My old laptop didn't have it and as someone who is online more often at night it is super helpful. But is there a way to turn it off during the day/in bright settings? A way to put it on a timer? In System Preferences I selected the option "Adjust keyboard brightness in low light", which I assumed to mean would have the keyboard NOT very bright when there IS light, but it continues to light up just the same. Any apps or extensions to help with this one?
    And finally, the dock! This question is more about aesthetics than functionality but help is appreciated all the same. Currently, my dock looks like this: http://i42.tinypic.com/35ktxlz.png It is rather opaque and the indicator lights can barely be seen. However, in a lot of tutorial videos I've been watching, many people have docks that look like this: http://i.i.cbsi.com/cnwk.1d/i/tim/2011/07/19/Lion_LaunchPad.png It is a darker shade of gray, the divider is dashed rather than a straight line, and the indicator lights are clearly visible. Does anybody know how to get this look for the dock? I've looked in the dock preferences but there's not really anything in there other than magnification/size/effects.
    That about sums things up! I'm sorry if any of these seem like "silly" questions but they are all things I have been unable to find answers for. Any and all tips, tricks, and help is appreciated! Thanks in advance for all your help!!

    congratulations on coming over from the dark side.
    Seems like you are interested in column view, which would show you the hierarchy of folders and files:  Column View in Mac OS X Mountain Lion - For Dummies Not sure what's going on if your finder settings don't stay put. May be a corrupted preferences file, which is easy to fix, but is perhaps a topic for another discussion.
    What I'd suggest is to have an open mind and try to see what the mac can do, rather than force it to look like your windows machine. I mean, if you just want it to look like windows, then why bother switching? If you give it a little time, you'll start to appreciate the mac way of doing things, and see how it is infinitely more awesome, powerful, creative, intuitive, and better designed (and the software way better written)  than what you left behind. But that's your call.
    There are some threads on this forum with complaints about the backlight. Keyboard backlight settings query...: Apple Support Communities  Evidently it depends on the angle of the screen and the light sensor relative to the light. Some suggest that a SMC reset may help: Intel-based Macs: Resetting the System Management Controller (SMC)  This is not an issue for me, I just adjust the brightness with the keyboard buttons if I want. Real men shift their own gears, drink their coffee black, and adjust their own keyboard brightness. I am not aware of any software to exert more control over this feature but a search of macupdate  Download Apple Mac Software & iPhone Software : MacUpdate may help. I mean, it's up to you what is important. I can waste a lot of time playing around with the GUI and with unnecessary software, or I can just get my work (and play) done.
    You might prefer the no-glass dock, that removes the shelf, and makes the indicator lights like more discrete orbs. You can do this with the terminal. Using the terminal is also, perhaps, a topic for another discussion.I like the 2D dock much better. If you want I'll give you some directions for how to do it. Otherwise, here's a reference: 2D Dock - MacRumors Forums

  • New to inDesign - looking for help with creating booklets

    Looking for a tutorial/answer on how to set up my book so that the pages can be printed, folded in half (like a brochure/magazine) so that I can bind the pages myself in a book.   Not sure if my page size would be what I want the finished book size to be or if I need to double the page width setup size, because I will be folding them in half to put the book together.  I know there must be a magic button as well that will sort the pages and keep them in the right order, once I fold them.   Does this make sense to anyone?

    Hi 4boyz,
    You can refer to the below mentioned links:
    https://www.youtube.com/watch?v=GY16m7QcFj4
    https://multimedia.nscad.ns.ca/pdfs/indesign-2%20sided%20saddle%20stich.pdf
    https://www.youtube.com/watch?v=BCoTJZXkgSQ
    https://helpx.adobe.com/indesign/how-to/make-brochure.html
    http://www.creativebloq.com/indesign/brochure-design-4112750
    InDesign Help | Creating book files
    http://smallbusiness.chron.com/layout-book-indesign-27014.html
    Some other links to learn Indesign:
    InDesign CC tutorials | Learn how to use InDesign CC
    http://tv.adobe.com/show/learn-indesign-cc/
    InDesign Help | InDesign Help
    http://helpx.adobe.com/pdf/indesign_reference.pdf
    http://vc.uscannenberg.org/sites/vc.uscannenberg.org/files/documentation/31/Adobe%20InDesi gn%20Beginner%20Tutorial.pdf
    http://ptgmedia.pearsoncmg.com/images/9780321926975/samplepages/0321926978.pdf
    http://ptgmedia.pearsoncmg.com/imprint_downloads/peachpit/peachpit/academic/IDCCCIB_Instru ctor_Notes.pdf
    Thanks,
    Nikhil Gupta

  • New to illustrator, looking for help

    Hello,
    I'm new to illustrator (3) and would like to make kayak station molds and outlines using a table of numbers (offsets).  Can anyone help me on how to do this ?
    I found this image on the net, i'm also using a laptop.
    A table of offsets

    That can easily be done in Illustrator. There is nothing about it that would require CAD software. Just use ordinary drafting techniques.
    The sections could be drawn full scale, so no need to manually workaround Illustrator's (infuriating) lack of user-defined rulers. Simply set your grid to correspond to the ruler units you want to use (the ft or centimenter offsets). Zero your rulers to the Artboard origin. Measure your offsets from the left and bottom edges of the Artboard. The exact steps could be any of many different procedures. For example:
    Rectangle Tool: Click (don't drag). Enter overall height and width of a section.
    Transform palette: Select its left bottom corner as the reference in the 9-point proxy icon. Enter x and y values for vertical and horizontal offsets. That rectangle is now the "bounding box" of your section shape.
    Similar simple operations can be used involving the Line tool, to numerically position direct-selected anchorpoints, whatever. You only have a few values in the tables, so this would not take long to do manually. If it were more involved, a script could be written to draw the whole thing programmatically, but I hardly see the need for that in this. I dare say many home builders of kayaks and sailboats use nothing more elaborate than a program like Illustator to make their working drawings and patterns.
    The profiles could be drawn to a convenient scale (half, quarter, etc.) and even projected to flats using ordinary drafting techniques in Illustator.
    To help you further would require my speaking with you in more detail about what you actually have, where you are in the process, what exactly you need to draw, etc.--Not practical in an online forum. You just need a general understanding of working in Illustrator. Then, if you have a basic understanding of 2D drafting, you'd know how to do this in Illustrator.
    I see nothing particularly challenging about it, and would not hesitate to draw it in Illustrator. (Except that, since I have them available, I'd use any other drawing program that provides the basic conveniences of user-defined rulers, callouts, and dimension tools. That would include Draw, Canvas, Corel Designer and others.) But again: This is a simple project, and could even be done in Illustrator, and just as accurately (for all practical purposes) as in a CAD program.
    JET

  • Looking for Help with Hyperion to JAVA

    I am looking for help with connecting Hyperion to Java. We are in Maryland but would be willing to work out something for remote consulting. If you have experience with connecting web services, hyperion, and Java and would be interested in about 80 hours of consulting please contact me at:[email protected] x4846

    Hi,
    From your description, you want to achieve the following goal:
    Configure Exchange to filter the attachments if the size is over 10 MB and store it in a public folder, and then forward the email to Salesforce.
    Based on my knowledge, I'm afraid that it can't be achieved. Exchange can filter messages with attachments, but it couldn't store these attachments on public folder automatically. Also, I don't see any transport rule can do it.
    Hope my clarification is helpful.
    Best regards,
    Amy Wang
    TechNet Community Support

  • My new ipod classic 160 gb powered off and won't turn back on. if i plug in to computer, itunes will not open. if i start itunes first then plug in ipod, itunes freezes up. Looking for help. thanks

    my new ipod classic 160 gb powered off and won't turn back on. if i plug in to computer, itunes will not open. if i start itunes first then plug in ipod, itunes freezes up. Looking for help. thanks. Was not connected to the computer when ipod died.

    I have not heard of a good reason for this to happen or how to fix. 3 days later my screen lights up and says to connect to charger.... so its back "for now". Best music player on the market when it works.

  • Looking for help with respect to configuring MS Exchange server to handle attachments over 10 MB for forwarding to Salesforce (Email-to-case).

    Looking for help with respect to configuring MS Exchange server to handle attachments over 10 MB for forwarding to Salesforce (Email-to-case).
    Problem - SFDC does not create cases from emails that have more than 10 MB of attachments. Our clients will not go-live if their clients cannot send in emails with attachments over 10 MBs
    Potential resolution - Configure MS exchange to strip off the attachments(if over 10 MB) and store it in a public folder, forward the email to Salesforce (so the case gets created or the email
    is associated to an existing case), the client should have some way to know if the attachments were stripped off and should be able to dlownload the attachments and continue with case resolution.
    Any help is appreicated!
    Thanks

    Hi,
    From your description, you want to achieve the following goal:
    Configure Exchange to filter the attachments if the size is over 10 MB and store it in a public folder, and then forward the email to Salesforce.
    Based on my knowledge, I'm afraid that it can't be achieved. Exchange can filter messages with attachments, but it couldn't store these attachments on public folder automatically. Also, I don't see any transport rule can do it.
    Hope my clarification is helpful.
    Best regards,
    Amy Wang
    TechNet Community Support

  • One question I am looking for help with is, when you hit the history button I want my last fifty pages to show up instead of just fifteen. Is it possible to

    one question I am looking for help with is, when you hit the history button I want my last fifty pages to show up instead of just fifteen. Is it possible to change that setting?
    TY

    The History menu can only show that fixed maximum of 15 as that is hard coded.
    Maybe this extension helps:
    *History Submenus Ⅱ: https://addons.mozilla.org/firefox/addon/history-submenus-2/

  • PLEASE PLEASE looking for help cant believe this terrible way to look for help

    looking for help to print my pictures by  by-passing pop-up window stating :access denied due to missing files.".. theres NO MISSING FILES

    looking for help to print my pictures by  by-passing pop-up window stating :access denied due to missing files.".. theres NO MISSING FILES

  • New window manager (with prototype!) [wmii-like] --- looking for help

    I have a prototype for a new window manager in the style of wmii. It is called
    cakewm. I currently have a prototype version implemented in pygame, and would
    like help moving this to use X---making it a real window manager.
    Disclaimer: I have a very limited knowledge of X11 and window manager
    development. The most I've done is add a couple new features to wmfs.
    To get the code
    > git clone git://github.com/saikobee/cakewm.git
    Then run main.py. cakewm depends on pygame.
    Upon running, press Alt-Enter to fullscreen cakewm and intercept keybinds, or
    Alt-Space to just intercept keybinds.  Press Alt-Esc to quit. The window
    manager related keybinds are listed in the file binds.conf.
    Config note: <WSCA-x> means Windows-Shift-Control-Alt-x
    Implementation note: pypixel.py is a large and mostly useless dependency. I
    forked a library I made previously rather than coding straight in pygame.
    cakewm's goals are to be similar to wmii, but with more functionality, easier
    configurability, and saner defaults.
    - cakewm is fully functional using the keyboard. Mouse support can come later.
    - cakewm provides 9 workspaces per monitor.
    - cakewm manages each workspace as a group of columns. Each column is like a
      wmii default split, except each window can have other windows "stacked" on
      top of or behind it.
    - cakewm manages column sizes (and window sizes within columns) using a
      master/slave paradigm, with the ability to adjust the size ratios.
    - cakewm's configuration file is simple key=val pairs, with the ability to
      include other files like in C.
    - cakewm has a slightly larger emphasis on window decorations (adjustable
      size---even in tiled mode) and themes (nothing bloated, like pixmaps or
      gradients---it's all still simple colors).
    - cakewm will have proper support for international text (Japanese text in
      window titles or the wmii status bar generally render as boxes) through the
      use of a more advanced text library such as Pango.
    Please let me know if you have comments, questions, or concerns. If you are
    interested in helping, get in touch with me. If you know somewhere better to
    look for volunteers, please let me know.

    m4co wrote:
    Wow is this forum active. Makes me feel welcome here
    The thing about wireless, I actually like command line, but there are a few things that are worth having a applet or something.
    And wireless is one of those. I guess I can take a look on wicd.
    It's a good idea to have compiz as the WM actually. Would it be lightweight to have it like that?
    Is there anybody here that uses compiz as a WM?
    For the xfce4-panel, is it possible to get transparency on it? That's probably the only thing holding me back with xfce4-panel.
    If "able to run compiz" wasn't a requisite, what other WM would you suggest for my "profile" ?
    I would like to hear other users opinions who like to customize everything on a WM.
    I recommend running Compiz by itself. There is a good wiki page on it in the Arch wiki. Some apps you'll want to go with it are:
    LXAppearance --change GTK/icon theme
    Feh or Nitrogen --Set Wallpaper
    Xfce4-panel --The lightest one that works with Compiz properly
    Or, if you don't want a panel: stalonetray
    Compiz-deskmenu --For a customizable right-click main menu
    Gmrun --Run dialog (Alt+F2 in most DEs)
    And this helped me a lot.
    Thank you all for the replies. I appreciate.
    Xfce4-panel can have transparency.  The only problem is that everything become transparent: text, icons, everything.
    I use Compiz as a standalone WM and it is much lighter than DE+Compiz. My Compiz setup uses about 30MB(out of 1GB) more RAM than my Openbox setup (which are both the same except for the WM).

  • New(?) pattern looking for a good home

    Hi everyone, this is my second post to sun forums about this, I initially asked people for help with the decorator and strategy pattern on the general Java Programming forum not being aware that there was a specific section for design pattern related questions. Since then I refined my solution somewhat and was wondering if anyone here would take a look. Sorry about the length of my post, I know it's best to keep it brief but in this case it just seemed that a fully functional example was more important than keeping it short.
    So what I'd like to ask is whether any of you have seen this pattern before and if so, then what is it called. I'm also looking for some fresh eyes on this, this example I wrote seems to work but there are a lot of subtleties to the problem so any help figuring out if I went wrong anywhere is greatly appreciated. Please do tell me if you think this is an insane approach to the problem -- in short, might this pattern have a chance at finding a good home or should it be put down?
    The intent of the pattern I am giving below is to modify behavior of an object at runtime through composition. In effect, it is like strategy pattern, except that the effect is achieved by wrapping, and wrapping can be done multiple times so the effect is cumulative. Wrapper class is a subclass of the class whose instance is being wrapped, and the change of behavior is accomplished by overriding methods in the wrapper class. After wrapping, the object "mutates" and starts to behave as if it was an instance of the wrapper class.
    Here's the example:
    public class Test {
         public static void main(String[] args) {
              double[] data = { 1, 1, 1, 1 };
              ModifiableChannel ch1 = new ModifiableChannel();
              ch1.fill(data);
              // ch2 shifts ch1 down by 1
              ModifiableChannel ch2 = new DownShiftedChannel(ch1, 1);
              // ch3A shifts ch2 down by 1
              ModifiableChannel ch3A = new DownShiftedChannel(ch2, 1);
              // ch3B shifts ch2 up by 1, tests independence from ch3A
              ModifiableChannel ch3B = new UpShiftedChannel(ch2, 1);
              // ch4 shifts ch3A up by 1, data now looks same as ch2
              ModifiableChannel ch4 = new UpShiftedChannel(ch3A, 1);
              // print channels:
              System.out.println("ch1:");
              printChannel(ch1);
              System.out.println("ch2:");
              printChannel(ch2);
              System.out.println("ch3A:");
              printChannel(ch3A);
              System.out.println("ch3B:");
              printChannel(ch3B);
              System.out.println("ch4:");
              printChannel(ch4);
         public static void printChannel(Channel channel) {
              for(int i = 0; i < channel.size(); i++) {
                   System.out.println(channel.get(i) + "");
              // Note how channel's getAverage() method "sees"
              // the changes that each wrapper imposes on top
              // of the original object.
              System.out.println("avg=" + channel.getAverage());
    * A Channel is a simple container for data that can
    * find its average. Think audio channel or any other
    * kind of sampled data.
    public interface Channel {
         public void fill(double[] data);
         public double get(int i);
         public double getAverage();
         public int size();
    public class DefaultChannel implements Channel {
         private double[] data;
         public void fill(double[] data) {
              this.data = new double[data.length];
              for(int i = 0; i < data.length; i++)
                   this.data[i] = data;
         public double get(int i) {
              if(i < 0 || i >= data.length)
                   throw new IndexOutOfBoundsException("Incorrect index.");
              return data[i];
         public double getAverage() {
              if(data.length == 0) return 0;
              double average = this.get(0);
              for(int i = 1; i < data.length; i++) {
                   average = average * i / (i + 1) + this.get(i) / (i + 1);
              return average;
         public int size() {
              return data.length;
    public class ModifiableChannel extends DefaultChannel {
         protected ChannelModifier modifier;
         public void fill(double[] data) {
              if (modifier != null) {
                   modifier.fill(data);
              } else {
                   super.fill(data);
         public void _fill(double[] data) {
              super.fill(data);
         public double get(int i) {
              if(modifier != null)
                   return modifier.get(i);
              else
                   return super.get(i);
         public double _get(int i) {
              return super.get(i);
         public double getAverage() {
              if (modifier != null) {
                   return modifier.getAverage();
              } else {
                   return super.getAverage();
         public double _getAverage() {
              return super.getAverage();
    public class ChannelModifier extends ModifiableChannel {
         protected ModifiableChannel delegate;
         protected ModifiableChannel root;
         protected ChannelModifier tmpModifier;
         protected boolean doSwap = true;
         private void pre() {
              if(doSwap) { // we only want to swap out modifiers once when the
                   // top call in the chain is made, after that we want to
                   // proceed without it and finally restore doSwap to original
                   // state once ChannelModifier is reached.
                   tmpModifier = root.modifier;
                   root.modifier = this;
                   if(delegate instanceof ChannelModifier)
                        ((ChannelModifier)delegate).doSwap = false;
         private void post() {
              if (doSwap) {
                   root.modifier = tmpModifier;
              } else {
                   if(delegate instanceof ChannelModifier)
                             ((ChannelModifier)delegate).doSwap = true;
         public ChannelModifier(ModifiableChannel delegate) {
              if(delegate instanceof ChannelModifier)
                   this.root = ((ChannelModifier)delegate).root;
              else
                   this.root = delegate;
              this.delegate = delegate;
         public void fill(double[] data) {
              pre();
              if(delegate instanceof ChannelModifier)
                   delegate.fill(data);
              else
                   delegate._fill(data);
              post();
         public double get(int i) {
              pre();
              double result;
              if(delegate instanceof ChannelModifier)
                   result = delegate.get(i);
              else
                   result = delegate._get(i);
              post();
              return result;
         public double getAverage() {
              pre();
              double result;
              if(delegate instanceof ChannelModifier)
                   result = delegate.getAverage();
              else
                   result = delegate._getAverage();
              post();
              return result;
         public int size() {
              //for simplicity no support for modifying size()
              return delegate.size();
    public class DownShiftedChannel extends ChannelModifier {
         private double shift;
         public DownShiftedChannel(ModifiableChannel channel, final double shift) {
              super(channel);
              this.shift = shift;
         @Override
         public double get(int i) {
              return super.get(i) - shift;
    public class UpShiftedChannel extends ChannelModifier {
         private double shift;
         public UpShiftedChannel(ModifiableChannel channel, final double shift) {
              super(channel);
              this.shift = shift;
         @Override
         public double get(int i) {
              return super.get(i) + shift;
    Output:ch1:
    1.0
    1.0
    1.0
    1.0
    avg=1.0
    ch2:
    0.0
    0.0
    0.0
    0.0
    avg=0.0
    ch3A:
    -1.0
    -1.0
    -1.0
    -1.0
    avg=-1.0
    ch3B:
    1.0
    1.0
    1.0
    1.0
    avg=1.0
    ch4:
    0.0
    0.0
    0.0
    0.0
    avg=0.0

    jduprez wrote:
    Hello,
    unless you sell your design better, I deem it is an inferior derivation of the Adapter pattern.
    In the Adapter pattern, the adaptee doesn't have to be designed to support adaptation, and the instance doesn't even know at runtime whether it is adapted.
    Your design makes the "modifiable" class aware of the modification, and it needs to be explicitly designed to be modifiable (in particular this constrains the implementation hierarchy). Overall DesignPattern are meant to provide flexibility, your version offers less flexibility than Adapter, as it poses more constraint on the modifiable class.
    Another sign of this inflexibility is your instanceof checks.
    On an unrelated note, I intensely dislike your naming choice of fill() vs _fill()+, I prefer more explicit names (I cannot provide you one as I didn't understand the purpose of this dual method, which a good name would have avoided, by the way).
    That being said, I haven't followed your original problem, so I am not aware of the constraints that led you to this design.
    Best regards,
    J.
    Edited by: jduprez on Mar 22, 2010 10:56 PMThank you for your input, I will try to explain my design better. First of all, as I understand it the Adapter pattern is meant to translate one interface into another. This is not at all what I am trying to do here, I am trying to keep the same interface but modify behavior of objects through composition. I started thinking about how to do this when I was trying to apply the Decorator pattern to filter some data. The way I would do that in my example here is to write an AbstractChannelDecorator that delegates all methods to the Channel it wraps:
    public abstract class AbstractChannelDecorator implements Channel {
            protected Channel delegate;
    ...// code ommitted
         public double getAverage() {
              return delegate.getAverage();
    ...// code ommitted
    }and then to filter the data I would extend it with concrete classes and override the appropriate methods like so:
    public class DownShiftedChannel extends AbstractChannelDecorator {
         ...// code ommitted
         public double get(int i) {
              return super.get(i) - shift;
           ...// code ommitted
    }(I am just shifting the data here to simplify the examples but a more realistic example would be something like a moving average filter to smooth the data).
    Unfortunately this doesn't get me what I want, because getAverage() method doesn't use the filtered data unless I override it in the concrete decorator, but that means I will have to re-implement the whole algorithm. So that's pretty much my motivation for this, how do I use what on the surface looks like a Decorator pattern, but in reality works more like inheritance?
    Now as to the other points of critique you mentioned:
    I understand your dislike for such method names, I'm sorry about that, I had to come up with some way for the ChannelModifier to call ModifiableChannel's super's method equivalents. I needed some way to have the innermost wrapped object to initiate a call to the topmost ChannelModifier, but only do it once -- that was one way to do it. I suppose I could have done it with a flag and another if/else statement in each of the methods, or if you prefer, the naming convention could have been fill() and super_fill(), get() and super_get(), I didn't really think that it was that important. Anyway, those methods are not meant to be used by any other class except ChannelModifier so I probably should have made them protected.
    The instanceof checks are necessary because at some point ChannelModifier instance runs into a delegate that isn't a ChannelModifier and I have to somehow detect that, because otherwise instead of calling get() I'd call get() which in ModifiableChannel would take me back up to the topmost wrapper and start the whole call chain again, so we'd be in infinite recursion. But calling get() allows me to prevent that and go straight to the original method of the innermost wrapped object.
    I completely agree with you that the example I presented has limited flexibility in supporting multiple implementations. If I had two different Channel implementations I would need two ModifiableChannel classes, two ChannelModifiers, and two sets of concrete implementations -- obviously that's not good. Not to worry though, I found a way around that. Here's what I came up with, it's a modification of my original example with DefaultChannel replaced by ChannelImplementation1,2:
    public class ChannelImplementation1 implements Channel { ... }
    public class ChannelImplementation2 implements Channel { ... }
    // this interface allows implementations to be interchangeable in ChannelModifier
    public interface ModifiableChannel {
         public double super_get(int i);
         public double super_getAverage();
         public void setModifier(ChannelModifier modifier);
         public ChannelModifier getModifier();
    public class ModifiableChannelImplementation1
              extends ChannelImplementation1
              implements ModifiableChannel {
         ... // see DefaultChannel in my original example
    public class ModifiableChannelImplementation2
              extends ChannelImplementation1
              implements ModifiableChannel { ...}
    // ChannelModifier is a Channel, but more importantly, it takes a Channel,
    // not any specific implementation of it, so in effect the user has complete
    // flexibility as to what implementation to use.
    public class ChannelModifier implements Channel {
         protected Channel delegate;
         protected Channel root;
         protected ChannelModifier tmpModifier;
         protected boolean doSwap = true;
         public ChannelModifier(Channel delegate) {
              if(delegate instanceof ChannelModifier)
                   this.root = ((ChannelModifier)delegate).root;
              else
                   this.root = delegate;
              this.delegate = delegate;
         private void pre() {
              if(doSwap) {
                   if(root instanceof ModifiableChannel) {
                        ModifiableChannel root = (ModifiableChannel)this.root;
                        tmpModifier = root.getModifier();
                        root.setModifier(this);
                   if(delegate instanceof ChannelModifier)
                        ((ChannelModifier)delegate).doSwap = false;
         private void post() {
              if (doSwap) {
                   if(root instanceof ModifiableChannel) {
                        ModifiableChannel root = (ModifiableChannel)this.root;
                        root.setModifier(tmpModifier);
              } else {
                   if(delegate instanceof ChannelModifier)
                             ((ChannelModifier)delegate).doSwap = true;
         public void fill(double[] data) {
              delegate.fill(data);
         public double get(int i) {
              pre();
              double result;
              if(delegate instanceof ModifiableChannel)
    // I've changed the naming convention from _get() to super_get(), I think that may help show the intent of the call
                   result = ((ModifiableChannel)delegate).super_get(i);
              else
                   result = delegate.get(i);               
              post();
              return result;
         public double getAverage() {
              pre();
              double result;
              if(delegate instanceof ModifiableChannel)
                   result = ((ModifiableChannel)delegate).super_getAverage();
              else
                   result = delegate.getAverage();
              post();
              return result;
         public int size() {
              return delegate.size();
    public class UpShiftedChannel extends ChannelModifier { ...}
    public class DownShiftedChannel extends ChannelModifier { ... }

  • Looking for help getting EZdrummer to work in Logic Pro 9

    First off let me say I have looked everywhere and even talked to toontack about the following problem. Toontrack as said that the plug-in is working properly and the problem is with Logic.
    Ok so I purchased toontrack ezdrummer and drumkit from ****. After installing them and updating to ezrumming 1.2 I am unable to load ezdrummer in logic pro 9. The really strange thing is that it will launch when using garageband and fully function.
    In logic it is not in AU manager and not there for selection in the channel strip, so I thought at first that it was only installing as a VST. However, when looking in Library>Audio>Plug-Ins>Components, EZdrummer.component is there. I thought this was where Logic looked for AU plug-ins but I'm now thinking thats wrong but I've not been able to find anything saying different.
    Please guys any help you can offer would be outstanding. I'm so fed up I'm about to get a refund but I would rather use this software.
    Thanks.

    EZDrummer works fine here.
    You could try trashing this file:
    Macintosh HD/Users/YourUserName/Library/Caches/com.apple.audiounits.cache
    On the next launch, Logic will rescan all your plugins.
    You could also try a new OS X user account.
    And what exact version of Logic are you using?

  • Looking for help to upgrade Z61m HD and OS

    All,
    Being a layman I am looking for some help on how to do the following:
    -  Upgrade my current HD from the small 105gig to a new 320 gig HD - have the new SATA drive.
    -  Also wanting to get off of Vista to Windows7 - I have the new Windows 7 ulimate software.
    Looking for procedures on how to upgrade(back up data, make boot disks, when to upgrade the OS.....) and not lose my data.  I own a 500 gig external HD with plenty of room.  Any pitfalls and gotchas are apreciated too.

    I did a quick google and found some Windows-based programs you could buy to do that, but nothing for the Mac.
    However, you ought to be able to do it in word (I do when I have to print chords w/ lyrics to play with a group). You just have to fiddle with the space bar and tab to line up the chord changes with the lyrics.
    It might be easier if you use a fixed-width font like Courier.

  • New to Java and need help with this program..please!

    I'd really appreciate any helpful comments about this program assignment that I have to turn in a week from Friday. I'm taking a class one night a week and completely new to Java. I'd ask my professor for help, but we can't call him during the week and he never answers e-mails. He didn't tell us how to call from other classes yet, and I just can't get the darn thing to do what I want it to do!
    The assignment requirements are:
    1. Change a card game application that draws two cards
    and the higher card wins, to a Blackjack application
    2. Include a new class called Hand
    3. The Hand class should record the number of draws
    4. The application should prompt for a number of draws
    5. The game is played against the Dealer
    6. The dealer always draws a card if the dealer's hand total is <= 17
    7. Prompt the player after each hand if he wants to quit
    8. Display the total games won by the dealer and total and the total games wond by the player after each hand
    9. Display all of the dealer's and player's cards at the
    end of each hand
    10. Player has the option of drawing an additional card after the first two cards
    11. The Ace can have a value of 11 or 1
    (Even though it's not called for in the requirements, I would like to be able to let the Ace have a value of 1 or an 11)
    The following is my code with some comments about a few things that are driving me nuts:
    import java.util.*;
    import javax.swing.*;
    import java.text.*;
    public class CardDeck
    public CardDeck()
    deck = new Card[52];
    fill();
    shuffle();
    public void fill()
    int i;
    int j;
    for (i = 1; i <= 13; i++)
    for (j = 1; j <= 4; j++)
    deck[4 * (i - 1) + j - 1] = new Card(i, j);
    cards = 52;
    public void shuffle()
    int next;
    for (next = 0; next < cards - 1; next++)
    int rand = (int)(Math.random()*(next+1));
    Card temp = deck[next];
    deck[next] = deck[rand];
    deck[rand] = temp;
    public final Card draw()
    if (cards == 0)
    return null;
    cards--;
    return deck[cards];
    public int changeValue()
    int val = 0;
    boolean ace = false;
    int cds;
    for (int i = 0; i < cards; i++)
    if (cardValue > 10)
    cardValue = 10;
    if (cardValue ==1)     {
    ace = true;
    val = val + cardValue;
    if ( ace = true && val + 10 <= 21 )
    val = val + 10;
    return val;
    public static void main(String[] args)
    CardDeck d = new CardDeck();
    int x = 3;
    int i;
    int wins = 1;
    int playerTotal = 1;
    do {
    Card dealer = (d.draw());
    /**I've tried everything I can think of to call the ChangeValue() method after I draw the card, but nothing is working for me.**/
    System.out.println("Dealer draws: " + dealer);
    do {
    dealer = (d.draw());
    System.out.println(" " + dealer);
    }while (dealer.rank() <= 17);
    Card mine = d.draw();
    System.out.println("\t\t\t\t Player draws: "
    + mine);
    mine = d.draw();
    System.out.println("\t\t\t\t\t\t" + mine);
    do{
    String input = JOptionPane.showInputDialog
    ("Would you like a card? ");
    if(input.equalsIgnoreCase("yes"))
         mine = d.draw();
    System.out.println("\t\t\t\t\t\t" + mine);
         playerTotal++;
         else if(input.equalsIgnoreCase("no"))
    System.out.println("\t\t\t\t Player stands");
         else
    System.out.println("\t\tInvalid input.
    Please try again.");
    I don't know how to go about making and calling a method or class that will combine the total cards delt to the player and the total cards delt to the dealer. The rank() method only seems to give me the last cards drawn to compare with when I try to do the tests.**/
    if ((dealer.rank() > mine.rank())
    && (dealer.rank() <= 21)
    || (mine.rank() > 21)
    && (dealer.rank() < 22)
    || ((dealer.rank() == 21)
    && (mine.rank() == 21))
    || ((mine.rank() > 21)
    && (dealer.rank() <= 21)))
    System.out.println("Dealer wins");
    wins++;
         else
    System.out.println("I win!");
    break;
    } while (playerTotal <= 1);
    String stop = JOptionPane.showInputDialog
    ("Would you like to play again? ");
    if (stop.equalsIgnoreCase("no"))
    break;
    if (rounds == 5)
    System.out.println("Player wins " +
    (CardDeck.rounds - wins) + "rounds");
    } while (rounds <= 5);
    private Card[] deck;
    private int cards;
    public static int rounds = 1;
    public int cardValue;
    /**When I try to compile this nested class, I get an error message saying I need a brace here and at the end of the program. I don't know if any of this code would work because I've tried adding braces and still can't compile it.**/
    class Hand()
    static int r = 1;
    public Hand() { CardDeck.rounds = r; }
    public int getRounds() { return r++; }
    final class Card
    public static final int ACE = 1;
    public static final int JACK = 11;
    public static final int QUEEN = 12;
    public static final int KING = 13;
    public static final int CLUBS = 1;
    public static final int DIAMONDS = 2;
    public static final int HEARTS = 3;
    public static final int SPADES = 4;
    public Card(int v, int s)
    value = v;
    suit = s;
    public int getValue() { return value; }
    public int getSuit() { return suit;  }
    public int rank()
    if (value == 1)
    return 4 * 13 + suit;
    else
    return 4 * (value - 1) + suit;
    /**This works, but I'm confused. How is this method called? Does it call itself?**/
    public String toString()
    String v;
    String s;
    if (value == ACE)
    v = "Ace";
    else if (value == JACK)
    v = "Jack";
    else if (value == QUEEN)
    v = "Queen";
    else if (value == KING)
    v = "King";
    else
    v = String.valueOf(value);
    if (suit == DIAMONDS)
    s = "Diamonds";
    else if (suit == HEARTS)
    s = "Hearts";
    else if (suit == SPADES)
    s = "Spades";
    else
    s = "Clubs";
    return v + " of " + s;
    private int value; //Value is an integer, so how can a
    private int suit; //string be assigned to an integer?
    }

    Thank you so much for offering to help me with this Jamie! When I tried to call change value using:
    Card dealer = (d.changeValue());
    I get an error message saying:
    Incompatible types found: int
    required: Card
    I had my weekly class last night and the professor cleared up a few things for me, but I've not had time to make all of the necessary changes. I did find out how toString worked, so that's one question out of the way, and he gave us a lot of information for adding another class to generate random numbers.
    Again, thank you so much. I really want to learn this but I'm feeling so stupid right now. Any help you can give me about the above error message would be appreciated.

  • Looking for help

    Hello,
    I'm looking for some help in inserting a slide presentation
    in my website. I used the feature in Dreamweaver for creating a
    slideshow using JPEG images. It looks beautiful when viewing it in
    the preview browser, but I can't get it to upload to the web.
    I purchased a program - PVii Slide Show Magic - tried that -
    still no luck.
    Is there anyone out there who can give me some plain and
    simple guidance in inserting a slide presentation into my site?
    Thank you in advance,

    Please take this to the PVII support forum!
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "guite49" <[email protected]> wrote in
    message
    news:fvr4ki$t54$[email protected]..
    > Hello,
    >
    > I'm looking for some help in inserting a slide
    presentation in my website.
    > I
    > used the feature in Dreamweaver for creating a slideshow
    using JPEG
    > images. It
    > looks beautiful when viewing it in the preview browser,
    but I can't get it
    > to
    > upload to the web.
    >
    > I purchased a program - PVii Slide Show Magic - tried
    that - still no
    > luck.
    >
    > Is there anyone out there who can give me some plain and
    simple guidance
    > in
    > inserting a slide presentation into my site?
    >
    > Thank you in advance,
    >
    >
    >

Maybe you are looking for

  • Missing Header in PDF From

    I have used the assessment template to build my writable form and it looks great.  But when I save it as a PDF, I lose the header.  Also, the text areas fill in blue.  How can I fix this.

  • How Realistic is it to Use Aperture with a JPG Workflow instead of iPhoto?

    Hi! (for reference, I am not a world-class photographer jet-setting all over the world with hot shot clients. I'm a serious hobbyist, enthusiast, freelancer, whatever you wanna call it. I get paid for small headshot and portrait gigs here and there.

  • Final Cut 5.1 won't EVEN open

    for some reason Final Cut won't even open!! The icon is there, the files are there, BUT NOTHING!! The icon bounces twice, then NOTHING...PLEASE HELP!! (and I lost my install disk during a move)

  • Drilling up in a BI Beans graph

    Hi All, I am currently going through the BI Beans tutorial and have created a graph and clicked on a bar and drilled down into a more detailed view. The problem is I can't find any way of drilling up. Does anybody know how to do this, I need to make

  • CS5 Production Premium installation disk 3

    First off, I always buy hard copies of my Adobe software. I prefer relying on disks sitting on the shelf instead of an installer file that is sitting on an Adobe download server somewhere for a finite period of time. My self-inflicted problem: During