Vector inside a Vector

Help me, friends.
A vector "V" contains elements which are also vectors, say "v". E.g.:
V = {{1,2,3},{1,3,4,5},{2,4,5},{5,6,7}}
How to implement: if the first element of vector "v" are the same, combines the two vectors "v" AND if the two vectors "v" contains the same element for the rest (2nd, 3rd, etc), remove duplicate.
So the output for above example will be:
V = {{1,2,3,4,5},{2,4,5},{5,6,7}}
Thanks you for your help.

Thanks.
Another problem. I've tried to find the all pairs.
<code>
import java.io.*;
import java.util.*;
public class SequenceFacade {
     private HashMap map;
     public SequenceFacade() {
          map = new HashMap();     
     } // end default constructor
     /**     Task: Find all the pairs with input gap.
     *     @param inputFile a text file to be read
     *     @param gap no. of words between the pair
     public HashMap findPairs(String inputFile, String outputFile, int gap) throws Exception {
          File textFile = new File(inputFile);
          FileReader reader = new FileReader(textFile);
          BufferedReader br = new BufferedReader(reader);          
          FileWriter writer = new FileWriter(outputFile);
          PrintWriter pw = new PrintWriter(writer);
          String line = br.readLine();
          Vector words = new Vector();
          Object value;
          Vector indexList;
          int docIndex = 0;
          int totalPairs = 0;
          while(line != null) {
               StringTokenizer st = new StringTokenizer(line);
               while(st.hasMoreTokens())
                    words.addElement(st.nextToken());
               int noOfWords = words.size();
               for(int i = 0; i < noOfWords; i++) {
                    int j = i + (gap+1);
                    if(i < (noOfWords - (gap+1))) {
                         for(int k = i+1; k <= j; k++) {
                              Vector sequence = new Vector();
                              sequence.addElement(words.elementAt(i));
                              sequence.addElement(words.elementAt(k));
                              Vector index = new Vector();
                              index.addElement(new Integer(docIndex));
                              index.addElement(new Integer(i));
                              index.addElement(new Integer(k));
                              value = map.get(sequence);
                              if(value == null) {
                                   indexList = new Vector();
                                   map.put(sequence, indexList);
                              else {
                                   indexList = (Vector)value;
                              totalPairs++;
                              indexList.addElement(index);
                    else {
                         for(int k = i+1; k < noOfWords; k++) {
                              Vector sequence = new Vector();
                              sequence.addElement(words.elementAt(i));
                              sequence.addElement(words.elementAt(k));
                              Vector index = new Vector();
                              index.addElement(new Integer(docIndex));
                              index.addElement(new Integer(i));
                              index.addElement(new Integer(k));
                              value = map.get(sequence);
                              if(value == null) {
                                   indexList = new Vector();
                                   map.put(sequence, indexList);
                              else {
                                   indexList = (Vector)value;
                              totalPairs++;
                              indexList.addElement(index);
               } // end for
               docIndex++;
               line = br.readLine();
               words = new Vector();
          } // end while
          System.out.println("Total no. of pairs : "+map.size());
          System.out.println("Total no. of all pairs : "+totalPairs);
          Set set = map.entrySet();
          List setList = new ArrayList(set);
          //Collections.sort(setList, new MyCompare());
          for(Iterator it = setList.iterator(); it.hasNext();)
               pw.println(it.next());
          br.close();
          pw.close();
          return map;
     } // end findPairs()
} // end class SequenceFacade
</code>
The problem is when the key has a value which is a Vector that contains vector v. if the first element of vectors v are the same, then just append the vector.
Eg.
"hello world" which is found in line 1, "hello" in position 2, "world" in position 3.
So:
[hello, world]=[[1,2,3]]
if the words "hello word" also found in the same line but different position for each words, we just append the vector. Say, another "hello world" also found in line 1, "hello" in position 6, world in position 8.
We just append it like this:
[hello, world]=[[1,2,3,6,8]]
Anyone can help me edit the above algorithm? Thanks.

Similar Messages

  • JList(Vector) inside JScrollPane vanishes!

    Hi all, I have a problem thats driving me crazy, Im really stumped on this one;
    Im trying to update the GUI on a packet sniffer I wrote a while ago,
    I have a GUI class below as part of a larger program, this class containes a JList(Vector) inside a JScrollPane inside a JPanel inside a JFrame, I want this JList to be on the screen all the time, and grow dynamically as new elements are added to the Vector.
    Elements are added via an accessor method addPacket(Capture), you can assume the other classes in my program work fine.
    The problem is, the JFrame periodically goes blank, sometimes the scrollbars are present, sometimes not. After a while (sometimes) the JList reappears, containing the list of packets as it should, but it never lasts very long. Often it will disappear permanently.
    The class below is pretty short and simple, I really hope this is a simple and obvious mistake Ive made that someone can spot.
    Thanks,
    Soothsayer
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.io.InputStream;
    public class GUI extends JFrame
         Dimension screenResolution = Toolkit.getDefaultToolkit().getScreenSize();
         private InputStream fontStream = this.getClass().getResourceAsStream("console.ttf");
         Font outputFont;
         static final Color FIELD_COLOR = new Color(20, 20, 60);
         static final Color FONT_COLOR = new Color(150, 190, 255);
         private static JPanel superPanel = new JPanel();
         private static Vector<Capture> packetList = new Vector<Capture>(1000, 500);
         private static JList listObject = new JList(packetList);
         private static JScrollPane scrollPane = new JScrollPane(listObject);
         public GUI()
              super("LineLight v2.1 - Edd Burgess");
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              this.setLocation(50, 10);
              try { outputFont = Font.createFont(Font.TRUETYPE_FONT, fontStream); }
              catch(Exception e) { System.err.println("Error Loading Font:\n" + e); }
              outputFont = outputFont.deriveFont((float)10);
              listObject.setFont(outputFont);
              superPanel.setPreferredSize(new Dimension(screenResolution.width - 100, screenResolution.height - 100));
              superPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
              scrollPane.setPreferredSize(new Dimension(screenResolution.width - 100, screenResolution.height - 100));
              scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
              scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
              scrollPane.setWheelScrollingEnabled(true);
              superPanel.add(scrollPane);
              this.add(superPanel);
              this.pack();
         public void addPacket(Capture c)
              this.packetList.add(c);
              this.listObject.setListData(packetList);
              this.superPanel.repaint();
    }

    I'm having basically the same problem, And how is your code different than the example in the tutorial???
    You can also read the tutorial section on "Concurrency".
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.
    Start your own posting if you need further help.

  • Strange Problem with a Vector wraped inside a Hashtable

    Hi all ,
    I'm having a strange problem with a Vector wraped within a Hashtable inherited Class.
    My goal is to keep the order of the elements of the Hashtable so what I did was to extend Hashtable and wrap a Vector Inside of it.
    Here is what it looks like :
    package somepackage.util;
    import java.util.Enumeration;
    import java.util.Hashtable;
    import java.util.Vector;
    public class OrderedHashTable extends Hashtable {
        private Vector index;
        /** Creates a new instance of OrderedHashTable */
        public OrderedHashTable() {      
            this.index = new Vector();
    //adds a key pair value to the HashTable and adds the key at the end of the index Vector
       public synchronized Object put(Object key,Object value){      
           index.addElement(key);
           Object obj = super.put(key,value);
           System.out.println("inside OrderedHashTable Put method index size = " + index.size());
           return obj;    
    public synchronized Object remove(Object key){
           int indx = index.indexOf(key);
           index.removeElementAt(indx);
           Object obj = super.remove(key);
           return obj;
    public synchronized Enumeration getOrderedEnumeration(){
           return index.elements();
    public synchronized Object getByIndex(int indexValue){
           Object obj1 = index.elementAt(indexValue);
           Object obj2 = super.get(obj1);      
           return obj2;
       public synchronized int indexOf(Object key){
        return index.indexOf(key);
        public synchronized int getIndexSize() {
            return index.size();
        }Everything seemed to work fine util I tried to add objects using a "for" loop such as this one :
    private synchronized void testOrderedHashTable(){
            OrderedHashTable test = new OrderedHashTable();
            for (int i = 1 ; i<15; i++){
                 System.out.println("adding Object No " + i);
                 String s = new String("string number = "+i);
                 test.put(new Integer(i),s);
                 System.out.println("-----------------------------------");
            //try to list the objects
            Enumeration e = test.getOrderedEnumeration();
            while (e.hasMoreElements()){
                Integer intObj = (Integer) e.nextElement();
                System.out.println("nextObject Number = "+ intObj);
        }Here is the console output :
    Generic/JSR179: adding Object No 1
    Generic/JSR179: inside OrderedHashTable Put method index size = 1
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 2
    Generic/JSR179: inside OrderedHashTable Put method index size = 2
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 3
    Generic/JSR179: inside OrderedHashTable Put method index size = 3
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 4
    Generic/JSR179: inside OrderedHashTable Put method index size = 4
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 5
    Generic/JSR179: inside OrderedHashTable Put method index size = 5
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 6
    Generic/JSR179: inside OrderedHashTable Put method index size = 6
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 7
    Generic/JSR179: inside OrderedHashTable Put method index size = 7
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 8
    Generic/JSR179: inside OrderedHashTable Put method index size = 8
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 9
    Generic/JSR179: inside OrderedHashTable Put method index size = 10
    Generic/JSR179: inside OrderedHashTable Put method index size = 10
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 10
    Generic/JSR179: inside OrderedHashTable Put method index size = 11
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 11
    Generic/JSR179: inside OrderedHashTable Put method index size = 12
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 12
    Generic/JSR179: inside OrderedHashTable Put method index size = 13
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 13
    Generic/JSR179: inside OrderedHashTable Put method index size = 14
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 14
    Generic/JSR179: inside OrderedHashTable Put method index size = 15
    Generic/JSR179: -----------------------------------
    Generic/JSR179: nextObject Number = 1
    Generic/JSR179: nextObject Number = 2
    Generic/JSR179: nextObject Number = 3
    Generic/JSR179: nextObject Number = 4
    Generic/JSR179: nextObject Number = 5
    Generic/JSR179: nextObject Number = 6
    Generic/JSR179: nextObject Number = 7
    Generic/JSR179: nextObject Number = 8
    Generic/JSR179: nextObject Number = 9
    Generic/JSR179: nextObject Number = 9
    Generic/JSR179: nextObject Number = 10
    Generic/JSR179: nextObject Number = 11
    Generic/JSR179: nextObject Number = 12
    Generic/JSR179: nextObject Number = 13
    Generic/JSR179: nextObject Number = 14
    You can notice that the output seems correct until the insertion of object 9.
    At this point the vector size should be 9 and the output says it is 10 elements long ...
    In the final check you can notice the 9 was inserted twice ...
    I think the problem has something to do with the automatic resizing of the vector but I'm not really sure. Mybe the resizing is done in a separate thread and the new insertion occurs before the vector is resized ... this is my best guess ...
    I also tested this in a pure J2SE evironment and I don't have the same strange behavior
    Can anybody tell me what I am doing wrong or how I could avoid this problem ?
    Thanks a lot !
    Cheers Alex

    Am i doing anything wrong?Uhm, yes. Read the API doc for addElement() and for addAll()

  • How can we serialize a c++ structure with an vector inside it in coherence using PofWriter?

    How can we serialize a c++ structure with an vector inside it in coherence using PofWriter?
    Any help is appreciated.
    Thanks.

    The link you gave was the same link that had already been given, and that points to an article about AIR 3.6.
    I’m not sure if AIR 3.9 has changed fundamentally with regard to this problem though, but here’s a work around someone used, to make the subsequent loads seem like a new file:
    https://gist.github.com/sportebois/6969008
    Would it be possible to just keep a reference to the loaded swf, after the first load? Then you can removechild it when you’re not needing it, and addchild it back when you do need it.

  • Change path inside and outside areas in vector mask

    Hey all PS/CS lovers,
         That's probably an easy one, yet, being rather new to this, I have to ask.
         So I have this vector mask on a layer, and while singing along to the Beatles I'm editing paths on it. Well, all it is is a rectangle to reframe a photo, nothing crazy. But that rectangle is too big to my taste - so I just draw another, smaller one inside it and plan on deleting the first one.
         But ! The second, smaller rectangle is viewed as a takeout from the first one (so its inside is considered "black" mask-wise, i.e. cut out, and its outside is "white", i.e. kept in). Thus, when deleting the first, bigger one, the entirety of the picture appears, except for the part I want in the middle, that's cut out ! Yes - that's the opposite of what I want.
         Now, I tried using the path selection tool and changing the fill color of the rectangle, but you can't ... So, how do you invert inside and outside of a closed path ? Thanks in advance !
    Charles

    So, how do you invert inside and outside of a closed path ?
    Select the Path with the Path Selection Tool and in the Options Bar change the Path Operations setting.

  • Is it possible to scale Illustrator files inside After Effects and retain the vector quality?

    I imported an Illustrator file into my After Effects project and scaled the ai file to 200%, but noticed that is pixelated.  Is there a way to keep the ai file vector based inside After Effects.
    Note:  I attempted to use the "Create Shapes from Vector Layer" and the paths all show up, but the fill and stroke colors disappear?? 
    Any suggestions would be appreciated.
    I am using CS6 Creative Cloud on a Windows 8 with 16 gig of ram
    Thanks,
    Paul

    Dave is right. See this:
    FAQ: Why are my vector graphics (e.g., from Illustrator) jagged or soft?

  • I have a vector Star(Red) then I create small bubbles vector(blue) how to create Red star w/ blue bubbles inside star get rid of excess bubble outside of star?

    I tried path finder but then it will create a bubbles hole in the star leaving the blue color of bubble behind
    Masking  also made a hole in the star
                <           >
                     V  V         <----   this is my red star 
    :*^.......**         <-------my small bubble made from circles vector blue
    OUTPUT without your help guys : 
               .*":;:  /\*^...
            :*^....  / *\.....**
           *^.. < *":;..":;* >:*^....
               *^...V  V *^....       <------ how to create Red star w/ blue bubbles inside star get rid of excess bubble outside of star?
    OUTPUT with your help guys : 
                < *":;..":;* >
                     V  V            <-------how can i do this pls help thx alot

    qui nox,
    You may, with the stroke/nofill red star on top of the blue bubbles in the (Layers palette) stacking order:
    1) Select everything and Object>Clipping Mask>Make;
    2) Direct Select the (formerly) red star and reapply its red stroke.
    You may also start by making a copy in front of the red star and use the original in 1); that will make the copy a separate object on top of the Clipping mask.

  • Comparing elements inside a vector

    Hello,
    I am having a hard time understanding how to compare elements inside a vector. I have a vector of six strings and I want to compare the first element at index 0 with all other elements at positions 1-5. After that, compare the element at position 1 with elements at positions 2-5 and so on until all elements have been compared against each other.
    Can some one please advise me on how to achieve this?
    Thank you.

    joor_empire wrote:
    Thanks for replying. I tried using nested loops, but I keep getting array index out of bound error.Hmmm, then you're doing it wrong.
    For more information, you'll have to give us more info, such as your code (please use code tags when posting it though).

  • Search inside vector?

    help please.
    public class items
      String a;
      int b;
      Vector storageVector = new Vector();
    public void wootwoot();
      items weee = new items();
      a=wootest;
      b=100;
      storageVector.add(weee);
    public void search();
      //How could i search the content of 'string a' inside vector v?
      //In array, i could simply search for array[0].a but it's not compatible with vector.
    }

    _helloWorld_ wrote:
    Loop over the Vector and use elementAt(). Then check the contents using the equals() method.Or just override the equals(Object) method in the items class(and preferably the hashCode() as well) and use Vector's get(Object) to get an item from your Vector.

  • Servicegen for sub-class inside vector variable of Super

    java.lang.NoSuchMethodError
    at com.netsboss.WSBE.model.QueryItemCodec.typedInvokeGetter(QueryItemCod
    ec.java:87)
    at com.netsboss.WSBE.model.QueryItemCodec.invokeGetter(QueryItemCodec.ja
    va:56)
    at weblogic.xml.schema.binding.BeanCodecBase.gatherContents(BeanCodecBas
    e.java:295)
    at weblogic.xml.schema.binding.CodecBase.serializeFill(CodecBase.java:25
    3)
    at weblogic.xml.schema.binding.CodecBase.serialize(CodecBase.java:195)
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUti
    ls.java:184)loop
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUti
    ls.java:170)
    QueryItem {
    private Vector airItiners;
    public Vector getAirItiners() {
    return airItiners;
    public class AirItinerary implements Serializable{}
    QueryItem is my return class. The return result will include sub class AirItinerary
    in QueryItem's Vector. I notice servicegen will only generate stub and web.xml
    for QueryItem.
    I get above error, when the result return to client. How to generate necessary
    sub-class inside a vector variable of Super class?
    Stephen

    Hi Stephen,
    write my own ser/deser? Any other quick way?Our excellent support group ([email protected]) may be able to help with
    an alternative solution. If you could create a small reproducer, then
    this will help them with a clear picture of your goal.
    One more problem, wls deloy my WSBE.ear as a war correctly. But error show noDouble check the console log for any messages. Also try:
    http://[host]:[port]/[contextURI]/[serviceURI]
    See: http://edocs.bea.com/wls/docs70/webserv/client.html#1051033 and
    also check the console to verify the app is or is not deployed. See:
    http://edocs.bea.com/wls/docs70/programming/deploying.html
    HTHs,
    Bruce
    Stephen Zeng wrote:
    >
    Hi Bruce:
    Our company use wsl7.0. We are not able to update to wls8 in this project. Do
    I have to
    write my own ser/deser? Any other quick way?
    sub class variable:
    public class AirItinerary implements Serializable{
    private String air;
    private Vector flightItem; //sub class of AirItineray
    One more problem, wls deloy my WSBE.ear as a war correctly. But error show no
    deloyment found. web-services.xml has been generated by servicegen under web-inf
    path. Thanks Bruce.
    Stephen
    Bruce Stephens <[email protected]> wrote:
    Hi Stephen,
    The java.util.vector should be converted to a SOAP Array, see:
    http://edocs.bea.com/wls/docs81/webserv/assemble.html#1060696 however
    the issue of the sub-class is most likely the problem. Can you simplify
    the data types? You may just have to write your own ser/deser, see:
    http://edocs.bea.com/wls/docs81/webserv/customdata.html#1060764
    This is with WLS 8.1, right?
    Thanks,
    Bruce
    Stephen Zeng wrote:
    java.lang.NoSuchMethodError
    at com.netsboss.WSBE.model.QueryItemCodec.typedInvokeGetter(QueryItemCod
    ec.java:87)
    at com.netsboss.WSBE.model.QueryItemCodec.invokeGetter(QueryItemCodec.ja
    va:56)
    at weblogic.xml.schema.binding.BeanCodecBase.gatherContents(BeanCodecBas
    e.java:295)
    at weblogic.xml.schema.binding.CodecBase.serializeFill(CodecBase.java:25
    3)
    at weblogic.xml.schema.binding.CodecBase.serialize(CodecBase.java:195)
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUti
    ls.java:184)loop
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUti
    ls.java:170)
    QueryItem {
    private Vector airItiners;
    public Vector getAirItiners() {
    return airItiners;
    public class AirItinerary implements Serializable{}
    QueryItem is my return class. The return result will include sub classAirItinerary
    in QueryItem's Vector. I notice servicegen will only generate stuband web.xml
    for QueryItem.
    I get above error, when the result return to client. How to generatenecessary
    sub-class inside a vector variable of Super class?
    Stephen

  • Display elements inside a vector

    How do I display the elements inside a vector and place it inside a TextArea in a JFrame?
    //start of Itm class
    public class Itm
         private String name;
         private int qty;
         private double price;
         public int SetQty (int nQty)
              qty = 0;
              if (nQty>0)
                   qty = nQty ;
              return qty;
         public String SetName (String strName)
              name = "";
              name = strName;
              return name;
         public double SetPrice (String name)
              if (name == "6pcs. Chckn McNggts")
                   price = 57;
              else if (name == "HB")
                   price = 25;
              else if (name == "Big Mac Meal")
                   price = 115;
              else if (name == "CHB Meal")
                   price = 115;
              else if (name == "RICE")
                   price = 11;
              else if (name == "1pc. Chicken Mcdo w/rice")
                   price = 57;
              else if (name == "CHB")
                   price = 35;
              else if (name == "1pc. Chicken w/Sphtti")
                   price = 90;
              else if (name == "BMD Meal")
                   price = 50;
              else if (name == "GRAVY")
                   price = 8;
              else if (name == "Mc Spghtti")
                   price = 35;
              else if (name == "DCHB")
                   price = 69;
              else if (name == "1pc. Chickn Mcdo Happy Ml")
                   price = 92;
              else if (name == "Mc Spghtti Happy Ml")
                   price = 76;
              else if (name == "X-SAUCE")
                   price = 8;
              else if (name == "Mc Rice Brgr Beef Sprme")
                   price = 75;
              else if (name == "Qrtr Pounder w/cheese")
                   price = 85;
              else if (name == "Mc Flurry")
                   price = 30;
              else if (name == "Sundae Cup")
                   price = 25;
              else if (name == "X-MAYO")
                   price = 8;
              else if (name == "Mc Rice Brgr Chckn Sprme")
                   price = 85;
              else if (name == "Big Mac")
                   price = 85;
              else if (name == "PIE")
                   price = 20;
              else if (name == "Sundae Cone - Vanilla")
                   price = 12;
              else if (name == "ICE MIX")
                   price = 25;
              else if (name == "Crispy Chicken Fillet")
                   price = 35;
              else if (name == "Reg Fries")
                   price = 25;
              else if (name == "Mc Float")
                   price = 25;
              else if (name == "Mc Float w/LFries")
                   price = 55;
              else if (name == "Ornge Juice")
                   price = 26;
              else if (name == "Brgr Mcdo")
                   price = 25;
              else if (name == "Lrge Fries")
                   price = 36;
              else if (name == "Softdrink")
                   price = 19;
              else if (name == "Icd Tea")
                   price = 26;
              else if (name == "Coffee")
                   price = 27;
              return price;
    //end of Itm class
    //start of Receipt class
    import java.util.*;
    public class Receipt
         Vector vReceipt = new Vector();
         Itm i = new Itm();
         public void addItem (Itm i)
              vReceipt.addElement(i);
    //end of Receipt class

    http://forum.java.sun.com/thread.jspa?threadID=5225026&tstart=0
    Thanks for double posting butthole!
    NO HELP FOR YOU

  • Class inside vector?

    how can i put a class with 3 attributes inside a vector?

    I guess you didnt read the previous post ;).
    1. create an object for your class
    2. create a vector
    3. add the created object into the vector.
    items itemObject = new items();
    Vector storageVector = new Vector();
    storageVector.add(itemObject);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Enlarged Smart Objects with vectors inside them appear as resized bitmaps

    In Photoshop CC for Mac I have...
    Created layers of vector art
    Combined them into a smart object
    Enlarged the smart object (both via "Transform" and "Image Size")
    Upon enlarging, the vector objects look the way an enlarged bitmap would (i.e. fuzzy, pixelated, terrible) instead of crisp and clean as a vector should look. I've double- and triple-checked to make sure all layers have remained vector after resizing and they have.
    This is a terrible inconvenience for anyone that works heavily with vector smart objects and resizes them. I use this workflow on a daily basis to make adapting interface elements for various screen resolutions easier, without it I am beyond screwed.
    If anyone knows a workaround (or if this requires a setting that I haven't found to be changed) please let me know.
    Screenshot proof below:

    Read this thread -link http://forums.adobe.com/message/3498406#3498406
    you may want to read it from the beginning.
    Basically while a smart object layer embedded object may contain  vector graphics.  Photoshop renders a composite for the embedded object and uses the resulting rendered pixels for the smart object layers pixels.  When you transform a smart object layer your transforming those pixels like raster layer using your Photoshop preference interpolation preference..  If you want to resize the vector graphics contained in the embedded object you must open the embedded object into the approbate application and resize the embedded object using vector tools. After you commit the resize. Photoshop will update the embedded object and the layers pixel will be the composite rendered for the updated resized embedded object.

  • How to place image and crop to fit inside vector shape

    I'm trying to place an image on top of a vector shape and then i want to trim the edges of the image so it takes on that shape (essentially filling the shape with the image)
    I'm also trying to do this with two layers of vector shapes, i want to fit one within the other and not have any over hang.. the top or "filling shape" is an array of hexagons (making a honeycomb like structure) i want it to fit within the underlying oval (lime green one) shape.  here's a link if you want to see what i'm doing.. its the one on the right
    www.oregonstate.edu/~pearsoan/images/achieve3.ai
    How do you do this?

    Blue,
    Put the shaping (vector) path on top of the image, select both, and Object>Clipping Mask>Make.
    I cannot open the file to see what there is to see, and I have to leave in a moment.
    If you upload an image, using the Camera icon, all helpers can see it here in the thread.

  • Vector Smart Object inside another smart object losing quality after scale

    Hi,
    I have 6 icons created on Illustrator and imported as vector smart objects.
    Then, I select all 6 and create another Smart Object from then.
    If I scale this smart object now, it will loose it´s quality, as if the icons were raster in the first place.
    This was not what happend in in PS CS5.
    It´s a bug or new "feature"?
    Rodrigo C.

    You need to realize that Photoshop renders pixels for the embedded object  then when you scale the smart object layer it scale like and raster layer through interpolation not scaled with vector graphics. Its the way smart object layers work. Hers is a very old thread on the subject
    smart objects pixelized | Adobe Community

  • Vector inside vector

    Hello,
    I am fetching data from the datatabse, then fetching each column for one row store in a column vector then storing that element of vector into another vector which will contains rows. now when I use removeAllElements() or any of the remove methods on columns vector. Rows vector also gets blank data.
    Can anyone help me out how does vector internally works. Or what happened when I store vector object in vector.
    Does it store the reference of the contained vector.
    Plz plz help me out as soon as possible.

    Hi deepmh,
    Yes, if you call removeAllElements() on the column Vector it removes all those references to the row Vectors. Since you no longer have references to the row Vectors, all that data is lost to you.
    If you still want to hang onto a row Vector, you have to assign its reference to something else to save it. - MOD

Maybe you are looking for

  • Mime-type

    I have set <mime-mapping> <extension>xml</extension> <mime-type>text/xml</mime-type> </mime-mapping> in the file .\jakarta-tomcat-5.5.7\conf\web.xml. The aim is that the field 'contet-type="text/xml"' come inside the HTTP 200 OK reply along with the

  • How to install jboss

    hi iam new for the jboss application server.can you please any one give some guidence regarding on jboss application server.how an i install and how can i deploy servlet program.

  • How do I upgrade free apps in iTunes 10.0.3

    My iTunes (upgraded last night), shows 5 apps to be updated - but the button to update them is missing?   How do I upgrade them?

  • Display an exception on one keyfigure based on the value of another key fig

    Hello all, How to run a exception based on some condition i.e i want to highlight the sales(key figure) which r less than the  average sales.. where sales and average sales r keyfigures... i also created a cal key fig which has has value 1 if sale >

  • Cannot open htm files in Firefox

    Running Firefox 16.0.1 under Win7. I am not sure when this problem started. In earlier versions of Firefox, this was not an issue. I can open saved htm files in IE, but not in Firefox. Any help would be appreciated.