Trying to get jprogressbar to display in a jtable

package interface;
import java.awt.*;
import javax.swing.*;
import javax.swing.table.*;
// This class renders a JProgressBar in a table cell.
class ProgressRenderer extends JProgressBar
        implements TableCellRenderer {
    // Constructor for ProgressRenderer.
    public ProgressRenderer(int min, int max) {
        super(min, max);
  /* Returns this JProgressBar as the renderer
     for the given table cell. */
    public Component getTableCellRendererComponent(
            JTable table, Object value, boolean isSelected,
            boolean hasFocus, int row, int column) {
        // Set JProgressBar's percent complete value.
        setValue((int) ((Float) value).floatValue());
        return this;
}Instead of the specific column displaying a jprogressbar, I get some some long text consisting of "interface.ProgressRenderer[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=javax.swing.plaf.BorderUIResource$LineBorderUIResource@1729854,flags=8,maximumSize=,minimumSize=,preferredSize=,orientation=HORIZONTAL,paintBorder=true,paintString=false,progressString=,indeterminateString=false]", does anyone know what's wrong?

See example here: [http://java-swing-tips.blogspot.com/2008/03/jprogressbar-in-jtable-cell.html]
If you want further help post a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html] that demonstrates the problem.

Similar Messages

  • Trying to get hypertrend to display signals

    I created a series of multistate type objects to display limit switch positions. Each display is a green light for on, and black for off. Each one is displaying the status of a bit-of word, like DL2.V17051:2 for instance. I used the database to save the logical status, and tried to get it to log to the hypertrend with no success. If I do the same thing using a C type contact, it will show up. Why can't I do this?

    How do you set the logging for logical status? This is what I do.
    I use the Modbus. Connect the 40001.1 to a multistate object. It works fine. The logging is configured in modbus object. Then, create the Hypertrend, the URL is Modbus1.40001.1. The logical trends displays well like this attachment.
    You can check if the data is logged or not by MAX. Create the trend view in MAX.
    Ryan Shi
    National Instruments
    Attachments:
    untitled.JPG ‏39 KB

  • Trying to get a 2nd display to work with my MacBook

    Hey,
    I have the late 2008 aluminium MacBook. I'm trying to use a 1440x900 monitor as an alternative display for it using a mini DisplayPort to VGA adapter. However, I can't seem to get it working. The monitor either just shows a stock background, or if I use mirroring, it drops the resolution to the same as my MacBook.
    Ideally, what I'd like to do, is use my magic mouse and keyboard plugged into my MacBook with the lid closed, but the display appearing on the bigger monitor. Can I do this?
    Thanks

    ScarboroughKID wrote:
    Hey,
    I have the late 2008 aluminium MacBook. I'm trying to use a 1440x900 monitor as an alternative display for it using a mini DisplayPort to VGA adapter. However, I can't seem to get it working. The monitor either just shows a stock background, or if I use mirroring, it drops the resolution to the same as my MacBook.
    Both is expected behaviour when using external display with your MAcBook.
    Ideally, what I'd like to do, is use my magic mouse and keyboard plugged into my MacBook with the lid closed, but the display appearing on the bigger monitor. Can I do this?
    Apple calls this closed clamshell mode. See here http://support.apple.com/kb/HT3131
    Thanks
    Regards
    Stefan

  • [Solved] Trying to get conky to display hebrew right...

    ok,
    So i've been using ${mpd_status} to display my songs on conky. However, some of my song's names are in hebrew, and hebrew has this problem that the terminal (and conky) display it the other way around. For exaple, hebrew word abc (a,b,c are hebrew letters) are displaed cba. So, I wrote 2 scripts: One to reverse the hebrew so on the terminal it looks "ok" (If it sounds rediculus to you, that's the way we get around the hebrew problem on computers, we've been doing it since computers were invented), and another to get the song's name and feed it to the first script.
    So, after all this work, I managed to make the scripts display hebrew song names on the terminal perfectly. However, conky refuses to show my song names. English eongs work fine, hebrew songs are just not displayed. This leads me to believe there's a problem. I was wondering if the kind people of the forum can help?
    PS I realize this is in the gray area between programming and help. That's why I put it in here. If the admins think there's a better place for it, please move this tread, thank you.
    revHebrew.py
    #!/usr/bin/python
    # This script takes a sentence as an argument and reverses all hebrew so it's
    # displayed right in the terminal and in conky.
    # USAGE: revHebrew.py [word1] [word2] [...]
    import sys
    ENGLISH_LETTERS = []
    UPPER_CASE_START_INDEX = 65
    LOWER_CASE_START_INDEX = 97
    NUMBER_OF_LETTERS_IN_ENGLISH = 26
    ENCODING = "utf-8"
    args = sys.argv[1:]
    def inEnglish(word):
    letters = list(word)
    for letter in letters:
    if letter in ENGLISH_LETTERS:
    return True
    return False
    def generateEnglishLetters():
    global ENGLISH_LETTERS
    ENGLISH_LETTERS = map(chr, range(UPPER_CASE_START_INDEX,
    UPPER_CASE_START_INDEX + NUMBER_OF_LETTERS_IN_ENGLISH) +
    range(LOWER_CASE_START_INDEX,LOWER_CASE_START_INDEX +
    NUMBER_OF_LETTERS_IN_ENGLISH))
    def reverseWord(word):
    return word[::-1]
    def reverseSentence(sentence):
    ltrSubsentence = []
    orderedSentence = []
    for word in sentence:
    if not inEnglish(word):
    ltrSubsentence.insert(0,word)
    else:
    ltrSubsentence.append(word)
    orderedSentence += ltrSubsentence
    ltrSubsentence = []
    orderedSentence += ltrSubsentence
    return orderedSentence
    def main():
    generateEnglishLetters()
    sentence = []
    for word in args:
    word = unicode(word, ENCODING)
    if not inEnglish(word):
    word = reverseWord(word)
    sentence.append(word)
    print u' '.join(reverseSentence(sentence))
    if __name__ == "__main__":
    main()
    hebrewMPDstatus.sh
    #!/bin/bash
    # A script to display hebrew and english songs from MPD in the right way
    # USAGE: hebrewMPDstatis.sh
    Title=`sonata info | grep Title: | cut -c8-`
    Artist=`sonata info | grep Artist: | cut -c9-`
    Song="$Title - $Artist"
    Command="python revHebrew.py ${Song}"
    eval $Command
    my .conkyrc
    #override_utf8_locale no
    format_human_readable yes
    double_buffer yes
    alignment top_middle
    background yes
    border_width 0
    cpu_avg_samples 2
    default_color white
    default_outline_color white
    default_shade_color white
    draw_borders no
    draw_graph_borders yes
    draw_outline no
    draw_shades no
    use_xft yes
    #xftfont Miriam Mono CLM:size=10
    xftfont Sans:size=10
    gap_x 0
    gap_y 0
    minimum_size 1672 0
    maximum_width 1672 0
    net_avg_samples 2
    no_buffers yes
    out_to_console no
    out_to_stderr no
    extra_newline no
    own_window yes
    own_window_class Conky
    own_window_type desktop
    own_window_transparent no
    own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky
    stippled_borders 0
    update_interval 1.0
    uppercase no
    use_spacer yes
    show_graph_scale no
    show_graph_range no
    text_buffer_size 2048
    TEXT
    $nodename - $sysname $kernel on $machine :: ${color grey}Uptime:$color $uptime :: ${color grey}Frequency:$color $freq_g GHz :: ${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes :: Net: Up:$color ${upspeed wlan0} ${color grey} Down:$color ${downspeed wlan0} :: ${color gray} Heat$color: Core0: ${font mpd:style=Bold:color=white:size=10}${execi 8 sensors | grep -A 1 'Core 0' | cut -c15-16 | sed '/^$/d'}C${font} Core1: ${font mpd:style=Bold:color=white:size=10}${execi 8 sensors | grep -A 1 'Core 1' | cut -c15-16 | sed '/^$/d'}C${font} temp: ${font mpd:style=Bold:color=white:size=10}${execi 8 sensors | grep -A 1 'temp1' | cut -c15-16 | sed '/^$/d'}C${font} :: ${font Miriam Mono CLM:style=Bold:size=10}${color lightblue}${execi 1 ~/hebrewMPDstatus.sh} - $mpd_status ${mpd_elapsed} ${color grey} ${mpd_bar 10}${color}
    #RAM Usage:$color $mem/$memmax - $memperc% ${membar 4} ${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4} ${color grey}CPU Usage:$color $cpu% ${cpubar 4}
    Additional info: Unless I made a mistike, the script's output should be utf8. I looked around and apperantly sometimes the font's at fault so I decided to try a hebrew font, but no luck.
    SOLVED: Ok, solved my own problem. I saw this error:
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128)
    and decided to invastigate it. It lead me to the following page: http://stackoverflow.com/questions/4924 … -in-python
    Basiclly turns out python's print command outputs in ASCII. I modified my main as instructed in the page, to change the default encoding to utf-8 and it did the trick!
    Another thing I had to do in my .conkyrc was to set "override_utf8_locale yes" in the config. I now have working hebrew in my conky! I hope others will find this post in the future and be saved the trouble.
    Last edited by Greenstuff (2010-05-29 00:06:20)

    Please don't necrobump: https://wiki.archlinux.org/index.php/Fo … Bumping.22
    Closing

  • Tried to connect to TV, display (ibook?) died

    I hope someone can help me with this one!
    I have been having some issues lately connecting my ibook to a tv ... kinda of had to fidget with the video plug to get it to work right. It would be almost all the way plugged in but not quite and then it would show up on the tv.
    Well, today I was doing this routine again, fidgeting with the plug trying to get it to display on the tv, and the ibook screen was flickering and then it went totally black. The backlight is also not turning on.
    I was also in the middle of transferring a 700mb file from an external storage disk to my ipod.
    I couldn't get the screen to turn back on and didn't nkow what else to do so I forced a reboot.
    Now it still won't turn on. It is sounding the chime. I <think> the harddrive is spinning but i'm not sure. I zapped the pram, and reset the pmu (well i followed the directions, but there's no way to tell whether it actually reset or not). I also put my installation disk in thinking, surely it would boot from that. Well it was spinning in the drive, but still no screen so i have no idea if it is starting or not.
    Now I cannot eject the disk, even if I hold down the trackpad button.
    Any advice??
    Is it possible that it's stuck in some sort of inbetween tv and normal mode??
    Or has the logic board failed (please no!)

    i believe that your mlb has failed. if you let it sit
    for a while and eventaully high fans come on then its
    def dead
    mlb? Sorry... not up to speed with the acronyms.
    And do you mean let it sit and the fan will come on on its own??

  • Tried to connect to TV, display died

    I hope someone can help me with this one!
    I have been having some issues lately connecting my ibook to a tv ... kinda of had to fidget with the video plug to get it to work right. It would be almost all the way plugged in but not quite and then it would show up on the tv.
    Well, today I was doing this routine again, fidgeting with the plug trying to get it to display on the tv, and the ibook screen was flickering and then it went totally black. The backlight is also not turning on.
    I was also in the middle of transferring a 700mb file from an external storage disk to my ipod.
    I couldn't get the screen to turn back on and didn't nkow what else to do so I forced a reboot.
    Now it still won't turn on. I <think> the harddrive is spinning but i'm not sure. I zapped the pram, and reset the pmu (well i followed the directions, but there's no way to tell whether it actually reset or not). I also put my installation disk in thinking, surely it would boot from that. Well it was spinning in the drive, but still no screen so i have no idea if it is starting or not.
    Now I cannot eject the disk, even if I hold down the trackpad button.
    Any advice??
    Is it possible that it's stuck in some sort of inbetween tv and normal mode??
    Or has the logic board failed (please no!)

    There is a chance a hardware failure, ie: video component, may be the
    problem. I'm not an expert, but sometimes if the connections don't work
    correctly and you have to mess with them to make something work, it
    may be the video component gone wrong. At the point where both the
    external display and internal display share a signal from the video circuit.
    And that may be essentially part of the logicboard, at that point.
    The machine really needs to have a proper diagnostic to find out what
    has gone wrong and get an estimate. If the machine's hard drive content
    is not backed up externally, that would be the main concern: lost work.
    A possibility exists in trying to see if the computer would boot into FireWire
    Target Disk mode (without a display on the computer in question) to see
    by visual clues, if the TDM was working. And that'd be something a
    second working Mac with FireWire ports would be necessary to have
    and use to see if the hard drive of the defective computer is accessible.

  • Getting the ACTUAL size of a JTable

    Hi all, I've been trying to get the actual size of a JTable for awhile now. I have tried just about every getSize or whatever other size method you can think of and nothing is working out for me. A lot of the times I'll get a value of 0 and other times I'll get a non-zero value. The variance is coming from which getSize method I use and where I'm using it. Whatever the value is though, they do not match up with the actual size that I'm seeing when everything is displayed.
    My JTable is within a JScrollPane, which is within a JSplitPane. The JTable takes up the complete size of the JScrollPane and the JScrollPane takes up the complete size of JSplitPane (the top component at least). I have tried getting the sizes from each of these components that are used to contain the JTable, but each one of the values I get are incorrect too.
    Anyone have any ideas to help me out?
    Thanks, Bryan

    Thanks for your help camickr.
    I ended up writing a component listener for the frame since componentShown only listens for calls to the setVisible method. Also, I can now resize the table columns whenever the user resizes the frame.
        /*Add component listener to frame.  When frame is shown or
          resized, then set student table column widths*/
        this.addComponentListener(new ComponentListener() {
          public void componentShown(ComponentEvent e) {
            setStudentTableColumnWidths();
          public void componentResized(ComponentEvent e) {
            setStudentTableColumnWidths();
          public void componentMoved(ComponentEvent e) {}
          public void componentHidden(ComponentEvent e) {}
       * Sets the student table column widths.  The username column should take up
       * ~1/3 of the table and the student name column should take up ~2/3 of the
       * table.
      private void setStudentTableColumnWidths()
        TableColumnModel tableColumnModel = studentsTable.getColumnModel();
        Dimension scrollPaneViewportSize = studentsTableScrollPane.getViewport().getSize();
        int usernameColWidth = scrollPaneViewportSize.width/3;
        int studentNameColWidth = scrollPaneViewportSize.width - usernameColWidth;
        tableColumnModel.getColumn(0).setPreferredWidth(usernameColWidth);
        tableColumnModel.getColumn(1).setPreferredWidth(studentNameColWidth);
      }

  • I have a mid 2011 27 inch iMac and a late 2012 mac mini. I am using the 27 inch iMac as the display for the mac mini. I was trying to use bootcamp on the mini but after I started downloading windows I can't get it to display on the iMac.

    I have a mid 2011 27 inch iMac and a late 2012 mac mini. I am using the 27 inch iMac as the display for the mac mini with a thunderbolt cable. I was trying to use bootcamp on the mini but after I started downloading windows I can't get it to display on the iMac.

    Hi there,
    The simplest way is to drag it across wirelessly using the 'Airdrop' application once both computers are near one another. 'Airdrop' can be found near the top, on the left hand side menu, within 'Finder'.
    AJ

  • Trying to get a JEditorPane to highlight the full width of a displayed line

    I have displayed the wep page in JEditorPane . Now I'm trying to get a JEditorPane to highlight the full width of a displayed line. All the examples I've tried only highlight the textual content. For example if I have content such as this:
    + Here is some text +
    + some more text +
    within a JEditorPane represented by the box above, then highlighting the first row highlights only the 'Here is some text' (represented between [ and ] below).
    [ Here is some text ]
    [some more text ]
    I would like it to highlight the full width of the JEditorPane like the following:( ie Inspecting the Html element in firebug ....)
    l Here is some text l
    l some more text l
    l_________________________l
    Is there a way to do this?
    Edited by: arunnprakash on Mar 27, 2009 7:59 AM

    Take a look here:
    [http://tips4java.wordpress.com/2008/10/29/line-painter/]
    [http://www.java-forums.org/awt-swing/10862-how-select-highlight-entire-row-jtextpane.html]
    db

  • Im trying to get a 32" LCD to display windows on my intel imac..please help

    I somehow got OSX to display on my new LCD but I cannot for the life of me get windows to display...
    When I boot up windows my TV displays the windows loading screen then it just goes black.
    Everything is hooked up right because OSX displays fine.
    Anyone know what I need to do?

    bump....
    Anyone?

  • Cant get JProgressBar to work!

    i am trying to get a progress bar to pop up while a load fo code is being processed then disapear when it is finished, but unfortuantely i cant get it to appear until all the code is processed and the comptuer has nothing better to do than to show my progress bar, by which time ti is too late!
    folowing is some of my code
    private void JButActionPerformed1()
            jProgressBar1.setIndeterminate(false);
            jProgressBar1.setMinimum(0);
            jProgressBar1.setMaximum(100);
            this.getContentPane().add(bar1);
            jProgressBar1.setVisible(true);
            jProgressBar1.setValue(0);
            progbaratmpt1 atmpt1 = new progbaratmpt1();
            show();
            timer1 = new Timer(300,
                    new ActionListener()
                        public void actionPerformed(ActionEvent evt)
                            if ((counter % 4) == 0)
                                jProgressBar1.setValue(0);
                            if ((counter % 4) == 1)
                                jProgressBar1.setValue(33);
                            if ((counter % 4) == 2)
                                jProgressBar1.setValue(66);
                            if ((counter % 4) == 3)
                                jProgressBar1.setValue(100);
                            counter++;
            progbaratmpt1a();
            timer1.start();
            //timer1.stop();
    public void progbaratmpt1a()
          try
            Thread.sleep(2000);
        catch (InterruptedException e1) {}
      }i have been stuck on this for quite some time, and for some reason no matter what i try nothing works, any help would be greatly appreciated, i am using 1.4.2_05 on win xp. i am just using this code as an example as the real code would be too long, in this example, when i hit the button , it waits 2 secodns then displays my progressbar instead of displaying it straight away.
    thanks again
    chris

    sorry, i had that in my code as well, and never put it in:-
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import java.awt.Button;
    import java.awt.Rectangle;
    import javax.swing.JPanel;
    import javax.swing.JProgressBar;
    import javax.swing.Timer;
    import Project.progbaratmpt1;
    import oracle.jdeveloper.layout.XYConstraints;
    public class progressbarattempt extends JFrame
        private Button button1 = new Button();
        private JProgressBar jProgressBar1 = new JProgressBar();
        JProgressBar bar1 = new JProgressBar();
        JPanel panel = new JPanel();
        private Timer timer;
        private int counter;
        Timer timer1;
        public progressbarattempt()
            try
                jbInit();
            catch (Exception e)
                e.printStackTrace();
        private void jbInit() throws Exception
            this.getContentPane().setLayout(null);
            button1.setLabel("show progress bar");
            button1.setBounds(new Rectangle(0, 0, 140, 50));
            jProgressBar1.setBounds(new Rectangle(205, 55, 130, 50));
            jProgressBar1.setIndeterminate(true);
            //this.getContentPane().add(jProgressBar1, null);
            this.getContentPane().add(button1, null);
            button1.addActionListener(new ActionListener()
                    public void actionPerformed(ActionEvent e)
                        JButActionPerformed1();
            this.setSize(500, 200);
            this.getContentPane().add(jProgressBar1, null);
            jProgressBar1.setVisible(false);
            this.setVisible(true);
        private void JButActionPerformed1()
            jProgressBar1.setIndeterminate(false);
            jProgressBar1.setMinimum(0);
            jProgressBar1.setMaximum(100);
            this.getContentPane().add(bar1);
            jProgressBar1.setVisible(true);
            jProgressBar1.setValue(0);
            progbaratmpt1 atmpt1 = new progbaratmpt1();
            show();
            timer1 = new Timer(300,
                    new ActionListener()
                        public void actionPerformed(ActionEvent evt)
                            if ((counter % 4) == 0)
                                jProgressBar1.setValue(0);
                            if ((counter % 4) == 1)
                                jProgressBar1.setValue(33);
                            if ((counter % 4) == 2)
                                jProgressBar1.setValue(66);
                            if ((counter % 4) == 3)
                                jProgressBar1.setValue(100);
                            counter++;
            try
                Thread.sleep(2000);
            catch (InterruptedException e1) {}
            timer1.start();
            //timer1.stop();
        public static void main(String[] args)
            progressbarattempt attempt = new progressbarattempt();
    }

  • How can I get iTunes to display the tracks from a CD in their original (album) order?

    To be absolutely honest, I don't really understand what this box is for, so I shall just use it to repeat and expand on my question. (I have already sent a "Feedback" comment on the same topic).
    How can I get iTunes to display the tracks from a CD in their original (album) order?
    It seems to me that there is something very basic wrong with the way iTunes handles CD Tracks.
    Professionally produced CD tracks are seldom if ever in a randomised order. Why then does iTunes seem unable to display the tracks in the order they appear on the original CD source - whether from a personally owned CD or from a download from the iTunes Store?
    Some music demands a specific, non-alphabetic sequence in order to make sense. Why does it seem that iTunes only offers Alphabetic, or reverse alphabetic order - both of which make a nonsense of the original, often intended order of tracks?
    Why not replace the so-called "cover-art" in the bottom left hand corner if the iTunes window - which, while it may look attractive to some, gives the barest of information concerning the original disc, with a list of the original CD tracks in their original order, so that the user can easily reestablish the order in which they should be played.
    As I would expect legibility might be a problem with doing this, why could not the original contents, (in their original order), at least, be displayed when the "cover art" is double clicked-on - the result of which at present gives me an enlarged version of the "Cover Art". While on the subject of the contents of the source disc, what about all the album notes which someone takes trouble to write in order to increase the appreciation of the music on the CD and the listener's general background knowledge of the artists involved. Such notes, it seems to me, have considerable intrinsic value in their own account. I would, I think, normally be prepared to buy such "Sleeve notes" - so long as a "taster" was supplied (as it is for the music) - for something like the cost of a single 'Tune" on iTunes.
    These two aspects let Apple iTunes down enormously, in my opinion. I think that by chopping even quite protracted sequences of music up into bits does no one any favours - except perhaps Apple's already quite substantial bank balance. People have to be aware that two and a half, to three and a half minutes is a very short time to develop a piece of worthwhile music, and that there are many, many composers, not all of whom are alive today who have written music that huge masses of mankind value for the enrichment of their lives and the human condition in general.
    Please make the viewing of iTunes tracks in their correct order by default possible. By all means have the alphabetical variations available as offering a different approach to the music, but not the sole approach to it - PLEASE.
    Frustratedly yours
    Alan Whitaker
    PS I work at my old 24" iMac Intel Core 2 machine which runs OS "Tiger" - because it is more beautiful to look at, the screen is more pleasant to work on, and because, in some ways it is more capable (it will run FreeHand MX without needing a "patch"), than my more recent 21.5" which runs "Snow Leopard". (I don't find it that much slower, either).

    Dear Mike
    Thanks for the support. I am utterly amazed that after all the hype about how good iTunes is that it cannot play a downloaded CD in the correct order, and that what that order should be is not available directly from within one's own iTunes installation. (I know that one can go back to the iTunes Store to check what the order should be, but having downloaded the tracks surely iTunes is clever enough to retrieve this important information.
    My iTunes to differ from yours in that I have also noticed that it seems unable to download copies of my "talking books" in the correct order either. But in my case it downloads them - from a CD - in order, but with the first track downloaded first - so that it appears at the bottom of the column of tracks so that it would get played last! (At least this is, while being inexplicable, a relatively "logical" bit of blundering and because of this is relatively easy to put right!).
    I like many genres of music, some of which are not really programmed except perhaps by the artist performing them. I know that Frank Sinatra was very careful to programme his album songs to obtain a particular effect and in relation to the keys of the music. iTunes presumes to know better.
    Film scores may be totally randomly put together, in some cases, but in others the order is vital to one's appreciation of the music as a whole and how it relates to the plot of the film.
    In symphonic music most works are divided into sections and are conceived by the composer that way. Some individual sections may gain a life of their own if played separately, but they are never complete in the sense that the composer envisaged them without being placed in their proper context.
    Opera and probably most choral music too, is similar except that the words may well become meaningless if the order is changed at the whim of a piece of ill-written computer code, while ballet music has to be heard totally within its sequential context or it becomes meaningless.
    Finally, I would venture that iTunes, by jumbling up the order of the tracks as recorded on a CD, does an immense disservice, not only to the music on a particular CD, but to music in general, by expressing everything in terms of "Songs" - which it seems to interpret as stand-alone items of between 2 and 4 minutes whatever the genre. Even the way the iTunes publicity speaks of how many "songs" it can store instead of how many minutes or hours of recorded sound. This has to be another brick in the wall of "dumming-down" of people's expectations, and the shortening of their attention spans.
    I don't know about anyone else, but I feel betrayed by Apple over this. Perhaps the look, feel and general presentation of an item are not the most desirable features of a consumer product. Maybe it should be judged more on it fitness for the purpose for which it was sold. There is one other possibility - that Apple are trying to redefine "Music" - and that everything that lasts longer than about 3.5 minutes or is in the form of what could for want of a better term be called symphonic in the broadest sense is something else - not "Music" within Apple's new definition, at all!
    Well that's off my chest! now I can get down to creating some sort of order in my iTunes Libraries, knowing that I have to reconsult all the sources in order to confirm the source playing order.
    Anyway thanks again. At least I know that it is not just me
    alanfromthatcham

  • I have a Power Mac G4 and i am trying to get it to work with my LCD

    I have a Power Mac G4 and i am trying to get it to work with my LCD Monitor/TV. The connection on the computer is DVI and the connection on the Monitor is DVI. The Monitor says in the manual to hook up computers using the DVI connection. When I connect the too the monitor says there is no video input. I tried changing the settings on the monitor from PC mode to DVI mode and nothing. I have also tried changing the display on the computer to a couple of different settings and nothing. Please Help?

    Hi-
    A little more info please.
    What model G4?
    What Graphics card?
    What OS?
    What model/make of monitor?
    G4AGP(450)Sawtooth, 2ghz PowerLogix, 2gbRAM, RaptorSATAATA, ATI Radeon 9800   Mac OS X (10.4.8)   Pioneer DVR-109, 23" ACD, Ratoc USB 2.0, QCam Ultra, Nikon Coolscan

  • Why am I getting ErrorCode: OperationNotSupported _Code: 204 When I am trying to get campaigns from sandbox account

    Hi All,
          Seasonal Greetings. 
          I am new one to bing ads . I am trying to get Campaigns from my sandbox account. The following is my code.                    
     <?php
    // To ensure that a cached WSDL is not being used,
    // disable WSDL caching.
    ini_set("soap.wsdl_cache_enabled", "0");
    try
        //$accountId = <youraccountid>; // Application-specific value.
         $accountId = "8951263";
        // Use either the sandbox or the production URI.
        // This example is for the sandbox URI.
        $URI =
            "https://api.sandbox.bingads.microsoft.com/Api/Advertiser/v8/";
        // The following commented-out line contains the production URI.
        //$URI = "https://adcenterapi.microsoft.com/api/advertiser/v8/";
        // The API namespace.
        $xmlns = "https://adcenter.microsoft.com/v8";
        // The proxy for the Campaign Management Web service.
        $campaignProxy = 
            $URI . "CampaignManagement/CampaignManagementService.svc?wsdl";
        // The name of the service operation that will be called.
        $action = "GetCampaignsByAccountId";
        // The user name, password, and developer token are
        // expected to be passed in as command-line
        // arguments.
        // $argv[0] is the PHP file name.
        // $argv[1] is the user name.
        // $argv[2] is the password.
        // $argv[3] is the developer token.
        if ($argc !=4)
            printf("Usage:\n");
            printf(
              "php file.php username password devtoken\n");
            exit(0);
        $username = $argv[1];
        $password = $argv[2];
        $developerToken = $argv[3];
        $applicationToken = "";
        // Create the SOAP headers.
        $headerApplicationToken = 
            new SoapHeader
                $xmlns,
                'ApplicationToken',
                $applicationToken,
                false
        $headerDeveloperToken = 
            new SoapHeader
                $xmlns,
                'DeveloperToken',
                $developerToken,
                false
        $headerUserName = 
            new SoapHeader
                $xmlns,
                'UserName',
                $username,
                false
        $headerPassword = 
            new SoapHeader
                $xmlns,
                'Password',
                $password,
                false
        $headerCustomerAccountId = 
            new SoapHeader
                $xmlns,
                'CustomerAccountId',
                $accountId,
                false
        // Create the SOAP input header array.
        $inputHeaders = array
            $headerApplicationToken,
            $headerDeveloperToken,
            $headerUserName,
            $headerPassword,
            $headerCustomerAccountId
        // Create the SOAP client.
        $opts = array('trace' => true);
        $client = new SOAPClient($campaignProxy, $opts); 
        // Specify the parameters for the SOAP call.
        $params = array
            'AccountId' => $accountId,
        // Execute the SOAP call.
        $result = $client->__soapCall
            $action,
            array( $action.'Request' => $params ),
            null,
            $inputHeaders,
            $outputHeaders
         print "Successful $action call.\n";
         print "TrackingId output from response header: "
              . $outputHeaders['TrackingId']
              . ".\n";
         // Insert a blank line to separate the text that follows.
         print "\n";
        // Retrieve the campaigns.
        if (isset(
            $result->Campaigns
            if (is_array($result->Campaigns->Campaign))
                // An array of campaigns has been returned.
                $obj = $result->Campaigns->Campaign;
            else
                // A single campaign has been returned.
                $obj = $result->Campaigns;
            // Display the campaigns.
            foreach ($obj as $campaign)
                print "Name          : " . $campaign->Name . "\n";
                print "Description   : " . $campaign->Description . "\n";
                print "MonthlyBudget : " . $campaign->MonthlyBudget . "\n";
                print "BudgetType    : " . $campaign->BudgetType . "\n";
                print "\n";
    catch (Exception $e)
        print "$action failed.\n";
        if (isset($e->detail->ApiFaultDetail))
          print "ApiFaultDetail exception encountered\n";
          print "Tracking ID: " . 
              $e->detail->ApiFaultDetail->TrackingId . "\n";
          // Process any operation errors.
          if (isset(
              $e->detail->ApiFaultDetail->OperationErrors->OperationError
              if (is_array(
                  $e->detail->ApiFaultDetail->OperationErrors->OperationError
                  // An array of operation errors has been returned.
                  $obj = $e->detail->ApiFaultDetail->OperationErrors->OperationError;
              else
                  // A single operation error has been returned.
                  $obj = $e->detail->ApiFaultDetail->OperationErrors;
              foreach ($obj as $operationError)
                  print "Operation error encountered:\n";
                  print "\tMessage: ". $operationError->Message . "\n"; 
                  print "\tDetails: ". $operationError->Details . "\n"; 
                  print "\tErrorCode: ". $operationError->ErrorCode . "\n"; 
                  print "\tCode: ". $operationError->Code . "\n"; 
          // Process any batch errors.
          if (isset(
              $e->detail->ApiFaultDetail->BatchErrors->BatchError
              if (is_array(
                  $e->detail->ApiFaultDetail->BatchErrors->BatchError
                  // An array of batch errors has been returned.
                  $obj = $e->detail->ApiFaultDetail->BatchErrors->BatchError;
              else
                  // A single batch error has been returned.
                  $obj = $e->detail->ApiFaultDetail->BatchErrors;
              foreach ($obj as $batchError)
                  print "Batch error encountered for array index " . $batchError->Index . ".\n";
                  print "\tMessage: ". $batchError->Message . "\n"; 
                  print "\tDetails: ". $batchError->Details . "\n"; 
                  print "\tErrorCode: ". $batchError->ErrorCode . "\n"; 
                  print "\tCode: ". $batchError->Code . "\n"; 
        if (isset($e->detail->AdApiFaultDetail))
          print "AdApiFaultDetail exception encountered\n";
          print "Tracking ID: " . 
              $e->detail->AdApiFaultDetail->TrackingId . "\n";
          // Process any operation errors.
          if (isset(
              $e->detail->AdApiFaultDetail->Errors
              if (is_array(
                  $e->detail->AdApiFaultDetail->Errors
                  // An array of errors has been returned.
                  $obj = $e->detail->AdApiFaultDetail->Errors;
              else
                  // A single error has been returned.
                  $obj = $e->detail->AdApiFaultDetail->Errors;
              foreach ($obj as $Error)
                  print "Error encountered:\n";
                  print "\tMessage: ". $Error->Message . "\n"; 
                  print "\tDetail: ". $Error->Detail . "\n"; 
                  print "\tErrorCode: ". $Error->ErrorCode . "\n"; 
                  print "\tCode: ". $Error->Code . "\n"; 
        // Display the fault code and the fault string.
        print $e->faultcode . " " . $e->faultstring . ".\n";
        // Output the last request.
        print "Last SOAP request:\n";
        print $client->__getLastRequest() . "\n";
    ?>
    http://msdn.microsoft.com/en-us/library/bing-ads-campaign-management-php-samples-get-campaigns(v=msads.80).aspx
    But I am getting responce 
    GetCampaignsByAccountId failed.
    ApiFaultDetail exception encountered
    Tracking ID: efa654c5-b112-4e96-8c3d-79bac7e70112
    Operation error encountered:
    Message: This operation is not supported.
    Details: 
    ErrorCode: OperationNotSupported
    Code: 204
    s:Server Invalid client data. Check the SOAP fault details for more information.
    Last SOAP request:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adcenter.microsoft.com/v8"><SOAP-ENV:Header><ns1:ApplicationToken></ns1:ApplicationToken><ns1:DeveloperToken>BBD37VB98</ns1:DeveloperToken><ns1:UserName>-XXXXXX-</ns1:UserName><ns1:Password>-XXXXX-</ns1:Password><ns1:CustomerAccountId>8951263</ns1:CustomerAccountId></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>8951263</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    Please Help me to get out of this .  
    Thank you in advance.
    Deepa Varma 

    Hello Nalin,
              Thank you for the reply . Now I am using
    $campaignProxy ="https://api.sandbox.bingads.microsoft.com/Api/Advertiser/CampaignManagement/v9/CampaignManagementService.svc?wsdl" ;
    // The API namespace.
        $xmlns = "https://adcenter.microsoft.com/v9";
        $xmlns = "https://bingads.microsoft.com/AdIntelligence/v9";
    But I am getting 
    GetCampaignsByAccountId failed.
    AdApiFaultDetail exception encountered
    Tracking ID: ca31d743-7b7b-4479-8082-44997d60d549
    Error encountered:
    Message: Authentication failed. Either supplied credentials are invalid or the account is inactive
    Detail: 
    ErrorCode: InvalidCredentials
    Code: 105
    s:Server Invalid client data. Check the SOAP fault details for more information.
    Last SOAP request:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://bingads.microsoft.com/CampaignManagement/v9" xmlns:ns2="https://adcenter.microsoft.com/v8"><SOAP-ENV:Header><ns2:ApplicationToken></ns2:ApplicationToken><ns2:DeveloperToken>BBD37VB98</ns2:DeveloperToken><ns2:UserName>vbridgellp</ns2:UserName><ns2:Password>XXXX</ns2:Password><ns2:CustomerAccountId>8951263</ns2:CustomerAccountId></SOAP-ENV:Header><SOAP-ENV:Body><ns1:GetCampaignsByAccountIdRequest><ns1:AccountId>8951263</ns1:AccountId></ns1:GetCampaignsByAccountIdRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
    I am able to login to sand box UI and see my campaigns. What may be reason for the error ? 
    Thank you in Advance. 
    Deepa Varma

  • Trying to get a Trigger and Alert to work

    So im trying to get a trigger to work with an alert and the Alert seems to be right and the trigger complies which seems right to me, however the instruction that I have in my book does not produce the same output that I get from my Update.
    Here is the deal. I am to log into sql * with a default account as well as login as "SYSTEM"
    the trigger should invoke the Alert and output a message to re-order some more product and the status should = 0 since there is no wait time. However I don't get a "Message" from the Alert and the status = 1 which indicates timeout. So if you can take a look at my code and let me know what I did wrong or how to "Connect" the two that would be great.
    Trigger I created.
    CREATE OR REPLACE TRIGGER order_replace_trg
    AFtER UPDATE OF stock on bb_product
    FOR EACH ROW
    WHEN (OLD.stock = 24 AND NEW.stock = -2)
    DECLARE
    stock NUMBER(5,1);
    idproduct NUMBER(2);
    lv_msg_txt VARCHAR2(25);
    lv_status_num NUMBER(1);
    reorder NUMBER(3);
    BEGIN
    IF stock <> 24 AND reorder = 25 THEN
    lv_msg_txt := 'Product 4 Reorder Time!';
    DBMS_OUTPUT.PUT_LINE(lv_msg_txt);
    ELSE
    lv_status_num := 0;
    DBMS_OUTPUT.PUT_LINE(lv_status_num);
    END IF;
    END;
    The Alert:
    BEGIN
    DBMS_ALERT.REGISTER('reorder');
    END;
    DECLARE
    lv_msg_txt VARCHAR2(25);
    lv_status_num NUMBER(1);
    BEGIN
    DBMS_ALERT.WAITONE('reorder', lv_msg_txt, lv_status_num, 120);
    DBMS_OUTPUT.PUT_LINE('Alert: ' ||lv_msg_txt);
    DBMS_OUTPUT.PUT_LINE('Status: ' ||lv_status_num);
    END;
    Here is the block I need to run to test the trigger and alert.
    UPDATE bb_product
    SET stock = stock -2
    WHERE idproduct = 4;
    COMMIT;
    The message I should get is:
    Alert: Product 4 Reorder Time!
    Status: 0
    PL/SQL procedure successfully completed.
    This is what I get.
    SQL> /
    Alert:
    Status: 1
    PL/SQL procedure successfully completed.
    Thanks for your help!
    Mac

    Right. Register says "I'm interested in getting alerted to some particular event", Waitone says "I'm waiting until some event happens". Signal is the key thing that indicates that a particular event happened.
    As for your trigger, a couple of issues
    - I don't know why you're calling DBMS_OUTPUT. I'm guessing that you probably want to send a message along with your alert that the receiver gets and displays, not that you want to print a message to the window from inside the trigger.
    - You're using the local variables stock and reorder in your IF statement but you never initialize them. I'm guessing that you would want to eliminate those local variables and just use :new.stock and :new.reorder (assuming that REORDER is a column in the table).
    - Your WHEN clause doesn't seem to make sense. It's telling the trigger to fire only if you update stock from 24 to -2, which doesn't make sense. I'm not sure you would even need a WHEN clause here.
    Justin

Maybe you are looking for