I got two arrays how to search and match them???????

Hi experts plz help me out~
i got two arrays one contains students id
and the other one contains students id and marks
i have to compare these two, match id, and store value next to that students.
but how to match these two
one file:
213 John
356 Chris
421 Paul
the other file
356 55
421 67
213 69
and so on
i have to search both and matching IDs and store marks for them
i ve done string tokenizing part only.................
help me~~~~~~~~~~~~~

You can read each file into a Map and have the student ID as a key, then you can iterate over the student map keyset and find marks for each key.
Mike

Similar Messages

  • In Pages, how to search and replace text involving invisible characters?

    In Pages documents, how to search and replace text involving invisible characters, colors and font sizes—a task which is so easy in Mircosoft Word?

    I read that an older version of Pages allowed users to enter special characters in the search/replace fields, but this did not work for me.
    Here: http://www.macworld.com/article/1156533/pagesspecialcharacters.html
    I still am looking for a way to do this.

  • How to search and remove all exact words

    How to search and remove all exact words, I have tried adobe 11 Pro and I still need to know how to do this

    That works well for replace or deleting one at a time, I need to search the doc and delete all found and not change formatting
    Thank you for your help

  • I have two arrays of points, when i plot them there´s an intersection point, but this point doesn´t belong to any arrays...

    I have two arrays of points, when i plot them there´s an intersection point, but this point doesn´t belong to any arrays. I need to find the both value of this point, X and Y. I attached my problem in a very simple example. Thanks.
    Attachments:
    arrays_plot.vi ‏25 KB

    Although this doesn't directly answer your question , I've attached a VI that will hopefully give you a start and point you in the right direction. It generates a Boolean array that indicates between which indecies an intersection has taken place. Then, all you need to do is use triganometry to work out exactly what the intersection point is.
    Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
    Attachments:
    2x1D_Array_Intersections.vi ‏36 KB

  • Working with Chinese characters: How to paste and modify them as sentences; not as individual images?

    Working with Chinese characters: How to paste and modify them as sentences; not as individual images?
    From 2004, this is so far the most detailed answer I could find: http://en.allexperts.com/q/Adobe-Illustrator-1027/FONTS-display-problem-Adobe.htm, but is this really still the most up-to date solution?
    Is it possible at all to work with Chinese characters, if I don't have the Chinese version of Illustrator? (http://www.proz.com/forum/dtp_desktop_publishing/221125-chinese_in_indesign.html)

    Thanks for your reply.
    I'm using Version 17.1.0 (64-bit) - basically CS6.
    Operating system is Windows 8.1. Installed is the simplied Chinese language package.
    I have received the text in a Word document. It contains mixed characters, something like this:
    教授资料
    学术背景:
      博士;曾于波恩大学(Rheinische Friedrich-Wilhelms-Universität Bonn)、台湾师范大学、
    I have tried to paste it in the two following ways:
    1) to create a text box and paste the text. The result is that some of the characters are not showed correctly.
    2) Paste it directly without any preparation. This result into a single "image" or group of images. I can cancel modify each character one at a time, or I can dissolve the group, but the result is the same.

  • I have photoshop CC. I cannot open two files such as Tiffs and view them side by side. When I open the second file it overrides the first. Do I need to do something with preferences?

    I have photoshop CC. I cannot open two files such as Tiffs and view them side by side. When I open the second file it overrides the first. Do I need to do something with preferences?

    What happens when you try to use the clone stamp tool?
    It should work with the images side by side.
    You can setup photoshop cc to be like photoshop cs2 was on your other mac, by going to Photoshop>Preferences>Interface and unchecking
    Open Documents as Tabs and Enable Floating Document Window Docking
    And also going to Window and unchecking Application Frame

  • How does mix and match works in ECC6.0?

    How does mix and match works in ECC 6.0?
    Can some shared on this topic?
    Thanks in advance

    It;s a term used in Retail for combination of sales item eg buy 3 get 1 any other  @ xx price.

  • What are message tables and their role?How to create and access them ?

    hi,
    Can any body clarify me about What are messaging tables and their role(use) in DataBase?How to create and access them ?
    Thanks in advance
    Gopi

    If you have doubt that's you have an idea. So, explain your idea please, because I don't see what are "messaging tables".
    Did you say about Oracle database ? Apps ?...
    Nicolas.

  • How to Search and Array for multiple occurrences of a value

    Hi,
    I am trying to search an array of doubles for a number and report the index location(s) of a number. I.e. -allow for repetition. Search and report all index[i] where the number is contained in the array. For example I have
    double[] myInputArray = new double[5];
    double[] myInputArray = { 1, 2, 3, 3, 5 }I know how to search through the array ONCE and return the first occurrence of a number:
    public double GetIndexOf(double Number) {
        for (int i=0; i<myInputArray.length; i++) {
             if (myInputArray[i] == Number){
                  return(i);
        return(-1);
      }How do I expand this code to report multiple index[i] locations if the number reoccurs in the array like the number 3 does in my example array above?

    The way the Java libraries do this type of operation (String.indexOf(), etc) is to specify the starting index along with what you want to find.
    Changing your example slightly (notice how I fixed your naming and more importantly, your return type):
    public int indexOf(double num) {
       return indexOf(num, 0);
    public int indexOf(double num, int fromIndex) {
        for (int i=fromIndex; i<myInputArray.length; i++) {
             if (myInputArray[i] == num){
                  return(i);
        return(-1);
    //usage to get all indices:
    for ( int index = -1; (index = indexOf(num, index+1)) != -1; ) {
       System.out.println(index);
    }Note that due to how floating point numbers work, you may find doing this on doubles (or any other operation that uses == with double arguments) to give you unexpected results.

  • How to search and replace in an xml file using java

    Hi all,
    I am new to java and Xml Programming.
    I have to search and replace a value Suresh with some other name in the below xml file.
    Any help of code in java it is of great help,and its very urgent.
    I am using java swings for generating two text boxes and a button but i am not able to search in the xml file thru the values that are entered into these text boxes.
    Thanks in advance.
    **XML File*
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <student>
    <stud_name>Suresh</stud_name>
    <stud_age>40</stud_age>
    </student>Also i am using SAX Parser in the java program
    any help of code or any tutorials for sax parisng is very urgent please help me to resolve this problem
    Edited by: Karthik84 on Aug 19, 2008 1:45 AM
    Edited by: Karthik84 on Aug 19, 2008 3:15 AM

    Using XPath to locate the elements you are after is very easy.
    Try something like this:
    import java.io.File;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.xpath.XPath;
    import javax.xml.xpath.XPathConstants;
    import javax.xml.xpath.XPathFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.xml.sax.InputSource;
    public class BasicXMLReplaceWithDOM4J {
         static String inputFile = "C:/student.xml";
         static String outputFile = "C:/studentRenamed.xml";
         public static void main(String[] args) throws Exception {
              // Read xml and build a DOM document
              Document doc = DocumentBuilderFactory.newInstance()
                        .newDocumentBuilder().parse(new InputSource(inputFile));
              // Use XPath to find all nodes where student is named 'Suresh'
              XPath xpath = XPathFactory.newInstance().newXPath();
              NodeList nodes = (NodeList)xpath
                   .evaluate("//stud_name[text()='Suresh']", doc, XPathConstants.NODESET);
              // Rename these nodes
              for (int idx = 0; idx < nodes.getLength(); idx++) {
                   nodes.item(idx).setTextContent("Suresh-Renamed");
              // Write the DOM document to the file
              Transformer xformer = TransformerFactory.newInstance().newTransformer();
              xformer.transform(new DOMSource(doc), new StreamResult(new File(outputFile)));
    }- Roy

  • Two questions:  how do Skype and iChat compare for group video?  quality, reliability, cost, etc are important.  2) Is my MobileMe ID what I need to use in the window in making an iChat buddy?  It only says AIM above the window, online tutorial differs.

    Two questions:  1) How do Skype and iChat compare for group video?  Quality, reliability, cost, etc are important.  2) Is my MobileMe ID what I need to input in the window in making an iChat buddy?  It only says AIM above the window, online tutorial differs, saying MobileMe, AIM, GoogleTalk (Jabber) all work. Thnx

    Hi,
    IChat uses better Video Compression than Skype does.
    On a top flight Mac you can send a 640 X 480 pixel frame up to 30 frames a sec.
    Skype can't match this.
    iChat in Video is Peer to Peer. (you can actually Log out of the Buddy list)
    Skype seems to borrow something from everyone's bandwidth to make connections.
    What do you mean by Business account Tracking ?
    iChat Adds (or can add) the First Name, Last Name of your Buddies and create an Address Book Entry
    Whether you mark those cards connected with a  company is up to you.
    (I have heard of issues with earlier version of iChat and the Address Book that "saw" the Company Name as the part of the Name and linking several Screen Names to the one name
    Audio on a Mac using Skype tend to be the same as the streaming needs are less.
    However you have to rely on any PCs audio abilities from PCs which may not be to the same standard.
    Mac to PCs in iChat and AIM can be difficult though.  (It should work but it rarely as simple as Plug and go)
    Skype may suit your needs better on ocassions.
    9:11 PM      Thursday; May 5, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
    , Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • How to search and delete an email from the mailbox

    hi,
    have a hybrid scenario, exchange 2013 and office 365
    what command should I use to search and delete an email from the organization mailbox i.e. I do not want that email to be in any users inbox.
    I have tried this command but it does not work, it says search-mailbox is not recognized as the name of the command let.
    Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery 'Subject:"Download this file"' -DeleteContent
    kindly assist.
    Kind Regards, Khuzema R.

    Hi Khuzema
    This can be accomplished by search-mailbox command
    First you need to create a new role group
    To Create –  New-RoleGroup “Mailbox Import-Export Management” -Roles “Mailbox Import Export”
    Then add the user to the group
    To Add user – Add-RoleGroupMember “Mailbox Import-Export Management” -Member Administrator
    Search the mailbox
    get-mailbox -ResultSize unlimited -IgnoreDefaultScope | search-mailbox -SearchQuery ‘Subject:”virus infected”’ -LogOnly -TargetMailbox administrator -TargetFolder filter -LogLevel Full
    Now we need to run the below command to search the infected emails and delete all of them in the whole organization
    get-mailbox -ResultSize unlimited -IgnoreDefaultScope | search-mailbox -SearchQuery ‘Subject:”virus infected”’ -TargetMailbox administrator -TargetFolder filter -deletecontent -LogLevel Full
    Also you can do a message tracking with the subject and delete them
    Get-ExchangeServer | where {$_.isHubTransportServer -eq $true -or $_.isMailboxServer -eq $true} | Get-MessageTrackingLog -Messagesubject “Virus Infected” | Select-Object Timestamp,ServerHostname,ClientHostname,Source,EventId,Recipients
    | Sort-Object -Property Timestamp
    I have written a blog with regards to the same. You can always refer this which might mostly  help you in your scenario
    http://exchangequery.com/2014/10/16/steps-to-delete-circulated-suspicious-emails-with-search-mailbox/
    Thanks 
    Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com Thanks Sathish
    (MVP)

  • ADDING TWO FIELDS TO MASTERDATA 0MAT_PLANT AND MAKE THEM AS INFO-OBJECTS.

    Hi Bw Experts,
    I have a Problem , I.e. How to add Two filelds i.e. reorderpoint and maximum stock level in Standard data source 0MAT_PLANT_ATTR for Master data 0MAT_PLANT.
    If Extract structure doesn’t contain these fields then I Can go for Data source enchancement. It’s ok.
    But this Extract structure(BIW_MARC_S) is having these fields reorderpoint and Maximumstock level and not showing me in Data source 0MAT_PLANT_ATTR and  also  not showing me in Hide and selcetions, if it shows me in Hide (selected ) then I  can able to  change it. (By unselcet check box from Hide).
    These fields reorder point and maximum stock level should be maintianed as attributes of 0MAT_PLANT. (IN BW SIDE)
    Friends another Problem is in Bw side  my client want it should display as info-objects. Is it possible ?
    Because these attributes are key-figure attributes and K.F. attributes can’t be maintain as navigantional attributes.
    Any help would be really appreciated.
    Thanks in advance for your support.

    Hi vinod,
    My doubt is these fields already available in Extact structure biw_marc_s but not available in data source 0mat_plant_attr.
    I can go for data source enhancement when there is no fields availble in Extract structe right.
    but fieds reorder point (mabst) & maximum stock level (minbe) are available in Extract Structure.
    2) IN bw side i can create these  two infoobjects (reorder point and maximum stock level) as key figure infoobjects but they can't be maintained as navigatinal attributes to act as info object individually right.
    Please  help me out or Please pass through this message to your freinds .
    It's urgent Please.
    Thanks in advance,
    Kumar.

  • Searching and Matching - Difference between 'Match Pattern' and 'Match Geometric Pattern'?

    I was wondering if someone can explain to me the difference between  'Match Pattern' and 'Match Geometric Pattern' VIs? I'm really not sure which best to use for my application. I'm trying to search/match small spherical particles in a grey video in order to track their speed (I'm doing this after subtracting two subsequent frames to get rid of background motion artifacts).
    Which should I use?
    Thank you!
    Solved!
    Go to Solution.

    Hi TKassis,
    1.You may find from this link for the difference between these two,
    Pattern Match : http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_match_pattern_3/
    Geometric Match : http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_match_geometric_pattern/.
    2. I always prefer match pattern because of its execution speed, and incase of geometric pattern match it took lot of time to match your result. You may find in the attached figure for same image with these two algorithm execution time.
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney

  • How to search and replace a string in Excel Shape (textbox) using Powershell.

    I have been asked to write a PS script to search/replace a string when found in Excel Shapes when they are textboxes. I have seen lots of simplistic PS scripts and even I can do a "foreach" loop through all the Shapes on a Sheet and display the
    Name of each Shape. But I have not found a property or method to expose the actual text in a textbox let alone change it.
    I have seen vba script that does this as:  
    Set xWs = Application.ActiveWorkbook.Worksheets(I)
    For Each shp In xWs.Shapes
    xValue = shp.TextFrame.Characters.Text
    shp.TextFrame.Characters.Text = VBA.Replace(xValue, xFindStr, xReplace, 1)
    Next
    In Powershell, shp.TextFrame.Characters.Text is ignored and returns nothing.  It would be nice to know if this is possible in PS and if so, know how to do it and/or get an example to work from.  I would have thought that
    PS and VB would use the same Excel object model but apparently they do not.
    I am using Excel 14.0 and PS 3.
    Any suggestions would be appreciated,
    Michael

    This didn't work for me.  I have the shape object and it shows the textframe property:
    PS C:\> $shape | gm
       TypeName: System.__ComObject#{00024439-0000-0000-c000-000000000046}
    Name                       MemberType Definition
    Apply                      Method     void Apply ()
    CanvasCropBottom           Method     void CanvasCropBottom (float)
    SoftEdge                   Property   SoftEdgeFormat SoftEdge () {get}
    TextEffect                 Property   TextEffectFormat TextEffect () {get}
    TextFrame                  Property   TextFrame TextFrame () {get}
    TextFrame2                 Property   TextFrame2 TextFrame2 () {get}
    ThreeD                     Property   ThreeDFormat ThreeD () {get}
    But trying to access it gives an error:
    PS C:\> $shape.textframe | gm
    gm : You must specify an object for the Get-Member cmdlet.
    At line:1 char:20
    + $shape.textframe | gm
    +                    ~~
        + CategoryInfo          : CloseError: (:) [Get-Member], InvalidOperationException
        + FullyQualifiedErrorId : NoObjectInGetMember,Microsoft.PowerShell.Commands.GetMemberCommand
    PS C:\> $shape.TextFrame.Characters().text="hello"
    You cannot call a method on a null-valued expression.
    At line:1 char:1
    + $shape.TextFrame.Characters().text="hello"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull
    I hope this post has helped!

Maybe you are looking for

  • I am trying to buy Logic Pro 9 from the app store, but every time I try I get an error

    I just bought a brand new MacBook Pro 15" that runs OS X Lion and I am trying to download Logic Pro 9, but when I try to download it all I get is an error window that says "There was an error in the App Store. Please try again later. (100)"  I have t

  • This song cannot be made into a ringtone!

    I JUST purchased a song to use as a ringtone (even though I had this song IN intunes because I owned the CD. I downloaded it, and right clicked make ringtone and it says: This song cannot be made into a ringtone. XXXX song title can no longer be made

  • Problem with crude operations in master detail tables

    Hi, I have Master-Detail tables in my page and crud operations are there for both the tables. Create/delete/edit are working fine on the master table but i am facing the following problems for the detail table 1.delete operation is alway referring to

  • Error #16820 on update

    Hi, I'm trying to learn how to use the application updater framework. I'am starting from here: http://www.adobe.com/devnet/air/ajax/quickstart/update_framework.html I've changed urls in the src/config/update-config.xml, and when I click on the "check

  • How do I remove iTunes credit?

    I bought some US iTunes credit a few years back when I was visiting the USA and now have something like $0.38 left. I want to purchase extra iCloud storage but I need to change my store to the NZ store to do so. iTunes won't let me change store while