Help with placing and altering jpg in Illustrator CS4

I am trying to use a jpg file in my design.  it is an FDIC logo which is has the logo part in black and the background in white.  I need to invert the colors and change the background to be brown to match my illustrator file colors.  tracing is not an option due to the complexity of the logo, and i am pretty new at this so i'm having a hard time trying to explain what i need in order to get any help.
Thanks,
Gwen

Jesseham-
super, that hit the spot.  so just to refresh myself, if i wanted a vector image of another jpeg i have, i would have to trace it myself?
Thanks SO much, I was getting frustrated trying to match the color in photoshop

Similar Messages

  • Help with writing and retrieving data from a table field with type "LCHR"

    Hi Experts,
    I need help with writing and reading data from a database table field which has a type of "LCHR". I have given an example of the original code but don't know what to change it to in order to fix it and still read in the original data that's stored in the LCHR field.
    Basically we have two Function modules, one that saves list data to a database table and one that reads in this data. Both Function modules have an identicle table which has an array of fields from type INT4, CHAR, and type P. The INT4 field is the first one.
    Incidentally this worked in the 4.7 non-unicode system but is now dumping in the new ECC6 Unicode system.
    Thanks in advance,
    C
    SAVING THE LIST DATA TO DB
    DATA: L_WA(800).
    LOOP AT T_TAB into L_WA.
    ZDBTAB-DATALEN = STRLEN( L_WA ).
    MOVE: L_WA to ZDBTAB-RAWDATA.
    ZDBTAB-LINENUM = SY-TABIX.
    INSERT ZDBTAB.
    READING THE DATA FROM DB
    DATA: BEGIN OF T_DATA,
                 SEQNR type ZDBTAB-LINENUM,
                 DATA type ZDBTAB-RAWDATA,
               END OF T_TAB.
    Select the data.
    SELECT linenum rawdata from ZDBTAB into table T_DATA
         WHERE repid = w_repname
         AND rundate = w_rundate
         ORDER BY linenum.
    Populate calling Internal Table.
    LOOP AT T-DATA.
    APPEND T_DATA to T_TAB.
    ENDLOOP.

    Hi Anuj,
    The unicode flag is active.
    When I run our report and then to try and save the list data a dump is happening at the following point
    LOOP AT T_TAB into L_WA.
    As I say, T_TAB consists of different fields and field types whereas L_WA is CHAR 800. The dump mentions UC_OBJECTS_NOT_CONVERTIBLE
    When I try to load a saved list the dump is happening at the following point
    APPEND T_DATA-RAWDATA to T_TAB.
    T_DATA-RAWDATA is type LCHR and T_TAB consists of different fields and field types.
    In both examples the dumps mention UC_OBJECTS_NOT_CONVERTIBLE
    Regards
    C

  • Help with count and sum query

    Hi I am using oracle 10g. Trying to aggregate duplicate count records. I have so far:
    SELECT 'ST' LEDGER,
    CASE
    WHEN c.Category = 'E' THEN 'Headcount Exempt'
    ELSE 'Headcount Non-Exempt'
    END
    ACCOUNTS,
    CASE WHEN a.COMPANY = 'ZEE' THEN 'OH' ELSE 'NA' END MARKET,
    'MARCH_12' AS PERIOD,
    COUNT (a.empl_id) head_count
    FROM essbase.employee_pubinfo a
    LEFT OUTER JOIN MMS_DIST_COPY b
    ON a.cost_ctr = TRIM (b.bu)
    INNER JOIN MMS_GL_PAY_GROUPS c
    ON a.pay_group = c.group_code
    WHERE a.employee_status IN ('A', 'L', 'P', 'S')
    AND FISCAL_YEAR = '2012'
    AND FISCAL_MONTH = 'MARCH'
    GROUP BY a.company,
    b.district,
    a.cost_ctr,
    c.category,
    a.fiscal_month,
    a.fiscal_year;
    which gives me same rows with different head_counts. I am trying to combine the same rows as a total (one record). Do I use a subquery?

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    user610131 wrote:
    ... which gives me same rows with different head_counts.If they have different head_counts, then the rows are not the same.
    I am trying to combine the same rows as a total (one record). Do I use a subquery?Maybe. It's more likely that you need a different GROUP BY clause, since the GROUP BY clause determines how many rows of output there will be. I'll be able to say more after you post the sample data, results, and explanation.
    You may want both a sub-query and a different GROUP BY clause. For example:
    WITH    got_group_by_columns     AS
         SELECT  a.empl_id
         ,     CASE
                        WHEN  c.category = 'E'
                  THEN  'Headcount Exempt'
                        ELSE  'Headcount Non-Exempt'
                END          AS accounts
         ,       CASE
                        WHEN a.company = 'ZEE'
                        THEN 'OH'
                        ELSE 'NA'
                END          AS market
         FROM              essbase.employee_pubinfo a
         LEFT OUTER JOIN  mms_dist_copy             b  ON   a.cost_ctr     = TRIM (b.bu)
         INNER JOIN       mms_gl_pay_groups        c  ON   a.pay_group      = c.group_code
         WHERE     a.employee_status     IN ('A', 'L', 'P', 'S')
         AND        fiscal_year           = '2012'
         AND        fiscal_month          = 'MARCH'
    SELECT    'ST'               AS ledger
    ,       accounts
    ,       market
    ,       'MARCH_12'          AS period
    ,       COUNT (empl_id)       AS head_count
    FROM       got_group_by_columns
    GROUP BY  accounts
    ,            market
    ;But that's just a wild guess.
    You said you wanted "Help with count and sum". I see the COUNT, but what do you want with SUM? No doubt this will be clearer after you post the sample data and results.
    Edited by: Frank Kulash on Apr 4, 2012 5:31 PM

  • MOVED: [Athlon64] Need Help with X64 and Promise 20378

    This topic has been moved to Operating Systems.
    [Athlon64] Need Help with X64 and Promise 20378

    I'm moving this the the Administration Forum.  It seems more apporpiate there.

  • I am running Mac OS 10.10 and trying to run Illustrator CS4. CS4 says it needs Java SE 6 Run Time, but I can not load that into OS 10.10. What to do?

    I am running Mac OS 10.10 and trying to run Illustrator CS4. CS4 says it needs Java SE 6 Run Time, but I can not load that into OS 10.10. What to do?

    Jacob,
    You are genius! I search all over the net and had a long chat with Apple without success. 30 minutes after posting the Abobe Illustrator forum, I have a link that works!! Many thanks.
    Jim

  • Help with placing the JComponents at a particular location in JPanel

    Hello All,
    I think it is simple in placing JLabel with an icon or just just text at a particular location in the JPanel. But it is notworking. I know it is very simple but i think i am missing something. Here is code please help with this code.
    Thanks
    Smithaimport java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.FlowLayout;
    import java.awt.LayoutManager;
    import javax.swing.*;
    public class DocumentGraphicalRepresentation {
         public void buildDocumentation() {
              JFrame frame = new JFrame("Graphical Representation");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setBounds(0, 0, 475, 265);
              JPanel panel = new JPanel();          
              panel.setBounds(0, 0, 475, 265);
              panel.setBackground(Color.lightGray);
              //panel.setLayout(new BorderLayout());          
              JLabel label0 = new JLabel(new ImageIcon("c:/arrow.gif"));
              label0.setLocation(61, 68);
              label0.setOpaque(false);
              panel.add(label0);
              JLabel label1 = new JLabel(new ImageIcon("c:/bulb.gif"));
              label1.setLocation(338, 139);
              label1.setOpaque(false);
              panel.add(label1);
              frame.getContentPane().add(panel);
              frame.setVisible(true);          
         public static void main(String args[]) {
              DocumentGraphicalRepresentation document = new DocumentGraphicalRepresentation();
              document.buildDocumentation();
    }

    When adding components to a null layout you must set both a location and size for them to show up.
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.LayoutManager;
    import javax.swing.*;
    public class DGR {
         public void buildDocumentation() {
              JFrame frame = new JFrame("Graphical Representation");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setBounds(0, 0, 475, 265);
              JPanel panel = new JPanel();          
              panel.setBounds(0, 0, 475, 265);
              panel.setBackground(Color.lightGray);
              //panel.setLayout(new BorderLayout());          
              JLabel label0 = new JLabel(new ImageIcon(//"c:/arrow.gif"));
                                         "images/geek/geek-----.gif"));
                    Dimension d = label0.getPreferredSize();
                    label0.setSize(d);
              label0.setLocation(61, 68);
    //          label0.setOpaque(false);
              panel.add(label0);
              JLabel label1 = new JLabel(new ImageIcon(//"c:/bulb.gif"));
                                         "images/hawk.jpg"));
                    d = label1.getPreferredSize();
                    label1.setBounds(338,139,d.width,d.height);
    //          label1.setLocation(338, 139);
              System.out.println("label1.isOpaque = " + label1.isOpaque());
    //          label1.setOpaque(false);
              panel.add(label1);
              frame.getContentPane().add(new JScrollPane(panel));
              frame.setVisible(true);          
         public static void main(String args[]) {
              new DGR().buildDocumentation();
    }

  • Please Please help with JavaScript and Actions

    Hello!
    Is there a way to perform a saved Action from the Action Pallette using a JavaScript script? I know there is a way to do it with Visual Basic.
    Is there a way to run a Visual Basic script from a JavaScript script?(which could be a potential workaround if JavaScript CANNOT call on an Action)
    Is there a way to call on a JavaScript from an Action?
    Here's specific information on my problem:
    I am using Illustrator CS2 on a PC
    I have written all of the JavaScript scripts that I need to perform various layer selection procedures and they all work perfectly. I have placed them in the Presets > Scripts folder so that they appear in my file menu.
    I wrote a very long action that called on these scripts (using Insert Menu Item > then selecting the script by going File > Scripts) sequentially and did some selecting and copy-pasting and applying graphic styles in between scripts. The Action worked PERFECTLY and ran all the scripts I needed to an automated a process that usually takes me an hour in less than five minutes!
    I saved the actions and saved the file.
    After closing Illustrator all of the lines of the action that called on scripts disappeared! It seems this is a known bug...I currently know of no workaround.
    Can anyone help with any of the following things:
    1. Getting actions to SAVE the commands to run javascripts
    2. Writing a JavaScript that runs an Illustrator Action
    3. Writing a JavaScript that runs a Visual Basic script that runs an Illustrator Action.
    I spent three days learning the basics of JavaScript (mostly by trial and error) and successfully wrote all the scripts I needed...I was overjoyed! But now that I've closed illustrator my actions to run said scripts do not work. PLEASE ADVISE!!!
    Thanks in advance,
    Matthew

    try next
    1)if possible split JS-code into 2 parts (before/after action)
    2)make vbs script with contents
    Set appRef = CreateObject("Illustrator.Application.3")
    appRef.DoJavaScriptFile("C:\my1.js")
    appRef.DoScript(Action As String, From As String)
    'add wait while ActionIsRunning
    appRef.DoJavaScriptFile("C:\my2.js")
    3) run vbs (File > Scripts or double-click).

  • Help with placing photos in Lightroom 4.2

    I am making my first book in the Book module and I'm not finding it as flexible as I expected. I'm slowly figuring out some answers to the questions that have arisen, but I'd like some help with the following.
    1. Can I add a small photo to the last page above the logo?
    2. Can I put a border around a photo on the front, like a frame? Or do I have to prepare a jpg in Photoshop Elements with the frame and my photo?
    3. Can I move or resize those yellow-bordered placement boxes, or make a custom layout if none of the layouts are exactly what I want?
    Answeres to these questions will take a lot of frustration out of the process. :-)
    Thanks,
    Nancy

    Camera? Is it supported?  There is a tutorial here which may help http://www.youtube.com/watch?v=AYs8WbTbJCk

  • Help with conditions AND installer Packages

    Hello everyone,
    I need help still learning.
    My shell is SHELL=/bin/sh based on env command
    I am trying to write a package with Iceberg to push Office 2004 to 250 Macs. I need a preflight script with a condition that will stop my script if /Applications/Microsoft Office 2004 exists OR if OFFICE 2004 exists. Don't know if searching on the folder name is the best or if there is better way
    If it doesn't exist I want it to continue with with placing Office 2004 in the /Applications folder.
    I don't know how to do conditions (If, then, end)
    PREFLIGHT SCRIPT
    IF /Applications/Microsoft Office 2004 folder exist = STOP
    IF /Applications/Microsoft Office 2004 folder doesn't exist continue with laying down files/folder in the package.
    LAYDOWN FILES
    LAY DOWN FILES IN ICEBERG FILE SECTION OF THE PACKAGE
    POSTFLIGHT SCRIPT
    #!/bin/sh
    #Change to root directory
    cd /
    # Move Microsoft Office X folder to Messages Received folder
    mv /Applications/Microsoft\ Office\ X /Messages\ Received
    #Open Office 2004 Installer
    open /Applications/Utilities/Installers/Office2004Installer
    G4 1.42   Mac OS X (10.3.5)  

    Hi Dmcrory,
       The answer to your question about ORing tests in a shell conditional statement could be something along the lines of:
    if [ -d /Applications/Microsoft\ Office\ 2004 -o -d "/Applications/OFFICE 2004" ]
    then
       exit 1
    fi
    I've included two different styles of quoting so you can choose which you prefer.
       That said, you appear to be asking us how to write shell scripts, starting from scratch. Time that you spend studying benefits you forever and sometimes benefits us, while time we spend doing your work is at best a trivial review for us. The above "-o" option, and many others, are documented at the compound comparison section of the Advanced Bash-Scripting Guide. Don't let the name fool you; the Guide actually assumes very little. The "Advanced" adjective refers to the completeness of work. In fact there are many good references.
       I used to have a long post of links to what I think are some of the better beginning UNIX tutorials and books. However, as others posted great links and I stole them, my post became too long so I put it in a web page. Bill Scott did the same thing so here is Bill's and here is mine.
       This is being written after reading your exchange with Roger. When you execute code that doesn't work, we certainly have no chance of knowing why without seeing the code. It generally helps a lot to see the output as well.
    Gary
    ~~~~
       University politics are vicious precisely because the
       stakes are so small.
             -- C. P. Snow

  • Help with Mathscipt and for loop

    I have a code in Mathscript/matlab and I need to output the array out. One option is my first code,the other option is using a for loop, but I am only getting the last ouput out. I need to get the whole output out.
    Any help.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    Help with Mathscript_for loop.vi ‏115 KB
    Help with Mathscript_for loop2.vi ‏84 KB

    Here's how it should look like.
    Message Edited by altenbach on 10-30-2008 05:12 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    MathscriptInFOR.png ‏15 KB

  • Need help with JTextArea and Scrolling

    import java.awt.*;
    import java.awt.event.*;
    import java.text.DecimalFormat;
    import javax.swing.*;
    public class MORT_RETRY extends JFrame implements ActionListener
    private JPanel keypad;
    private JPanel buttons;
    private JTextField lcdLoanAmt;
    private JTextField lcdInterestRate;
    private JTextField lcdTerm;
    private JTextField lcdMonthlyPmt;
    private JTextArea displayArea;
    private JButton CalculateBtn;
    private JButton ClrBtn;
    private JButton CloseBtn;
    private JButton Amortize;
    private JScrollPane scroll;
    private DecimalFormat calcPattern = new DecimalFormat("$###,###.00");
    private String[] rateTerm = {"", "7years @ 5.35%", "15years @ 5.5%", "30years @ 5.75%"};
    private JComboBox rateTermList;
    double interest[] = {5.35, 5.5, 5.75};
    int term[] = {7, 15, 30};
    double balance, interestAmt, monthlyInterest, monthlyPayment, monPmtInt, monPmtPrin;
    int termInMonths, month, termLoop, monthLoop;
    public MORT_RETRY()
    Container pane = getContentPane();
    lcdLoanAmt = new JTextField();
    lcdMonthlyPmt = new JTextField();
    displayArea = new JTextArea();//DEFINE COMBOBOX AND SCROLL
    rateTermList = new JComboBox(rateTerm);
    scroll = new JScrollPane(displayArea);
    scroll.setSize(600,170);
    scroll.setLocation(150,270);//DEFINE BUTTONS
    CalculateBtn = new JButton("Calculate");
    ClrBtn = new JButton("Clear Fields");
    CloseBtn = new JButton("Close");
    Amortize = new JButton("Amortize");//DEFINE PANEL(S)
    keypad = new JPanel();
    buttons = new JPanel();//DEFINE KEYPAD PANEL LAYOUT
    keypad.setLayout(new GridLayout( 4, 2, 5, 5));//SET CONTROLS ON KEYPAD PANEL
    keypad.add(new JLabel("Loan Amount$ : "));
    keypad.add(lcdLoanAmt);
    keypad.add(new JLabel("Term of loan and Interest Rate: "));
    keypad.add(rateTermList);
    keypad.add(new JLabel("Monthly Payment : "));
    keypad.add(lcdMonthlyPmt);
    lcdMonthlyPmt.setEditable(false);
    keypad.add(new JLabel("Amortize Table:"));
    keypad.add(displayArea);
    displayArea.setEditable(false);//DEFINE BUTTONS PANEL LAYOUT
    buttons.setLayout(new GridLayout( 1, 3, 5, 5));//SET CONTROLS ON BUTTONS PANEL
    buttons.add(CalculateBtn);
    buttons.add(Amortize);
    buttons.add(ClrBtn);
    buttons.add(CloseBtn);//ADD ACTION LISTENER
    CalculateBtn.addActionListener(this);
    ClrBtn.addActionListener(this);
    CloseBtn.addActionListener(this);
    Amortize.addActionListener(this);
    rateTermList.addActionListener(this);//ADD PANELS
    pane.add(keypad, BorderLayout.NORTH);
    pane.add(buttons, BorderLayout.SOUTH);
    pane.add(scroll, BorderLayout.CENTER);
    addWindowListener( new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    String arg = lcdLoanAmt.getText();
    int combined = Integer.parseInt(arg);
    if (e.getSource() == CalculateBtn)
    try
    JOptionPane.showMessageDialog(null, "Got try here", "Error", JOptionPane.ERROR_MESSAGE);
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Got here", "Error", JOptionPane.ERROR_MESSAGE);
    if ((e.getSource() == CalculateBtn) && (arg != null))
    try{
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 1))
    monthlyInterest = interest[0] / (12 * 100);
    termInMonths = term[0] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 2))
    monthlyInterest = interest[1] / (12 * 100);
    termInMonths = term[1] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 3))
    monthlyInterest = interest[2] / (12 * 100);
    termInMonths = term[2] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Invalid Entry!\nPlease Try Again", "Error", JOptionPane.ERROR_MESSAGE);
    }                    //IF STATEMENTS FOR AMORTIZATION
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 1))
    loopy(7, 5.35);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 2))
    loopy(15, 5.5);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 3))
    loopy(30, 5.75);
    if (e.getSource() == ClrBtn)
    rateTermList.setSelectedIndex(0);
    lcdLoanAmt.setText(null);
    lcdMonthlyPmt.setText(null);
    displayArea.setText(null);
    if (e.getSource() == CloseBtn)
    System.exit(0);
    private void loopy(int lTerm,double lInterest)
    double total, monthly, monthlyrate, monthint, monthprin, balance, lastint, paid;
    int amount, months, termloop, monthloop;
    String lcd2 = lcdLoanAmt.getText();
    amount = Integer.parseInt(lcd2);
    termloop = 1;
    paid = 0.00;
    monthlyrate = lInterest / (12 * 100);
    months = lTerm * 12;
    monthly = amount *(monthlyrate/(1-Math.pow(1+monthlyrate,-months)));
    total = months * monthly;
    balance = amount;
    while (termloop <= lTerm)
    displayArea.setCaretPosition(0);
    displayArea.append("\n");
    displayArea.append("Year " + termloop + " of " + lTerm + ": payments\n");
    displayArea.append("\n");
    displayArea.append("Month\tMonthly\tPrinciple\tInterest\tBalance\n");
    monthloop = 1;
    while (monthloop <= 12)
    monthint = balance * monthlyrate;
    monthprin = monthly - monthint;
    balance -= monthprin;
    paid += monthly;
    displayArea.setCaretPosition(0);
    displayArea.append(monthloop + "\t" + calcPattern.format(monthly) + "\t" + calcPattern.format(monthprin) + "\t");
    displayArea.append(calcPattern.format(monthint) + "\t" + calcPattern.format(balance) + "\n");
    monthloop ++;
    termloop ++;
    public static void main(String args[])
    MORT_RETRY f = new MORT_RETRY();
    f.setTitle("MORTGAGE PAYMENT CALCULATOR");
    f.setBounds(600, 600, 500, 500);
    f.setLocationRelativeTo(null);
    f.setVisible(true);
    }need help with displaying the textarea correctly and the scroll bar please.
    Message was edited by:
    new2this2020

    What's the problem you're having ???
    PS.

  • Help with encapsulation and a specific case of design

    Hello all. I have been playing with Java (my first real language and first OOP language) for a couple months now. Right now I am trying to write my first real application, but I want to design it right and I am smashing my head against the wall with my data structure, specifically with encapsulation.
    I go into detail about my app below, but it gets long so for those who don't want to read that far, let me just put these two questions up front:
    1) How do principles of encapsulation change when members are complex objects rather than primitives? If the member objects themselves have only primitive members and show good encapsulation, does it make sense to pass a reference to them? Or does good encapsulation demand that I deep-clone all the way to the bottom of my data structure and pass only cloned objects through my top level accessors? Does the analysis change when the structure gets three or four levels deep? Don't DOM structures built of walkable nodes violate basic principles of encapsulation?
    2) "Encapsulation" is sometimes used to mean no public members, othertimes to mean no public members AND no setter methods. The reasons for the first are obvious, but why go to the extreme of the latter? More importantly HOW do you go to the extreme of the latter? Would an "updatePrices" method that updates encapsulated member prices based on calculations, taking a single argument of say the time of year be considered a "setter" method that violates the stricter vision of encapsulation?
    Even help with just those two questions would be great. For the masochistic, on to my app... The present code is at
    http://www.immortalcoil.org/drake/Code.zip
    The most basic form of the application is statistics driven flash card software for Japanese Kanji (Chinese characters). For those who do not know, these are ideographic characters that represent concepts rather than sounds. There are a few thousand. In abstract terms, my data structure needs to represent the following.
    -  There are a bunch of kanji.
       Each kanji is defined by:
       -  a single character (the kanji itself); and
       -  multiple readings which fall into two categories of "on" and "kun".
          Each reading is defined by:
          -  A string of hiragana or katakana (Japanese phoenetic characters); and
          -  Statistics that I keep to represent knowledge of that reading/kanji pair.Ideally the structure should be extensible. Later I might want to add statistics associated with the character itself rather than individual readings, for example. Right now I am thinking of building a data structure like so:
    -  A Vector that holds:
       -  custom KanjiEntry objects that each hold
          -  a kanji in a primitive char value; and
          -  two (on, kun) arrays or Vectors of custom Reading objects that hold
             -  the reading in a String; and
             -  statistics of some sort, probably in primitive valuesFirst of all, is this approach sensible in the rough outlines?
    Now, I need to be able to do the obvious things... save to and load from file, generate tables and views, and edit values. The quesiton of editting values raises the questions I identified above as (1) and (2). Say I want to pull up a reading, quiz the user on it, and update its statistics based on whether the user got it right or wrong. I could do all this through the KanjiEntry object with a setter method that takes a zillion arguments like:
    theKanjiEntry.setStatistic(
    "on",   // which set of readings
    2,      // which element in that array or Vector
    "score", // which statistic
    98);      // the valueOr I could pass a clone of the Reading object out, work with that, then tell the KanjiEntry to replace the original with my modified clone.
    My instincts balk at the first approach, and a little at the second. Doesn't it make more sense to work with a reference to the Reading object? Or is that bad encapsulation?
    A second point. When running flash cards, I do not care about the subtlties of the structure, like whether a reading is an on or a kun (although this is important when browsing a table representing the entire structure). All I really care about is kanij/reading pairings. And I should be able to quickly poll the Reading objects to see which ones need quizzing the most, based on their statistics. I was thinking of making a nice neat Hashtable with the keys being the kanji characters in Strings (not the KanjiEntry objects) and the values being the Reading objects. The result would be two indeces to the Reading objects... the basic structure and my ad hoc hashtable for runninq quizzes. Then I would just make sure that they stay in sync in terms of the higher level structure (like if a whole new KanjiEntry got added). Is this bad form, or even downright dangerous?
    Apart from good form, the other consideration bouncing around in my head is that if I get all crazy with deep cloning and filling the bottom level guys with instance methods then this puppy is going to get bloated or lag when there are several thousand kanji in memory at once.
    Any help would be appreciated.
    Drake

    Usually by better design. Move methods that use the
    getters inside the class that actually has the data....
    As a basic rule of thumb:
    The one who has the data is the one using it. If
    another class needs that data, wonder what for and
    consider moving that operation away from that class.
    Or move from pull to push: instead of A getting
    something from B, have B give it to A as a method
    call argument.Thanks for the response. I think I see what you are saying.. in my case it is something like this.
    Solution 1 (disfavored):
    public class kanjiDrill{ // a chunk of Swing GUI or something
         public void runDrill(Vector kanjiEntries){
              KanjiEntry currentKanjiEntry = kanjiEntries.elementAt(0); // except really I will pick one randomly
              char theKanji = currentKanjiEntry.getKanji();
              String theReading = currentKanjiEntry.getReading();
              // build and show a flashcard based on theKanji and theReading
              // use a setter to change currentKanji's data based on whether the user answers correctly;
    }Solution 2 (favored):
    public class kanjiDrill{ // a chunk of Swing GUI or something
         public void runDrill(Vector kanjiEntries){
              KanjiEntry currentKanjiEntry = kanjiEntries.elementAt(0); // except really I will pick one randomly
              currentKanji.buildAndShowFlashcard(); // method includes updating stats
    }I can definitely see the advantages to this, but two potential reasons to think hard about it occur to me right away. First, if this process is carried out to a sufficient extreme the objects that hold my data end up sucking in all the functionality of my program and my objects stop resembling natural concepts.
    In your shopping example, say you want to generate price tags for the items. The price tags can be generated with ONLY the raw price, because we do not want the VAT on them. They are simple GIF graphics that have the price printed on a an irregular polygon. Should all that graphics generating code really go into the item objects, or should we just get the price out of the object with a simple getter method and then make the tags?
    My second concern is that the more instance methods I put into my bottom level data objects the bigger they get, and I intend to have thousands of these things in memory. Is there a balance to strike at some point?
    It's not really a setter. Outsiders are not setting
    the items price - it's rather updating its own price
    given an argument. This is exactly how it should be,
    see my above point. A breach of encapsulation would
    be: another object gets the item price, re-calculates
    it using a date it knows, and sets the price again.
    You can see yourself that pushing the date into the
    item's method is much beter than breaching
    encapsulation and getting and setting the price.So the point is not "don't allow access to the members" (which after all you are still doing, albeit less directly) so much as "make sure that any functionality implicated in working with the members is handled within the object," right? Take your shopping example. Say we live in a country where there is no VAT and the app will never be used internationally. Then we would resort to a simple setter/getter scheme, right? Or is the answer that if the object really is pure data are almost so, then it should be turned into a standard java.util collection instead of a custom class?
    Thanks for the help.
    Drake

  • Can anyone help with iPlayer and Sky Mobile?

    Ok, I'm so close to giving up with this useless phone. There are 3 apps on my N97 which give me a constant headache.
    BBC iPlayer
    Sky Mobile*
    YouTube
    *I should point out that I only use Sky Mobile to set recordings on my Sky+. I do not use it for, nor have any desire to use it for actually watching Mobile TV.
    All of these apps work absolutely fine over my home WiFi network. It's when I try to use them over 3G (my Vodafone Live! connection) that I start running in to trouble.
    All 3 give me connection problems, errors, and simply refuse to load half the time when on 3G. I got so annoyed I just did a hard reset the other week, and magically all three started working again. However, now 2 of them are failing me again. YouTube (touch wood) is working fine at the moment, but iPlayer and Sky Mobile just aren't.
    iPlayer sometimes works. But sometimes I get script errors (unable to load content), and sometimes it says something about checking my connection settings. I wouldn't mind but it's not actually possible to access any options for the iPlayer. Even in application settings there are no options you're able to set.
    Sky Mobile simply flat out refuses to work ever on 3G. But it did after I did a hard reset for a couple of weeks, now it just stopped working! It wont even load. It just gives the error message 'Unable to connect to network - please check connection settings" or something along those lines.
    I've tried so many different things. Tried setting my internet connections to 'always ask', tried setting it to default to Vodafone Live! all the time, tried setting my video streaming settings to WAP, all sorts. Every combination I can think of.
    I just can't wait to get rid of this phone. I've put so many people off buying one. They see it and think it's all swish and cool, and I just say 'Don't. You'll regret it'. I can't wait for my contract to be up so I can upgrade to an iPhone now Vodafone have got them.
    Can anyone help with these problems? Thanks in advance, but I don't hold out much hope...

    About iPlayer.
    Have a chat with Vodaphone. Streaming iPlayer over 3G IS allowed on Vodaphone contract, unlike my O2 contract. As long as your contract allows it, and you have the correct AP address, it should be fine. Vodaphone should be able to give you the setting.
    Mine only works over Wlan.
    FWIW, "... streaming over 3G is not currently available on iPhone handsets on any mobile network".
    p.s. Just to be clear. You say  "Tried setting my internet connections to 'always ask', tried setting it to default to Vodafone Live!".
    iPlayer uses the Nokia browser "Web". So that's where you should make the setting "Ask when needed". It should then offer you the choice of whatever you've set in Destinations> Internet> then select whatever you've chosen as your GPRS connection.(as advised, or sent to you by Vodaphone).

  • Help with exporting and image size or boundaries?

    I am trying to slide the cat into the scene a little at a time foir an animation project I am working on. However, when I export the image the back ground of the image expands with a checkered back ground( showing here in white) and shows the whole cat.
    How do I just show a little of the cat on the image at a time when exporting. I am trying to give the impression that the cat is walking into the room. I do not want to have to cut the cat up.
    I would be thankful for any suggestions.

    Provide the name of the program you are using so a Moderator may move this message to the correct program forum
    This Cloud forum is not about help with program problems... a program would be Photoshop or Lighroom or Muse or ???

  • Help with looping and counting

    i am in a CS 1 class and need help with this loop
    /*Write a program that will allow the user to enter a character
              until the capital letter Z is entered
         The program should count the number of letters entered
              and print the total after the loop is completed*/
    here is what i have it doesn't end nor does it count and i don't know hwo to make it count also i suck at do..while loops hehe
    char b,Z=0;
              Scanner a = new Scanner(System.in);
         do
                   System.out.print("Enter a letter: "+"\n");
                   b=a.next().charAt(0);
              while (b !=Z);
    i know that its not even close to being right just help me out here
    Edited by: purplesmurf on Nov 14, 2008 7:25 PM

    The following program will count the number of chacters entered until Z is enetered.
    import java.io.*;
    class count
         public static void main(String[] args)throws IOException
              char ch;
              int cnt=0;
              DataInputStream br=new DataInputStream(System.in);
              do
              System.out.print("Enter a character:");
              ch=(char)br.read();
              if(ch!='Z')
                   cnt++;
              else
                   break;
              }while((ch=(char)br.read())!='Z');
              System.out.println("The Number of entered characters are:"+cnt);
    }

Maybe you are looking for