Use of "in(vector)"

Hello,
Can some body please advise me how to achieve the following?
SELECT * FROM TEST
WHERE (T1,T2) IN
('912','703904'),
('912','720562'),
('975','903735'),
('880','060484'),
('880','080062'),
('880','090914'));
I am using toplink 4.6.0.
I know we can use "in(vector)".
But I don't know how to do when we have two columns.
Thanks in advance

hey, it's me again..
I am trying to provide some more information on my problem with calling the min() function with variables.
the lines within the mathscript node look like the following (signal and count are inputs to this node):
if count == 0
   D_r = signal
end
if count == 1
   D_g = signal
end
if count ==2
   D_b = signal
end
vector = [D_r D_g D_b];
colour = min(vector);
see also the VI attached at the bottom.
but this last line will be answered by the already mentioned error message..
it seems like the mathscript node cannot treat variables..
still, I hope somebody has the solution to this problem ready..!
greets,
matthias
Attachments:
LDR_read_computeCOLOUR_180509_as_subVI_of_LEDLDRcombo_TIMED.vi ‏410 KB

Similar Messages

  • Exporting to PDF - How Can I Get A Small File Size When Using Lots of Vector Art?

    I am trying to create a small PDF file for e-book distribution purposes. My Indesign pages contain a variety of photographs, vector icons and vector maps.
    A publisher in Britain who does similar books on a Mac using Creative Suite was able to create a 22-page document very similar to mine (similar icons, graphics, density, etc) that is only 2.84 mb, a small fraction of the file size that I'm getting! I've included a sample page of his below, which is a low-res jpeg, but on the original PDF all of the text and images (except the jpeg cliff background) are super sharp - they look like vectors when you zoom in. I've also included screenshots of his PDF export settings.
    I don't know if he's exporting directly out of Indesign, but my best guess is that he is.
    My vector-based icons, numbers and maps are bloating my PDFs considerably. When I remove them, the Indesign and exported PDF file sizes drop dramatically. For the life of me, I can't figure out how he got such small PDF files sizes using so much vector art! The PDF graphic compression settings don't seem to include any options for vector art.
    My vector art graphics (numbering, icons, maps) are all saved as Illustrator AI files and then placed in Indesign as linked graphics. My best guess as to why I can't achieve smaller PDF files is I'm either doing something wrong with the vector graphics themselves or handling/exporting them improperly out of Indesign.
    I am using CS4 for PC and am on a Dell Machine running Windows 7.

    I am trying to create a small PDF file for e-book distribution purposes. My Indesign pages contain a variety of photographs, vector icons and vector maps.
    A publisher in Britain who does similar books on a Mac using Creative Suite was able to create a 22-page document very similar to mine (similar icons, graphics, density, etc) that is only 2.84 mb, a small fraction of the file size that I'm getting! I've included a sample page of his below, which is a low-res jpeg, but on the original PDF all of the text and images (except the jpeg cliff background) are super sharp - they look like vectors when you zoom in. I've also included screenshots of his PDF export settings.
    I don't know if he's exporting directly out of Indesign, but my best guess is that he is.
    My vector-based icons, numbers and maps are bloating my PDFs considerably. When I remove them, the Indesign and exported PDF file sizes drop dramatically. For the life of me, I can't figure out how he got such small PDF files sizes using so much vector art! The PDF graphic compression settings don't seem to include any options for vector art.
    My vector art graphics (numbering, icons, maps) are all saved as Illustrator AI files and then placed in Indesign as linked graphics. My best guess as to why I can't achieve smaller PDF files is I'm either doing something wrong with the vector graphics themselves or handling/exporting them improperly out of Indesign.
    I am using CS4 for PC and am on a Dell Machine running Windows 7.

  • How to Use the Scalable Vector Graphics API (JSR 226)

    im doin an Application with Maps and locations...
    i need 2 use the Scalable Vector Graphics API (JSR 226)..
    can anyone plz guide me to get it and use the API.. Im using netBeans 5.0
    it will be great help :)
    Regards
    Muhammedh aka MNM

    Thanks Rohan :)
    i did read some stuff from the URLs u gav me :)
    and I manage 2 solve the prob i had :) (Thank God)
    1. downloaded latest version of netBeans (5.5)
    2. Java SDK 6 :D...
    3. the key thing: Wireless tool kit for CLDC 2.5 Beta
    now when u create a project make sure u set the above given tool kit :)
    when u set it.. u get an option 2 select the APIs frm a List.. Check on SVG API :)...
    Other APIs Such as,
    * wireless Messaging API
    * Location API
    and many more...
    Cheers 2 Every1 :)
    regards
    Muhammedh

  • Should we use ArrayList or Vector?

    Should we use ArrayList or Vector in web programming environment?
    thanks,

    I used to use ArrayList everywhere since it was a newer class and recommended in books, but use Vector now because it is used in several key environments: Java 1 (Web browsers), Swing and J2ME. In Java2, Vector was retrofitted to use the Collections framework, so Vector implements List.
    Anyway, you should probably deal with only the List interface anyway so whichever you decide will be localized. That way, if Sun suddenly stops supporting Vector, you will only need to make a change in one place.
    List mylist = new Vector();

  • Error while using Enumeration and Vectors

    Hi all,
    I am new bee in java i am using enumeration and vectors in my JSP page,
    i want to get the values from JSP page using enumeration and store then in Vector, below is the code, its giving errors saying ArrayIndexoutofException
    pls help, thanx in advance.
              while ( enum.hasMoreElements() )
              String enumString = (String)enum.nextElement();
              String[] enumValue =request.getParameterValues(enumString);
              for(int n=0;n<=enumValue.length;n++)
              tempbean.dbRows.add(enumValue[n]);     //tempbean.dbRows is a vector,
    if I seperate the For block out of While loop then im getting cannot resolve enum variable, bcoz its declared in while loop, I cannot declare it out side of while loop because I dont know the perfect size of the array and it will change dynamically.
    pls help

    Thankyou ,
    It worked out,
    Thank you very much.

  • Need right value to Load/Read Velocity Using Input/Return Vectors

    I have a servo motor with a encoder feedback of ( 4,000 counts per revolution ), maximum velocity of 6,000 rpm ( 100 rps ). I need to create 3 moving profiles with stroke time of 0.25 mm/sec, 1.0 mm/sec, and 25 mm/sec. I would like to use either Load Velocity VI or Load Velocity in RPM VI whichever is easy to set velocity, distance, and read position of my axis. More, I would like to be able to use onboard variables to set distance, velocity, and read position of the axis using input/return vectors, but I don't know how to set the right values. Do I need a conversion or multiplier number to get the right value?
    Any help would be greatly appreciated.
    Carlos D' Garcia.

    Carols –
    There is a simple vi on how to do vector moves at the following link (I also attached the file below):
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3DF9956A4E034080020E74861&p_node=DZ52480&p_source=External
    To have your axes move at different rates, you will have to replace the single ‘Load Velocity in RPM.vi’ that is wired to the Configure Vector Space.flx with three separate Load Velocity RPM.vi’s each with an axis constant (or control) wired to their axis input and the max velocity you want. This way, you will set the maximum velocity for each axis rather than all three at once.
    Best of luck with your project! Let me know if you have further questions with this.
    Marc C
    National Instruments
    Applications Engineer
    Attachments:
    Three-Axis_Vector_Move_with_Position_Monitor.zip ‏29 KB

  • Is there any way of  using arrays or vectors in JavaScript

    In my JSP page when ever a value in the text field changes i have to store that value before submitting a form. When ever the value in the text field changes i have to use "OnChange" option but i have to store all these values in an array or vector. Is there any other way of doing this. I am using webwork. Can any one help me!!!!!!

    JavaScript arrays are dynamic. You can add new values to the array and the array will grow in size.
    //a is an array of size zero
    var a = new Array();
    a[0] = "something";
    a[1] = "else";
    a[a.length] = "Adding another String at the end of my array";But here's something to think about. If your web site absolutely needs JavaScript, what happens to your site when the user decides to disable JavaScript in his browser....?
    I only use JavaScript to validate the user's input data, but I revalidate server-side in case JavaScript was disabled.

  • Should I use the short vector types for C++ AMP?

    Hello, is there any performance reason to use short vector types (as outlined in http://blogs.msdn.com/b/nativeconcurrency/archive/2012/04/03/short-vector-types-in-c-amp.aspx)
    in my C++ AMP kernels that will be confined to execution only on the GPU? Or is this simply to clean up the syntax a little?

    Hello LKeene.
    This would depend on the GPU architectures that you are running on. For example, older AMD hardware (pre-GCN i.e. 5xxx and 6xxx series) was VLIW at the ALU level, so it might have benefited from the explicit vector usage as the compiler wouldn't have had
    to work as hard to find elements to pack. That being said, more modern hardware would not directly benefit. If you think that the syntax ends up being cleaner, go for it (that's still a win!). I hope this helps. Cheers!

  • Use ArrayList vs Vector

    I'm writing an application that accept multiple connections.
    To check the connections I have a thread that check these connections if they are in use, i iterate over these connections and if they are not used for a periode of time, i close this connection and remove them from my list and iterate further.
    If i use a Vector to collect the connections, everything goes fine, but if i use a Arraylist, i get a concurrentmodificationexception, i now, this is normal, because the failfast of the iterator, so, i used the synchronize method of collections, but i got the same exception,
    any suggestions to make ik work with an ArrayList.

    If i can make it work with a list i'me happy, i will try it with a linked list, thx
    Heres the code of the methode
    public void run() {
    while (true) {
    try {
         Enumeration enum = null;
         sleep(frequency);
         long currTime = System.currentTimeMillis();
         enum = TimeoutInputStream.instanceList.elements();
         while (enum.hasMoreElements()) {
    TimeoutInputStream stream =
         (TimeoutInputStream) (enum.nextElement());
    //ITERATOR FAILS HERE
         long lastActive = stream.getLastActive();                    System.out.println(".");
         if (lastActive == 0) {
              stream.setLastActive(currTime);
         } else if ((currTime - lastActive) > timeout) {
              stream.abort();
    //HERE DO I REMOVE THE CONNECTION OUT OF THE LIST
              System.out.println("Timeout: input stream aborted");
         } catch (InterruptedException e) {
              System.out.println(e);

  • SampleLinear doesn't work when scaling outCoord using ByteArray or Vector. Number

    Hi,
    I think I've found a bug in Pixel Bender that's so far been missed.
    If you want to upsample a buffer using a ShaderJob and ByteArray/Vector.<Number> it doesn't work with sampleLinear, only sampleNearest.  Using sampleLinear it returns a buffer with mostly black pixels but with every 2nd pixel (for upsampling to a double sized buffer) written to.  So basically it looks like it's upsampling but only writing to some of the target pixels...
    Btw, I'm talking about in Flash here.   And I need to use ByteArray/Vector.<Number> instead of BitmapData as I need to process 32-bit data.
    Strangely it works in the PB toolkit in all of the modes (GPU, CPU, Flash).
    Am I doing something wrong or is this a known issue?
    Here's my sample code:
    package 
              import flash.display.Bitmap;
              import flash.display.BitmapData;
              import flash.display.Shader;
              import flash.display.ShaderJob;
              import flash.display.ShaderPrecision;
              import flash.display.Sprite;
              import flash.display.StageQuality;
              import flash.geom.Vector3D;
              import flash.utils.ByteArray;
              import flash.utils.Endian;
              import flash.utils.Timer;
              public class Test_Upscale extends Sprite
                        [Embed ( source = "../data/embed/pixelbender/bilinearresample.pbj", mimeType = "application/octet-stream" ) ]
                        private var BilinearScalingKernel:Class;
                        public function Test_Upscale()
                                  const srcWidth:int = 256;
                                  const srcHeight:int = 256;
                                  const dstWidth:int = 256;
                                  const dstHeight:int = 256;
                                  this.stage.quality = StageQuality.BEST;
                                  // Create noise input buffer
                                  var input:ByteArray = new ByteArray();
                                  input.endian = Endian.LITTLE_ENDIAN;
                                  input.length = srcWidth * srcHeight * 4 * 4;
                                  for (var i:int = 0; i < srcWidth*srcHeight; i++)
                                            var val:int = Math.random() * 255.0;
                                            input.writeFloat(val);
                                            input.writeFloat(val);
                                            input.writeFloat(val);
                                            input.writeFloat(255.0);
                                  input.position = 0;
                                  // Create output buffer
                                  var output:ByteArray = new ByteArray();
                                  output.endian = Endian.LITTLE_ENDIAN;
                                  output.length = dstWidth * dstHeight * 4 * 4;
                                  // Resample
                                  Resample(input, srcWidth, srcHeight, dstWidth, dstHeight, output);
                                  // Display as a bitmap
                                  this.addChild(new Bitmap(ToBitmap(dstWidth, dstHeight, output) ));
                        private static function ToBitmap(width:int, height:int, data:ByteArray):BitmapData
                                  data.position = 0;
                                  var bmp:BitmapData = new BitmapData(width, height, false);
                                  var idx:int = 0;
                                  for (var j:int = 0; j < height; j++)
                                            for (var i:int = 0; i < width; i++)
                                                      var r:int = data.readFloat() as int;
                                                      var g:int = data.readFloat() as int;
                                                      var b:int = data.readFloat() as int;
                                                      data.readFloat();
                                                      var c:int = r + (g << 8) + (b << 16);
                                                      bmp.setPixel(i, j, c);
                                                      idx++;
                                  return bmp;
                        public function Resample(src:ByteArray, srcWidth:int, srcHeight:int, dstWidth:int, dstHeight:int, dst:ByteArray):void
                                  // create and configure a Shader object
                                  var shader:Shader = new Shader();
                                  shader.precisionHint =ShaderPrecision.FULL;
                                  shader.byteCode = new BilinearScalingKernel();
                                  shader.data.src.input = src;
                                  shader.data.src.width = srcWidth;
                                  shader.data.src.height = srcHeight;
                                  shader.data.scaley.value = [0.5];
                                  var job:ShaderJob = new ShaderJob(shader, dst, dstWidth, dstHeight);
                                  job.start(true); // true flag runs the job synchronously.
    <languageVersion : 1.0;>
    kernel BilinearResample
    <   namespace : "com.test.pixelbender";
        vendor : "me";
        version : 1;
        description : "bilinear";
    >
        input image4 src;
        output pixel4 dst;
        parameter float scaley;
        void
        evaluatePixel()
            dst = sampleLinear(src, outCoord() * float2(scaley, scaley)); // bilinear scaling

    My bad...
    PIxel bender is fine, the bug was in my code that converts the floats back to a BitmapData
    It seems that
        var r:int = data.readFloat() as int;
    does something strange.. If I just remove the "as int" it works fine...  still not sure why though
    -Andrew

  • Regular Expressions + using them in Vector analysis

    Hello,
    I would be very glad for any hint concerning this problem:
    Consider this ilustrational code sample
    import java.util.regex.*;
    Vector sequence = new Vector();
            sequence.add("-");
            sequence.add("-");
            sequence.add("A");
            sequence.add("-");
            sequence.add("B");I want to find the first occurence of any alphabetical character ...I thought I can do it like this:
    int index = sequence.indexOf("\\w");or from the other point of view like this:
    int index = sequence.indexOf("[^-]");Unfortunately none of these are working. Do you know why and how to fix this? There are supposed to be only alphabetical characters and "-" character...
    thanks a lot
    adam

    mAdam wrote:
    well, the code I posted above should suit only as an illustration of my problem.
    ActualIy I have a bunch of those sequences in an Arraylist...it can be from 5 - 100 sequences(vectors) and I need to use some methods which are available only for Collections (frequency(), insertElementAt()...etc.). I am not a proffesional programmer so I do hope that I am using it correctly instead of "simple" String[][] BunchOfSequences = {seq1,seq2,...}I am not aware of any frequency() or insertElementAt() methods in one of Java's collection classes.
    Is it possible to use regular expressions to find a first occurence of a "a-z"(or "A-Z"..it doesnt matter) in a vector then? Or I just need to find it in a "for loop"?
    thx
    adamRegexes only work on Strings, not on collections holding Strings. So yes, you will need to use a for statement (or similar).
    List<String> list = ...
    for(String s : list) {
      if(s.matches("\\w")) {
    }

  • Optimizing Flash graphics - better to use filters or vectors?

    Hi,
    I'm trying to lighten the load on the users' machine as much as possible. Which requires less resources: using Flash filters for Drop Shadow/Glow or creating vector shapes for the shadow/glow with the Modify > Shape > Soften Fill Edges command?
    Thanks!!

    This was what I thought, but all the cacheAsBitmap stuff I've been reading about mobile development got
    me wondering. Thanks!

  • How to use lists or vectors and things?

    Hello !
    I started to code with java about year ago and the first jdk that i used was 1.5.0. Since 1.5.0, generics have been supported and I think that linkedlists, arraylists and whatever have been made differently. I can't use these generics in my mobile applications so I don't how to use vectors and stacks etc, different way in my applications.
    When I used (for instance) arrayists with jdk 1.5.0 or 6, I did it like this:
    ArrayList <AL> al = new ArrayList <AL>();
    void something(){
    for(AL a : al){
    //do something
    But how do I do these with mobile things, and whats the most similar thing compared to linkedlist and arraylist, vector? I really don't know how to add and remove things with these. If someone can point a good tutorial or thread, I would really appreciate that.
    Edited by: RandomNero, for a third time in a row, on Dec 13, 2007 1:42 PM

    Hello,
    there's no typed vectors on J2ME,
    please check out this link : http://java.sun.com/javame/reference/apis/jsr118/java/util/Vector.html
    to know more about J2ME vectors.

  • Using complex numbers/vectors

    I am trying to use the CNiMath::FFT(CNiComplexReal64 &x) function. I don't know how to set up the CNiComplexReal64 vector - I have no information on how to format the real and imaginary parts. Any easy example would be sufficient to get going on it. I have a vector of my real values and a vector of imaginary values if that can somehow be converted to the CNiComplexReal64 type. Thanks.

    Hello
    Check out the fft example that is installed with Measurement Studio, you can find it under ..\MeasurementStudio\VC\Examples\Analysis\Fft.
    The CNiMath::FFT has 2 overloads
    static MathError FFT(
    CNiComplexReal64Vector& x);
    and
    static MathError FFT(
    CNiReal64Vector& xReal,
    CNiReal64Vector& xImag);
    You can use the second overload, since you already have the data in that form. Check out the documentation for the CNiReal64Vector for more informtion on its available constructors and properties.
    Thanks
    Bilal Durrani
    NI
    Bilal Durrani
    NI

  • Using Classes within Vector

    ok,
    I writing a bank program where a user types in a string which is then broken into tokens. The tokens are separated using .nextToken( ) and the first token is used to determine what command the user wants to perform.
    My problem is that I am trying to place a class that Ive created within the vector and I cant seem to be able to get the tokens into the right place or retrieve them when they are needed.
    Here is what I have so far, ps I am very new to java.
    Project3Functions func = new Project3Functions();
    Vector vect = new Vector();
    do
    String firstLine = func.getLineInput();
    StringTokenizer tok = new StringTokenizer(firstLine," ");
    String hold = tok.nextToken();
    if(hold.equals("newAccount"))
    int index = Integer.parseInt(tok.nextToken());
    vect.setSize(index);
    vect.add(index, new Account());
    vect.add(index, Account.firstname = tok.nextToken());
    vect.add(index, Account.lastname = tok.nextToken());
    System.out.println("a new account was created");
    public class Account
    static String firstname = "";
    static String lastname = "";
    I am trying to create a new Account in the position <index> within the vector but I dont think Im referencing firstname and lastname correctly. Also how would I get firstname and lastname out of the vector to print them on the screen?
    Please someone help me.

    Don't use static fields in Account - that means that they are shared by all instances. Try something like:
    if(hold.equals("newAccount"))
      int index = Integer.parseInt(tok.nextToken());
      vect.setSize(index); // be careful! if index < size, then you will lose elements
      Account acct = new Account();
      acct.firstname = tok.nextToken();
      acct.lastname = tok.nextToken();
      vect.add(index, acct);
      System.out.println("a new account was created");
    public class Account
    String firstname = "";  //consider using get and set methods
    String lastname = "";
    }To get the data out,Account acct = (Account) vect.get(index);
    System.out.println("firstname = " + acct.firstname + ", lastname = " + acct.lastname);

Maybe you are looking for