Problem using Category to split a large file

I want to split a large class file by putting methods used only internally into a separate source file. The original file is "Calculator.m"; the new file is "CalculatorP2.m" which has been added to the project. In the main file I have added the statement:
#import "CalculatorP2.m"
just ahead of "@implementation Calculator".
In "CalculatorP2.m I have placed the statements:
#import "Calculator.h"
@interface Calculator ( CalculatorP2 )
@end
@implementation Calculator ( CalculatorP2 )
ahead of the source code. The compiler is happy with this but the linker fails, saying:
/usr/bin/ld: multiple definitions of symbol .objccategory_name_CalculatorCalculatorP2
Any idea as to how to fix this? I am using XCode 2.4.1.

SecondViewControllerP2.h:
#import <UIKit/UIKit.h>
#import "SecondViewController.h"
@interface Secondviewcontroller(SecondviewcontrollerP2)
- (void)method1;
@end
SecondViewControllerP2.m:
#import "SecondViewControllerP2.h"
@implementation Secondviewcontroller(SecondviewcontrollerP2)
- (void)method1 {
NSLog(@"method1");
@end
SecondViewController.m:
#import "SecondViewController.h"
#import "SecondViewControllerP2.h"
@implementation Secondviewcontroller
@end

Similar Messages

  • File Splitting for Large File processing in XI using EOIO QoS.

    Hi
    I am currently working on a scenario to split a large file (700MB) using sender file adapter "Recordset Structure" property (eg; Row, 5000). As the files are split and mapped, they are, appended to a destination file. In an example scenario a file of 700MB comes in (say with 20000 records) the destination file should have 20000 records.
    To ensure no records are missed during the process through XI, EOIO, QoS is used. A trigger record is appended to the incoming file (trigger record structure is the same as the main payload recordset) using UNIX shellscript before it is read by the Sender file adapter.
    XPATH conditions are evaluated in the receiver determination to eighther append the record to the main destination file or create a trigger file with only the trigger record in it.
    Problem that we are faced is that the "Recordset Structure" (eg; Row, 5000) splits in the chunks of 5000 and when the remaining records of the main payload are less than 5000 (say 1300) those remaining 1300 lines get grouped up with the trigger record and written to the trigger file instead of the actual destination file.
    For the sake of this forum I have a listed a sample scenario xml file representing the inbound file with the last record wih duns = "9999" as the trigger record that will be used to mark the end of the file after splitting and appending.
    <?xml version="1.0" encoding="utf-8"?>
    <ns:File xmlns:ns="somenamespace">
    <Data>
         <Row>
              <Duns>"001001924"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001925"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001926"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001927"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001928"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"001001929"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
         <Row>
              <Duns>"9999"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Cage_Code>"3NQN1"</Cage_Code>
              <Extract_Code>"A"</Extract_Code>
         </Row>
    </Data>
    </ns:File>
    In the sender file adapter I have for test purpose changed the "Recordset structure" set as "Row,5" for this sample xml inbound file above.
    I have two XPATH expressions in the receiver determination to take the last record set with the Duns = "9999" and send it to the receiver (coominication channel) to create the trigger file.
    In my test case the first 5 records get appended to the correct destination file. But the last two records (6th and 7th record get sent to the receiver channel that is only supposed to take the trigger record (last record with Duns = "9999").
    Destination file: (This is were all the records with "Duns NE "9999") are supposed to get appended)
    <?xml version="1.0" encoding="UTF-8"?>
    <R3File>
         <R3Row>
              <Duns>"001001924"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
         <R3Row>
              <Duns>"001001925"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
         <R3Row>
              <Duns>"001001926"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</xtract_Code>
         </R3Row>
              <R3Row>
              <Duns>"001001927"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
              <R3Row>
              <Duns>"001001928"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Extract_Code>"A"</Extract_Code>
         </R3Row>
    </R3File>
    Trigger File:
    <?xml version="1.0" encoding="UTF-8"?>
    <R3File>
              <R3Row>
              <Duns>"001001929"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Ccr_Extract_Code>"A"</Ccr_Extract_Code>
         </R3Row>
              <R3Row>
              <Duns>"9999"</Duns>
              <Duns_Plus_4>""</Duns_Plus_4>
              <Ccr_Extract_Code>"A"</Ccr_Extract_Code>
         </R3Row>
    </R3File>
    I ve tested the XPATH condition in XML Spy and that works fine. My doubts are on the property "Recordset structure" set as "Row,5".
    Any suggestions on this will be very helpful.
    Thanks,
    Mujtaba

    Hi Debnilay,
    We do have 64 bit architecture and still we have the file processing problem. Currently we are splitting the file into smaller chuncks and processsing. But we want to process as a whole file.
    Thanks
    Steve

  • Problem using java String.split() method

    Hi all, I have a problem regarding the usage of java regular expressions. I want to use the String.split() method to tokenize a string of text. Now the problem is that the delimiter which is to be used is determined only at runtime and it can itself be a string, and may contain the characters like *, ?, + etc. which are treated as regular expression constructs.
    Is there a way to tell the regular expression that it should not treat certain characters as quantifiers but the whole string should be treated as a delimiter? I know one solution is to use the StringTokenizer class but it's a legacy class & its use is not recommended in Javadocs. So, does there exist a way to get the above functionality using regular expressions.
    Please do respond if anyone has any idea. Thanx
    Hamid

    public class StringSplit {
    public static void main(String args[]) throws Exception{
    new StringSplit().doit();
    public void doit() {
    String s3 = "Dear <TitleNo> ABC Letter Details";
    String[] temp = s3.split("<>");
    dump(temp);
    public void dump(String []s) {
    System.out.println("------------");
    for (int i = 0 ; i < s.length ; i++) {
    System.out.println(s);
    System.out.println("------------");
    Want to extract only string between <>
    for example to extract <TitleNo> only.
    any suggestions please ?

  • Split/join large files

    I have a need to split and eventually re-join a large file. Are there recommended utilities for doing this?
    Thanks,
    George E.

    Resolved. Found the answer in the archives. Stuffitt.

  • When using  Vikas' program to load large files  getting error

    Hello,
    I am using Vikas' program to load large data files: http://htmldb.oracle.com/pls/otn/f?p=38131:1
    This works fine, except when I click on the button to create table, then I get a "not found" error--
    failed to parse SQL query:
    ORA-00942: table or view does not exist
    What might cause this? I've checked grants and such and reviewed the code, but haven't figured it out...
    Thanks!

    Hello,
    I am using Vikas' program to load large data files: http://htmldb.oracle.com/pls/otn/f?p=38131:1
    This works fine, except when I click on the button to create table, then I get a "not found" error--
    failed to parse SQL query:
    ORA-00942: table or view does not exist
    What might cause this? I've checked grants and such and reviewed the code, but haven't figured it out...
    Thanks!

  • Major problems using Keynote 09 with Keynote 08 files

    Keynote 09 seems to have been let out into the wild a bit too early. I have encountered several major problems when using it on older KN08 files. From the Scroll bar in outline view, to almost every movie or sound file being corrupted and requiring a "reinsert," to an annoyingly common problem with images losing their formatting. It seems that the new file format in KN09 does not play well with KN08 (this was not the case with any of the previous version upgrades).
    I have contacted Apple and shared these problems with them. I have removed KN09 from all my machines and have reverted back to KN08. Hopefully a future patch will correct this file corruption problem

    I have contacted Apple and shared these problems with them. I have removed KN09 from all my machines and have reverted back to KN08. Hopefully a future patch will correct this file corruption problem
    Your presentations sound like they are much more involved and memory intensive than mine. I only have a couple with movies/sound and those are quite short. So far (knock on wood) I've not had any of your problems. However, as a matter of course I always create a backup file before starting to edit an old important file with a new program. Keep us posted.

  • Problem using a library with an EAR file (ServletNotFoundException)

    Hello
    I'm trying to use a library (J2EE library project) an associated it to an Enterprise Application Project.
    The application was built using the Spring MVC framework.
    When I did deploy I got the following warning:
    Apr 25, 2006 9:44:17 AM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] INFO:
    [004]Finished Deployment
    And when I try to run the application  I got the following error:
    404 Not Found
    The request cannot be processed.
    Details:   com.sap.engine.services.servlets_jsp.server.exceptions.ServletNotFoundException: Cannot load the requested servlet [data-entryLib/servlet/data-entry].  The ID of this error is
    Exception id: [00306E5DA8D2004E00000068000052550004124234F31271].
    The application run properly when I use the jars file in the WEB-INF/lib folder.
    I have been reading some recomendations in this forum, but nobody tell me how to solve this problem
    Thanks
    Adriana.

    Hi Rajesh
    Thanks for your answer.
    Yes, I deployed the .sda file, add the jars file in the archive server/provider.xml and I checked this: (Problem with EAR referencing a library DC)
    The type of reference that I gave in the EAR file was in the archive application-j2EE-engine.xml:
    <reference
        reference-type="hard">
        <reference-target
          provider-name="sap.com"
        target-type="library">LibreriaDataEntry</reference-target>
    </reference>
    <provider-name>sap.com</provider-name>
       <fail-over-enable
       mode="disable"/>
    Thanks
    Adriana

  • Problems using windows media player to transfer files to zen x

    All 9gs of my music is stored in windows media player music library.transferring it to zen xtra has caused many cds arriving at player with wrong content under different artists and some songs copied many times over. Is there a known conflict using windows player and zen xtra?I would use mediasource but my cds imported to ther interface with many not identified even thogh all my music was clearly labeled with artist, title and gnere in windows music library.Any help would be great. I cant get my 9gs of music into the zen without content mess u
    ps.
    thanks matt

    I, for one, am incredibly dissapointed in the portable file aspect of this player. i work in a PC store and we sell the Zen Touch , i also received one for christmas. At first i was very happy that i could also use it to carry my files to and from school but all my hopes were extinguished when i realized that the computers i would transfering to and from had to have the creative software installed. Obviously, Creative's target consumers are of the Student generation, so they must have known that we, as students , use computer labs in school. So why not add the firmware to override the creative software when transfering data files? What's written on the box and the sales pitch creative uses is extreamly misguided and alot of the buyers have come back to the store with complaints. They arn't happy, i'm not happy, creative should fix this porblem, and yes it is a problem and not "part of the design".

  • I'm having problems using Firefox when opening up PDF files that are called from jsp.

    I'm trying to open my billing statement in pdf format. When I click on the link, Firefox 4 takes me to the dowload page and starts to download a readPDF.jsp file. How come Firefox is asking for that? When I use IE 7 I get no problems. Please advise on how to get Firefox to open jsp files automatically.

    I have same problem too

  • How to split a large file when disk space is limited

    I have a long (200 minutes) DV clip which uses up most [40 GB] of my external hard drive. The last 90 minutes of the clip is blank, and I need to delete the corresponding [18 GB] filespace to free-up space on my hard drive for editing.
    How do I delete a portion of the file without having the 22 GB of free space Quicktime seems to need to temporarily store the new (smaller file).
    Thanks,
    David

    I modified the program as follow:
    ZipEntry entry = new ZipEntry(file.getName());
    entry.setTime(file.lastModified());
    zip.putNextEntry(entry);
    byte[] bytes=new byte[1024];
    int len;
    while ((len=in.read(bytes))>0) {
    zip.write(bytes,0,len);
    And now it is working. I can zip a file with 125MB size.
    Thank you for your help.
    Michelle

  • Processing/Splitting of large file

    Hi,
    Some time ago I did post some related question.
    Is it possible in file2file(RFC) scenario to send an XML - file containing 1000 records to XI and split it so that there will be 1000 single output-messages written to a network destination. All of them containing one record. As output it shall be written to File (or RFC)?
    Please let me know if you have some ideas.
    Thanks,
    Sebastian

    Hi Wojciech,
    thanks again for your help so far.
    Queue is okay.
    Source files:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://MyTutorial/SHeinz07" targetNamespace="http://MyTutorial/SHeinz07">
    <xsd:element name="MT_Werkteil" type="DT_Werkteil" />
    <xsd:complexType name="DT_Werkteil">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    13289f7070c111db8d5e00508b691bcc
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="Row" minOccurs="0" maxOccurs="unbounded">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    96d1db50592111dbc096cb2fc0a864a8
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Nummer" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    96d1db51592111db8ca0cb2fc0a864a8
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="Name" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    96d1db52592111db8741cb2fc0a864a8
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="Preis" type="xsd:integer">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    96d1db53592111db8dd6cb2fc0a864a8
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Target file:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://MyTutorial/SHeinz07" targetNamespace="http://MyTutorial/SHeinz07">
    <xsd:element name="MT_Werkteil_single" type="DT_Werkteil_single" />
    <xsd:complexType name="DT_Werkteil_single">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    13a6f73070c111dbc23600508b691bcc
    </xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
    <xsd:element name="Nummer" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    e53f2c90700d11dbadfdc229c0a864a8
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="Name" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    e53f2c91700d11dbb999c229c0a864a8
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    <xsd:element name="Preis" type="xsd:integer">
    <xsd:annotation>
    <xsd:appinfo source="http://sap.com/xi/TextID">
    e53f2c92700d11dbb2edc229c0a864a8
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    Currently my output in Mapping Test looks like that:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:MT_Werkteil_single xmlns:ns1="http://MyTutorial/SHeinz07">
             <Nummer>1000</Nummer>
             <Name>Schraube</Name>
             <Preis>12</Preis>
          </ns1:MT_Werkteil_single>
       </ns0:Message1>
    </ns0:Messages>
    Though I did some researches on contexts and splitbyvalue I am right now just guessing instead of understanding why there is no correct output.
    do you have any idea?
    Regards,
    Sebastian

  • Problem creating  ONE PDF from a large file

    Every few months we need to create a three or four foot square document that our printer ouputs for us and laminates. But each time I end up jumping through hoops to get them the PDF file from the Visio source file. Finally get it to work in the end but with each new job I start all over again. Very frustrating...
    The document size in Visio is set to 36x36 inches.
    When printing, In the Adobe PDF Settings tab I have:
    Default Settings I have created and saved a setting that has the page size set to 36x36.
    Under Adobe PDF Page Size I have that set to 36 by 36
    But after chewing on the file for a LONG time, I end up with a useless, 20 page file. What am I missing??
    Using:
    Visio 2010
    Acrobat X Pro 10.1.3
    Win 7/64

    Finally figured it out...
    Even though the page size in Visio and all Acrobat settings was set to 36x36 inches, there's yet another option in Visio for Print Setup which was left set to standard letter size. As a result, that overode all the other settings and Acrobat was misinformed as to what size paper was being used for ouput. Once i changed that size as well to 36x36, the PDF came out as I wanted on one page.

  • Splitting a Large File

    I record a 5 hour radio program that I like to listen to on my iPod. My previous recorder automatically split the program at pre-determined times. My Mac recording software is one big file. Is there an AppleScript way to split the track or add chapter bookmarks? It has to be easy since I will be doing this daily. Thanks.

    afernandes wrote:
    Thanks Michel,
    I will try this out.
    Do you know if this will create a new file(s) ?
    http://discussions.apple.com/thread.jspa?threadID=2460925&tstart=0
    What I want to do is to break up my 2 hours video into smaller chunks then burn the good chunks as raw footage ( AVI/MOV) onto backup data DVDs. Then export all the chunks into compresssed files (MPEG-4?) and save these on another data DVD.
    Avoid to compress. Save as quicktime movie.
    Michel Boissonneault

  • When I use Image Trace for a large file, it keeps deleting one corner of the file.

    I've tried several tracing options and it keeps happening. The image was created in Illustrator, but I need it all on one layer,
    so I took it into Photoshop.  Now back to Illustrator because the fabricator needs that format.  Reduced the image size, same problem.
    Does anyone have any ideas?

    without seeing the artwork i'm not sure how I would do it.
    I might try a script, Turn selected AI sublayers into top-level layers?
    or it may be as simple as selecting all and doing a pathfinder unite. but that may or may not cause big issues.
    but if it is just a hand full of shapes for a water jet to cut out then that may be a very simple way to fix your problem.

  • Using XI to FTP large files

    Hi Folks,
    I have a scenario in which I need to transfer a flat file to an external system. No mapping is required. We are not using BPM. I read Michael's comments on using Java proxies to transfer large files. I know that we can use standard Java IO APIs to copy the file over. However, I don't know how to implement this.
    In my scenario an SAP tranaction will create the file. I just need XI to pick it up and FTP it to another server. Can you point in the right direction as to how i should go about imlementing this?
    1. I assume i will still have to use file adapter to pick up the file.Right?
    2. Then, i use Java server proxy to FTP it to the target system?
    3. In order to generate the proxy i need a message interface. Should i use a dummy Message Interface as my inbound and outbound that points to a dummy message type?
    Can someone provide me a sample?
    Thanks,
    Birla

    Hi Nilesh,
    Thanks for the reply and the link. However, the blog doesn't provide solution to my problem. I was asking if XI can pick-up a large file (say 200MB) and FTP it to an external system without doing content conversion.
    I already read these blogs.
    FTP_TO_FTP
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    /people/shabarish.vijayakumar/blog/2006/04/03/xi-in-the-role-of-a-ftp
    These blogs suggest that i can use Java proxy to achieve better performance.
    I just don't know how to implement it.
    Any help would be much appreciated.
    Thanks,
    Birla.

Maybe you are looking for

  • How to split a parallell-page PDF into single-page PDF

    My situation: I have a few hundred pages of files I made quite a few years ago, optimized for "self-publishing" via the printer. I no longer have any source files (my own bad). These files have 2 pages next to each other in an A4 landscape PDF. I wou

  • How can I include a jsf page?

    I need to include a jsp page that contains jsf code, I try with: <c:import url="faces/include.jsp" var="prova" /> but the server response: javax.servlet.ServletException: Cannot find FacesContext There something that is wrong? Thank's Teo

  • Using N97 as a modem

    When i try to use my N97 as a modem for my laptop i wont connect unless i make a backup first. I doesn't matter what data i do a backup off but i have to do it to make the phone connect to the internet. Wierd but that's the way it is. Any ideas what

  • Info on Custom Profile in PI 7.1 EHP1

    Hi All Can anyone please provide any document or any link with information on Custom Profiles. Any kind of help will be really appreciated.

  • Can the iphone 4s have two different contact lists?

    Can two different contact lists be created on the iPhone 4S? Rgginc